Merge branch '0.7.x' of git@gitorious.org:laconica/dev into 0.7.x
This commit is contained in:
commit
533a463879
2
README
2
README
|
@ -1125,7 +1125,7 @@ default: nickname of a user account to automatically subscribe new
|
|||
service updates or announcements. Users are able to unsub
|
||||
if they want. Default is null; no auto subscribe.
|
||||
welcome: nickname of a user account that sends welcome messages to new
|
||||
users. Can be the same as 'subscribe' account, although on
|
||||
users. Can be the same as 'default' account, although on
|
||||
busy servers it may be a good idea to keep that one just for
|
||||
'urgent' messages. Default is null; no message.
|
||||
|
||||
|
|
|
@ -104,9 +104,9 @@ class FavoritedAction extends Action
|
|||
{
|
||||
parent::prepare($args);
|
||||
$this->page = ($this->arg('page')) ? ($this->arg('page')+0) : 1;
|
||||
|
||||
|
||||
common_set_returnto($this->selfUrl());
|
||||
|
||||
|
||||
return true;
|
||||
}
|
||||
|
||||
|
@ -143,13 +143,10 @@ class FavoritedAction extends Action
|
|||
$this->elementStart('div', 'instructions');
|
||||
$this->raw($output);
|
||||
$this->elementEnd('div');
|
||||
}
|
||||
|
||||
$favorite = new Fave;
|
||||
|
||||
if ($favorite->count()) {
|
||||
return;
|
||||
}
|
||||
|
||||
function showEmptyList()
|
||||
{
|
||||
$message = _('Favorite notices appear on this page but no one has favorited one yet.') . ' ';
|
||||
|
||||
if (common_logged_in()) {
|
||||
|
@ -217,6 +214,10 @@ class FavoritedAction extends Action
|
|||
|
||||
$cnt = $nl->show();
|
||||
|
||||
if ($cnt == 0) {
|
||||
$this->showEmptyList();
|
||||
}
|
||||
|
||||
$this->pagination($this->page > 1, $cnt > NOTICES_PER_PAGE,
|
||||
$this->page, 'favorited');
|
||||
}
|
||||
|
|
|
@ -107,6 +107,7 @@ class FeaturedAction extends Action
|
|||
|
||||
$featured_nicks = common_config('nickname', 'featured');
|
||||
|
||||
|
||||
if (count($featured_nicks) > 0) {
|
||||
|
||||
$quoted = array();
|
||||
|
@ -118,7 +119,7 @@ class FeaturedAction extends Action
|
|||
$user = new User;
|
||||
$user->whereAdd(sprintf('nickname IN (%s)', implode(',', $quoted)));
|
||||
$user->limit(($this->page - 1) * PROFILES_PER_PAGE, PROFILES_PER_PAGE + 1);
|
||||
$user->orderBy('user.nickname ASC');
|
||||
$user->orderBy(common_database_tablename('user') .'.nickname ASC');
|
||||
|
||||
$user->find();
|
||||
|
||||
|
@ -145,4 +146,4 @@ class FeaturedAction extends Action
|
|||
$this->page, 'featured');
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
@ -166,19 +166,8 @@ class PublicAction extends Action
|
|||
$nav->show();
|
||||
}
|
||||
|
||||
function showPageNotice()
|
||||
function showEmptyList()
|
||||
{
|
||||
$notice = new Notice;
|
||||
|
||||
if (!$notice) {
|
||||
$this->serverError(_('Could not retrieve public stream.'));
|
||||
return;
|
||||
}
|
||||
|
||||
if ($notice->count()) {
|
||||
return;
|
||||
}
|
||||
|
||||
$message = _('This is the public timeline for %%site.name%% but no one has posted anything yet.') . ' ';
|
||||
|
||||
if (common_logged_in()) {
|
||||
|
@ -216,6 +205,10 @@ class PublicAction extends Action
|
|||
|
||||
$cnt = $nl->show();
|
||||
|
||||
if ($cnt == 0) {
|
||||
$this->showEmptyList();
|
||||
}
|
||||
|
||||
$this->pagination($this->page > 1, $cnt > NOTICES_PER_PAGE,
|
||||
$this->page, 'public');
|
||||
}
|
||||
|
|
|
@ -62,12 +62,10 @@ class PublictagcloudAction extends Action
|
|||
$this->element('p', 'instructions',
|
||||
sprintf(_('These are most popular recent tags on %s '),
|
||||
common_config('site', 'name')));
|
||||
}
|
||||
|
||||
$tags = new Notice_tag;
|
||||
if ($tags->count()) {
|
||||
return;
|
||||
}
|
||||
|
||||
function showEmptyList()
|
||||
{
|
||||
$message = _('No one has posted a notice with a [hashtag](%%doc.tags%%) yet.') . ' ';
|
||||
|
||||
if (common_logged_in()) {
|
||||
|
@ -144,6 +142,8 @@ class PublictagcloudAction extends Action
|
|||
$this->elementEnd('dd');
|
||||
$this->elementEnd('dl');
|
||||
$this->elementEnd('div');
|
||||
} else {
|
||||
$this->showEmptyList();
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
@ -51,7 +51,7 @@ class PublicxrdsAction extends Action
|
|||
{
|
||||
/**
|
||||
* Is read only?
|
||||
*
|
||||
*
|
||||
* @return boolean true
|
||||
*/
|
||||
function isReadOnly()
|
||||
|
@ -61,7 +61,7 @@ class PublicxrdsAction extends Action
|
|||
|
||||
/**
|
||||
* Class handler.
|
||||
*
|
||||
*
|
||||
* @param array $args array of arguments
|
||||
*
|
||||
* @return nothing
|
||||
|
@ -70,24 +70,24 @@ class PublicxrdsAction extends Action
|
|||
{
|
||||
parent::handle($args);
|
||||
header('Content-Type: application/xrds+xml');
|
||||
common_start_xml();
|
||||
$this->startXML();
|
||||
$this->elementStart('XRDS', array('xmlns' => 'xri://$xrds'));
|
||||
$this->elementStart('XRD', array('xmlns' => 'xri://$xrd*($v*2.0)',
|
||||
'xmlns:simple' => 'http://xrds-simple.net/core/1.0',
|
||||
'version' => '2.0'));
|
||||
$this->element('Type', null, 'xri://$xrds*simple');
|
||||
foreach (array('finishopenidlogin', 'finishaddopenid', 'finishimmediate') as $finish) {
|
||||
foreach (array('finishopenidlogin', 'finishaddopenid') as $finish) {
|
||||
$this->showService(Auth_OpenID_RP_RETURN_TO_URL_TYPE,
|
||||
common_local_url($finish));
|
||||
}
|
||||
$this->elementEnd('XRD');
|
||||
$this->elementEnd('XRDS');
|
||||
common_end_xml();
|
||||
$this->endXML();
|
||||
}
|
||||
|
||||
/**
|
||||
* Show service.
|
||||
*
|
||||
*
|
||||
* @param string $type XRDS type
|
||||
* @param string $uri URI
|
||||
* @param array $params type parameters, null by default
|
||||
|
|
|
@ -139,7 +139,7 @@ class SubscriptionsList extends ProfileList
|
|||
|
||||
$this->out->elementStart('form', array('id' => 'subedit-' . $profile->id,
|
||||
'method' => 'post',
|
||||
'class' => 'form_subcription_edit',
|
||||
'class' => 'form_subscription_edit',
|
||||
'action' => common_local_url('subedit')));
|
||||
$this->out->hidden('token', common_session_token());
|
||||
$this->out->hidden('profile', $profile->id);
|
||||
|
|
|
@ -93,4 +93,9 @@ class TagAction extends Action
|
|||
$this->pagination($this->page > 1, $cnt > NOTICES_PER_PAGE,
|
||||
$this->page, 'tag', array('tag' => $this->tag));
|
||||
}
|
||||
|
||||
function isReadOnly()
|
||||
{
|
||||
return true;
|
||||
}
|
||||
}
|
||||
|
|
|
@ -97,47 +97,91 @@ class UserauthorizationAction extends Action
|
|||
$location = $params['omb_listenee_location'];
|
||||
$avatar = $params['omb_listenee_avatar'];
|
||||
|
||||
$this->elementStart('div', 'profile');
|
||||
$this->elementStart('div', array('class' => 'profile'));
|
||||
$this->elementStart('div', 'entity_profile vcard');
|
||||
$this->elementStart('a', array('href' => $profile,
|
||||
'class' => 'url'));
|
||||
if ($avatar) {
|
||||
$this->element('img', array('src' => $avatar,
|
||||
'class' => 'avatar',
|
||||
'class' => 'photo avatar',
|
||||
'width' => AVATAR_PROFILE_SIZE,
|
||||
'height' => AVATAR_PROFILE_SIZE,
|
||||
'alt' => $nickname));
|
||||
}
|
||||
$this->element('a', array('href' => $profile,
|
||||
'class' => 'external profile nickname'),
|
||||
$nickname);
|
||||
$hasFN = ($fullname !== '') ? 'nickname' : 'fn nickname';
|
||||
$this->elementStart('span', $hasFN);
|
||||
$this->raw($nickname);
|
||||
$this->elementEnd('span');
|
||||
$this->elementEnd('a');
|
||||
|
||||
if (!is_null($fullname)) {
|
||||
$this->elementStart('div', 'fullname');
|
||||
if (!is_null($homepage)) {
|
||||
$this->element('a', array('href' => $homepage),
|
||||
$fullname);
|
||||
} else {
|
||||
$this->text($fullname);
|
||||
}
|
||||
$this->elementEnd('div');
|
||||
$this->elementStart('dl', 'entity_fn');
|
||||
$this->elementStart('dd');
|
||||
$this->elementStart('span', 'fn');
|
||||
$this->raw($fullname);
|
||||
$this->elementEnd('span');
|
||||
$this->elementEnd('dd');
|
||||
$this->elementEnd('dl');
|
||||
}
|
||||
if (!is_null($location)) {
|
||||
$this->element('div', 'location', $location);
|
||||
$this->elementStart('dl', 'entity_location');
|
||||
$this->element('dt', null, _('Location'));
|
||||
$this->elementStart('dd', 'label');
|
||||
$this->raw($location);
|
||||
$this->elementEnd('dd');
|
||||
$this->elementEnd('dl');
|
||||
}
|
||||
|
||||
if (!is_null($homepage)) {
|
||||
$this->elementStart('dl', 'entity_url');
|
||||
$this->element('dt', null, _('URL'));
|
||||
$this->elementStart('dd');
|
||||
$this->elementStart('a', array('href' => $homepage,
|
||||
'class' => 'url'));
|
||||
$this->raw($homepage);
|
||||
$this->elementEnd('a');
|
||||
$this->elementEnd('dd');
|
||||
$this->elementEnd('dl');
|
||||
}
|
||||
|
||||
if (!is_null($bio)) {
|
||||
$this->element('div', 'bio', $bio);
|
||||
$this->elementStart('dl', 'entity_note');
|
||||
$this->element('dt', null, _('Note'));
|
||||
$this->elementStart('dd', 'note');
|
||||
$this->raw($bio);
|
||||
$this->elementEnd('dd');
|
||||
$this->elementEnd('dl');
|
||||
}
|
||||
|
||||
if (!is_null($license)) {
|
||||
$this->elementStart('dl', 'entity_license');
|
||||
$this->element('dt', null, _('License'));
|
||||
$this->elementStart('dd', 'license');
|
||||
$this->element('a', array('href' => $license,
|
||||
'class' => 'license'),
|
||||
$license);
|
||||
$this->elementEnd('dd');
|
||||
$this->elementEnd('dl');
|
||||
}
|
||||
$this->elementStart('div', 'license');
|
||||
$this->element('a', array('href' => $license,
|
||||
'class' => 'license'),
|
||||
$license);
|
||||
$this->elementEnd('div');
|
||||
$this->elementEnd('div');
|
||||
|
||||
$this->elementStart('div', 'entity_actions');
|
||||
$this->elementStart('ul');
|
||||
$this->elementStart('li', 'entity_subscribe');
|
||||
$this->elementStart('form', array('method' => 'post',
|
||||
'id' => 'userauthorization',
|
||||
'class' => 'form_user_authorization',
|
||||
'name' => 'userauthorization',
|
||||
'action' => common_local_url('userauthorization')));
|
||||
$this->hidden('token', common_session_token());
|
||||
$this->submit('accept', _('Accept'));
|
||||
$this->submit('reject', _('Reject'));
|
||||
|
||||
$this->submit('accept', _('Accept'), 'submit accept', null, _('Subscribe to this user'));
|
||||
$this->submit('reject', _('Reject'), 'submit reject', null, _('Reject this subscription'));
|
||||
$this->elementEnd('form');
|
||||
$this->elementEnd('li');
|
||||
$this->elementEnd('ul');
|
||||
$this->elementEnd('div');
|
||||
$this->elementEnd('div');
|
||||
}
|
||||
|
||||
function sendAuthorization()
|
||||
|
|
|
@ -67,6 +67,8 @@ class Notice extends Memcached_DataObject
|
|||
$this->blowSubsCache(true);
|
||||
|
||||
$this->query('BEGIN');
|
||||
//Null any notices that are replies to this notice
|
||||
$this->query(sprintf("UPDATE notice set reply_to = null WHERE reply_to = %d", $this->id));
|
||||
$related = array('Reply',
|
||||
'Fave',
|
||||
'Notice_tag',
|
||||
|
|
|
@ -30,6 +30,8 @@ $config['site']['path'] = 'laconica';
|
|||
#$config['site']['closed'] = true;
|
||||
#Only allow registration for people invited by another user
|
||||
#$config['site']['inviteonly'] = true;
|
||||
#Make the site invisible to non-logged-in users
|
||||
#$config['site']['private'] = true;
|
||||
|
||||
# If you want logging sent to a file instead of syslog
|
||||
#$config['site']['logfile'] = '/tmp/laconica.log';
|
||||
|
|
|
@ -1,27 +1,28 @@
|
|||
INSERT INTO notice_source
|
||||
(code, name, url, created)
|
||||
VALUES
|
||||
('adium', 'Adium', 'http://www.adiumx.com/', now()),
|
||||
('betwittered','BeTwittered','http://www.32hours.com/betwitteredinfo/', now()),
|
||||
('bti','bti','http://gregkh.github.com/bti/', now()),
|
||||
('cliqset', 'Cliqset', 'http://www.cliqset.com/', now()),
|
||||
('deskbar','Deskbar-Applet','http://www.gnome.org/projects/deskbar-applet/', now()),
|
||||
('Do','Gnome Do','http://do.davebsd.com/wiki/index.php?title=Microblog_Plugin', now()),
|
||||
('Facebook','Facebook','http://apps.facebook.com/identica/', now()),
|
||||
('Gwibber','Gwibber','http://launchpad.net/gwibber', now()),
|
||||
('HelloTxt','HelloTxt','http://hellotxt.com/', now()),
|
||||
('IdentiFox','IdentiFox','http://www.bitbucket.org/uncryptic/identifox/', now()),
|
||||
('LaTwit','LaTwit','http://latwit.mac65.com/', now()),
|
||||
('Nambu','Nambu','http://www.nambu.com/', now()),
|
||||
('Pikchur','Pikchur','http://www.pikchur.com/', now()),
|
||||
('Ping.fm','Ping.fm','http://ping.fm/', now()),
|
||||
('Twidge','Twidge','http://software.complete.org/twidge', now()),
|
||||
('Updating.Me','Updating.Me','http://updating.me/', now()),
|
||||
('betwittered','BeTwittered','http://www.32hours.com/betwitteredinfo/', now()),
|
||||
('bti','bti','http://gregkh.github.com/bti/', now()),
|
||||
('deskbar','Deskbar-Applet','http://www.gnome.org/projects/deskbar-applet/', now()),
|
||||
('identicatools','Laconica Tools','http://bitbucketlabs.net/laconica-tools/', now()),
|
||||
('identichat','identichat','http://identichat.prosody.im/', now()),
|
||||
('IdentiFox','IdentiFox','http://www.bitbucket.org/uncryptic/identifox/', now()),
|
||||
('identitwitch','IdentiTwitch','http://richfish.org/identitwitch/', now()),
|
||||
('LaTwit','LaTwit','http://latwit.mac65.com/', now()),
|
||||
('maisha', 'Maisha', 'http://maisha.grango.org/', now()),
|
||||
('mbpidgin','mbpidgin','http://code.google.com/p/microblog-purple/', now()),
|
||||
('Mobidentica', 'Mobidentica', 'http://www.substanceofcode.com/software/mobidentica/', now()),
|
||||
('moconica','Moconica','http://moconica.com/', now()),
|
||||
('nambu','Nambu','http://www.nambu.com/', now()),
|
||||
('peoplebrowsr', 'PeopleBrowsr', 'http://www.peoplebrowsr.com/', now()),
|
||||
('Pikchur','Pikchur','http://www.pikchur.com/', now()),
|
||||
('Ping.fm','Ping.fm','http://ping.fm/', now()),
|
||||
('pocketwit','PockeTwit','http://code.google.com/p/pocketwit/', now()),
|
||||
('posty','Posty','http://spreadingfunkyness.com/posty/', now()),
|
||||
('royalewithcheese','Royale With Cheese','http://p.hellyeah.org/', now()),
|
||||
|
@ -33,9 +34,11 @@ VALUES
|
|||
('tarpipe','tarpipe','http://tarpipe.com/', now()),
|
||||
('tjunar','Tjunar','http://nederflash.nl/boek/titels/tjunar-air', now()),
|
||||
('tr.im','tr.im','http://tr.im/', now()),
|
||||
('triklepost', 'Tricklepost', 'http://github.com/zcopley/tricklepost/tree/master', now()),
|
||||
('tweenky','Tweenky','http://beta.tweenky.com/', now()),
|
||||
('twhirl','Twhirl','http://www.twhirl.org/', now()),
|
||||
('twibble','twibble','http://www.twibble.de/', now()),
|
||||
('Twidge','Twidge','http://software.complete.org/twidge', now()),
|
||||
('twidge','Twidge','http://software.complete.org/twidge', now()),
|
||||
('twidroid','twidroid','http://www.twidroid.com/', now()),
|
||||
('twittelator','Twittelator','http://www.stone.com/iPhone/Twittelator/', now()),
|
||||
|
@ -45,6 +48,6 @@ VALUES
|
|||
('twittertools','Twitter Tools','http://wordpress.org/extend/plugins/twitter-tools/', now()),
|
||||
('twitux','Twitux','http://live.gnome.org/DanielMorales/Twitux', now()),
|
||||
('twitvim','TwitVim','http://vim.sourceforge.net/scripts/script.php?script_id=2204', now()),
|
||||
('Updating.Me','Updating.Me','http://updating.me/', now()),
|
||||
('urfastr','urfastr','http://urfastr.net/', now()),
|
||||
('adium', 'Adium', 'http://www.adiumx.com/', now()),
|
||||
('yatca','Yatca','http://www.yatca.com/', now());
|
||||
|
|
|
@ -3,6 +3,5 @@ A bookmarklet is a small piece of javascript code used as a bookmark. This one w
|
|||
Drag-and-drop the following link to your bookmarks bar or right-click it and add it to your browser favorites to keep it handy.
|
||||
|
||||
<MTMarkdownOptions output='raw'>
|
||||
<a href="javascript:var%20d=document,w=window,e=w.getSelection,k=d.getSelection,x=d.selection,s=(e?e():(k)?k():(x?x.createRange().text:0)),f='http://%%site.server%%/%%site.path%%/index.php?action=newnotice',l=d.location,e=encodeURIComponent,g=f+'&status_textarea=%22'+e(s)+'%22 from '+l.href;function%20a(){if(!w.open(g,'t','toolbar=0,resizable=0,scrollbars=1,status=1,width=720,height=570')){l.href=g;}}a();void(0);">Post to %%site.name%%</a>
|
||||
<a href="javascript:var%20d=document,w=window,e=w.getSelection,k=d.getSelection,x=d.selection,s=(e?e():(k)?k():(x?x.createRange().text:0)),f='http://%%site.server%%/%%site.path%%/index.php?action=newnotice',l=d.location,e=encodeURIComponent,g=f+'&status_textarea=%22'+((e(s))?e(s):e(document.title))+'%22 from '+l.href;function%20a(){if(!w.open(g,'t','toolbar=0,resizable=0,scrollbars=1,status=1,width=800,height=570')){l.href=g;}}a();void(0);">Post to %%site.name%%</a>
|
||||
</MTMarkdownOptions>
|
||||
|
||||
|
|
|
@ -30,3 +30,5 @@ Here are some documents that you might find helpful in understanding
|
|||
* [OpenMicroBlogging](%%doc.openmublog%%) - subscribing to remote users
|
||||
* [Privacy](%%doc.privacy%%) - %%site.name%%'s privacy policy
|
||||
* [Source](%%doc.source%%) - How to get the Laconica source code
|
||||
* [Badge](%%doc.badge%%) - How to put a Laconica badge on your blog or homepage
|
||||
* [Bookmarklet](%%doc.bookmarklet%%) - Bookmarklet for posting Web pages
|
|
@ -57,9 +57,14 @@ class FeaturedUsersSection extends ProfileSection
|
|||
$quoted[] = "'$nick'";
|
||||
}
|
||||
|
||||
$table = "user";
|
||||
if(common_config('db','quote_identifiers')) {
|
||||
$table = '"' . $table . '"';
|
||||
}
|
||||
|
||||
$qry = 'SELECT profile.* ' .
|
||||
'FROM profile JOIN user on profile.id = user.id ' .
|
||||
'WHERE user.nickname in (' . implode(',', $quoted) . ') ' .
|
||||
'FROM profile JOIN '. $table .' on profile.id = '. $table .'.id ' .
|
||||
'WHERE '. $table .'.nickname in (' . implode(',', $quoted) . ') ' .
|
||||
'ORDER BY profile.created DESC ';
|
||||
|
||||
$limit = PROFILES_PER_SECTION + 1;
|
||||
|
|
|
@ -33,7 +33,7 @@ if (!defined('LACONICA')) {
|
|||
|
||||
require_once INSTALLDIR.'/lib/grouplist.php';
|
||||
|
||||
define('GROUPS_PER_MINILIST', 80);
|
||||
define('GROUPS_PER_MINILIST', 27);
|
||||
|
||||
/**
|
||||
* Widget to show a list of groups, good for sidebar
|
||||
|
@ -75,8 +75,9 @@ class GroupMiniList extends GroupList
|
|||
'href' => $this->group->homeUrl(),
|
||||
'rel' => 'contact group',
|
||||
'class' => 'url'));
|
||||
$logo = ($this->group->stream_logo) ?
|
||||
$this->group->stream_logo : User_group::defaultLogo(AVATAR_STREAM_SIZE);
|
||||
|
||||
$logo = ($this->group->mini_logo) ?
|
||||
$this->group->mini_logo : User_group::defaultLogo(AVATAR_MINI_SIZE);
|
||||
|
||||
$this->out->element('img', array('src' => $logo,
|
||||
'width' => AVATAR_MINI_SIZE,
|
||||
|
|
|
@ -232,7 +232,7 @@ class ResultItem
|
|||
$this->profile_image_url = ($avatar) ?
|
||||
$avatar->displayUrl() : Avatar::defaultImage(AVATAR_STREAM_SIZE);
|
||||
|
||||
$this->created_at = date('r', $this->notice->created);
|
||||
$this->created_at = common_date_rfc2822($this->notice->created);
|
||||
}
|
||||
|
||||
/**
|
||||
|
|
|
@ -33,7 +33,7 @@ if (!defined('LACONICA')) {
|
|||
|
||||
require_once INSTALLDIR.'/lib/profilelist.php';
|
||||
|
||||
define('PROFILES_PER_MINILIST', 80);
|
||||
define('PROFILES_PER_MINILIST', 27);
|
||||
|
||||
/**
|
||||
* Widget to show a list of profiles, good for sidebar
|
||||
|
|
|
@ -46,7 +46,7 @@ function get_twitter_data($uri, $screen_name, $password)
|
|||
common_debug("Twitter bridge - cURL error: $errmsg - trying to load: $uri with user $screen_name.",
|
||||
__FILE__);
|
||||
|
||||
if (SCRIPT_DEBUG) {
|
||||
if (defined('SCRIPT_DEBUG')) {
|
||||
print "cURL error: $errmsg - trying to load: $uri with user $screen_name.\n";
|
||||
}
|
||||
}
|
||||
|
@ -106,7 +106,7 @@ function update_twitter_user($twitter_id, $screen_name)
|
|||
|
||||
if ($result) {
|
||||
common_debug("Removed uri ($uri) from another foreign_user who was squatting on it.");
|
||||
if (SCRIPT_DEBUG) {
|
||||
if (defined('SCRIPT_DEBUG')) {
|
||||
print("Removed uri ($uri) from another Twitter user who was squatting on it.\n");
|
||||
}
|
||||
}
|
||||
|
@ -122,7 +122,7 @@ function update_twitter_user($twitter_id, $screen_name)
|
|||
common_log(LOG_WARNING,
|
||||
"Couldn't update foreign_user data for Twitter user: $screen_name");
|
||||
common_log_db_error($fuser, 'UPDATE', __FILE__);
|
||||
if (SCRIPT_DEBUG) {
|
||||
if (defined('SCRIPT_DEBUG')) {
|
||||
print "UPDATE failed: for Twitter user: $twitter_id - $screen_name. - ";
|
||||
print common_log_objstring($fuser) . "\n";
|
||||
$error = &PEAR::getStaticProperty('DB_DataObject','lastError');
|
||||
|
@ -155,7 +155,7 @@ function add_twitter_user($twitter_id, $screen_name)
|
|||
if ($result) {
|
||||
common_log(LOG_WARNING,
|
||||
"Twitter bridge - removed invalid Twitter user squatting on uri: $new_uri");
|
||||
if (SCRIPT_DEBUG) {
|
||||
if (defined('SCRIPT_DEBUG')) {
|
||||
print "Removed invalid Twitter user squatting on uri: $new_uri\n";
|
||||
}
|
||||
}
|
||||
|
@ -177,7 +177,7 @@ function add_twitter_user($twitter_id, $screen_name)
|
|||
common_log(LOG_WARNING,
|
||||
"Twitter bridge - failed to add new Twitter user: $twitter_id - $screen_name.");
|
||||
common_log_db_error($fuser, 'INSERT', __FILE__);
|
||||
if (SCRIPT_DEBUG) {
|
||||
if (defined('SCRIPT_DEBUG')) {
|
||||
print "INSERT failed: could not add new Twitter user: $twitter_id - $screen_name. - ";
|
||||
print common_log_objstring($fuser) . "\n";
|
||||
$error = &PEAR::getStaticProperty('DB_DataObject','lastError');
|
||||
|
@ -185,7 +185,7 @@ function add_twitter_user($twitter_id, $screen_name)
|
|||
}
|
||||
} else {
|
||||
common_debug("Twitter bridge - Added new Twitter user: $screen_name ($twitter_id).");
|
||||
if (SCRIPT_DEBUG) {
|
||||
if (defined('SCRIPT_DEBUG')) {
|
||||
print "Added new Twitter user: $screen_name ($twitter_id).\n";
|
||||
}
|
||||
}
|
||||
|
@ -212,7 +212,7 @@ function save_twitter_user($twitter_id, $screen_name)
|
|||
common_debug('Twitter bridge - Updated nickname (and URI) for Twitter user ' .
|
||||
"$fuser->id to $screen_name, was $fuser->nickname");
|
||||
|
||||
if (SCRIPT_DEBUG) {
|
||||
if (defined('SCRIPT_DEBUG')) {
|
||||
print 'Updated nickname (and URI) for Twitter user ' .
|
||||
"$fuser->id to $screen_name, was $fuser->nickname\n";
|
||||
}
|
||||
|
@ -241,7 +241,7 @@ function retreive_twitter_friends($twitter_id, $screen_name, $password)
|
|||
return $friends;
|
||||
}
|
||||
|
||||
if (SCRIPT_DEBUG) {
|
||||
if (defined('SCRIPT_DEBUG')) {
|
||||
print "Twitter 'social graph' ids method says $screen_name has " .
|
||||
count($friends_ids) . " friends.\n";
|
||||
}
|
||||
|
@ -252,7 +252,7 @@ function retreive_twitter_friends($twitter_id, $screen_name, $password)
|
|||
if ($pages == 0) {
|
||||
common_log(LOG_WARNING,
|
||||
"Twitter bridge - $screen_name seems to have no friends.");
|
||||
if (SCRIPT_DEBUG) {
|
||||
if (defined('SCRIPT_DEBUG')) {
|
||||
print "$screen_name seems to have no friends.\n";
|
||||
}
|
||||
}
|
||||
|
@ -264,7 +264,7 @@ function retreive_twitter_friends($twitter_id, $screen_name, $password)
|
|||
if (!$data) {
|
||||
common_log(LOG_WARNING,
|
||||
"Twitter bridge - Couldn't retrieve page $i of $screen_name's friends.");
|
||||
if (SCRIPT_DEBUG) {
|
||||
if (defined('SCRIPT_DEBUG')) {
|
||||
print "Couldn't retrieve page $i of $screen_name's friends.\n";
|
||||
}
|
||||
continue;
|
||||
|
@ -276,7 +276,7 @@ function retreive_twitter_friends($twitter_id, $screen_name, $password)
|
|||
|
||||
common_log(LOG_WARNING,
|
||||
"Twitter bridge - No data for page $i of $screen_name's friends.");
|
||||
if (SCRIPT_DEBUG) {
|
||||
if (defined('SCRIPT_DEBUG')) {
|
||||
print "No data for page $i of $screen_name's friends.\n";
|
||||
}
|
||||
continue;
|
||||
|
@ -295,7 +295,7 @@ function save_twitter_friends($user, $twitter_id, $screen_name, $password)
|
|||
|
||||
if (empty($friends)) {
|
||||
common_debug("Twitter bridge - Couldn't get friends data from Twitter for $screen_name.");
|
||||
if (SCRIPT_DEBUG) {
|
||||
if (defined('SCRIPT_DEBUG')) {
|
||||
print "Couldn't get friends data from Twitter for $screen_name.\n";
|
||||
}
|
||||
return false;
|
||||
|
@ -310,7 +310,7 @@ function save_twitter_friends($user, $twitter_id, $screen_name, $password)
|
|||
if (!save_twitter_user($friend_id, $friend_name)) {
|
||||
common_log(LOG_WARNING,
|
||||
"Twitter bridge - couldn't save $screen_name's friend, $friend_name.");
|
||||
if (SCRIPT_DEBUG) {
|
||||
if (defined('SCRIPT_DEBUG')) {
|
||||
print "Couldn't save $screen_name's friend, $friend_name.\n";
|
||||
}
|
||||
continue;
|
||||
|
@ -328,11 +328,11 @@ function save_twitter_friends($user, $twitter_id, $screen_name, $password)
|
|||
|
||||
if ($result === true) {
|
||||
common_debug("Twitter bridge - subscribed $friend_user->nickname to $user->nickname.");
|
||||
if (SCRIPT_DEBUG) {
|
||||
if (defined('SCRIPT_DEBUG')) {
|
||||
print("Subscribed $friend_user->nickname to $user->nickname.\n");
|
||||
}
|
||||
} else {
|
||||
if (SCRIPT_DEBUG) {
|
||||
if (defined('SCRIPT_DEBUG')) {
|
||||
print "$result ($friend_user->nickname to $user->nickname)\n";
|
||||
}
|
||||
}
|
||||
|
|
13
lib/util.php
13
lib/util.php
|
@ -1321,3 +1321,16 @@ function common_compatible_license($from, $to)
|
|||
// XXX: better compatibility check needed here!
|
||||
return ($from == $to);
|
||||
}
|
||||
|
||||
/**
|
||||
* returns a quoted table name, if required according to config
|
||||
*/
|
||||
function common_database_tablename($tablename)
|
||||
{
|
||||
|
||||
if(common_config('db','quote_identifiers')) {
|
||||
$tablename = '"'. $tablename .'"';
|
||||
}
|
||||
//table prefixes could be added here later
|
||||
return $tablename;
|
||||
}
|
Binary file not shown.
File diff suppressed because it is too large
Load Diff
|
@ -27,8 +27,8 @@ if (isset($_SERVER) && array_key_exists('REQUEST_METHOD', $_SERVER)) {
|
|||
define('INSTALLDIR', realpath(dirname(__FILE__) . '/..'));
|
||||
define('LACONICA', true);
|
||||
|
||||
// Set this to true to get useful console output
|
||||
define('SCRIPT_DEBUG', false);
|
||||
// Uncomment this to get useful console output
|
||||
//define('SCRIPT_DEBUG', true);
|
||||
|
||||
require_once(INSTALLDIR . '/lib/common.php');
|
||||
|
||||
|
@ -62,7 +62,7 @@ while ($flink->fetch()) {
|
|||
|
||||
$result = save_twitter_friends($user, $fuser->id,
|
||||
$fuser->nickname, $flink->credentials);
|
||||
if (SCRIPT_DEBUG) {
|
||||
if (defined('SCRIPT_DEBUG')) {
|
||||
print "\nDONE\n";
|
||||
} else {
|
||||
print "DONE\n";
|
||||
|
|
|
@ -29,6 +29,7 @@ h1 {
|
|||
font-size:1.4em;
|
||||
margin-bottom:18px;
|
||||
}
|
||||
#showstream h1 { display:none; }
|
||||
h2 { font-size:1.3em; }
|
||||
h3 { font-size:1.2em; }
|
||||
h4 { font-size:1.1em; }
|
||||
|
@ -407,7 +408,7 @@ float:left;
|
|||
width:27.917%;
|
||||
min-height:259px;
|
||||
float:left;
|
||||
margin-left:0.395%;
|
||||
margin-left:0.385%;
|
||||
padding:1.795%;
|
||||
border-radius:7px;
|
||||
-moz-border-radius:7px;
|
||||
|
@ -472,7 +473,7 @@ bottom:0;
|
|||
right:0;
|
||||
}
|
||||
#form_notice label[for=to] {
|
||||
margin-top:11px;
|
||||
margin-top:7px;
|
||||
}
|
||||
#form_notice select[id=to] {
|
||||
margin-bottom:7px;
|
||||
|
@ -607,7 +608,9 @@ border-radius:4px;
|
|||
-moz-border-radius:4px;
|
||||
-webkit-border-radius:4px;
|
||||
}
|
||||
|
||||
.entity_actions .accept {
|
||||
margin-bottom:18px;
|
||||
}
|
||||
|
||||
.entity_tags ul {
|
||||
list-style-type:none;
|
||||
|
@ -689,7 +692,7 @@ float:none;
|
|||
.profile .entity_profile .entity_note,
|
||||
.profile .entity_profile .entity_url,
|
||||
.profile .entity_profile .entity_tags,
|
||||
.profile .entity_profile .form_subcription_edit {
|
||||
.profile .entity_profile .form_subscription_edit {
|
||||
margin-left:59px;
|
||||
clear:none;
|
||||
display:block;
|
||||
|
@ -701,7 +704,7 @@ margin-right:11px;
|
|||
}
|
||||
|
||||
|
||||
.profile .entity_profile .form_subcription_edit label {
|
||||
.profile .entity_profile .form_subscription_edit label {
|
||||
font-weight:normal;
|
||||
margin-right:11px;
|
||||
}
|
||||
|
@ -918,6 +921,10 @@ padding:0;
|
|||
}
|
||||
|
||||
|
||||
#usergroups #new_group {
|
||||
float: left;
|
||||
margin-right: 2em;
|
||||
}
|
||||
#new_group, #group_search {
|
||||
margin-bottom:18px;
|
||||
}
|
||||
|
|
|
@ -21,7 +21,7 @@ p { orphans: 2; widows: 1; }
|
|||
.entity_actions,
|
||||
.notice-options,
|
||||
#aside_primary,
|
||||
.form_subcription_edit .submit {
|
||||
.form_subscription_edit .submit {
|
||||
display:none;
|
||||
}
|
||||
|
||||
|
|
|
@ -164,7 +164,8 @@ background-color:#A9BF4F;
|
|||
color:#fff;
|
||||
}
|
||||
.form_user_unsubscribe input.submit,
|
||||
.form_group_leave input.submit {
|
||||
.form_group_leave input.submit,
|
||||
.form_user_authorization input.reject {
|
||||
background-color:#97BFD1;
|
||||
}
|
||||
|
||||
|
@ -231,10 +232,6 @@ background-color:#fcfcfc;
|
|||
#new_group a {
|
||||
background:transparent url(../images/icons/twotone/green/news.gif) no-repeat 0 45%;
|
||||
}
|
||||
#usergroups #new_group {
|
||||
float: left;
|
||||
margin-right: 2em;
|
||||
}
|
||||
|
||||
.pagination .nav_prev a,
|
||||
.pagination .nav_next a {
|
||||
|
|
|
@ -164,7 +164,8 @@ background-color:#9BB43E;
|
|||
color:#fff;
|
||||
}
|
||||
.form_user_unsubscribe input.submit,
|
||||
.form_group_leave input.submit {
|
||||
.form_group_leave input.submit,
|
||||
.form_user_authorization input.reject {
|
||||
background-color:#87B4C8;
|
||||
}
|
||||
|
||||
|
@ -231,10 +232,6 @@ background-color:#fcfcfc;
|
|||
#new_group a {
|
||||
background:transparent url(../images/icons/twotone/green/news.gif) no-repeat 0 45%;
|
||||
}
|
||||
#usergroups #new_group {
|
||||
float: left;
|
||||
margin-right: 2em;
|
||||
}
|
||||
|
||||
.pagination .nav_prev a,
|
||||
.pagination .nav_next a {
|
||||
|
|
Loading…
Reference in New Issue
Block a user