Commit 0aa2cb35 authored by sarven's avatar sarven

Merge branch 'master' of ../trunk

parents 6c9bbdb5 9c5ab86d
......@@ -72,10 +72,14 @@ class ApiAction extends Action
}
} else {
# Look for the user in the session
if (common_logged_in()) {
$this->user = common_current_user();
}
# Caller might give us a username even if not required
if (isset($_SERVER['PHP_AUTH_USER'])) {
$user = User::staticGet('nickname', $_SERVER['PHP_AUTH_USER']);
if ($user) {
$this->user = $user;
}
# Twitter doesn't throw an error if the user isn't found
}
$this->process_command();
}
......
......@@ -202,7 +202,7 @@ class FacebookhomeAction extends FacebookAction
$this->elementEnd('p');
$this->elementStart('form', array('method' => 'post',
'action' => "$app_url/index.php",
'action' => "index.php",
'id' => 'facebook-skip-permissions'));
$this->elementStart('ul', array('id' => 'fb-permissions-list'));
......
This diff is collapsed.
......@@ -56,6 +56,11 @@ class PublicAction extends Action
var $page = null;
function isReadOnly()
{
return true;
}
/**
* Read and validate arguments
*
......
......@@ -24,17 +24,20 @@ require_once(INSTALLDIR.'/lib/twitterapi.php');
class TwitapiaccountAction extends TwitterapiAction
{
function verify_credentials($args, $apidata)
function verify_credentials($args, $apidata)
{
parent::handle($args);
if (!in_array($apidata['content-type'], array('xml', 'json'))) {
$this->clientError(_('API method not found!'), $code = 404);
return;
}
if ($apidata['content-type'] == 'xml') {
header('Content-Type: application/xml; charset=utf-8');
print '<authorized>true</authorized>';
} elseif ($apidata['content-type'] == 'json') {
header('Content-Type: application/json; charset=utf-8');
print '{"authorized":true}';
} else {
common_user_error(_('API method not found!'), $code=404);
}
$this->show_extended_profile($apidata['user'], $apidata);
}
}
function end_session($args, $apidata)
{
......@@ -99,4 +102,4 @@ class TwitapiaccountAction extends TwitterapiAction
parent::handle($args);
$this->serverError(_('API method under construction.'), $code=501);
}
}
\ No newline at end of file
}
......@@ -33,22 +33,88 @@ class TwitapiusersAction extends TwitterapiAction
return;
}
$user = null;
$email = $this->arg('email');
$this->auth_user = $apidata['user'];
$user = null;
$email = $this->arg('email');
if ($email) {
$user = User::staticGet('email', $email);
} elseif (isset($apidata['api_arg'])) {
$user = $this->get_user($apidata['api_arg']);
}
if ($email) {
$user = User::staticGet('email', $email);
} elseif (isset($apidata['api_arg'])) {
$user = $this->get_user($apidata['api_arg']);
}
if (!$user) {
// XXX: Twitter returns a random(?) user instead of throwing and err! -- Zach
$this->clientError(_('Not found.'), 404, $apidata['content-type']);
return;
}
if (!$user) {
// XXX: Twitter returns a random(?) user instead of throwing and err! -- Zach
$this->client_error(_('Not found.'), 404, $apidata['content-type']);
return;
}
$profile = $user->getProfile();
if (!$profile) {
common_server_error(_('User has no profile.'));
return;
}
$twitter_user = $this->twitter_user_array($profile, true);
// Add in extended user fields offered up by this method
$twitter_user['created_at'] = $this->date_twitter($profile->created);
$subbed = DB_DataObject::factory('subscription');
$subbed->subscriber = $profile->id;
$subbed_count = (int) $subbed->count() - 1;
$notices = DB_DataObject::factory('notice');
$notices->profile_id = $profile->id;
$notice_count = (int) $notices->count();
$twitter_user['friends_count'] = (is_int($subbed_count)) ? $subbed_count : 0;
$twitter_user['statuses_count'] = (is_int($notice_count)) ? $notice_count : 0;
// Other fields Twitter sends...
$twitter_user['profile_background_color'] = '';
$twitter_user['profile_text_color'] = '';
$twitter_user['profile_link_color'] = '';
$twitter_user['profile_sidebar_fill_color'] = '';
$faves = DB_DataObject::factory('fave');
$faves->user_id = $user->id;
$faves_count = (int) $faves->count();
$twitter_user['favourites_count'] = $faves_count;
$timezone = 'UTC';
if ($user->timezone) {
$timezone = $user->timezone;
}
$t = new DateTime;
$t->setTimezone(new DateTimeZone($timezone));
$twitter_user['utc_offset'] = $t->format('Z');
$twitter_user['time_zone'] = $timezone;
if (isset($this->auth_user)) {
if ($this->auth_user->isSubscribed($profile)) {
$twitter_user['following'] = 'true';
} else {
$twitter_user['following'] = 'false';
}
// Not implemented yet
$twitter_user['notifications'] = 'false';
}
$this->show_extended_profile($user, $apidata);
}
if ($apidata['content-type'] == 'xml') {
$this->init_document('xml');
$this->show_twitter_xml_user($twitter_user);
$this->end_document('xml');
} elseif ($apidata['content-type'] == 'json') {
$this->init_document('json');
$this->show_json_objects($twitter_user);
$this->end_document('json');
}
}
}
......@@ -129,6 +129,8 @@ class Notice extends Memcached_DataObject
$notice->is_local = $is_local;
}
$notice->query('BEGIN');
$notice->reply_to = $reply_to;
$notice->created = common_sql_now();
$notice->content = common_shorten_links($content);
......@@ -160,6 +162,9 @@ class Notice extends Memcached_DataObject
$notice->saveTags();
$notice->saveGroups();
$notice->addToInboxes();
$notice->query('COMMIT');
# Clear the cache for subscribed users, so they'll update at next request
# XXX: someone clever could prepend instead of clearing the cache
......@@ -167,7 +172,6 @@ class Notice extends Memcached_DataObject
$notice->blowCaches();
}
$notice->addToInboxes();
return $notice;
}
......
......@@ -403,7 +403,7 @@ class User extends Memcached_DataObject
'FROM notice JOIN notice_inbox ON notice.id = notice_inbox.notice_id ' .
'WHERE notice_inbox.user_id = %d ';
# NOTE: we override ORDER
$order = 'ORDER BY notice_inbox.created DESC, notice_inbox.notice_id DESC ';
$order = null;
}
return Notice::getStream(sprintf($qry, $this->id),
'user:notices_with_friends:' . $this->id,
......
......@@ -86,4 +86,82 @@ class User_group extends Memcached_DataObject
return $members;
}
function setOriginal($filename, $type)
{
$orig = clone($this);
$this->original_logo = common_avatar_url($filename);
$this->homepage_logo = common_avatar_url($this->scale($filename,
AVATAR_PROFILE_SIZE,
$type));
$this->stream_logo = common_avatar_url($this->scale($filename,
AVATAR_STREAM_SIZE,
$type));
$this->mini_logo = common_avatar_url($this->scale($filename,
AVATAR_MINI_SIZE,
$type));
common_debug(common_log_objstring($this));
return $this->update($orig);
}
function scale($filename, $size, $type)
{
$filepath = common_avatar_path($filename);
if (!file_exists($filepath)) {
$this->serverError(_('Lost our file.'));
return;
}
$info = @getimagesize($filepath);
switch ($type) {
case IMAGETYPE_GIF:
$image_src = imagecreatefromgif($filepath);
break;
case IMAGETYPE_JPEG:
$image_src = imagecreatefromjpeg($filepath);
break;
case IMAGETYPE_PNG:
$image_src = imagecreatefrompng($filepath);
break;
default:
$this->serverError(_('Unknown file type'));
return;
}
$image_dest = imagecreatetruecolor($size, $size);
$background = imagecolorallocate($image_dest, 0, 0, 0);
ImageColorTransparent($image_dest, $background);
imagealphablending($image_dest, false);
imagecopyresized($image_dest, $image_src, 0, 0, $x, $y, $size, $size, $info[0], $info[1]);
$cur = common_current_user();
$outname = common_avatar_filename($cur->id,
image_type_to_extension($type),
null,
common_timestamp());
$outpath = common_avatar_path($outname);
switch ($type) {
case IMAGETYPE_GIF:
imagegif($image_dest, $outpath);
break;
case IMAGETYPE_JPEG:
imagejpeg($image_dest, $outpath);
break;
case IMAGETYPE_PNG:
imagepng($image_dest, $outpath);
break;
default:
$this->serverError(_('Unknown file type'));
return;
}
return $outname;
}
}
......@@ -49,7 +49,8 @@ create table "user" (
emailnotifysub integer default 1 /* comment 'Notify by email of subscriptions' */,
emailnotifyfav integer default 1 /* comment 'Notify by email of favorites' */,
emailnotifynudge integer default 1 /* comment 'Notify by email of nudges' */,
emailmicroid integer default 1 /* comment 'whether to publish email microid' */,
emailnotifymsg integer default 1 / * comment 'Notify by email of direct messages' */,
emailmicroid integer default 1 /* comment 'whether to publish email microid' */,
language varchar(50) /* comment 'preferred language' */,
timezone varchar(50) /* comment 'timezone' */,
emailpost integer default 1 /* comment 'Post by email' */,
......@@ -66,6 +67,7 @@ create table "user" (
uri varchar(255) unique /* comment 'universally unique identifier, usually a tag URI' */,
autosubscribe integer default 0 /* comment 'automatically subscribe to users who subscribe to us' */,
urlshorteningservice varchar(50) default 'ur1.ca' /* comment 'service to use for auto-shortening URLs' */,
inboxed integer default 0 /* comment 'has an inbox been created for this user?' */,
created timestamp not null /* comment 'date this record was created' */,
modified timestamp /* comment 'date this record was modified' */
......@@ -86,6 +88,8 @@ create table remote_profile (
create table subscription (
subscriber integer not null /* comment 'profile listening' */,
subscribed integer not null /* comment 'profile being listened to' */,
jabber integer default 1 /* comment 'deliver jabber messages',
sms integer default 1 comment 'deliver sms messages',
token varchar(255) /* comment 'authorization token' */,
secret varchar(255) /* comment 'token secret' */,
created timestamp not null /* comment 'date this record was created' */,
......@@ -271,8 +275,6 @@ create table foreign_user (
service int not null /* comment 'foreign key to service' */ references foreign_service(id) ,
uri varchar(255) not null unique /* comment 'identifying URI' */,
nickname varchar(255) /* comment 'nickname on foreign service' */,
user_id int /* comment 'link to user on this system, if exists' */ references "user" (id),
credentials varchar(255) /* comment 'authc credentials, typically a password' */,
created timestamp not null /* comment 'date this record was created' */,
modified timestamp /* comment 'date this record was modified' */,
......@@ -280,11 +282,25 @@ create table foreign_user (
);
create index foreign_user_user_id_idx on foreign_user using btree(user_id);
create table foreign_link (
user_id int /* comment 'link to user on this system, if exists' */ references "user" (id),
foreign_id int /* comment 'link' */ references foreign_user (id),
service int not null /* comment 'foreign key to service' */ references foreign_service (id),
credentials varchar(255) /* comment 'authc credentials, typically a password',
noticesync int not null default 1 /* comment 'notice synchronisation, bit 1 = sync outgoing, bit 2 = sync incoming, bit 3 = filter local replies' */,
friendsync int not null default 2 /* comment 'friend synchronisation, bit 1 = sync outgoing, bit 2 = sync incoming
created timestamp not null /* comment 'date this record was created' */,
modified timestamp not null /* comment 'date this record was modified' */,
primary key (user_id,foreign_id,service)
);
create index foreign_user_user_id_idx on foreign_link using btree(user_id);
create table foreign_subscription (
service int not null /* comment 'service where relationship happens' */ references foreign_service(id) ,
subscriber int not null /* comment 'subscriber on foreign service' */ ,
subscribed int not null /* comment 'subscribed user' */ ,
created timestamp not null /* comment 'date this record was created' */,
created timestamp not null /* comment 'date this record was created' /,
primary key (service, subscriber, subscribed)
);
......@@ -320,6 +336,38 @@ create index message_from_idx on message using btree(from_profile);
create index message_to_idx on message using btree(to_profile);
create index message_created_idx on message using btree(created);
create table notice_inbox (
user_id integer not null /* comment 'user receiving the message' */ references user (id),
notice_id integer not null /* comment 'notice received' */ references notice (id),
created datetime not null /* comment 'date the notice was created' */,
source integer default 1 /* comment 'reason it is in the inbox; 1=subscription' */,
primary key (user_id, notice_id)
);
create index notice_inbox_notice_id_idx (notice_id) on notice_inbox using btree(notice_id);
create table profile_tag (
tagger integer not null /* comment 'user making the tag' */ references "user" (id),
tagged integer not null /* comment 'profile tagged' */ references profile (id),
tag varchar(64) not null /* comment 'hash tag associated with this notice' */,
modified timestamp /* comment 'date the tag was added' */,
primary key (tagger, tagged, tag)
);
create index profile_tag_modified_idx on profile_tag using btree(modified);
create index profile_tag_tagger_tag_idx on profile_tag using btree(tagger,tag);
create table profile_block (
blocker integer not null i/* comment 'user making the block' */ references user (id),
blocked integer not null /* comment 'profile that is blocked' */ references profile (id),
modified timestamp /* comment 'date of blocking' */,
primary key (blocker, blocked)
);
/* Textsearch stuff */
create index textsearch_idx on profile using gist(textsearch);
......
......@@ -89,13 +89,14 @@ RewriteRule ^peopletag/([a-zA-Z0-9]+)$ index.php?action=peopletag&tag=$1 [L,QSA]
RewriteRule ^featured/?$ index.php?action=featured [L,QSA]
RewriteRule ^favorited/?$ index.php?action=favorited [L,QSA]
RewriteRule ^group/new index.php?action=newgroup [L,QSA]
RewriteRule ^group/([a-zA-Z0-9]+)/edit index.php?action=editgroup&nickname=$1 [L,QSA]
RewriteRule ^group/([a-zA-Z0-9]+)/join index.php?action=joingroup&nickname=$1 [L,QSA]
RewriteRule ^group/([a-zA-Z0-9]+)/leave index.php?action=leavegroup&nickname=$1 [L,QSA]
RewriteRule ^group/([a-zA-Z0-9]+)/members index.php?action=groupmembers&nickname=$1 [L,QSA]
RewriteRule ^group/([0-9]+)/id index.php?action=groupbyid&id=$1 [L,QSA]
RewriteRule ^group/([a-zA-Z0-9]+)/rss index.php?action=grouprss&nickname=$1 [L,QSA]
RewriteRule ^group/new$ index.php?action=newgroup [L,QSA]
RewriteRule ^group/([a-zA-Z0-9]+)/edit$ index.php?action=editgroup&nickname=$1 [L,QSA]
RewriteRule ^group/([a-zA-Z0-9]+)/join$ index.php?action=joingroup&nickname=$1 [L,QSA]
RewriteRule ^group/([a-zA-Z0-9]+)/leave$ index.php?action=leavegroup&nickname=$1 [L,QSA]
RewriteRule ^group/([a-zA-Z0-9]+)/members$ index.php?action=groupmembers&nickname=$1 [L,QSA]
RewriteRule ^group/([a-zA-Z0-9]+)/logo$ index.php?action=grouplogo&nickname=$1 [L,QSA]
RewriteRule ^group/([0-9]+)/id$ index.php?action=groupbyid&id=$1 [L,QSA]
RewriteRule ^group/([a-zA-Z0-9]+)/rss$ index.php?action=grouprss&nickname=$1 [L,QSA]
RewriteRule ^group/([a-zA-Z0-9]+)$ index.php?action=showgroup&nickname=$1 [L,QSA]
RewriteRule ^group$ index.php?action=groups [L,QSA]
......
......@@ -19,7 +19,7 @@
if (!defined('LACONICA')) { exit(1); }
define('LACONICA_VERSION', '0.6.4.1');
define('LACONICA_VERSION', '0.7.0');
define('AVATAR_PROFILE_SIZE', 96);
define('AVATAR_STREAM_SIZE', 48);
......
......@@ -101,6 +101,12 @@ class GroupNav extends Widget
sprintf(_('Edit %s group properties'), $nickname),
$action_name == 'editgroup',
'nav_group_admin');
$this->out->menuItem(common_local_url('grouplogo', array('nickname' =>
$nickname)),
_('Logo'),
sprintf(_('Add or edit %s logo'), $nickname),
$action_name == 'grouplogo',
'nav_group_logo');
}
$this->out->elementEnd('ul');
}
......
......@@ -99,54 +99,35 @@ function get_nice_language_list()
*
* @return array mapping of language codes to language info
*/
function get_all_languages()
{
return
array('en-us' => array('q' => 1, 'lang' => 'en_US',
'name' => 'English (US)', 'direction' => 'ltr'),
'en-nz' => array('q' => 1, 'lang' => 'en_NZ',
'name' => 'English (NZ)', 'direction' => 'ltr'),
'en-gb' => array('q' => 1, 'lang' => 'en_GB',
'name' => 'English (British)', 'direction' => 'ltr'),
'en' => array('q' => 1, 'lang' => 'en',
'name' => 'English', 'direction' => 'ltr'),
'da' => array('q' => 0.1, 'lang' => 'da_DK',
'name' => 'Danish', 'direction' => 'ltr'),
'nl' => array('q' => 1, 'lang' => 'nl_NL',
'name' => 'Dutch', 'direction' => 'ltr'),
'eo' => array('q' => 0.1, 'lang' => 'eo',
'name' => 'Esperanto', 'direction' => 'ltr'),
'fr-fr' => array('q' => 0.9, 'lang' => 'fr_FR',
'name' => 'French', 'direction' => 'ltr'),
'de' => array('q' => 1, 'lang' => 'de_DE',
'name' => 'German', 'direction' => 'ltr'),
'it' => array('q' => 1, 'lang' => 'it_IT',
'name' => 'Italian', 'direction' => 'ltr'),
'ko' => array('q' => 0.1, 'lang' => 'ko',
'name' => 'Korean', 'direction' => 'ltr'),
'nb' => array('q' => 1, 'lang' => 'nb_NO',
'name' => 'Norwegian (bokmal)', 'direction' => 'ltr'),
'pt' => array('q' => 0.2, 'lang' => 'pt',
'name' => 'Portuguese', 'direction' => 'ltr'),
'pt-br' => array('q' => 1, 'lang' => 'pt_BR',
'name' => 'Portuguese Brazil', 'direction' => 'ltr'),
'es' => array('q' => 1, 'lang' => 'es',
'name' => 'Spanish', 'direction' => 'ltr'),
'tr' => array('q' => 1, 'lang' => 'tr_TR',
'name' => 'Turkish', 'direction' => 'ltr'),
'uk' => array('q' => 1, 'lang' => 'uk_UA',
'name' => 'Ukrainian', 'direction' => 'ltr'),
'pl' => array('q' => 1, 'lang' => 'pl_PL',
'name' => 'Polish', 'direction' => 'ltr'),
'mk' => array('q' => 1, 'lang' => 'mk_MK',
'name' => 'Macedonian', 'direction' => 'ltr'),
'jp' => array('q' => 0.1, 'lang' => 'ja_JP',
'name' => 'Japanese', 'direction' => 'ltr'),
'cs' => array('q' => 1, 'lang' => 'cs_CZ',
'name' => 'Czech', 'direction' => 'ltr'),
'ca' => array('q' => 1, 'lang' => 'ca_ES',
'name' => 'Catalan', 'direction' => 'ltr'),
);
function get_all_languages() {
return array(
'bg' => array('q' => 0.8, 'lang' => 'bg_BG', 'name' => 'Bulgarian', 'direction' => 'ltr'),
'ca' => array('q' => 0.5, 'lang' => 'ca_ES', 'name' => 'Catalan', 'direction' => 'ltr'),
'cs' => array('q' => 0.5, 'lang' => 'cs_CZ', 'name' => 'Czech', 'direction' => 'ltr'),
'de' => array('q' => 0.5, 'lang' => 'de_DE', 'name' => 'German', 'direction' => 'ltr'),
'el' => array('q' => 0.1, 'lang' => 'el', 'name' => 'Greek', 'direction' => 'ltr'),
'en-us' => array('q' => 1, 'lang' => 'en_US', 'name' => 'English (US)', 'direction' => 'ltr'),
'en-gb' => array('q' => 0.3, 'lang' => 'en_GB', 'name' => 'English (British)', 'direction' => 'ltr'),
'en' => array('q' => 1, 'lang' => 'en', 'name' => 'English', 'direction' => 'ltr'),
'es' => array('q' => 0.5, 'lang' => 'es', 'name' => 'Spanish', 'direction' => 'ltr'),
'fr-fr' => array('q' => 0.2, 'lang' => 'fr_FR', 'name' => 'French', 'direction' => 'ltr'),
'he' => array('q' => 0.5, 'lang' => 'he_IL', 'name' => 'Hebrew', 'direction' => 'ltr'),
'it' => array('q' => 0.9, 'lang' => 'it_IT', 'name' => 'Italian', 'direction' => 'rtl'),
'jp' => array('q' => 0.5, 'lang' => 'ja_JP', 'name' => 'Japanese', 'direction' => 'ltr'),
# 'ko' => array('q' => 0, 'lang' => 'ko', 'name' => 'Korean', 'direction' => 'ltr'),
'mk' => array('q' => 0.5, 'lang' => 'mk_MK', 'name' => 'Macedonian', 'direction' => 'ltr'),
'nb' => array('q' => 0.1, 'lang' => 'nb_NO', 'name' => 'Norwegian (bokmal)', 'direction' => 'ltr'),
'nl' => array('q' => 0.5, 'lang' => 'nl_NL', 'name' => 'Dutch', 'direction' => 'ltr'),
'pl' => array('q' => 0.5, 'lang' => 'pl_PL', 'name' => 'Polish', 'direction' => 'ltr'),
# 'pt' => array('q' => 0, 'lang' => 'pt', 'name' => 'Portuguese', 'direction' => 'ltr'),
'pt-br' => array('q' => 0.7, 'lang' => 'pt_BR', 'name' => 'Portuguese Brazil', 'direction' => 'ltr'),
'ru' => array('q' => 0.1, 'lang' => 'ru_RU', 'name' => 'Russian', 'direction' => 'ltr'),
'sv' => array('q' => 0.9, 'lang' => 'sv_SE', 'name' => 'Swedish', 'direction' => 'ltr'),
'te' => array('q' => 0.3, 'lang' => 'te_IN', 'name' => 'Telugu', 'direction' => 'ltr'),
'tr' => array('q' => 0.5, 'lang' => 'tr_TR', 'name' => 'Turkish', 'direction' => 'ltr'),
'uk' => array('q' => 0.7, 'lang' => 'uk_UA', 'name' => 'Ukrainian', 'direction' => 'ltr'),
'vi' => array('q' => 0.7, 'lang' => 'vi_VN', 'name' => 'Vietnamese', 'direction' => 'ltr'),
'zh-cn' => array('q' => 0.9, 'lang' => 'zh_CN', 'name' => 'Chinese (Simplified)', 'direction' => 'ltr'),
'zh-hant' => array('q' => 0.2, 'lang' => 'zh_hant', 'name' => 'Chinese (Taiwanese)', 'direction' => 'ltr'),
);
}
......@@ -60,23 +60,22 @@ function subs_subscribe_to($user, $other)
subs_notify($other, $user);
if (common_config('memcached', 'enabled')) {
$cache = new Memcache();
if ($cache->connect(common_config('memcached', 'server'), common_config('memcached', 'port'))) {
$cache->delete(common_cache_key('user:notices_with_friends:' . $user->id));
}
}
$cache = common_memcache();
if ($cache) {
$cache->delete(common_cache_key('user:notices_with_friends:' . $user->id));
}
if ($other->autosubscribe && !$other->isSubscribed($user) && !$user->hasBlocked($other)) {
if (!$other->subscribeTo($user)) {
return _('Could not subscribe other to you.');
}
if (common_config('memcached', 'enabled')) {
$cache = new Memcache();
if ($cache->connect(common_config('memcached', 'server'), common_config('memcached', 'port'))) {
$cache->delete(common_cache_key('user:notices_with_friends:' . $other->id));
}
}
$cache = common_memcache();
if ($cache) {
$cache->delete(common_cache_key('user:notices_with_friends:' . $other->id));
}
subs_notify($user, $other);
}
......@@ -134,12 +133,11 @@ function subs_unsubscribe_to($user, $other)
if (!$sub->delete())
return _('Couldn\'t delete subscription.');
if (common_config('memcached', 'enabled')) {
$cache = new Memcache();
if ($cache->connect(common_config('memcached', 'server'), common_config('memcached', 'port'))) {
$cache->delete(common_cache_key('user:notices_with_friends:' . $user->id));
}
}
$cache = common_memcache();
if ($cache) {
$cache->delete(common_cache_key('user:notices_with_friends:' . $user->id));
}
return true;
}
......
......@@ -690,4 +690,4 @@ class TwitterapiAction extends Action
}
}
\ No newline at end of file
}
......@@ -900,6 +900,8 @@ function common_fancy_url($action, $args=null)
return common_path('group/'.$args['nickname'].'/rss');
case 'groupmembers':
return common_path('group/'.$args['nickname'].'/members');
case 'grouplogo':
return common_path('group/'.$args['nickname'].'/logo');
case 'usergroups':
return common_path($args['nickname'].'/groups');
case 'groups':
......
This source diff could not be displayed because it is too large. You can view the blob instead.
This source diff could not be displayed because it is too large. You can view the blob instead.
This source diff could not be displayed because it is too large. You can view the blob instead.
This source diff could not be displayed because it is too large. You can view the blob instead.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
......@@ -42,68 +42,70 @@ common_log(LOG_INFO, 'Updating user inboxes.');
$ids = file($id_file);
foreach ($ids as $id) {
$user = User::staticGet('id', $id);
$user = User::staticGet('id', $id);
if (!$user) {
common_log(LOG_WARNING, 'No such user: ' . $id);
continue;
}
if ($user->inboxed) {
common_log(LOG_WARNING, 'Already inboxed: ' . $id);
continue;
}
if (!$user) {