The overloaded DB_DataObject function staticGet is now called getKV
I used this hacky sed-command (run it from your GNU Social root, or change the first grep's path to where it actually lies) to do a rough fix on all ::staticGet calls and rename them to ::getKV sed -i -s -e '/DataObject::staticGet/I!s/::staticGet/::getKV/Ig' $(grep -R ::staticGet `pwd`/* | grep -v -e '^extlib' | grep -v DataObject:: |grep -v "function staticGet"|cut -d: -f1 |sort |uniq) If you're applying this, remember to change the Managed_DataObject and Memcached_DataObject function definitions of staticGet to getKV! This might of course take some getting used to, or modification fo StatusNet plugins, but the result is that all the static calls (to staticGet) are now properly made without breaking PHP Strict Standards. Standards are there to be followed (and they caused some very bad confusion when used with get_called_class) Reasonably any plugin or code that tests for the definition of 'GNUSOCIAL' or similar will take this change into consideration.
This commit is contained in:
parent
e95f77d34c
commit
2a4dc77a63
@ -94,7 +94,7 @@ class AddpeopletagAction extends Action
|
|||||||
|
|
||||||
$tagged_id = $this->arg('tagged');
|
$tagged_id = $this->arg('tagged');
|
||||||
|
|
||||||
$this->tagged = Profile::staticGet('id', $tagged_id);
|
$this->tagged = Profile::getKV('id', $tagged_id);
|
||||||
|
|
||||||
if (empty($this->tagged)) {
|
if (empty($this->tagged)) {
|
||||||
// TRANS: Client error displayed trying to perform an action related to a non-existing profile.
|
// TRANS: Client error displayed trying to perform an action related to a non-existing profile.
|
||||||
@ -103,7 +103,7 @@ class AddpeopletagAction extends Action
|
|||||||
}
|
}
|
||||||
|
|
||||||
$id = $this->arg('peopletag_id');
|
$id = $this->arg('peopletag_id');
|
||||||
$this->peopletag = Profile_list::staticGet('id', $id);
|
$this->peopletag = Profile_list::getKV('id', $id);
|
||||||
|
|
||||||
if (empty($this->peopletag)) {
|
if (empty($this->peopletag)) {
|
||||||
// TRANS: Client error displayed trying to reference a non-existing list.
|
// TRANS: Client error displayed trying to reference a non-existing list.
|
||||||
@ -130,7 +130,7 @@ class AddpeopletagAction extends Action
|
|||||||
$this->peopletag->tag);
|
$this->peopletag->tag);
|
||||||
|
|
||||||
if (!$ptag) {
|
if (!$ptag) {
|
||||||
$user = User::staticGet('id', $id);
|
$user = User::getKV('id', $id);
|
||||||
if ($user) {
|
if ($user) {
|
||||||
$this->clientError(
|
$this->clientError(
|
||||||
// TRANS: Client error displayed when an unknown error occurs when adding a user to a list.
|
// TRANS: Client error displayed when an unknown error occurs when adding a user to a list.
|
||||||
|
@ -62,7 +62,7 @@ class AllrssAction extends Rss10Action
|
|||||||
{
|
{
|
||||||
parent::prepare($args);
|
parent::prepare($args);
|
||||||
$nickname = $this->trimmed('nickname');
|
$nickname = $this->trimmed('nickname');
|
||||||
$this->user = User::staticGet('nickname', $nickname);
|
$this->user = User::getKV('nickname', $nickname);
|
||||||
|
|
||||||
if (!$this->user) {
|
if (!$this->user) {
|
||||||
// TRANS: Client error when user not found for an rss related action.
|
// TRANS: Client error when user not found for an rss related action.
|
||||||
|
@ -69,7 +69,7 @@ class ApiconversationAction extends ApiAuthAction
|
|||||||
throw new ClientException(_('No conversation ID.'));
|
throw new ClientException(_('No conversation ID.'));
|
||||||
}
|
}
|
||||||
|
|
||||||
$this->conversation = Conversation::staticGet('id', $convId);
|
$this->conversation = Conversation::getKV('id', $convId);
|
||||||
|
|
||||||
if (empty($this->conversation)) {
|
if (empty($this->conversation)) {
|
||||||
// TRANS: Client exception thrown when referring to a non-existing conversation ID (%d).
|
// TRANS: Client exception thrown when referring to a non-existing conversation ID (%d).
|
||||||
|
@ -64,12 +64,12 @@ class ApiFavoriteCreateAction extends ApiAuthAction
|
|||||||
parent::prepare($args);
|
parent::prepare($args);
|
||||||
|
|
||||||
$this->user = $this->auth_user;
|
$this->user = $this->auth_user;
|
||||||
$this->notice = Notice::staticGet($this->arg('id'));
|
$this->notice = Notice::getKV($this->arg('id'));
|
||||||
if ($this->notice->repeat_of != '' ) {
|
if ($this->notice->repeat_of != '' ) {
|
||||||
common_log(LOG_DEBUG, 'Trying to Fave '.$this->notice->id.', repeat of '.$this->notice->repeat_of);
|
common_log(LOG_DEBUG, 'Trying to Fave '.$this->notice->id.', repeat of '.$this->notice->repeat_of);
|
||||||
common_log(LOG_DEBUG, 'Will Fave '.$this->notice->repeat_of.' instead');
|
common_log(LOG_DEBUG, 'Will Fave '.$this->notice->repeat_of.' instead');
|
||||||
$real_notice_id = $this->notice->repeat_of;
|
$real_notice_id = $this->notice->repeat_of;
|
||||||
$this->notice = Notice::staticGet($real_notice_id);
|
$this->notice = Notice::getKV($real_notice_id);
|
||||||
}
|
}
|
||||||
|
|
||||||
return true;
|
return true;
|
||||||
@ -163,7 +163,7 @@ class ApiFavoriteCreateAction extends ApiAuthAction
|
|||||||
*/
|
*/
|
||||||
function notify($fave, $notice, $user)
|
function notify($fave, $notice, $user)
|
||||||
{
|
{
|
||||||
$other = User::staticGet('id', $notice->profile_id);
|
$other = User::getKV('id', $notice->profile_id);
|
||||||
if ($other && $other->id != $user->id) {
|
if ($other && $other->id != $user->id) {
|
||||||
if ($other->email && $other->emailnotifyfav) {
|
if ($other->email && $other->emailnotifyfav) {
|
||||||
mail_notify_fave($other, $user, $notice);
|
mail_notify_fave($other, $user, $notice);
|
||||||
|
@ -64,12 +64,12 @@ class ApiFavoriteDestroyAction extends ApiAuthAction
|
|||||||
parent::prepare($args);
|
parent::prepare($args);
|
||||||
|
|
||||||
$this->user = $this->auth_user;
|
$this->user = $this->auth_user;
|
||||||
$this->notice = Notice::staticGet($this->arg('id'));
|
$this->notice = Notice::getKV($this->arg('id'));
|
||||||
if ($this->notice->repeat_of != '' ) {
|
if ($this->notice->repeat_of != '' ) {
|
||||||
common_log(LOG_DEBUG, 'Trying to unFave '.$this->notice->id);
|
common_log(LOG_DEBUG, 'Trying to unFave '.$this->notice->id);
|
||||||
common_log(LOG_DEBUG, 'Will unFave '.$this->notice->repeat_of.' instead');
|
common_log(LOG_DEBUG, 'Will unFave '.$this->notice->repeat_of.' instead');
|
||||||
$real_notice_id = $this->notice->repeat_of;
|
$real_notice_id = $this->notice->repeat_of;
|
||||||
$this->notice = Notice::staticGet($real_notice_id);
|
$this->notice = Notice::getKV($real_notice_id);
|
||||||
}
|
}
|
||||||
|
|
||||||
return true;
|
return true;
|
||||||
|
@ -68,17 +68,17 @@ class ApiFriendshipsShowAction extends ApiBareAuthAction
|
|||||||
$target_screen_name = $this->trimmed('target_screen_name');
|
$target_screen_name = $this->trimmed('target_screen_name');
|
||||||
|
|
||||||
if (!empty($source_id)) {
|
if (!empty($source_id)) {
|
||||||
$this->source = User::staticGet($source_id);
|
$this->source = User::getKV($source_id);
|
||||||
} elseif (!empty($source_screen_name)) {
|
} elseif (!empty($source_screen_name)) {
|
||||||
$this->source = User::staticGet('nickname', $source_screen_name);
|
$this->source = User::getKV('nickname', $source_screen_name);
|
||||||
} else {
|
} else {
|
||||||
$this->source = $this->auth_user;
|
$this->source = $this->auth_user;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (!empty($target_id)) {
|
if (!empty($target_id)) {
|
||||||
$this->target = User::staticGet($target_id);
|
$this->target = User::getKV($target_id);
|
||||||
} elseif (!empty($target_screen_name)) {
|
} elseif (!empty($target_screen_name)) {
|
||||||
$this->target = User::staticGet('nickname', $target_screen_name);
|
$this->target = User::getKV('nickname', $target_screen_name);
|
||||||
}
|
}
|
||||||
|
|
||||||
return true;
|
return true;
|
||||||
|
@ -297,13 +297,13 @@ class ApiGroupCreateAction extends ApiAuthAction
|
|||||||
*/
|
*/
|
||||||
function groupNicknameExists($nickname)
|
function groupNicknameExists($nickname)
|
||||||
{
|
{
|
||||||
$local = Local_group::staticGet('nickname', $nickname);
|
$local = Local_group::getKV('nickname', $nickname);
|
||||||
|
|
||||||
if (!empty($local)) {
|
if (!empty($local)) {
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
|
||||||
$alias = Group_alias::staticGet('alias', $nickname);
|
$alias = Group_alias::getKV('alias', $nickname);
|
||||||
|
|
||||||
if (!empty($alias)) {
|
if (!empty($alias)) {
|
||||||
return true;
|
return true;
|
||||||
|
@ -198,7 +198,7 @@ class ApiGroupProfileUpdateAction extends ApiAuthAction
|
|||||||
|
|
||||||
if (!empty($this->nickname) && ($this->nickname != $orig->nickname)) {
|
if (!empty($this->nickname) && ($this->nickname != $orig->nickname)) {
|
||||||
common_log(LOG_INFO, "Saving local group info.");
|
common_log(LOG_INFO, "Saving local group info.");
|
||||||
$local = Local_group::staticGet('group_id', $this->group->id);
|
$local = Local_group::getKV('group_id', $this->group->id);
|
||||||
$local->setNickname($this->nickname);
|
$local->setNickname($this->nickname);
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -220,14 +220,14 @@ class ApiGroupProfileUpdateAction extends ApiAuthAction
|
|||||||
|
|
||||||
function nicknameExists($nickname)
|
function nicknameExists($nickname)
|
||||||
{
|
{
|
||||||
$group = Local_group::staticGet('nickname', $nickname);
|
$group = Local_group::getKV('nickname', $nickname);
|
||||||
|
|
||||||
if (!empty($group) &&
|
if (!empty($group) &&
|
||||||
$group->group_id != $this->group->id) {
|
$group->group_id != $this->group->id) {
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
|
||||||
$alias = Group_alias::staticGet('alias', $nickname);
|
$alias = Group_alias::getKV('alias', $nickname);
|
||||||
|
|
||||||
if (!empty($alias) &&
|
if (!empty($alias) &&
|
||||||
$alias->group_id != $this->group->id) {
|
$alias->group_id != $this->group->id) {
|
||||||
|
@ -68,7 +68,7 @@ class ApiGroupShowAction extends ApiPrivateAuthAction
|
|||||||
$this->group = $this->getTargetGroup($this->arg('id'));
|
$this->group = $this->getTargetGroup($this->arg('id'));
|
||||||
|
|
||||||
if (empty($this->group)) {
|
if (empty($this->group)) {
|
||||||
$alias = Group_alias::staticGet(
|
$alias = Group_alias::getKV(
|
||||||
'alias',
|
'alias',
|
||||||
common_canonical_nickname($this->arg('id'))
|
common_canonical_nickname($this->arg('id'))
|
||||||
);
|
);
|
||||||
|
@ -126,7 +126,7 @@ class ApiSearchJSONAction extends ApiPrivateAuthAction
|
|||||||
$stream = new TagNoticeStream(substr($q, 1), $this->auth_profile);
|
$stream = new TagNoticeStream(substr($q, 1), $this->auth_profile);
|
||||||
} else if ($this->isAnURL($q)) {
|
} else if ($this->isAnURL($q)) {
|
||||||
$canon = File_redirection::_canonUrl($q);
|
$canon = File_redirection::_canonUrl($q);
|
||||||
$file = File::staticGet('url', $canon);
|
$file = File::getKV('url', $canon);
|
||||||
if (!empty($file)) {
|
if (!empty($file)) {
|
||||||
$stream = new FileNoticeStream($file, $this->auth_profile);
|
$stream = new FileNoticeStream($file, $this->auth_profile);
|
||||||
}
|
}
|
||||||
|
@ -77,7 +77,7 @@ class ApiStatusesDestroyAction extends ApiAuthAction
|
|||||||
$this->notice_id = (int)$this->arg('id');
|
$this->notice_id = (int)$this->arg('id');
|
||||||
}
|
}
|
||||||
|
|
||||||
$this->notice = Notice::staticGet((int)$this->notice_id);
|
$this->notice = Notice::getKV((int)$this->notice_id);
|
||||||
|
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
@ -67,7 +67,7 @@ class ApiStatusesRetweetAction extends ApiAuthAction
|
|||||||
|
|
||||||
$id = $this->trimmed('id');
|
$id = $this->trimmed('id');
|
||||||
|
|
||||||
$this->original = Notice::staticGet('id', $id);
|
$this->original = Notice::getKV('id', $id);
|
||||||
|
|
||||||
if (empty($this->original)) {
|
if (empty($this->original)) {
|
||||||
// TRANS: Client error displayed trying to repeat a non-existing notice through the API.
|
// TRANS: Client error displayed trying to repeat a non-existing notice through the API.
|
||||||
|
@ -63,7 +63,7 @@ class ApiStatusesRetweetsAction extends ApiAuthAction
|
|||||||
|
|
||||||
$id = $this->trimmed('id');
|
$id = $this->trimmed('id');
|
||||||
|
|
||||||
$this->original = Notice::staticGet('id', $id);
|
$this->original = Notice::getKV('id', $id);
|
||||||
|
|
||||||
if (empty($this->original)) {
|
if (empty($this->original)) {
|
||||||
// TRANS: Client error displayed trying to display redents of a non-exiting notice.
|
// TRANS: Client error displayed trying to display redents of a non-exiting notice.
|
||||||
|
@ -82,7 +82,7 @@ class ApiStatusesShowAction extends ApiPrivateAuthAction
|
|||||||
$this->notice_id = (int)$this->arg('id');
|
$this->notice_id = (int)$this->arg('id');
|
||||||
}
|
}
|
||||||
|
|
||||||
$this->notice = Notice::staticGet((int)$this->notice_id);
|
$this->notice = Notice::getKV((int)$this->notice_id);
|
||||||
|
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
@ -147,7 +147,7 @@ class ApiStatusesShowAction extends ApiPrivateAuthAction
|
|||||||
// XXX: Twitter just sets a 404 header and doens't bother
|
// XXX: Twitter just sets a 404 header and doens't bother
|
||||||
// to return an err msg
|
// to return an err msg
|
||||||
|
|
||||||
$deleted = Deleted_notice::staticGet($this->notice_id);
|
$deleted = Deleted_notice::getKV($this->notice_id);
|
||||||
|
|
||||||
if (!empty($deleted)) {
|
if (!empty($deleted)) {
|
||||||
$this->clientError(
|
$this->clientError(
|
||||||
|
@ -254,7 +254,7 @@ class ApiStatusesUpdateAction extends ApiAuthAction
|
|||||||
if (!empty($this->in_reply_to_status_id)) {
|
if (!empty($this->in_reply_to_status_id)) {
|
||||||
// Check whether notice actually exists
|
// Check whether notice actually exists
|
||||||
|
|
||||||
$reply = Notice::staticGet($this->in_reply_to_status_id);
|
$reply = Notice::getKV($this->in_reply_to_status_id);
|
||||||
|
|
||||||
if ($reply) {
|
if ($reply) {
|
||||||
$reply_to = $this->in_reply_to_status_id;
|
$reply_to = $this->in_reply_to_status_id;
|
||||||
|
@ -414,7 +414,7 @@ class ApiTimelineUserAction extends ApiBareAuthAction
|
|||||||
common_debug("Note ID is {$note->id}");
|
common_debug("Note ID is {$note->id}");
|
||||||
|
|
||||||
if (!empty($note->id)) {
|
if (!empty($note->id)) {
|
||||||
$notice = Notice::staticGet('uri', trim($note->id));
|
$notice = Notice::getKV('uri', trim($note->id));
|
||||||
|
|
||||||
if (!empty($notice)) {
|
if (!empty($notice)) {
|
||||||
// TRANS: Client error displayed when using another format than AtomPub.
|
// TRANS: Client error displayed when using another format than AtomPub.
|
||||||
@ -445,7 +445,7 @@ class ApiTimelineUserAction extends ApiBareAuthAction
|
|||||||
if (!empty($profile)) {
|
if (!empty($profile)) {
|
||||||
$options['replies'][] = $uri;
|
$options['replies'][] = $uri;
|
||||||
} else {
|
} else {
|
||||||
$group = User_group::staticGet('uri', $uri);
|
$group = User_group::getKV('uri', $uri);
|
||||||
if (!empty($group)) {
|
if (!empty($group)) {
|
||||||
$options['groups'][] = $group->id;
|
$options['groups'][] = $group->id;
|
||||||
} else {
|
} else {
|
||||||
@ -459,7 +459,7 @@ class ApiTimelineUserAction extends ApiBareAuthAction
|
|||||||
// @fixme what about conversation ID?
|
// @fixme what about conversation ID?
|
||||||
|
|
||||||
if (!empty($activity->context->replyToID)) {
|
if (!empty($activity->context->replyToID)) {
|
||||||
$orig = Notice::staticGet('uri',
|
$orig = Notice::getKV('uri',
|
||||||
$activity->context->replyToID);
|
$activity->context->replyToID);
|
||||||
if (!empty($orig)) {
|
if (!empty($orig)) {
|
||||||
$options['reply_to'] = $orig->id;
|
$options['reply_to'] = $orig->id;
|
||||||
|
@ -56,7 +56,7 @@ class ApiUserProfileImageAction extends ApiPrivateAuthAction
|
|||||||
function prepare($args)
|
function prepare($args)
|
||||||
{
|
{
|
||||||
parent::prepare($args);
|
parent::prepare($args);
|
||||||
$this->user = User::staticGet('nickname', $this->arg('screen_name'));
|
$this->user = User::getKV('nickname', $this->arg('screen_name'));
|
||||||
$this->size = $this->arg('size');
|
$this->size = $this->arg('size');
|
||||||
|
|
||||||
return true;
|
return true;
|
||||||
|
@ -68,7 +68,7 @@ class ApiUserShowAction extends ApiPrivateAuthAction
|
|||||||
// XXX: email field deprecated in Twitter's API
|
// XXX: email field deprecated in Twitter's API
|
||||||
|
|
||||||
if (!empty($email)) {
|
if (!empty($email)) {
|
||||||
$this->user = User::staticGet('email', $email);
|
$this->user = User::getKV('email', $email);
|
||||||
} else {
|
} else {
|
||||||
$this->user = $this->getTargetUser($this->arg('id'));
|
$this->user = $this->getTargetUser($this->arg('id'));
|
||||||
}
|
}
|
||||||
|
@ -63,7 +63,7 @@ class ApprovegroupAction extends Action
|
|||||||
$nickname_arg = $this->trimmed('nickname');
|
$nickname_arg = $this->trimmed('nickname');
|
||||||
$id = intval($this->arg('id'));
|
$id = intval($this->arg('id'));
|
||||||
if ($id) {
|
if ($id) {
|
||||||
$this->group = User_group::staticGet('id', $id);
|
$this->group = User_group::getKV('id', $id);
|
||||||
} else if ($nickname_arg) {
|
} else if ($nickname_arg) {
|
||||||
$nickname = common_canonical_nickname($nickname_arg);
|
$nickname = common_canonical_nickname($nickname_arg);
|
||||||
|
|
||||||
@ -75,7 +75,7 @@ class ApprovegroupAction extends Action
|
|||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
|
||||||
$local = Local_group::staticGet('nickname', $nickname);
|
$local = Local_group::getKV('nickname', $nickname);
|
||||||
|
|
||||||
if (!$local) {
|
if (!$local) {
|
||||||
// TRANS: Client error displayed when trying to leave a non-local group.
|
// TRANS: Client error displayed when trying to leave a non-local group.
|
||||||
@ -83,7 +83,7 @@ class ApprovegroupAction extends Action
|
|||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
|
||||||
$this->group = User_group::staticGet('id', $local->group_id);
|
$this->group = User_group::getKV('id', $local->group_id);
|
||||||
} else {
|
} else {
|
||||||
// TRANS: Client error displayed when trying to leave a group without providing a group name or group ID.
|
// TRANS: Client error displayed when trying to leave a group without providing a group name or group ID.
|
||||||
$this->clientError(_('No nickname or ID.'), 404);
|
$this->clientError(_('No nickname or ID.'), 404);
|
||||||
@ -104,7 +104,7 @@ class ApprovegroupAction extends Action
|
|||||||
}
|
}
|
||||||
if ($this->arg('profile_id')) {
|
if ($this->arg('profile_id')) {
|
||||||
if ($cur->isAdmin($this->group)) {
|
if ($cur->isAdmin($this->group)) {
|
||||||
$this->profile = Profile::staticGet('id', $this->arg('profile_id'));
|
$this->profile = Profile::getKV('id', $this->arg('profile_id'));
|
||||||
} else {
|
} else {
|
||||||
// TRANS: Client error displayed trying to approve group membership while not a group administrator.
|
// TRANS: Client error displayed trying to approve group membership while not a group administrator.
|
||||||
$this->clientError(_('Only group admin can approve or cancel join requests.'), 403);
|
$this->clientError(_('Only group admin can approve or cancel join requests.'), 403);
|
||||||
|
@ -61,7 +61,7 @@ class ApprovesubAction extends Action
|
|||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
if ($this->arg('profile_id')) {
|
if ($this->arg('profile_id')) {
|
||||||
$this->profile = Profile::staticGet('id', $this->arg('profile_id'));
|
$this->profile = Profile::getKV('id', $this->arg('profile_id'));
|
||||||
} else {
|
} else {
|
||||||
// TRANS: Client error displayed trying to approve subscriptionswithout specifying a profile to approve.
|
// TRANS: Client error displayed trying to approve subscriptionswithout specifying a profile to approve.
|
||||||
$this->clientError(_('Must specify a profile.'));
|
$this->clientError(_('Must specify a profile.'));
|
||||||
|
@ -62,7 +62,7 @@ class AtompubfavoritefeedAction extends ApiAuthAction
|
|||||||
{
|
{
|
||||||
parent::prepare($argarray);
|
parent::prepare($argarray);
|
||||||
|
|
||||||
$this->_profile = Profile::staticGet('id', $this->trimmed('profile'));
|
$this->_profile = Profile::getKV('id', $this->trimmed('profile'));
|
||||||
|
|
||||||
if (empty($this->_profile)) {
|
if (empty($this->_profile)) {
|
||||||
// TRANS: Client exception thrown when requesting a favorite feed for a non-existing profile.
|
// TRANS: Client exception thrown when requesting a favorite feed for a non-existing profile.
|
||||||
@ -251,7 +251,7 @@ class AtompubfavoritefeedAction extends ApiAuthAction
|
|||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
$notice = Notice::staticGet('uri', $note->id);
|
$notice = Notice::getKV('uri', $note->id);
|
||||||
|
|
||||||
if (empty($notice)) {
|
if (empty($notice)) {
|
||||||
// XXX: import from listed URL or something
|
// XXX: import from listed URL or something
|
||||||
@ -362,7 +362,7 @@ class AtompubfavoritefeedAction extends ApiAuthAction
|
|||||||
*/
|
*/
|
||||||
function notify($fave, $notice, $user)
|
function notify($fave, $notice, $user)
|
||||||
{
|
{
|
||||||
$other = User::staticGet('id', $notice->profile_id);
|
$other = User::getKV('id', $notice->profile_id);
|
||||||
if ($other && $other->id != $user->id) {
|
if ($other && $other->id != $user->id) {
|
||||||
if ($other->email && $other->emailnotifyfav) {
|
if ($other->email && $other->emailnotifyfav) {
|
||||||
mail_notify_fave($other, $user, $notice);
|
mail_notify_fave($other, $user, $notice);
|
||||||
|
@ -64,7 +64,7 @@ class AtompubmembershipfeedAction extends ApiAuthAction
|
|||||||
|
|
||||||
$profileId = $this->trimmed('profile');
|
$profileId = $this->trimmed('profile');
|
||||||
|
|
||||||
$this->_profile = Profile::staticGet('id', $profileId);
|
$this->_profile = Profile::getKV('id', $profileId);
|
||||||
|
|
||||||
if (empty($this->_profile)) {
|
if (empty($this->_profile)) {
|
||||||
// TRANS: Client exception.
|
// TRANS: Client exception.
|
||||||
@ -250,7 +250,7 @@ class AtompubmembershipfeedAction extends ApiAuthAction
|
|||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
$group = User_group::staticGet('uri', $groupObj->id);
|
$group = User_group::getKV('uri', $groupObj->id);
|
||||||
|
|
||||||
if (empty($group)) {
|
if (empty($group)) {
|
||||||
// XXX: import from listed URL or something
|
// XXX: import from listed URL or something
|
||||||
|
@ -68,14 +68,14 @@ class AtompubshowfavoriteAction extends ApiAuthAction
|
|||||||
$profileId = $this->trimmed('profile');
|
$profileId = $this->trimmed('profile');
|
||||||
$noticeId = $this->trimmed('notice');
|
$noticeId = $this->trimmed('notice');
|
||||||
|
|
||||||
$this->_profile = Profile::staticGet('id', $profileId);
|
$this->_profile = Profile::getKV('id', $profileId);
|
||||||
|
|
||||||
if (empty($this->_profile)) {
|
if (empty($this->_profile)) {
|
||||||
// TRANS: Client exception.
|
// TRANS: Client exception.
|
||||||
throw new ClientException(_('No such profile.'), 404);
|
throw new ClientException(_('No such profile.'), 404);
|
||||||
}
|
}
|
||||||
|
|
||||||
$this->_notice = Notice::staticGet('id', $noticeId);
|
$this->_notice = Notice::getKV('id', $noticeId);
|
||||||
|
|
||||||
if (empty($this->_notice)) {
|
if (empty($this->_notice)) {
|
||||||
// TRANS: Client exception thrown when referencing a non-existing notice.
|
// TRANS: Client exception thrown when referencing a non-existing notice.
|
||||||
|
@ -65,7 +65,7 @@ class AtompubshowmembershipAction extends ApiAuthAction
|
|||||||
|
|
||||||
$profileId = $this->trimmed('profile');
|
$profileId = $this->trimmed('profile');
|
||||||
|
|
||||||
$this->_profile = Profile::staticGet('id', $profileId);
|
$this->_profile = Profile::getKV('id', $profileId);
|
||||||
|
|
||||||
if (empty($this->_profile)) {
|
if (empty($this->_profile)) {
|
||||||
// TRANS: Client exception.
|
// TRANS: Client exception.
|
||||||
@ -74,7 +74,7 @@ class AtompubshowmembershipAction extends ApiAuthAction
|
|||||||
|
|
||||||
$groupId = $this->trimmed('group');
|
$groupId = $this->trimmed('group');
|
||||||
|
|
||||||
$this->_group = User_group::staticGet('id', $groupId);
|
$this->_group = User_group::getKV('id', $groupId);
|
||||||
|
|
||||||
if (empty($this->_group)) {
|
if (empty($this->_group)) {
|
||||||
// TRANS: Client exception thrown when referencing a non-existing group.
|
// TRANS: Client exception thrown when referencing a non-existing group.
|
||||||
|
@ -64,7 +64,7 @@ class AtompubshowsubscriptionAction extends ApiAuthAction
|
|||||||
parent::prepare($argarray);
|
parent::prepare($argarray);
|
||||||
$subscriberId = $this->trimmed('subscriber');
|
$subscriberId = $this->trimmed('subscriber');
|
||||||
|
|
||||||
$this->_subscriber = Profile::staticGet('id', $subscriberId);
|
$this->_subscriber = Profile::getKV('id', $subscriberId);
|
||||||
|
|
||||||
if (empty($this->_subscriber)) {
|
if (empty($this->_subscriber)) {
|
||||||
// TRANS: Client exception thrown when trying to display a subscription for a non-existing profile ID.
|
// TRANS: Client exception thrown when trying to display a subscription for a non-existing profile ID.
|
||||||
@ -75,7 +75,7 @@ class AtompubshowsubscriptionAction extends ApiAuthAction
|
|||||||
|
|
||||||
$subscribedId = $this->trimmed('subscribed');
|
$subscribedId = $this->trimmed('subscribed');
|
||||||
|
|
||||||
$this->_subscribed = Profile::staticGet('id', $subscribedId);
|
$this->_subscribed = Profile::getKV('id', $subscribedId);
|
||||||
|
|
||||||
if (empty($this->_subscribed)) {
|
if (empty($this->_subscribed)) {
|
||||||
// TRANS: Client exception thrown when trying to display a subscription for a non-existing profile ID.
|
// TRANS: Client exception thrown when trying to display a subscription for a non-existing profile ID.
|
||||||
|
@ -66,7 +66,7 @@ class AtompubsubscriptionfeedAction extends ApiAuthAction
|
|||||||
|
|
||||||
$subscriber = $this->trimmed('subscriber');
|
$subscriber = $this->trimmed('subscriber');
|
||||||
|
|
||||||
$this->_profile = Profile::staticGet('id', $subscriber);
|
$this->_profile = Profile::getKV('id', $subscriber);
|
||||||
|
|
||||||
if (empty($this->_profile)) {
|
if (empty($this->_profile)) {
|
||||||
// TRANS: Client exception thrown when trying to display a subscription for a non-existing profile ID.
|
// TRANS: Client exception thrown when trying to display a subscription for a non-existing profile ID.
|
||||||
|
@ -65,7 +65,7 @@ class AttachmentAction extends Action
|
|||||||
parent::prepare($args);
|
parent::prepare($args);
|
||||||
|
|
||||||
if ($id = $this->trimmed('attachment')) {
|
if ($id = $this->trimmed('attachment')) {
|
||||||
$this->attachment = File::staticGet($id);
|
$this->attachment = File::getKV($id);
|
||||||
}
|
}
|
||||||
|
|
||||||
if (empty($this->attachment)) {
|
if (empty($this->attachment)) {
|
||||||
|
@ -71,7 +71,7 @@ class Attachment_thumbnailAction extends AttachmentAction
|
|||||||
*/
|
*/
|
||||||
function showCore()
|
function showCore()
|
||||||
{
|
{
|
||||||
$file_thumbnail = File_thumbnail::staticGet('file_id', $this->attachment->id);
|
$file_thumbnail = File_thumbnail::getKV('file_id', $this->attachment->id);
|
||||||
if (empty($file_thumbnail->url)) {
|
if (empty($file_thumbnail->url)) {
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
@ -73,7 +73,7 @@ class AvatarbynicknameAction extends Action
|
|||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
$user = User::staticGet('nickname', $nickname);
|
$user = User::getKV('nickname', $nickname);
|
||||||
if (!$user) {
|
if (!$user) {
|
||||||
// TRANS: Client error displayed trying to get an avatar for a non-existing user.
|
// TRANS: Client error displayed trying to get an avatar for a non-existing user.
|
||||||
$this->clientError(_('No such user.'));
|
$this->clientError(_('No such user.'));
|
||||||
|
@ -74,7 +74,7 @@ class BlockedfromgroupAction extends GroupAction
|
|||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
|
||||||
$local = Local_group::staticGet('nickname', $nickname);
|
$local = Local_group::getKV('nickname', $nickname);
|
||||||
|
|
||||||
if (!$local) {
|
if (!$local) {
|
||||||
// TRANS: Client error displayed when requesting a list of blocked users for a non-local group.
|
// TRANS: Client error displayed when requesting a list of blocked users for a non-local group.
|
||||||
@ -82,7 +82,7 @@ class BlockedfromgroupAction extends GroupAction
|
|||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
|
||||||
$this->group = User_group::staticGet('id', $local->group_id);
|
$this->group = User_group::getKV('id', $local->group_id);
|
||||||
|
|
||||||
if (!$this->group) {
|
if (!$this->group) {
|
||||||
// TRANS: Client error displayed when requesting a list of blocked users for a non-existing group.
|
// TRANS: Client error displayed when requesting a list of blocked users for a non-existing group.
|
||||||
|
@ -63,7 +63,7 @@ class CancelgroupAction extends Action
|
|||||||
$nickname_arg = $this->trimmed('nickname');
|
$nickname_arg = $this->trimmed('nickname');
|
||||||
$id = intval($this->arg('id'));
|
$id = intval($this->arg('id'));
|
||||||
if ($id) {
|
if ($id) {
|
||||||
$this->group = User_group::staticGet('id', $id);
|
$this->group = User_group::getKV('id', $id);
|
||||||
} else if ($nickname_arg) {
|
} else if ($nickname_arg) {
|
||||||
$nickname = common_canonical_nickname($nickname_arg);
|
$nickname = common_canonical_nickname($nickname_arg);
|
||||||
|
|
||||||
@ -74,7 +74,7 @@ class CancelgroupAction extends Action
|
|||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
|
||||||
$local = Local_group::staticGet('nickname', $nickname);
|
$local = Local_group::getKV('nickname', $nickname);
|
||||||
|
|
||||||
if (!$local) {
|
if (!$local) {
|
||||||
// TRANS: Client error displayed when trying to leave a non-local group.
|
// TRANS: Client error displayed when trying to leave a non-local group.
|
||||||
@ -82,7 +82,7 @@ class CancelgroupAction extends Action
|
|||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
|
||||||
$this->group = User_group::staticGet('id', $local->group_id);
|
$this->group = User_group::getKV('id', $local->group_id);
|
||||||
} else {
|
} else {
|
||||||
// TRANS: Client error displayed when trying to leave a group without providing a group name or group ID.
|
// TRANS: Client error displayed when trying to leave a group without providing a group name or group ID.
|
||||||
$this->clientError(_('No nickname or ID.'), 404);
|
$this->clientError(_('No nickname or ID.'), 404);
|
||||||
@ -103,7 +103,7 @@ class CancelgroupAction extends Action
|
|||||||
}
|
}
|
||||||
if ($this->arg('profile_id')) {
|
if ($this->arg('profile_id')) {
|
||||||
if ($cur->isAdmin($this->group)) {
|
if ($cur->isAdmin($this->group)) {
|
||||||
$this->profile = Profile::staticGet('id', $this->arg('profile_id'));
|
$this->profile = Profile::getKV('id', $this->arg('profile_id'));
|
||||||
} else {
|
} else {
|
||||||
// TRANS: Client error displayed when trying to approve or cancel a group join request without
|
// TRANS: Client error displayed when trying to approve or cancel a group join request without
|
||||||
// TRANS: being a group administrator.
|
// TRANS: being a group administrator.
|
||||||
|
@ -85,7 +85,7 @@ class CancelsubscriptionAction extends Action
|
|||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
$other = Profile::staticGet('id', $other_id);
|
$other = Profile::getKV('id', $other_id);
|
||||||
|
|
||||||
if (!$other) {
|
if (!$other) {
|
||||||
// TRANS: Client error displayed when trying to leave a non-existing group.
|
// TRANS: Client error displayed when trying to leave a non-existing group.
|
||||||
|
@ -74,7 +74,7 @@ class ConfirmaddressAction extends Action
|
|||||||
$this->clientError(_('No confirmation code.'));
|
$this->clientError(_('No confirmation code.'));
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
$confirm = Confirm_address::staticGet('code', $code);
|
$confirm = Confirm_address::getKV('code', $code);
|
||||||
if (!$confirm) {
|
if (!$confirm) {
|
||||||
// TRANS: Client error displayed when providing a non-existing confirmation code in the contact address confirmation action.
|
// TRANS: Client error displayed when providing a non-existing confirmation code in the contact address confirmation action.
|
||||||
$this->clientError(_('Confirmation code not found.'));
|
$this->clientError(_('Confirmation code not found.'));
|
||||||
@ -110,7 +110,7 @@ class ConfirmaddressAction extends Action
|
|||||||
|
|
||||||
if ($type == 'sms') {
|
if ($type == 'sms') {
|
||||||
$cur->carrier = ($confirm->address_extra)+0;
|
$cur->carrier = ($confirm->address_extra)+0;
|
||||||
$carrier = Sms_carrier::staticGet($cur->carrier);
|
$carrier = Sms_carrier::getKV($cur->carrier);
|
||||||
$cur->smsemail = $carrier->toEmailAddress($cur->sms);
|
$cur->smsemail = $carrier->toEmailAddress($cur->sms);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -64,7 +64,7 @@ class DeleteapplicationAction extends Action
|
|||||||
}
|
}
|
||||||
|
|
||||||
$id = (int)$this->arg('id');
|
$id = (int)$this->arg('id');
|
||||||
$this->app = Oauth_application::staticGet('id', $id);
|
$this->app = Oauth_application::getKV('id', $id);
|
||||||
|
|
||||||
if (empty($this->app)) {
|
if (empty($this->app)) {
|
||||||
// TRANS: Client error displayed trying to delete an application that does not exist.
|
// TRANS: Client error displayed trying to delete an application that does not exist.
|
||||||
|
@ -68,7 +68,7 @@ class DeletegroupAction extends RedirectingAction
|
|||||||
$nickname_arg = $this->trimmed('nickname');
|
$nickname_arg = $this->trimmed('nickname');
|
||||||
$id = intval($this->arg('id'));
|
$id = intval($this->arg('id'));
|
||||||
if ($id) {
|
if ($id) {
|
||||||
$this->group = User_group::staticGet('id', $id);
|
$this->group = User_group::getKV('id', $id);
|
||||||
} else if ($nickname_arg) {
|
} else if ($nickname_arg) {
|
||||||
$nickname = common_canonical_nickname($nickname_arg);
|
$nickname = common_canonical_nickname($nickname_arg);
|
||||||
|
|
||||||
@ -80,7 +80,7 @@ class DeletegroupAction extends RedirectingAction
|
|||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
|
||||||
$local = Local_group::staticGet('nickname', $nickname);
|
$local = Local_group::getKV('nickname', $nickname);
|
||||||
|
|
||||||
if (!$local) {
|
if (!$local) {
|
||||||
// TRANS: Client error when trying to delete a non-local group.
|
// TRANS: Client error when trying to delete a non-local group.
|
||||||
@ -88,7 +88,7 @@ class DeletegroupAction extends RedirectingAction
|
|||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
|
||||||
$this->group = User_group::staticGet('id', $local->group_id);
|
$this->group = User_group::getKV('id', $local->group_id);
|
||||||
} else {
|
} else {
|
||||||
// TRANS: Client error when trying to delete a group without providing a nickname or ID for the group.
|
// TRANS: Client error when trying to delete a group without providing a nickname or ID for the group.
|
||||||
$this->clientError(_('No nickname or ID.'), 404);
|
$this->clientError(_('No nickname or ID.'), 404);
|
||||||
|
@ -54,7 +54,7 @@ class DeletenoticeAction extends Action
|
|||||||
}
|
}
|
||||||
|
|
||||||
$notice_id = $this->trimmed('notice');
|
$notice_id = $this->trimmed('notice');
|
||||||
$this->notice = Notice::staticGet($notice_id);
|
$this->notice = Notice::getKV($notice_id);
|
||||||
|
|
||||||
if (!$this->notice) {
|
if (!$this->notice) {
|
||||||
// TRANS: Error message displayed trying to delete a non-existing notice.
|
// TRANS: Error message displayed trying to delete a non-existing notice.
|
||||||
|
@ -67,7 +67,7 @@ class DeleteuserAction extends ProfileFormAction
|
|||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
|
||||||
$this->user = User::staticGet('id', $this->profile->id);
|
$this->user = User::getKV('id', $this->profile->id);
|
||||||
|
|
||||||
if (empty($this->user)) {
|
if (empty($this->user)) {
|
||||||
// TRANS: Client error displayed when trying to delete a non-local user.
|
// TRANS: Client error displayed when trying to delete a non-local user.
|
||||||
|
@ -68,7 +68,7 @@ class DisfavorAction extends Action
|
|||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
$id = $this->trimmed('notice');
|
$id = $this->trimmed('notice');
|
||||||
$notice = Notice::staticGet($id);
|
$notice = Notice::getKV($id);
|
||||||
$token = $this->trimmed('token-'.$notice->id);
|
$token = $this->trimmed('token-'.$notice->id);
|
||||||
if (!$token || $token != common_session_token()) {
|
if (!$token || $token != common_session_token()) {
|
||||||
// TRANS: Client error displayed when the session token does not match or is not given.
|
// TRANS: Client error displayed when the session token does not match or is not given.
|
||||||
|
@ -69,8 +69,8 @@ class EditApplicationAction extends Action
|
|||||||
|
|
||||||
$id = (int)$this->arg('id');
|
$id = (int)$this->arg('id');
|
||||||
|
|
||||||
$this->app = Oauth_application::staticGet($id);
|
$this->app = Oauth_application::getKV($id);
|
||||||
$this->owner = User::staticGet($this->app->owner);
|
$this->owner = User::getKV($this->app->owner);
|
||||||
$cur = common_current_user();
|
$cur = common_current_user();
|
||||||
|
|
||||||
if ($cur->id != $this->owner->id) {
|
if ($cur->id != $this->owner->id) {
|
||||||
@ -302,7 +302,7 @@ class EditApplicationAction extends Action
|
|||||||
*/
|
*/
|
||||||
function nameExists($name)
|
function nameExists($name)
|
||||||
{
|
{
|
||||||
$newapp = Oauth_application::staticGet('name', $name);
|
$newapp = Oauth_application::getKV('name', $name);
|
||||||
if (empty($newapp)) {
|
if (empty($newapp)) {
|
||||||
return false;
|
return false;
|
||||||
} else {
|
} else {
|
||||||
|
@ -89,11 +89,11 @@ class EditgroupAction extends GroupAction
|
|||||||
$groupid = $this->trimmed('groupid');
|
$groupid = $this->trimmed('groupid');
|
||||||
|
|
||||||
if ($groupid) {
|
if ($groupid) {
|
||||||
$this->group = User_group::staticGet('id', $groupid);
|
$this->group = User_group::getKV('id', $groupid);
|
||||||
} else {
|
} else {
|
||||||
$local = Local_group::staticGet('nickname', $nickname);
|
$local = Local_group::getKV('nickname', $nickname);
|
||||||
if ($local) {
|
if ($local) {
|
||||||
$this->group = User_group::staticGet('id', $local->group_id);
|
$this->group = User_group::getKV('id', $local->group_id);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -288,7 +288,7 @@ class EditgroupAction extends GroupAction
|
|||||||
|
|
||||||
if ($nickname != $orig->nickname) {
|
if ($nickname != $orig->nickname) {
|
||||||
common_log(LOG_INFO, "Saving local group info.");
|
common_log(LOG_INFO, "Saving local group info.");
|
||||||
$local = Local_group::staticGet('group_id', $this->group->id);
|
$local = Local_group::getKV('group_id', $this->group->id);
|
||||||
$local->setNickname($nickname);
|
$local->setNickname($nickname);
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -309,14 +309,14 @@ class EditgroupAction extends GroupAction
|
|||||||
|
|
||||||
function nicknameExists($nickname)
|
function nicknameExists($nickname)
|
||||||
{
|
{
|
||||||
$group = Local_group::staticGet('nickname', $nickname);
|
$group = Local_group::getKV('nickname', $nickname);
|
||||||
|
|
||||||
if (!empty($group) &&
|
if (!empty($group) &&
|
||||||
$group->group_id != $this->group->id) {
|
$group->group_id != $this->group->id) {
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
|
||||||
$alias = Group_alias::staticGet('alias', $nickname);
|
$alias = Group_alias::getKV('alias', $nickname);
|
||||||
|
|
||||||
if (!empty($alias) &&
|
if (!empty($alias) &&
|
||||||
$alias->group_id != $this->group->id) {
|
$alias->group_id != $this->group->id) {
|
||||||
|
@ -93,9 +93,9 @@ class EditpeopletagAction extends Action
|
|||||||
|
|
||||||
$user = null;
|
$user = null;
|
||||||
if ($id) {
|
if ($id) {
|
||||||
$this->peopletag = Profile_list::staticGet('id', $id);
|
$this->peopletag = Profile_list::getKV('id', $id);
|
||||||
if (!empty($this->peopletag)) {
|
if (!empty($this->peopletag)) {
|
||||||
$user = User::staticGet('id', $this->peopletag->tagger);
|
$user = User::getKV('id', $this->peopletag->tagger);
|
||||||
}
|
}
|
||||||
} else {
|
} else {
|
||||||
if (!$tagger) {
|
if (!$tagger) {
|
||||||
@ -104,7 +104,7 @@ class EditpeopletagAction extends Action
|
|||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
|
||||||
$user = User::staticGet('nickname', $tagger);
|
$user = User::getKV('nickname', $tagger);
|
||||||
$this->peopletag = Profile_list::pkeyGet(array('tagger' => $user->id, 'tag' => $tag));
|
$this->peopletag = Profile_list::pkeyGet(array('tagger' => $user->id, 'tag' => $tag));
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -578,7 +578,7 @@ class EmailsettingsAction extends SettingsAction
|
|||||||
{
|
{
|
||||||
$user = common_current_user();
|
$user = common_current_user();
|
||||||
|
|
||||||
$other = User::staticGet('email', $email);
|
$other = User::getKV('email', $email);
|
||||||
|
|
||||||
if (!$other) {
|
if (!$other) {
|
||||||
return false;
|
return false;
|
||||||
|
@ -69,7 +69,7 @@ class FavorAction extends Action
|
|||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
$id = $this->trimmed('notice');
|
$id = $this->trimmed('notice');
|
||||||
$notice = Notice::staticGet($id);
|
$notice = Notice::getKV($id);
|
||||||
$token = $this->trimmed('token-'.$notice->id);
|
$token = $this->trimmed('token-'.$notice->id);
|
||||||
if (!$token || $token != common_session_token()) {
|
if (!$token || $token != common_session_token()) {
|
||||||
// TRANS: Client error displayed when the session token does not match or is not given.
|
// TRANS: Client error displayed when the session token does not match or is not given.
|
||||||
@ -117,7 +117,7 @@ class FavorAction extends Action
|
|||||||
*/
|
*/
|
||||||
function notify($notice, $user)
|
function notify($notice, $user)
|
||||||
{
|
{
|
||||||
$other = User::staticGet('id', $notice->profile_id);
|
$other = User::getKV('id', $notice->profile_id);
|
||||||
if ($other && $other->id != $user->id) {
|
if ($other && $other->id != $user->id) {
|
||||||
if ($other->email && $other->emailnotifyfav) {
|
if ($other->email && $other->emailnotifyfav) {
|
||||||
mail_notify_fave($other, $user, $notice);
|
mail_notify_fave($other, $user, $notice);
|
||||||
|
@ -65,7 +65,7 @@ class FavoritesrssAction extends Rss10Action
|
|||||||
parent::prepare($args);
|
parent::prepare($args);
|
||||||
|
|
||||||
$nickname = $this->trimmed('nickname');
|
$nickname = $this->trimmed('nickname');
|
||||||
$this->user = User::staticGet('nickname', $nickname);
|
$this->user = User::getKV('nickname', $nickname);
|
||||||
|
|
||||||
if (!$this->user) {
|
if (!$this->user) {
|
||||||
// TRANS: Client error displayed when trying to get the RSS feed with favorites of a user that does not exist.
|
// TRANS: Client error displayed when trying to get the RSS feed with favorites of a user that does not exist.
|
||||||
|
@ -35,7 +35,7 @@ class FileAction extends Action
|
|||||||
// TRANS: Client error displayed when no notice ID was given trying do display a file.
|
// TRANS: Client error displayed when no notice ID was given trying do display a file.
|
||||||
$this->clientError(_('No notice ID.'));
|
$this->clientError(_('No notice ID.'));
|
||||||
}
|
}
|
||||||
$notice = Notice::staticGet('id', $this->id);
|
$notice = Notice::getKV('id', $this->id);
|
||||||
if (empty($notice)) {
|
if (empty($notice)) {
|
||||||
// TRANS: Client error displayed when an invalid notice ID was given trying do display a file.
|
// TRANS: Client error displayed when an invalid notice ID was given trying do display a file.
|
||||||
$this->clientError(_('No notice.'));
|
$this->clientError(_('No notice.'));
|
||||||
|
@ -54,7 +54,7 @@ class FoafAction extends Action
|
|||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
|
||||||
$this->user = User::staticGet('nickname', $this->nickname);
|
$this->user = User::getKV('nickname', $this->nickname);
|
||||||
|
|
||||||
if (!$this->user) {
|
if (!$this->user) {
|
||||||
// TRANS: Client error displayed when requesting Friends of a Friend feed for an object that is not a user.
|
// TRANS: Client error displayed when requesting Friends of a Friend feed for an object that is not a user.
|
||||||
@ -170,7 +170,7 @@ class FoafAction extends Action
|
|||||||
|
|
||||||
if ($sub->find()) {
|
if ($sub->find()) {
|
||||||
while ($sub->fetch()) {
|
while ($sub->fetch()) {
|
||||||
$profile = Profile::staticGet('id', $sub->subscriber);
|
$profile = Profile::getKV('id', $sub->subscriber);
|
||||||
if (empty($profile)) {
|
if (empty($profile)) {
|
||||||
common_debug('Got a bad subscription: '.print_r($sub,true));
|
common_debug('Got a bad subscription: '.print_r($sub,true));
|
||||||
continue;
|
continue;
|
||||||
@ -207,7 +207,7 @@ class FoafAction extends Action
|
|||||||
if ($local == 'local') {
|
if ($local == 'local') {
|
||||||
$foaf_url = common_local_url('foaf', array('nickname' => $nickname));
|
$foaf_url = common_local_url('foaf', array('nickname' => $nickname));
|
||||||
}
|
}
|
||||||
$profile = Profile::staticGet($id);
|
$profile = Profile::getKV($id);
|
||||||
$this->elementStart('Agent', array('rdf:about' => $uri));
|
$this->elementStart('Agent', array('rdf:about' => $uri));
|
||||||
if ($type == BOTH) {
|
if ($type == BOTH) {
|
||||||
$this->element('knows', array('rdf:resource' => $this->user->uri));
|
$this->element('knows', array('rdf:resource' => $this->user->uri));
|
||||||
@ -284,7 +284,7 @@ class FoafAction extends Action
|
|||||||
|
|
||||||
if ($sub->find()) {
|
if ($sub->find()) {
|
||||||
while ($sub->fetch()) {
|
while ($sub->fetch()) {
|
||||||
$profile = Profile::staticGet('id', $sub->subscribed);
|
$profile = Profile::getKV('id', $sub->subscribed);
|
||||||
if (empty($profile)) {
|
if (empty($profile)) {
|
||||||
common_debug('Got a bad subscription: '.print_r($sub,true));
|
common_debug('Got a bad subscription: '.print_r($sub,true));
|
||||||
continue;
|
continue;
|
||||||
|
@ -58,7 +58,7 @@ class FoafGroupAction extends Action
|
|||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
|
||||||
$local = Local_group::staticGet('nickname', $this->nickname);
|
$local = Local_group::getKV('nickname', $this->nickname);
|
||||||
|
|
||||||
if (!$local) {
|
if (!$local) {
|
||||||
// TRANS: Client error displayed when requesting Friends of a Friend feed for a non-local group.
|
// TRANS: Client error displayed when requesting Friends of a Friend feed for a non-local group.
|
||||||
@ -66,7 +66,7 @@ class FoafGroupAction extends Action
|
|||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
|
||||||
$this->group = User_group::staticGet('id', $local->group_id);
|
$this->group = User_group::getKV('id', $local->group_id);
|
||||||
|
|
||||||
if (!$this->group) {
|
if (!$this->group) {
|
||||||
// TRANS: Client error displayed when requesting Friends of a Friend feed for a nickname that is not a group.
|
// TRANS: Client error displayed when requesting Friends of a Friend feed for a nickname that is not a group.
|
||||||
|
@ -72,7 +72,7 @@ class GroupblockAction extends RedirectingAction
|
|||||||
$this->clientError(_('No profile specified.'));
|
$this->clientError(_('No profile specified.'));
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
$this->profile = Profile::staticGet('id', $id);
|
$this->profile = Profile::getKV('id', $id);
|
||||||
if (empty($this->profile)) {
|
if (empty($this->profile)) {
|
||||||
// TRANS: Client error displayed trying to block a user from a group while specifying a non-existing profile.
|
// TRANS: Client error displayed trying to block a user from a group while specifying a non-existing profile.
|
||||||
$this->clientError(_('No profile with that ID.'));
|
$this->clientError(_('No profile with that ID.'));
|
||||||
@ -84,7 +84,7 @@ class GroupblockAction extends RedirectingAction
|
|||||||
$this->clientError(_('No group specified.'));
|
$this->clientError(_('No group specified.'));
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
$this->group = User_group::staticGet('id', $group_id);
|
$this->group = User_group::getKV('id', $group_id);
|
||||||
if (empty($this->group)) {
|
if (empty($this->group)) {
|
||||||
// TRANS: Client error displayed trying to block a user from a group while specifying a non-existing group.
|
// TRANS: Client error displayed trying to block a user from a group while specifying a non-existing group.
|
||||||
$this->clientError(_('No such group.'));
|
$this->clientError(_('No such group.'));
|
||||||
|
@ -76,7 +76,7 @@ class GroupbyidAction extends Action
|
|||||||
|
|
||||||
common_debug("Got ID $id");
|
common_debug("Got ID $id");
|
||||||
|
|
||||||
$this->group = User_group::staticGet('id', $id);
|
$this->group = User_group::getKV('id', $id);
|
||||||
|
|
||||||
if (!$this->group) {
|
if (!$this->group) {
|
||||||
// TRANS: Client error displayed referring to a group's permalink for a non-existing group ID.
|
// TRANS: Client error displayed referring to a group's permalink for a non-existing group ID.
|
||||||
|
@ -90,11 +90,11 @@ class GrouplogoAction extends GroupAction
|
|||||||
$groupid = $this->trimmed('groupid');
|
$groupid = $this->trimmed('groupid');
|
||||||
|
|
||||||
if ($groupid) {
|
if ($groupid) {
|
||||||
$this->group = User_group::staticGet('id', $groupid);
|
$this->group = User_group::getKV('id', $groupid);
|
||||||
} else {
|
} else {
|
||||||
$local = Local_group::staticGet('nickname', $nickname);
|
$local = Local_group::getKV('nickname', $nickname);
|
||||||
if ($local) {
|
if ($local) {
|
||||||
$this->group = User_group::staticGet('id', $local->group_id);
|
$this->group = User_group::getKV('id', $local->group_id);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -78,7 +78,7 @@ class GroupqueueAction extends GroupAction
|
|||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
|
||||||
$local = Local_group::staticGet('nickname', $nickname);
|
$local = Local_group::getKV('nickname', $nickname);
|
||||||
|
|
||||||
if (!$local) {
|
if (!$local) {
|
||||||
// TRANS: Client error displayed when trying to view group members for a non-existing group.
|
// TRANS: Client error displayed when trying to view group members for a non-existing group.
|
||||||
@ -86,7 +86,7 @@ class GroupqueueAction extends GroupAction
|
|||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
|
||||||
$this->group = User_group::staticGet('id', $local->group_id);
|
$this->group = User_group::getKV('id', $local->group_id);
|
||||||
|
|
||||||
if (!$this->group) {
|
if (!$this->group) {
|
||||||
// TRANS: Client error displayed when trying to view group members for an object that is not a group.
|
// TRANS: Client error displayed when trying to view group members for an object that is not a group.
|
||||||
|
@ -90,7 +90,7 @@ class groupRssAction extends Rss10Action
|
|||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
|
||||||
$local = Local_group::staticGet('nickname', $nickname);
|
$local = Local_group::getKV('nickname', $nickname);
|
||||||
|
|
||||||
if (!$local) {
|
if (!$local) {
|
||||||
// TRANS: Client error displayed when requesting a group RSS feed for group that does not exist.
|
// TRANS: Client error displayed when requesting a group RSS feed for group that does not exist.
|
||||||
@ -98,7 +98,7 @@ class groupRssAction extends Rss10Action
|
|||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
|
||||||
$this->group = User_group::staticGet('id', $local->group_id);
|
$this->group = User_group::getKV('id', $local->group_id);
|
||||||
|
|
||||||
if (!$this->group) {
|
if (!$this->group) {
|
||||||
// TRANS: Client error displayed when requesting a group RSS feed for an object that is not a group.
|
// TRANS: Client error displayed when requesting a group RSS feed for an object that is not a group.
|
||||||
|
@ -72,7 +72,7 @@ class GroupunblockAction extends Action
|
|||||||
$this->clientError(_('No profile specified.'));
|
$this->clientError(_('No profile specified.'));
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
$this->profile = Profile::staticGet('id', $id);
|
$this->profile = Profile::getKV('id', $id);
|
||||||
if (empty($this->profile)) {
|
if (empty($this->profile)) {
|
||||||
// TRANS: Client error displayed when trying to unblock a user from a group without providing an existing profile.
|
// TRANS: Client error displayed when trying to unblock a user from a group without providing an existing profile.
|
||||||
$this->clientError(_('No profile with that ID.'));
|
$this->clientError(_('No profile with that ID.'));
|
||||||
@ -84,7 +84,7 @@ class GroupunblockAction extends Action
|
|||||||
$this->clientError(_('No group specified.'));
|
$this->clientError(_('No group specified.'));
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
$this->group = User_group::staticGet('id', $group_id);
|
$this->group = User_group::getKV('id', $group_id);
|
||||||
if (empty($this->group)) {
|
if (empty($this->group)) {
|
||||||
// TRANS: Client error displayed when trying to unblock a user from a non-existing group.
|
// TRANS: Client error displayed when trying to unblock a user from a non-existing group.
|
||||||
$this->clientError(_('No such group.'));
|
$this->clientError(_('No such group.'));
|
||||||
|
@ -111,7 +111,7 @@ class InviteAction extends Action
|
|||||||
|
|
||||||
foreach ($addresses as $email) {
|
foreach ($addresses as $email) {
|
||||||
$email = common_canonical_email($email);
|
$email = common_canonical_email($email);
|
||||||
$other = User::staticGet('email', $email);
|
$other = User::getKV('email', $email);
|
||||||
if ($other) {
|
if ($other) {
|
||||||
if ($user->isSubscribed($other)) {
|
if ($user->isSubscribed($other)) {
|
||||||
$this->already[] = $other;
|
$this->already[] = $other;
|
||||||
|
@ -63,7 +63,7 @@ class JoingroupAction extends Action
|
|||||||
$nickname_arg = $this->trimmed('nickname');
|
$nickname_arg = $this->trimmed('nickname');
|
||||||
$id = intval($this->arg('id'));
|
$id = intval($this->arg('id'));
|
||||||
if ($id) {
|
if ($id) {
|
||||||
$this->group = User_group::staticGet('id', $id);
|
$this->group = User_group::getKV('id', $id);
|
||||||
} else if ($nickname_arg) {
|
} else if ($nickname_arg) {
|
||||||
$nickname = common_canonical_nickname($nickname_arg);
|
$nickname = common_canonical_nickname($nickname_arg);
|
||||||
|
|
||||||
@ -75,7 +75,7 @@ class JoingroupAction extends Action
|
|||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
|
||||||
$local = Local_group::staticGet('nickname', $nickname);
|
$local = Local_group::getKV('nickname', $nickname);
|
||||||
|
|
||||||
if (!$local) {
|
if (!$local) {
|
||||||
// TRANS: Client error displayed when trying to join a non-local group.
|
// TRANS: Client error displayed when trying to join a non-local group.
|
||||||
@ -83,7 +83,7 @@ class JoingroupAction extends Action
|
|||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
|
||||||
$this->group = User_group::staticGet('id', $local->group_id);
|
$this->group = User_group::getKV('id', $local->group_id);
|
||||||
} else {
|
} else {
|
||||||
// TRANS: Client error displayed when trying to join a group without providing a group name or group ID.
|
// TRANS: Client error displayed when trying to join a group without providing a group name or group ID.
|
||||||
$this->clientError(_('No nickname or ID.'), 404);
|
$this->clientError(_('No nickname or ID.'), 404);
|
||||||
|
@ -63,7 +63,7 @@ class LeavegroupAction extends Action
|
|||||||
$nickname_arg = $this->trimmed('nickname');
|
$nickname_arg = $this->trimmed('nickname');
|
||||||
$id = intval($this->arg('id'));
|
$id = intval($this->arg('id'));
|
||||||
if ($id) {
|
if ($id) {
|
||||||
$this->group = User_group::staticGet('id', $id);
|
$this->group = User_group::getKV('id', $id);
|
||||||
} else if ($nickname_arg) {
|
} else if ($nickname_arg) {
|
||||||
$nickname = common_canonical_nickname($nickname_arg);
|
$nickname = common_canonical_nickname($nickname_arg);
|
||||||
|
|
||||||
@ -75,7 +75,7 @@ class LeavegroupAction extends Action
|
|||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
|
||||||
$local = Local_group::staticGet('nickname', $nickname);
|
$local = Local_group::getKV('nickname', $nickname);
|
||||||
|
|
||||||
if (!$local) {
|
if (!$local) {
|
||||||
// TRANS: Client error displayed when trying to leave a non-local group.
|
// TRANS: Client error displayed when trying to leave a non-local group.
|
||||||
@ -83,7 +83,7 @@ class LeavegroupAction extends Action
|
|||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
|
||||||
$this->group = User_group::staticGet('id', $local->group_id);
|
$this->group = User_group::getKV('id', $local->group_id);
|
||||||
} else {
|
} else {
|
||||||
// TRANS: Client error displayed when trying to leave a group without providing a group name or group ID.
|
// TRANS: Client error displayed when trying to leave a group without providing a group name or group ID.
|
||||||
$this->clientError(_('No nickname or ID.'), 404);
|
$this->clientError(_('No nickname or ID.'), 404);
|
||||||
|
@ -74,7 +74,7 @@ class MakeadminAction extends RedirectingAction
|
|||||||
$this->clientError(_('No profile specified.'));
|
$this->clientError(_('No profile specified.'));
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
$this->profile = Profile::staticGet('id', $id);
|
$this->profile = Profile::getKV('id', $id);
|
||||||
if (empty($this->profile)) {
|
if (empty($this->profile)) {
|
||||||
// TRANS: Client error displayed when specifying an invalid profile ID on the Make Admin page.
|
// TRANS: Client error displayed when specifying an invalid profile ID on the Make Admin page.
|
||||||
$this->clientError(_('No profile with that ID.'));
|
$this->clientError(_('No profile with that ID.'));
|
||||||
@ -86,7 +86,7 @@ class MakeadminAction extends RedirectingAction
|
|||||||
$this->clientError(_('No group specified.'));
|
$this->clientError(_('No group specified.'));
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
$this->group = User_group::staticGet('id', $group_id);
|
$this->group = User_group::getKV('id', $group_id);
|
||||||
if (empty($this->group)) {
|
if (empty($this->group)) {
|
||||||
// TRANS: Client error displayed when providing an invalid group ID on the Make Admin page.
|
// TRANS: Client error displayed when providing an invalid group ID on the Make Admin page.
|
||||||
$this->clientError(_('No such group.'));
|
$this->clientError(_('No such group.'));
|
||||||
|
@ -56,7 +56,7 @@ class MicrosummaryAction extends Action
|
|||||||
parent::handle($args);
|
parent::handle($args);
|
||||||
|
|
||||||
$nickname = common_canonical_nickname($this->arg('nickname'));
|
$nickname = common_canonical_nickname($this->arg('nickname'));
|
||||||
$user = User::staticGet('nickname', $nickname);
|
$user = User::getKV('nickname', $nickname);
|
||||||
|
|
||||||
if (!$user) {
|
if (!$user) {
|
||||||
// TRANS: Client error displayed trying to make a micro summary without providing a valid user.
|
// TRANS: Client error displayed trying to make a micro summary without providing a valid user.
|
||||||
|
@ -317,7 +317,7 @@ class NewApplicationAction extends Action
|
|||||||
*/
|
*/
|
||||||
function nameExists($name)
|
function nameExists($name)
|
||||||
{
|
{
|
||||||
$app = Oauth_application::staticGet('name', $name);
|
$app = Oauth_application::getKV('name', $name);
|
||||||
return !empty($app);
|
return !empty($app);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -239,13 +239,13 @@ class NewgroupAction extends Action
|
|||||||
|
|
||||||
function nicknameExists($nickname)
|
function nicknameExists($nickname)
|
||||||
{
|
{
|
||||||
$local = Local_group::staticGet('nickname', $nickname);
|
$local = Local_group::getKV('nickname', $nickname);
|
||||||
|
|
||||||
if (!empty($local)) {
|
if (!empty($local)) {
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
|
||||||
$alias = Group_alias::staticGet('alias', $nickname);
|
$alias = Group_alias::getKV('alias', $nickname);
|
||||||
|
|
||||||
if (!empty($alias)) {
|
if (!empty($alias)) {
|
||||||
return true;
|
return true;
|
||||||
|
@ -112,7 +112,7 @@ class NewmessageAction extends Action
|
|||||||
|
|
||||||
if ($this->to) {
|
if ($this->to) {
|
||||||
|
|
||||||
$this->other = User::staticGet('id', $this->to);
|
$this->other = User::getKV('id', $this->to);
|
||||||
|
|
||||||
if (!$this->other) {
|
if (!$this->other) {
|
||||||
// TRANS: Client error displayed trying to send a direct message to a non-existing user.
|
// TRANS: Client error displayed trying to send a direct message to a non-existing user.
|
||||||
|
@ -345,7 +345,7 @@ class NewnoticeAction extends Action
|
|||||||
if (!$content) {
|
if (!$content) {
|
||||||
$replyto = $this->trimmed('replyto');
|
$replyto = $this->trimmed('replyto');
|
||||||
$inreplyto = $this->trimmed('inreplyto');
|
$inreplyto = $this->trimmed('inreplyto');
|
||||||
$profile = Profile::staticGet('nickname', $replyto);
|
$profile = Profile::getKV('nickname', $replyto);
|
||||||
if ($profile) {
|
if ($profile) {
|
||||||
$content = '@' . $profile->nickname . ' ';
|
$content = '@' . $profile->nickname . ' ';
|
||||||
}
|
}
|
||||||
|
@ -66,7 +66,7 @@ class NudgeAction extends Action
|
|||||||
}
|
}
|
||||||
|
|
||||||
$user = common_current_user();
|
$user = common_current_user();
|
||||||
$other = User::staticGet('nickname', $this->arg('nickname'));
|
$other = User::getKV('nickname', $this->arg('nickname'));
|
||||||
|
|
||||||
if ($_SERVER['REQUEST_METHOD'] != 'POST') {
|
if ($_SERVER['REQUEST_METHOD'] != 'POST') {
|
||||||
common_redirect(common_local_url('showstream',
|
common_redirect(common_local_url('showstream',
|
||||||
|
@ -167,7 +167,7 @@ class OauthconnectionssettingsAction extends SettingsAction
|
|||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
|
||||||
$app = Oauth_application::staticGet('id', $appUser->application_id);
|
$app = Oauth_application::getKV('id', $appUser->application_id);
|
||||||
|
|
||||||
$datastore = new ApiStatusNetOAuthDataStore();
|
$datastore = new ApiStatusNetOAuthDataStore();
|
||||||
$datastore->revoke_token($appUser->token, 1);
|
$datastore->revoke_token($appUser->token, 1);
|
||||||
|
@ -73,7 +73,7 @@ class OembedAction extends Action
|
|||||||
case 'shownotice':
|
case 'shownotice':
|
||||||
$oembed['type']='link';
|
$oembed['type']='link';
|
||||||
$id = $proxy_args['notice'];
|
$id = $proxy_args['notice'];
|
||||||
$notice = Notice::staticGet($id);
|
$notice = Notice::getKV($id);
|
||||||
if(empty($notice)){
|
if(empty($notice)){
|
||||||
// TRANS: Server error displayed in oEmbed action when notice not found.
|
// TRANS: Server error displayed in oEmbed action when notice not found.
|
||||||
// TRANS: %s is a notice.
|
// TRANS: %s is a notice.
|
||||||
@ -96,13 +96,13 @@ class OembedAction extends Action
|
|||||||
break;
|
break;
|
||||||
case 'attachment':
|
case 'attachment':
|
||||||
$id = $proxy_args['attachment'];
|
$id = $proxy_args['attachment'];
|
||||||
$attachment = File::staticGet($id);
|
$attachment = File::getKV($id);
|
||||||
if(empty($attachment)){
|
if(empty($attachment)){
|
||||||
// TRANS: Server error displayed in oEmbed action when attachment not found.
|
// TRANS: Server error displayed in oEmbed action when attachment not found.
|
||||||
// TRANS: %d is an attachment ID.
|
// TRANS: %d is an attachment ID.
|
||||||
$this->serverError(sprintf(_('Attachment %s not found.'),$id), 404);
|
$this->serverError(sprintf(_('Attachment %s not found.'),$id), 404);
|
||||||
}
|
}
|
||||||
if(empty($attachment->filename) && $file_oembed = File_oembed::staticGet('file_id', $attachment->id)){
|
if(empty($attachment->filename) && $file_oembed = File_oembed::getKV('file_id', $attachment->id)){
|
||||||
// Proxy the existing oembed information
|
// Proxy the existing oembed information
|
||||||
$oembed['type']=$file_oembed->type;
|
$oembed['type']=$file_oembed->type;
|
||||||
$oembed['provider']=$file_oembed->provider;
|
$oembed['provider']=$file_oembed->provider;
|
||||||
|
@ -98,7 +98,7 @@ class OldschoolsettingsAction extends SettingsAction
|
|||||||
{
|
{
|
||||||
$user = common_current_user();
|
$user = common_current_user();
|
||||||
|
|
||||||
$osp = Old_school_prefs::staticGet('user_id', $user->id);
|
$osp = Old_school_prefs::getKV('user_id', $user->id);
|
||||||
$orig = null;
|
$orig = null;
|
||||||
|
|
||||||
if (!empty($osp)) {
|
if (!empty($osp)) {
|
||||||
|
@ -71,7 +71,7 @@ class OtpAction extends Action
|
|||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
|
||||||
$this->user = User::staticGet('id', $id);
|
$this->user = User::getKV('id', $id);
|
||||||
|
|
||||||
if (empty($this->user)) {
|
if (empty($this->user)) {
|
||||||
// TRANS: Client error displayed trying to use "one time password login" without using an existing user.
|
// TRANS: Client error displayed trying to use "one time password login" without using an existing user.
|
||||||
@ -87,7 +87,7 @@ class OtpAction extends Action
|
|||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
|
||||||
$this->lt = Login_token::staticGet('user_id', $id);
|
$this->lt = Login_token::getKV('user_id', $id);
|
||||||
|
|
||||||
if (empty($this->lt)) {
|
if (empty($this->lt)) {
|
||||||
// TRANS: Client error displayed trying to use "one time password login" without requesting a login token.
|
// TRANS: Client error displayed trying to use "one time password login" without requesting a login token.
|
||||||
|
@ -85,7 +85,7 @@ class PeopletaggedAction extends Action
|
|||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
|
||||||
$user = User::staticGet('nickname', $tagger);
|
$user = User::getKV('nickname', $tagger);
|
||||||
|
|
||||||
if (!$user) {
|
if (!$user) {
|
||||||
// TRANS: Client error displayed when referring to non-existing user.
|
// TRANS: Client error displayed when referring to non-existing user.
|
||||||
|
@ -95,7 +95,7 @@ class PeopletagsbyuserAction extends Action
|
|||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
|
||||||
$this->user = User::staticGet('nickname', $nickname);
|
$this->user = User::getKV('nickname', $nickname);
|
||||||
|
|
||||||
if (!$this->user) {
|
if (!$this->user) {
|
||||||
// TRANS: Client error displayed trying to perform an action related to a non-existing user.
|
// TRANS: Client error displayed trying to perform an action related to a non-existing user.
|
||||||
|
@ -77,7 +77,7 @@ class PeopletagsforuserAction extends Action
|
|||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
|
||||||
$this->user = User::staticGet('nickname', $nickname);
|
$this->user = User::getKV('nickname', $nickname);
|
||||||
|
|
||||||
if (!$this->user) {
|
if (!$this->user) {
|
||||||
// TRANS: Client error displayed trying to perform an action related to a non-existing user.
|
// TRANS: Client error displayed trying to perform an action related to a non-existing user.
|
||||||
|
@ -85,7 +85,7 @@ class PeopletagsubscribersAction extends Action
|
|||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
|
||||||
$user = User::staticGet('nickname', $tagger);
|
$user = User::getKV('nickname', $tagger);
|
||||||
|
|
||||||
if (!$user) {
|
if (!$user) {
|
||||||
// TRANS: Client error displayed trying to perform an action related to a non-existing user.
|
// TRANS: Client error displayed trying to perform an action related to a non-existing user.
|
||||||
|
@ -79,7 +79,7 @@ class PeopletagsubscriptionsAction extends Action
|
|||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
|
||||||
$user = User::staticGet('nickname', $nickname);
|
$user = User::getKV('nickname', $nickname);
|
||||||
|
|
||||||
if (!$user) {
|
if (!$user) {
|
||||||
// TRANS: Client error displayed trying to perform an action related to a non-existing user.
|
// TRANS: Client error displayed trying to perform an action related to a non-existing user.
|
||||||
|
@ -94,7 +94,7 @@ class ProfilecompletionAction extends Action
|
|||||||
}
|
}
|
||||||
|
|
||||||
$id = $this->arg('peopletag_id');
|
$id = $this->arg('peopletag_id');
|
||||||
$this->peopletag = Profile_list::staticGet('id', $id);
|
$this->peopletag = Profile_list::getKV('id', $id);
|
||||||
|
|
||||||
if (empty($this->peopletag)) {
|
if (empty($this->peopletag)) {
|
||||||
// TRANS: Client error displayed trying to reference a non-existing list.
|
// TRANS: Client error displayed trying to reference a non-existing list.
|
||||||
|
@ -409,7 +409,7 @@ class ProfilesettingsAction extends SettingsAction
|
|||||||
|
|
||||||
$exists = false;
|
$exists = false;
|
||||||
|
|
||||||
$prefs = User_location_prefs::staticGet('user_id', $user->id);
|
$prefs = User_location_prefs::getKV('user_id', $user->id);
|
||||||
|
|
||||||
if (empty($prefs)) {
|
if (empty($prefs)) {
|
||||||
$prefs = new User_location_prefs();
|
$prefs = new User_location_prefs();
|
||||||
@ -471,7 +471,7 @@ class ProfilesettingsAction extends SettingsAction
|
|||||||
function nicknameExists($nickname)
|
function nicknameExists($nickname)
|
||||||
{
|
{
|
||||||
$user = common_current_user();
|
$user = common_current_user();
|
||||||
$other = User::staticGet('nickname', $nickname);
|
$other = User::getKV('nickname', $nickname);
|
||||||
if (!$other) {
|
if (!$other) {
|
||||||
return false;
|
return false;
|
||||||
} else {
|
} else {
|
||||||
|
@ -60,7 +60,7 @@ class ProfiletagbyidAction extends Action
|
|||||||
|
|
||||||
common_debug("Peopletag id $id by user id $tagger_id");
|
common_debug("Peopletag id $id by user id $tagger_id");
|
||||||
|
|
||||||
$this->peopletag = Profile_list::staticGet('id', $id);
|
$this->peopletag = Profile_list::getKV('id', $id);
|
||||||
|
|
||||||
if (!$this->peopletag) {
|
if (!$this->peopletag) {
|
||||||
// TRANS: Client error displayed trying to reference a non-existing list.
|
// TRANS: Client error displayed trying to reference a non-existing list.
|
||||||
@ -68,7 +68,7 @@ class ProfiletagbyidAction extends Action
|
|||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
|
||||||
$user = User::staticGet('id', $tagger_id);
|
$user = User::getKV('id', $tagger_id);
|
||||||
if (!$user) {
|
if (!$user) {
|
||||||
// remote peopletag, permanently redirect
|
// remote peopletag, permanently redirect
|
||||||
common_redirect($this->peopletag->permalink(), 301);
|
common_redirect($this->peopletag->permalink(), 301);
|
||||||
|
@ -57,7 +57,7 @@ class RecoverpasswordAction extends Action
|
|||||||
function checkCode()
|
function checkCode()
|
||||||
{
|
{
|
||||||
$code = $this->trimmed('code');
|
$code = $this->trimmed('code');
|
||||||
$confirm = Confirm_address::staticGet('code', $code);
|
$confirm = Confirm_address::getKV('code', $code);
|
||||||
|
|
||||||
if (!$confirm) {
|
if (!$confirm) {
|
||||||
// TRANS: Client error displayed when password recovery code is not correct.
|
// TRANS: Client error displayed when password recovery code is not correct.
|
||||||
@ -70,7 +70,7 @@ class RecoverpasswordAction extends Action
|
|||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
$user = User::staticGet($confirm->user_id);
|
$user = User::getKV($confirm->user_id);
|
||||||
|
|
||||||
if (!$user) {
|
if (!$user) {
|
||||||
// TRANS: Server error displayed trying to recover password without providing a user.
|
// TRANS: Server error displayed trying to recover password without providing a user.
|
||||||
@ -137,7 +137,7 @@ class RecoverpasswordAction extends Action
|
|||||||
common_ensure_session();
|
common_ensure_session();
|
||||||
$user_id = $_SESSION['tempuser'];
|
$user_id = $_SESSION['tempuser'];
|
||||||
if ($user_id) {
|
if ($user_id) {
|
||||||
$user = User::staticGet($user_id);
|
$user = User::getKV($user_id);
|
||||||
}
|
}
|
||||||
return $user;
|
return $user;
|
||||||
}
|
}
|
||||||
|
@ -70,7 +70,7 @@ class RedirecturlAction extends Action
|
|||||||
throw new ClientException(_('No id parameter.'));
|
throw new ClientException(_('No id parameter.'));
|
||||||
}
|
}
|
||||||
|
|
||||||
$this->file = File::staticGet('id', $this->id);
|
$this->file = File::getKV('id', $this->id);
|
||||||
|
|
||||||
if (empty($this->file)) {
|
if (empty($this->file)) {
|
||||||
// TRANS: Client exception thrown when an invalid ID parameter was provided for a file.
|
// TRANS: Client exception thrown when an invalid ID parameter was provided for a file.
|
||||||
|
@ -83,7 +83,7 @@ class RegisterAction extends Action
|
|||||||
}
|
}
|
||||||
|
|
||||||
if (!empty($this->code)) {
|
if (!empty($this->code)) {
|
||||||
$this->invite = Invitation::staticGet('code', $this->code);
|
$this->invite = Invitation::getKV('code', $this->code);
|
||||||
if (empty($this->invite)) {
|
if (empty($this->invite)) {
|
||||||
// TRANS: Client error displayed when trying to register to an invite-only site without a valid invitation.
|
// TRANS: Client error displayed when trying to register to an invite-only site without a valid invitation.
|
||||||
$this->clientError(_('Sorry, invalid invitation code.'));
|
$this->clientError(_('Sorry, invalid invitation code.'));
|
||||||
@ -181,7 +181,7 @@ class RegisterAction extends Action
|
|||||||
$code = $this->trimmed('code');
|
$code = $this->trimmed('code');
|
||||||
|
|
||||||
if ($code) {
|
if ($code) {
|
||||||
$invite = Invitation::staticGet($code);
|
$invite = Invitation::getKV($code);
|
||||||
}
|
}
|
||||||
|
|
||||||
if (common_config('site', 'inviteonly') && !($code && $invite)) {
|
if (common_config('site', 'inviteonly') && !($code && $invite)) {
|
||||||
@ -294,7 +294,7 @@ class RegisterAction extends Action
|
|||||||
*/
|
*/
|
||||||
function nicknameExists($nickname)
|
function nicknameExists($nickname)
|
||||||
{
|
{
|
||||||
$user = User::staticGet('nickname', $nickname);
|
$user = User::getKV('nickname', $nickname);
|
||||||
return is_object($user);
|
return is_object($user);
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -313,7 +313,7 @@ class RegisterAction extends Action
|
|||||||
if (!$email || strlen($email) == 0) {
|
if (!$email || strlen($email) == 0) {
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
$user = User::staticGet('email', $email);
|
$user = User::getKV('email', $email);
|
||||||
return is_object($user);
|
return is_object($user);
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -409,7 +409,7 @@ class RegisterAction extends Action
|
|||||||
$invite = null;
|
$invite = null;
|
||||||
|
|
||||||
if ($code) {
|
if ($code) {
|
||||||
$invite = Invitation::staticGet($code);
|
$invite = Invitation::getKV($code);
|
||||||
}
|
}
|
||||||
|
|
||||||
if (common_config('site', 'inviteonly') && !($code && $invite)) {
|
if (common_config('site', 'inviteonly') && !($code && $invite)) {
|
||||||
|
@ -95,7 +95,7 @@ class RemovepeopletagAction extends Action
|
|||||||
|
|
||||||
$tagged_id = $this->arg('tagged');
|
$tagged_id = $this->arg('tagged');
|
||||||
|
|
||||||
$this->tagged = Profile::staticGet('id', $tagged_id);
|
$this->tagged = Profile::getKV('id', $tagged_id);
|
||||||
|
|
||||||
if (empty($this->tagged)) {
|
if (empty($this->tagged)) {
|
||||||
// TRANS: Client error displayed when referring to a non-existing profile.
|
// TRANS: Client error displayed when referring to a non-existing profile.
|
||||||
@ -104,7 +104,7 @@ class RemovepeopletagAction extends Action
|
|||||||
}
|
}
|
||||||
|
|
||||||
$id = $this->arg('peopletag_id');
|
$id = $this->arg('peopletag_id');
|
||||||
$this->peopletag = Profile_list::staticGet('id', $id);
|
$this->peopletag = Profile_list::getKV('id', $id);
|
||||||
|
|
||||||
if (empty($this->peopletag)) {
|
if (empty($this->peopletag)) {
|
||||||
// TRANS: Client error displayed trying to reference a non-existing list.
|
// TRANS: Client error displayed trying to reference a non-existing list.
|
||||||
@ -132,7 +132,7 @@ class RemovepeopletagAction extends Action
|
|||||||
$this->peopletag->tag);
|
$this->peopletag->tag);
|
||||||
|
|
||||||
if (!$ptag) {
|
if (!$ptag) {
|
||||||
$user = User::staticGet('id', $this->tagged->id);
|
$user = User::getKV('id', $this->tagged->id);
|
||||||
if ($user) {
|
if ($user) {
|
||||||
$this->clientError(
|
$this->clientError(
|
||||||
// TRANS: Client error displayed when an unknown error occurs while delisting a user.
|
// TRANS: Client error displayed when an unknown error occurs while delisting a user.
|
||||||
|
@ -65,7 +65,7 @@ class RepeatAction extends Action
|
|||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
|
||||||
$this->notice = Notice::staticGet('id', $id);
|
$this->notice = Notice::getKV('id', $id);
|
||||||
|
|
||||||
if (empty($this->notice)) {
|
if (empty($this->notice)) {
|
||||||
// TRANS: Client error displayed when trying to repeat a non-existing notice.
|
// TRANS: Client error displayed when trying to repeat a non-existing notice.
|
||||||
|
@ -65,7 +65,7 @@ class RepliesAction extends Action
|
|||||||
|
|
||||||
$nickname = common_canonical_nickname($this->arg('nickname'));
|
$nickname = common_canonical_nickname($this->arg('nickname'));
|
||||||
|
|
||||||
$this->user = User::staticGet('nickname', $nickname);
|
$this->user = User::getKV('nickname', $nickname);
|
||||||
|
|
||||||
if (!$this->user) {
|
if (!$this->user) {
|
||||||
// TRANS: Client error displayed when trying to reply to a non-exsting user.
|
// TRANS: Client error displayed when trying to reply to a non-exsting user.
|
||||||
|
@ -31,7 +31,7 @@ class RepliesrssAction extends Rss10Action
|
|||||||
{
|
{
|
||||||
parent::prepare($args);
|
parent::prepare($args);
|
||||||
$nickname = $this->trimmed('nickname');
|
$nickname = $this->trimmed('nickname');
|
||||||
$this->user = User::staticGet('nickname', $nickname);
|
$this->user = User::getKV('nickname', $nickname);
|
||||||
|
|
||||||
if (!$this->user) {
|
if (!$this->user) {
|
||||||
// TRANS: Client error displayed when providing a non-existing nickname in a RSS 1.0 action.
|
// TRANS: Client error displayed when providing a non-existing nickname in a RSS 1.0 action.
|
||||||
|
@ -107,7 +107,7 @@ class RsdAction extends Action
|
|||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
|
||||||
$this->user = User::staticGet('nickname', $nickname);
|
$this->user = User::getKV('nickname', $nickname);
|
||||||
|
|
||||||
if (empty($this->user)) {
|
if (empty($this->user)) {
|
||||||
// TRANS: Client error.
|
// TRANS: Client error.
|
||||||
|
@ -71,8 +71,8 @@ class ShowApplicationAction extends Action
|
|||||||
|
|
||||||
$id = (int)$this->arg('id');
|
$id = (int)$this->arg('id');
|
||||||
|
|
||||||
$this->application = Oauth_application::staticGet($id);
|
$this->application = Oauth_application::getKV($id);
|
||||||
$this->owner = User::staticGet($this->application->owner);
|
$this->owner = User::getKV($this->application->owner);
|
||||||
|
|
||||||
if (!common_logged_in()) {
|
if (!common_logged_in()) {
|
||||||
// TRANS: Client error displayed trying to display an OAuth application while not logged in.
|
// TRANS: Client error displayed trying to display an OAuth application while not logged in.
|
||||||
@ -174,7 +174,7 @@ class ShowApplicationAction extends Action
|
|||||||
$this->elementStart('div', 'entity_statistics');
|
$this->elementStart('div', 'entity_statistics');
|
||||||
$defaultAccess = ($this->application->access_type & Oauth_application::$writeAccess)
|
$defaultAccess = ($this->application->access_type & Oauth_application::$writeAccess)
|
||||||
? 'read-write' : 'read-only';
|
? 'read-write' : 'read-only';
|
||||||
$profile = Profile::staticGet($this->application->owner);
|
$profile = Profile::getKV($this->application->owner);
|
||||||
|
|
||||||
$appUsers = new Oauth_application_user();
|
$appUsers = new Oauth_application_user();
|
||||||
$appUsers->application_id = $this->application->id;
|
$appUsers->application_id = $this->application->id;
|
||||||
|
@ -99,7 +99,7 @@ class ShowfavoritesAction extends Action
|
|||||||
|
|
||||||
$nickname = common_canonical_nickname($this->arg('nickname'));
|
$nickname = common_canonical_nickname($this->arg('nickname'));
|
||||||
|
|
||||||
$this->user = User::staticGet('nickname', $nickname);
|
$this->user = User::getKV('nickname', $nickname);
|
||||||
|
|
||||||
if (!$this->user) {
|
if (!$this->user) {
|
||||||
// TRANS: Client error displayed when trying to display favourite notices for a non-existing user.
|
// TRANS: Client error displayed when trying to display favourite notices for a non-existing user.
|
||||||
|
@ -69,7 +69,7 @@ class ShowmessageAction extends Action
|
|||||||
$this->page = 1;
|
$this->page = 1;
|
||||||
|
|
||||||
$id = $this->trimmed('message');
|
$id = $this->trimmed('message');
|
||||||
$this->message = Message::staticGet('id', $id);
|
$this->message = Message::getKV('id', $id);
|
||||||
|
|
||||||
if (!$this->message) {
|
if (!$this->message) {
|
||||||
// TRANS: Client error displayed requesting a single message that does not exist.
|
// TRANS: Client error displayed requesting a single message that does not exist.
|
||||||
|
@ -100,7 +100,7 @@ class ShownoticeAction extends Action
|
|||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
|
||||||
$this->user = User::staticGet('id', $this->profile->id);
|
$this->user = User::getKV('id', $this->profile->id);
|
||||||
|
|
||||||
$this->avatar = $this->profile->getAvatar(AVATAR_PROFILE_SIZE);
|
$this->avatar = $this->profile->getAvatar(AVATAR_PROFILE_SIZE);
|
||||||
|
|
||||||
@ -117,11 +117,11 @@ class ShownoticeAction extends Action
|
|||||||
{
|
{
|
||||||
$id = $this->arg('notice');
|
$id = $this->arg('notice');
|
||||||
|
|
||||||
$notice = Notice::staticGet('id', $id);
|
$notice = Notice::getKV('id', $id);
|
||||||
|
|
||||||
if (empty($notice)) {
|
if (empty($notice)) {
|
||||||
// Did we used to have it, and it got deleted?
|
// Did we used to have it, and it got deleted?
|
||||||
$deleted = Deleted_notice::staticGet($id);
|
$deleted = Deleted_notice::getKV($id);
|
||||||
if (!empty($deleted)) {
|
if (!empty($deleted)) {
|
||||||
// TRANS: Client error displayed trying to show a deleted notice.
|
// TRANS: Client error displayed trying to show a deleted notice.
|
||||||
$this->clientError(_('Notice deleted.'), 410);
|
$this->clientError(_('Notice deleted.'), 410);
|
||||||
@ -290,7 +290,7 @@ class ShownoticeAction extends Action
|
|||||||
*/
|
*/
|
||||||
function extraHead()
|
function extraHead()
|
||||||
{
|
{
|
||||||
$user = User::staticGet($this->profile->id);
|
$user = User::getKV($this->profile->id);
|
||||||
|
|
||||||
if (!$user) {
|
if (!$user) {
|
||||||
return;
|
return;
|
||||||
|
@ -70,7 +70,7 @@ class ShowprofiletagAction extends Action
|
|||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
|
||||||
$user = User::staticGet('nickname', $tagger);
|
$user = User::getKV('nickname', $tagger);
|
||||||
|
|
||||||
if (!$user) {
|
if (!$user) {
|
||||||
// TRANS: Client error displayed trying to perform an action related to a non-existing user.
|
// TRANS: Client error displayed trying to perform an action related to a non-existing user.
|
||||||
|
@ -120,7 +120,7 @@ class SmssettingsAction extends SettingsAction
|
|||||||
} else {
|
} else {
|
||||||
$confirm = $this->getConfirmation();
|
$confirm = $this->getConfirmation();
|
||||||
if ($confirm) {
|
if ($confirm) {
|
||||||
$carrier = Sms_carrier::staticGet($confirm->address_extra);
|
$carrier = Sms_carrier::getKV($confirm->address_extra);
|
||||||
$this->element('p', 'form_unconfirmed',
|
$this->element('p', 'form_unconfirmed',
|
||||||
$confirm->address . ' (' . $carrier->name . ')');
|
$confirm->address . ' (' . $carrier->name . ')');
|
||||||
$this->element('p', 'form_guide',
|
$this->element('p', 'form_guide',
|
||||||
@ -366,7 +366,7 @@ class SmssettingsAction extends SettingsAction
|
|||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
$carrier = Sms_carrier::staticGet($carrier_id);
|
$carrier = Sms_carrier::getKV($carrier_id);
|
||||||
|
|
||||||
mail_confirm_sms($confirm->code,
|
mail_confirm_sms($confirm->code,
|
||||||
$user->nickname,
|
$user->nickname,
|
||||||
@ -473,7 +473,7 @@ class SmssettingsAction extends SettingsAction
|
|||||||
{
|
{
|
||||||
$user = common_current_user();
|
$user = common_current_user();
|
||||||
|
|
||||||
$other = User::staticGet('sms', $sms);
|
$other = User::getKV('sms', $sms);
|
||||||
|
|
||||||
if (!$other) {
|
if (!$other) {
|
||||||
return false;
|
return false;
|
||||||
|
@ -51,7 +51,7 @@ class SubeditAction extends Action
|
|||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
|
||||||
$this->profile = Profile::staticGet('id', $id);
|
$this->profile = Profile::getKV('id', $id);
|
||||||
|
|
||||||
if (!$this->profile) {
|
if (!$this->profile) {
|
||||||
// TRANS: Client error displayed trying a change a subscription for a non-existant profile ID.
|
// TRANS: Client error displayed trying a change a subscription for a non-existant profile ID.
|
||||||
|
@ -103,7 +103,7 @@ class SubscribeAction extends Action
|
|||||||
|
|
||||||
$other_id = $this->arg('subscribeto');
|
$other_id = $this->arg('subscribeto');
|
||||||
|
|
||||||
$this->other = Profile::staticGet('id', $other_id);
|
$this->other = Profile::getKV('id', $other_id);
|
||||||
|
|
||||||
if (empty($this->other)) {
|
if (empty($this->other)) {
|
||||||
// TRANS: Client error displayed trying to subscribe to a non-existing profile.
|
// TRANS: Client error displayed trying to subscribe to a non-existing profile.
|
||||||
|
@ -83,7 +83,7 @@ class SubscribepeopletagAction extends Action
|
|||||||
|
|
||||||
$id = intval($this->arg('id'));
|
$id = intval($this->arg('id'));
|
||||||
if ($id) {
|
if ($id) {
|
||||||
$this->peopletag = Profile_list::staticGet('id', $id);
|
$this->peopletag = Profile_list::getKV('id', $id);
|
||||||
} else {
|
} else {
|
||||||
// TRANS: Client error displayed when trying to perform an action without providing an ID.
|
// TRANS: Client error displayed when trying to perform an action without providing an ID.
|
||||||
$this->clientError(_('No ID given.'), 404);
|
$this->clientError(_('No ID given.'), 404);
|
||||||
@ -96,7 +96,7 @@ class SubscribepeopletagAction extends Action
|
|||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
|
||||||
$this->tagger = Profile::staticGet('id', $this->peopletag->tagger);
|
$this->tagger = Profile::getKV('id', $this->peopletag->tagger);
|
||||||
|
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
@ -41,7 +41,7 @@ class TagprofileAction extends Action
|
|||||||
if (!$id) {
|
if (!$id) {
|
||||||
$this->profile = false;
|
$this->profile = false;
|
||||||
} else {
|
} else {
|
||||||
$this->profile = Profile::staticGet('id', $id);
|
$this->profile = Profile::getKV('id', $id);
|
||||||
|
|
||||||
if (!$this->profile) {
|
if (!$this->profile) {
|
||||||
// TRANS: Client error displayed when referring to non-existing profile ID.
|
// TRANS: Client error displayed when referring to non-existing profile ID.
|
||||||
|
@ -29,7 +29,7 @@ class TagrssAction extends Rss10Action
|
|||||||
function prepare($args) {
|
function prepare($args) {
|
||||||
parent::prepare($args);
|
parent::prepare($args);
|
||||||
$tag = common_canonical_tag($this->trimmed('tag'));
|
$tag = common_canonical_tag($this->trimmed('tag'));
|
||||||
$this->tag = Notice_tag::staticGet('tag', $tag);
|
$this->tag = Notice_tag::getKV('tag', $tag);
|
||||||
if (!$this->tag) {
|
if (!$this->tag) {
|
||||||
// TRANS: Client error when requesting a tag feed for a non-existing tag.
|
// TRANS: Client error when requesting a tag feed for a non-existing tag.
|
||||||
$this->clientError(_('No such tag.'));
|
$this->clientError(_('No such tag.'));
|
||||||
|
@ -80,7 +80,7 @@ class UnsubscribeAction extends Action
|
|||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
$other = Profile::staticGet('id', $other_id);
|
$other = Profile::getKV('id', $other_id);
|
||||||
|
|
||||||
if (!$other) {
|
if (!$other) {
|
||||||
// TRANS: Client error displayed when trying to unsubscribe while providing a non-existing profile ID.
|
// TRANS: Client error displayed when trying to unsubscribe while providing a non-existing profile ID.
|
||||||
|
@ -84,7 +84,7 @@ class UnsubscribepeopletagAction extends Action
|
|||||||
|
|
||||||
$id = intval($this->arg('id'));
|
$id = intval($this->arg('id'));
|
||||||
if ($id) {
|
if ($id) {
|
||||||
$this->peopletag = Profile_list::staticGet('id', $id);
|
$this->peopletag = Profile_list::getKV('id', $id);
|
||||||
} else {
|
} else {
|
||||||
// TRANS: Client error displayed when trying to perform an action without providing an ID.
|
// TRANS: Client error displayed when trying to perform an action without providing an ID.
|
||||||
$this->clientError(_('No ID given.'), 404);
|
$this->clientError(_('No ID given.'), 404);
|
||||||
@ -97,7 +97,7 @@ class UnsubscribepeopletagAction extends Action
|
|||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
|
||||||
$this->tagger = Profile::staticGet('id', $this->peopletag->tagger);
|
$this->tagger = Profile::getKV('id', $this->peopletag->tagger);
|
||||||
|
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
@ -157,7 +157,7 @@ class UseradminpanelAction extends AdminPanelAction
|
|||||||
// Validate default subscription
|
// Validate default subscription
|
||||||
|
|
||||||
if (!empty($values['newuser']['default'])) {
|
if (!empty($values['newuser']['default'])) {
|
||||||
$defuser = User::staticGet('nickname', trim($values['newuser']['default']));
|
$defuser = User::getKV('nickname', trim($values['newuser']['default']));
|
||||||
if (empty($defuser)) {
|
if (empty($defuser)) {
|
||||||
$this->clientError(
|
$this->clientError(
|
||||||
sprintf(
|
sprintf(
|
||||||
|
@ -69,7 +69,7 @@ class UserbyidAction extends Action
|
|||||||
// TRANS: Client error displayed trying to find a user by ID without providing an ID.
|
// TRANS: Client error displayed trying to find a user by ID without providing an ID.
|
||||||
$this->clientError(_('No ID.'));
|
$this->clientError(_('No ID.'));
|
||||||
}
|
}
|
||||||
$user = User::staticGet($id);
|
$user = User::getKV($id);
|
||||||
if (!$user) {
|
if (!$user) {
|
||||||
// TRANS: Client error displayed trying to find a user by ID for a non-existing ID.
|
// TRANS: Client error displayed trying to find a user by ID for a non-existing ID.
|
||||||
$this->clientError(_('No such user.'));
|
$this->clientError(_('No such user.'));
|
||||||
|
@ -88,7 +88,7 @@ class UsergroupsAction extends ProfileAction
|
|||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
|
||||||
$this->user = User::staticGet('nickname', $nickname);
|
$this->user = User::getKV('nickname', $nickname);
|
||||||
|
|
||||||
if (!$this->user) {
|
if (!$this->user) {
|
||||||
// TRANS: Client error displayed requesting groups for a non-existing user.
|
// TRANS: Client error displayed requesting groups for a non-existing user.
|
||||||
|
@ -31,7 +31,7 @@ class UserrssAction extends Rss10Action
|
|||||||
{
|
{
|
||||||
parent::prepare($args);
|
parent::prepare($args);
|
||||||
$nickname = $this->trimmed('nickname');
|
$nickname = $this->trimmed('nickname');
|
||||||
$this->user = User::staticGet('nickname', $nickname);
|
$this->user = User::getKV('nickname', $nickname);
|
||||||
$this->tag = $this->trimmed('tag');
|
$this->tag = $this->trimmed('tag');
|
||||||
|
|
||||||
if (!$this->user) {
|
if (!$this->user) {
|
||||||
|
Some files were not shown because too many files have changed in this diff Show More
Loading…
Reference in New Issue
Block a user