Remove more contractions
* doesn't * won't * isn't * don't
This commit is contained in:
parent
104a47e4a2
commit
5ab709b739
@ -56,7 +56,7 @@ class AllrssAction extends Rss10Action
|
|||||||
*
|
*
|
||||||
* @param array $args Web and URL arguments
|
* @param array $args Web and URL arguments
|
||||||
*
|
*
|
||||||
* @return boolean false if user doesn't exist
|
* @return boolean false if user does not exist
|
||||||
*/
|
*/
|
||||||
function prepare($args)
|
function prepare($args)
|
||||||
{
|
{
|
||||||
|
@ -36,7 +36,7 @@ if (!defined('STATUSNET')) {
|
|||||||
require_once INSTALLDIR . '/lib/apibareauth.php';
|
require_once INSTALLDIR . '/lib/apibareauth.php';
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* We don't have a rate limit, but some clients check this method.
|
* We do not have a rate limit, but some clients check this method.
|
||||||
* It always returns the same thing: 150 hits left.
|
* It always returns the same thing: 150 hits left.
|
||||||
*
|
*
|
||||||
* @category API
|
* @category API
|
||||||
|
@ -113,7 +113,7 @@ class ApiFriendshipsDestroyAction extends ApiAuthAction
|
|||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
// Don't allow unsubscribing from yourself!
|
// Do not allow unsubscribing from yourself!
|
||||||
|
|
||||||
if ($this->user->id == $this->other->id) {
|
if ($this->user->id == $this->other->id) {
|
||||||
$this->clientError(
|
$this->clientError(
|
||||||
|
@ -146,7 +146,7 @@ class AttachmentAction extends Action
|
|||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Don't show local navigation
|
* Do not show local navigation
|
||||||
*
|
*
|
||||||
* @return void
|
* @return void
|
||||||
*/
|
*/
|
||||||
@ -170,7 +170,7 @@ class AttachmentAction extends Action
|
|||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Don't show page notice
|
* Do not show page notice
|
||||||
*
|
*
|
||||||
* @return void
|
* @return void
|
||||||
*/
|
*/
|
||||||
|
@ -49,7 +49,7 @@ class AvatarbynicknameAction extends Action
|
|||||||
*
|
*
|
||||||
* @param array $args query arguments
|
* @param array $args query arguments
|
||||||
*
|
*
|
||||||
* @return boolean false if nickname or user isn't found
|
* @return boolean false if nickname or user is not found
|
||||||
*/
|
*/
|
||||||
function handle($args)
|
function handle($args)
|
||||||
{
|
{
|
||||||
|
@ -95,7 +95,7 @@ class GroupblockAction extends Action
|
|||||||
$this->clientError(_('User is already blocked from group.'));
|
$this->clientError(_('User is already blocked from group.'));
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
// XXX: could have proactive blocks, but we don't have UI for it.
|
// XXX: could have proactive blocks, but we do not have UI for it.
|
||||||
if (!$this->profile->isMember($this->group)) {
|
if (!$this->profile->isMember($this->group)) {
|
||||||
$this->clientError(_('User is not a member of group.'));
|
$this->clientError(_('User is not a member of group.'));
|
||||||
return false;
|
return false;
|
||||||
|
@ -159,7 +159,7 @@ class LoginAction extends Action
|
|||||||
$url = common_get_returnto();
|
$url = common_get_returnto();
|
||||||
|
|
||||||
if ($url) {
|
if ($url) {
|
||||||
// We don't have to return to it again
|
// We do not have to return to it again
|
||||||
common_set_returnto(null);
|
common_set_returnto(null);
|
||||||
} else {
|
} else {
|
||||||
$url = common_local_url('all',
|
$url = common_local_url('all',
|
||||||
|
@ -81,7 +81,7 @@ class LogoutAction extends Action
|
|||||||
{
|
{
|
||||||
common_set_user(null);
|
common_set_user(null);
|
||||||
common_real_login(false); // not logged in
|
common_real_login(false); // not logged in
|
||||||
common_forgetme(); // don't log back in!
|
common_forgetme(); // do not log back in!
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
@ -61,7 +61,7 @@ class NewmessageAction extends Action
|
|||||||
/**
|
/**
|
||||||
* Title of the page
|
* Title of the page
|
||||||
*
|
*
|
||||||
* Note that this usually doesn't get called unless something went wrong
|
* Note that this usually does not get called unless something went wrong
|
||||||
*
|
*
|
||||||
* @return string page title
|
* @return string page title
|
||||||
*/
|
*/
|
||||||
|
@ -59,7 +59,7 @@ class NewnoticeAction extends Action
|
|||||||
/**
|
/**
|
||||||
* Title of the page
|
* Title of the page
|
||||||
*
|
*
|
||||||
* Note that this usually doesn't get called unless something went wrong
|
* Note that this usually does not get called unless something went wrong
|
||||||
*
|
*
|
||||||
* @return string page title
|
* @return string page title
|
||||||
*/
|
*/
|
||||||
|
@ -52,7 +52,7 @@ class OpensearchAction extends Action
|
|||||||
*
|
*
|
||||||
* @param array $args query arguments
|
* @param array $args query arguments
|
||||||
*
|
*
|
||||||
* @return boolean false if user doesn't exist
|
* @return boolean false if user does not exist
|
||||||
*/
|
*/
|
||||||
function handle($args)
|
function handle($args)
|
||||||
{
|
{
|
||||||
|
@ -97,7 +97,7 @@ class PasswordsettingsAction extends AccountSettingsAction
|
|||||||
|
|
||||||
|
|
||||||
$this->elementStart('ul', 'form_data');
|
$this->elementStart('ul', 'form_data');
|
||||||
// Users who logged in with OpenID won't have a pwd
|
// Users who logged in with OpenID will not have a pwd
|
||||||
if ($user->password) {
|
if ($user->password) {
|
||||||
$this->elementStart('li');
|
$this->elementStart('li');
|
||||||
$this->password('oldpassword', _('Old password'));
|
$this->password('oldpassword', _('Old password'));
|
||||||
|
@ -174,7 +174,7 @@ class RegisterAction extends Action
|
|||||||
$bio = $this->trimmed('bio');
|
$bio = $this->trimmed('bio');
|
||||||
$location = $this->trimmed('location');
|
$location = $this->trimmed('location');
|
||||||
|
|
||||||
// We don't trim these... whitespace is OK in a password!
|
// We do not trim these... whitespace is OK in a password!
|
||||||
$password = $this->arg('password');
|
$password = $this->arg('password');
|
||||||
$confirm = $this->arg('confirm');
|
$confirm = $this->arg('confirm');
|
||||||
|
|
||||||
|
@ -418,7 +418,7 @@ class ShowgroupAction extends GroupDesignAction
|
|||||||
// XXX: WORM cache this
|
// XXX: WORM cache this
|
||||||
$members = $this->group->getMembers();
|
$members = $this->group->getMembers();
|
||||||
$members_count = 0;
|
$members_count = 0;
|
||||||
/** $member->count() doesn't work. */
|
/** $member->count() does not work. */
|
||||||
while ($members->fetch()) {
|
while ($members->fetch()) {
|
||||||
$members_count++;
|
$members_count++;
|
||||||
}
|
}
|
||||||
|
@ -137,7 +137,7 @@ class ShowmessageAction extends MailboxAction
|
|||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Don't show local navigation
|
* Do not show local navigation
|
||||||
*
|
*
|
||||||
* @return void
|
* @return void
|
||||||
*/
|
*/
|
||||||
@ -147,7 +147,7 @@ class ShowmessageAction extends MailboxAction
|
|||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Don't show page notice
|
* Do not show page notice
|
||||||
*
|
*
|
||||||
* @return void
|
* @return void
|
||||||
*/
|
*/
|
||||||
@ -157,7 +157,7 @@ class ShowmessageAction extends MailboxAction
|
|||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Don't show aside
|
* Do not show aside
|
||||||
*
|
*
|
||||||
* @return void
|
* @return void
|
||||||
*/
|
*/
|
||||||
@ -167,7 +167,7 @@ class ShowmessageAction extends MailboxAction
|
|||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Don't show any instructions
|
* Do not show any instructions
|
||||||
*
|
*
|
||||||
* @return string
|
* @return string
|
||||||
*/
|
*/
|
||||||
|
@ -208,7 +208,7 @@ class ShownoticeAction extends OwnerDesignAction
|
|||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Don't show local navigation
|
* Do not show local navigation
|
||||||
*
|
*
|
||||||
* @return void
|
* @return void
|
||||||
*/
|
*/
|
||||||
@ -234,7 +234,7 @@ class ShownoticeAction extends OwnerDesignAction
|
|||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Don't show page notice
|
* Do not show page notice
|
||||||
*
|
*
|
||||||
* @return void
|
* @return void
|
||||||
*/
|
*/
|
||||||
@ -244,7 +244,7 @@ class ShownoticeAction extends OwnerDesignAction
|
|||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Don't show aside
|
* Do not show aside
|
||||||
*
|
*
|
||||||
* @return void
|
* @return void
|
||||||
*/
|
*/
|
||||||
|
@ -253,7 +253,7 @@ class ShowstreamAction extends ProfileAction
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
// We don't show the author for a profile, since we already know who it is!
|
// We do not show the author for a profile, since we already know who it is!
|
||||||
|
|
||||||
class ProfileNoticeList extends NoticeList
|
class ProfileNoticeList extends NoticeList
|
||||||
{
|
{
|
||||||
|
@ -61,7 +61,7 @@ class SupAction extends Action
|
|||||||
$notice = new Notice();
|
$notice = new Notice();
|
||||||
|
|
||||||
# XXX: cache this. Depends on how big this protocol becomes;
|
# XXX: cache this. Depends on how big this protocol becomes;
|
||||||
# Re-doing this query every 15 seconds isn't the end of the world.
|
# Re-doing this query every 15 seconds is not the end of the world.
|
||||||
|
|
||||||
$divider = common_sql_date(time() - $seconds);
|
$divider = common_sql_date(time() - $seconds);
|
||||||
|
|
||||||
|
@ -250,7 +250,7 @@ class TwitapisearchatomAction extends ApiAction
|
|||||||
}
|
}
|
||||||
|
|
||||||
// FIXME: this alternate link is not quite right because our
|
// FIXME: this alternate link is not quite right because our
|
||||||
// web-based notice search doesn't support a rpp (responses per
|
// web-based notice search does not support a rpp (responses per
|
||||||
// page) param yet
|
// page) param yet
|
||||||
|
|
||||||
$this->element('link', array('type' => 'text/html',
|
$this->element('link', array('type' => 'text/html',
|
||||||
|
@ -55,7 +55,7 @@ class TwitapitrendsAction extends ApiAction
|
|||||||
*
|
*
|
||||||
* @param array $args Web and URL arguments
|
* @param array $args Web and URL arguments
|
||||||
*
|
*
|
||||||
* @return boolean false if user doesn't exist
|
* @return boolean false if user does not exist
|
||||||
*/
|
*/
|
||||||
function prepare($args)
|
function prepare($args)
|
||||||
{
|
{
|
||||||
|
@ -53,7 +53,7 @@ class File_redirection extends Memcached_DataObject
|
|||||||
'connect_timeout' => 10, // # seconds to wait
|
'connect_timeout' => 10, // # seconds to wait
|
||||||
'max_redirs' => $redirs, // # max number of http redirections to follow
|
'max_redirs' => $redirs, // # max number of http redirections to follow
|
||||||
'follow_redirects' => true, // Follow redirects
|
'follow_redirects' => true, // Follow redirects
|
||||||
'store_body' => false, // We won't need body content here.
|
'store_body' => false, // We will not need body content here.
|
||||||
));
|
));
|
||||||
return $request;
|
return $request;
|
||||||
}
|
}
|
||||||
@ -81,12 +81,12 @@ class File_redirection extends Memcached_DataObject
|
|||||||
}
|
}
|
||||||
try {
|
try {
|
||||||
$request = self::_commonHttp($short_url, $redirs);
|
$request = self::_commonHttp($short_url, $redirs);
|
||||||
// Don't include body in output
|
// Do not include body in output
|
||||||
$request->setMethod(HTTP_Request2::METHOD_HEAD);
|
$request->setMethod(HTTP_Request2::METHOD_HEAD);
|
||||||
$response = $request->send();
|
$response = $request->send();
|
||||||
|
|
||||||
if (405 == $response->getStatus()) {
|
if (405 == $response->getStatus()) {
|
||||||
// Server doesn't support HEAD method? Can this really happen?
|
// Server does not support HEAD method? Can this really happen?
|
||||||
// We'll try again as a GET and ignore the response data.
|
// We'll try again as a GET and ignore the response data.
|
||||||
$request = self::_commonHttp($short_url, $redirs);
|
$request = self::_commonHttp($short_url, $redirs);
|
||||||
$response = $request->send();
|
$response = $request->send();
|
||||||
@ -178,7 +178,7 @@ class File_redirection extends Memcached_DataObject
|
|||||||
case 'aim':
|
case 'aim':
|
||||||
case 'jabber':
|
case 'jabber':
|
||||||
case 'xmpp':
|
case 'xmpp':
|
||||||
// don't touch anything
|
// do not touch anything
|
||||||
break;
|
break;
|
||||||
|
|
||||||
default:
|
default:
|
||||||
|
@ -146,7 +146,7 @@ class Notice extends Memcached_DataObject
|
|||||||
|
|
||||||
/* Add them to the database */
|
/* Add them to the database */
|
||||||
foreach(array_unique($hashtags) as $hashtag) {
|
foreach(array_unique($hashtags) as $hashtag) {
|
||||||
/* elide characters we don't want in the tag */
|
/* elide characters we do not want in the tag */
|
||||||
$this->saveTag($hashtag);
|
$this->saveTag($hashtag);
|
||||||
}
|
}
|
||||||
return true;
|
return true;
|
||||||
@ -1105,7 +1105,7 @@ class Notice extends Memcached_DataObject
|
|||||||
if (empty($recipient)) {
|
if (empty($recipient)) {
|
||||||
continue;
|
continue;
|
||||||
}
|
}
|
||||||
// Don't save replies from blocked profile to local user
|
// Do not save replies from blocked profile to local user
|
||||||
$recipient_user = User::staticGet('id', $recipient->id);
|
$recipient_user = User::staticGet('id', $recipient->id);
|
||||||
if (!empty($recipient_user) && $recipient_user->hasBlocked($sender)) {
|
if (!empty($recipient_user) && $recipient_user->hasBlocked($sender)) {
|
||||||
continue;
|
continue;
|
||||||
@ -1131,7 +1131,7 @@ class Notice extends Memcached_DataObject
|
|||||||
$tagged = Profile_tag::getTagged($sender->id, $tag);
|
$tagged = Profile_tag::getTagged($sender->id, $tag);
|
||||||
foreach ($tagged as $t) {
|
foreach ($tagged as $t) {
|
||||||
if (!$replied[$t->id]) {
|
if (!$replied[$t->id]) {
|
||||||
// Don't save replies from blocked profile to local user
|
// Do not save replies from blocked profile to local user
|
||||||
$t_user = User::staticGet('id', $t->id);
|
$t_user = User::staticGet('id', $t->id);
|
||||||
if ($t_user && $t_user->hasBlocked($sender)) {
|
if ($t_user && $t_user->hasBlocked($sender)) {
|
||||||
continue;
|
continue;
|
||||||
|
@ -101,7 +101,7 @@ class Profile extends Memcached_DataObject
|
|||||||
}
|
}
|
||||||
|
|
||||||
foreach (array(AVATAR_PROFILE_SIZE, AVATAR_STREAM_SIZE, AVATAR_MINI_SIZE) as $size) {
|
foreach (array(AVATAR_PROFILE_SIZE, AVATAR_STREAM_SIZE, AVATAR_MINI_SIZE) as $size) {
|
||||||
# We don't do a scaled one if original is our scaled size
|
# We do not do a scaled one if original is our scaled size
|
||||||
if (!($avatar->width == $size && $avatar->height == $size)) {
|
if (!($avatar->width == $size && $avatar->height == $size)) {
|
||||||
|
|
||||||
$scaled_filename = $imagefile->resize($size);
|
$scaled_filename = $imagefile->resize($size);
|
||||||
@ -174,7 +174,7 @@ class Profile extends Memcached_DataObject
|
|||||||
|
|
||||||
function getNotices($offset=0, $limit=NOTICES_PER_PAGE, $since_id=0, $max_id=0, $since=null)
|
function getNotices($offset=0, $limit=NOTICES_PER_PAGE, $since_id=0, $max_id=0, $since=null)
|
||||||
{
|
{
|
||||||
// XXX: I'm not sure this is going to be any faster. It probably isn't.
|
// XXX: I'm not sure this is going to be any faster. It probably is not.
|
||||||
$ids = Notice::stream(array($this, '_streamDirect'),
|
$ids = Notice::stream(array($this, '_streamDirect'),
|
||||||
array(),
|
array(),
|
||||||
'profile:notice_ids:' . $this->id,
|
'profile:notice_ids:' . $this->id,
|
||||||
|
@ -87,7 +87,7 @@ class User extends Memcached_DataObject
|
|||||||
return (is_null($sub)) ? false : true;
|
return (is_null($sub)) ? false : true;
|
||||||
}
|
}
|
||||||
|
|
||||||
// 'update' won't write key columns, so we have to do it ourselves.
|
// 'update' will not write key columns, so we have to do it ourselves.
|
||||||
|
|
||||||
function updateKeys(&$orig)
|
function updateKeys(&$orig)
|
||||||
{
|
{
|
||||||
@ -384,7 +384,7 @@ class User extends Memcached_DataObject
|
|||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
|
||||||
// Otherwise, cache doesn't have all faves;
|
// Otherwise, cache does not have all faves;
|
||||||
// fall through to the default
|
// fall through to the default
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -463,7 +463,7 @@ class User extends Memcached_DataObject
|
|||||||
{
|
{
|
||||||
$cache = common_memcache();
|
$cache = common_memcache();
|
||||||
if ($cache) {
|
if ($cache) {
|
||||||
// Faves don't happen chronologically, so we need to blow
|
// Faves do not happen chronologically, so we need to blow
|
||||||
// ;last cache, too
|
// ;last cache, too
|
||||||
$cache->delete(common_cache_key('fave:ids_by_user:'.$this->id));
|
$cache->delete(common_cache_key('fave:ids_by_user:'.$this->id));
|
||||||
$cache->delete(common_cache_key('fave:ids_by_user:'.$this->id.';last'));
|
$cache->delete(common_cache_key('fave:ids_by_user:'.$this->id.';last'));
|
||||||
|
14
lib/api.php
14
lib/api.php
@ -66,7 +66,7 @@ class ApiAction extends Action
|
|||||||
*
|
*
|
||||||
* @param array $args Web and URL arguments
|
* @param array $args Web and URL arguments
|
||||||
*
|
*
|
||||||
* @return boolean false if user doesn't exist
|
* @return boolean false if user does not exist
|
||||||
*/
|
*/
|
||||||
|
|
||||||
function prepare($args)
|
function prepare($args)
|
||||||
@ -138,7 +138,7 @@ class ApiAction extends Action
|
|||||||
$design = null;
|
$design = null;
|
||||||
$user = $profile->getUser();
|
$user = $profile->getUser();
|
||||||
|
|
||||||
// Note: some profiles don't have an associated user
|
// Note: some profiles do not have an associated user
|
||||||
|
|
||||||
if (!empty($user)) {
|
if (!empty($user)) {
|
||||||
$design = $user->getDesign();
|
$design = $user->getDesign();
|
||||||
@ -203,7 +203,7 @@ class ApiAction extends Action
|
|||||||
if ($get_notice) {
|
if ($get_notice) {
|
||||||
$notice = $profile->getCurrentNotice();
|
$notice = $profile->getCurrentNotice();
|
||||||
if ($notice) {
|
if ($notice) {
|
||||||
# don't get user!
|
# do not get user!
|
||||||
$twitter_user['status'] = $this->twitterStatusArray($notice, false);
|
$twitter_user['status'] = $this->twitterStatusArray($notice, false);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@ -263,7 +263,7 @@ class ApiAction extends Action
|
|||||||
}
|
}
|
||||||
|
|
||||||
if ($include_user) {
|
if ($include_user) {
|
||||||
# Don't get notice (recursive!)
|
# Do not get notice (recursive!)
|
||||||
$twitter_user = $this->twitterUserArray($profile, false);
|
$twitter_user = $this->twitterUserArray($profile, false);
|
||||||
$twitter_status['user'] = $twitter_user;
|
$twitter_status['user'] = $twitter_user;
|
||||||
}
|
}
|
||||||
@ -1074,7 +1074,7 @@ class ApiAction extends Action
|
|||||||
function initTwitterAtom()
|
function initTwitterAtom()
|
||||||
{
|
{
|
||||||
$this->startXML();
|
$this->startXML();
|
||||||
// FIXME: don't hardcode the language here!
|
// FIXME: do not hardcode the language here!
|
||||||
$this->elementStart('feed', array('xmlns' => 'http://www.w3.org/2005/Atom',
|
$this->elementStart('feed', array('xmlns' => 'http://www.w3.org/2005/Atom',
|
||||||
'xml:lang' => 'en-US',
|
'xml:lang' => 'en-US',
|
||||||
'xmlns:thr' => 'http://purl.org/syndication/thread/1.0'));
|
'xmlns:thr' => 'http://purl.org/syndication/thread/1.0'));
|
||||||
@ -1116,7 +1116,7 @@ class ApiAction extends Action
|
|||||||
return User::staticGet('nickname', $nickname);
|
return User::staticGet('nickname', $nickname);
|
||||||
} else if ($this->arg('user_id')) {
|
} else if ($this->arg('user_id')) {
|
||||||
// This is to ensure that a non-numeric user_id still
|
// This is to ensure that a non-numeric user_id still
|
||||||
// overrides screen_name even if it doesn't get used
|
// overrides screen_name even if it does not get used
|
||||||
if (is_numeric($this->arg('user_id'))) {
|
if (is_numeric($this->arg('user_id'))) {
|
||||||
return User::staticGet('id', $this->arg('user_id'));
|
return User::staticGet('id', $this->arg('user_id'));
|
||||||
}
|
}
|
||||||
@ -1146,7 +1146,7 @@ class ApiAction extends Action
|
|||||||
return User_group::staticGet('nickname', $nickname);
|
return User_group::staticGet('nickname', $nickname);
|
||||||
} else if ($this->arg('group_id')) {
|
} else if ($this->arg('group_id')) {
|
||||||
// This is to ensure that a non-numeric user_id still
|
// This is to ensure that a non-numeric user_id still
|
||||||
// overrides screen_name even if it doesn't get used
|
// overrides screen_name even if it does not get used
|
||||||
if (is_numeric($this->arg('group_id'))) {
|
if (is_numeric($this->arg('group_id'))) {
|
||||||
return User_group::staticGet('id', $this->arg('group_id'));
|
return User_group::staticGet('id', $this->arg('group_id'));
|
||||||
}
|
}
|
||||||
|
@ -87,7 +87,7 @@ class ApiAuthAction extends ApiAction
|
|||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Check for a user specified via HTTP basic auth. If there isn't
|
* Check for a user specified via HTTP basic auth. If there is not
|
||||||
* one, try to get one by outputting the basic auth header.
|
* one, try to get one by outputting the basic auth header.
|
||||||
*
|
*
|
||||||
* @return boolean true or false
|
* @return boolean true or false
|
||||||
|
@ -39,7 +39,7 @@ require_once INSTALLDIR.'/lib/servererroraction.php';
|
|||||||
*
|
*
|
||||||
* This only occurs if there's been a DB_DataObject_Error that's
|
* This only occurs if there's been a DB_DataObject_Error that's
|
||||||
* reported through PEAR, so we try to avoid doing anything that connects
|
* reported through PEAR, so we try to avoid doing anything that connects
|
||||||
* to the DB, so we don't trigger it again.
|
* to the DB, so we do not trigger it again.
|
||||||
*
|
*
|
||||||
* @category Action
|
* @category Action
|
||||||
* @package StatusNet
|
* @package StatusNet
|
||||||
@ -62,12 +62,12 @@ class DBErrorAction extends ServerErrorAction
|
|||||||
|
|
||||||
function getLanguage()
|
function getLanguage()
|
||||||
{
|
{
|
||||||
// Don't try to figure out user's language; just show the page
|
// Do not try to figure out user's language; just show the page
|
||||||
return common_config('site', 'language');
|
return common_config('site', 'language');
|
||||||
}
|
}
|
||||||
|
|
||||||
function showPrimaryNav()
|
function showPrimaryNav()
|
||||||
{
|
{
|
||||||
// don't show primary nav
|
// do not show primary nav
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -104,11 +104,11 @@ class ErrorAction extends Action
|
|||||||
{
|
{
|
||||||
parent::showPage();
|
parent::showPage();
|
||||||
|
|
||||||
// We don't want to have any more output after this
|
// We do not want to have any more output after this
|
||||||
exit();
|
exit();
|
||||||
}
|
}
|
||||||
|
|
||||||
// Overload a bunch of stuff so the page isn't too bloated
|
// Overload a bunch of stuff so the page is not too bloated
|
||||||
|
|
||||||
function showBody()
|
function showBody()
|
||||||
{
|
{
|
||||||
|
@ -76,7 +76,7 @@ class HTMLOutputter extends XMLOutputter
|
|||||||
/**
|
/**
|
||||||
* Start an HTML document
|
* Start an HTML document
|
||||||
*
|
*
|
||||||
* If $type isn't specified, will attempt to do content negotiation.
|
* If $type is not specified, will attempt to do content negotiation.
|
||||||
*
|
*
|
||||||
* Attempts to do content negotiation for language, also.
|
* Attempts to do content negotiation for language, also.
|
||||||
*
|
*
|
||||||
|
@ -119,7 +119,7 @@ class ImageFile
|
|||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
// Don't crop/scale if it isn't necessary
|
// Do not crop/scale if it is not necessary
|
||||||
if ($size === $this->width
|
if ($size === $this->width
|
||||||
&& $size === $this->height
|
&& $size === $this->height
|
||||||
&& $x === 0
|
&& $x === 0
|
||||||
|
@ -437,7 +437,7 @@ function jabber_public_notice($notice)
|
|||||||
|
|
||||||
$public = common_config('xmpp', 'public');
|
$public = common_config('xmpp', 'public');
|
||||||
|
|
||||||
// FIXME PRIV don't send out private messages here
|
// FIXME PRIV do not send out private messages here
|
||||||
// XXX: should we send out non-local messages if public,localonly
|
// XXX: should we send out non-local messages if public,localonly
|
||||||
// = false? I think not
|
// = false? I think not
|
||||||
|
|
||||||
|
@ -467,7 +467,7 @@ function mail_notify_nudge($from, $to)
|
|||||||
"these days and is inviting you to post some news.\n\n".
|
"these days and is inviting you to post some news.\n\n".
|
||||||
"So let's hear from you :)\n\n".
|
"So let's hear from you :)\n\n".
|
||||||
"%3\$s\n\n".
|
"%3\$s\n\n".
|
||||||
"Don't reply to this email; it won't get to them.\n\n".
|
"Do not reply to this email. It will not get to them.\n\n".
|
||||||
"With kind regards,\n".
|
"With kind regards,\n".
|
||||||
"%4\$s\n"),
|
"%4\$s\n"),
|
||||||
$from_profile->getBestName(),
|
$from_profile->getBestName(),
|
||||||
@ -516,7 +516,7 @@ function mail_notify_message($message, $from=null, $to=null)
|
|||||||
"------------------------------------------------------\n\n".
|
"------------------------------------------------------\n\n".
|
||||||
"You can reply to their message here:\n\n".
|
"You can reply to their message here:\n\n".
|
||||||
"%4\$s\n\n".
|
"%4\$s\n\n".
|
||||||
"Don't reply to this email; it won't get to them.\n\n".
|
"Do not reply to this email. It will not get to them.\n\n".
|
||||||
"With kind regards,\n".
|
"With kind regards,\n".
|
||||||
"%5\$s\n"),
|
"%5\$s\n"),
|
||||||
$from_profile->getBestName(),
|
$from_profile->getBestName(),
|
||||||
@ -532,7 +532,7 @@ function mail_notify_message($message, $from=null, $to=null)
|
|||||||
/**
|
/**
|
||||||
* notify a user that one of their notices has been chosen as a 'fave'
|
* notify a user that one of their notices has been chosen as a 'fave'
|
||||||
*
|
*
|
||||||
* Doesn't check that the user has an email address nor if they
|
* Does not check that the user has an email address nor if they
|
||||||
* want to receive notification of faves. Maybe this happens higher
|
* want to receive notification of faves. Maybe this happens higher
|
||||||
* up the stack...?
|
* up the stack...?
|
||||||
*
|
*
|
||||||
|
@ -347,7 +347,7 @@ class NoticeListItem extends Widget
|
|||||||
* show the link to the main page for the notice
|
* show the link to the main page for the notice
|
||||||
*
|
*
|
||||||
* Displays a link to the page for a notice, with "relative" time. Tries to
|
* Displays a link to the page for a notice, with "relative" time. Tries to
|
||||||
* get remote notice URLs correct, but doesn't always succeed.
|
* get remote notice URLs correct, but does not always succeed.
|
||||||
*
|
*
|
||||||
* @return void
|
* @return void
|
||||||
*/
|
*/
|
||||||
@ -483,7 +483,7 @@ class NoticeListItem extends Widget
|
|||||||
* show a link to reply to the current notice
|
* show a link to reply to the current notice
|
||||||
*
|
*
|
||||||
* Should either do the reply in the current notice form (if available), or
|
* Should either do the reply in the current notice form (if available), or
|
||||||
* link out to the notice-posting form. A little flakey, doesn't always work.
|
* link out to the notice-posting form. A little flakey, does not always work.
|
||||||
*
|
*
|
||||||
* @return void
|
* @return void
|
||||||
*/
|
*/
|
||||||
|
@ -96,8 +96,8 @@ class QueueHandler extends Daemon
|
|||||||
* Initialization, run when the queue handler starts.
|
* Initialization, run when the queue handler starts.
|
||||||
* If this function indicates failure, the handler run will be aborted.
|
* If this function indicates failure, the handler run will be aborted.
|
||||||
*
|
*
|
||||||
* @fixme run() will abort if this doesn't return true,
|
* @fixme run() will abort if this does not return true,
|
||||||
* but some subclasses don't bother.
|
* but some subclasses do not bother.
|
||||||
* @return boolean true on success, false on failure
|
* @return boolean true on success, false on failure
|
||||||
*/
|
*/
|
||||||
function start()
|
function start()
|
||||||
@ -108,8 +108,8 @@ class QueueHandler extends Daemon
|
|||||||
* Cleanup, run when the queue handler ends.
|
* Cleanup, run when the queue handler ends.
|
||||||
* If this function indicates failure, a warning will be logged.
|
* If this function indicates failure, a warning will be logged.
|
||||||
*
|
*
|
||||||
* @fixme run() will throw warnings if this doesn't return true,
|
* @fixme run() will throw warnings if this does not return true,
|
||||||
* but many subclasses don't bother.
|
* but many subclasses do not bother.
|
||||||
* @return boolean true on success, false on failure
|
* @return boolean true on success, false on failure
|
||||||
*/
|
*/
|
||||||
function finish()
|
function finish()
|
||||||
@ -137,7 +137,7 @@ class QueueHandler extends Daemon
|
|||||||
* method, which passes control back to our handle_notice() method for
|
* method, which passes control back to our handle_notice() method for
|
||||||
* each notice that comes in on the queue.
|
* each notice that comes in on the queue.
|
||||||
*
|
*
|
||||||
* Most of the time this won't need to be overridden in a subclass.
|
* Most of the time this will not need to be overridden in a subclass.
|
||||||
*
|
*
|
||||||
* @return boolean true on success, false on failure
|
* @return boolean true on success, false on failure
|
||||||
*/
|
*/
|
||||||
@ -173,7 +173,7 @@ class QueueHandler extends Daemon
|
|||||||
* Called by QueueHandler after each handled item or empty polling cycle.
|
* Called by QueueHandler after each handled item or empty polling cycle.
|
||||||
* This is a good time to e.g. service your XMPP connection.
|
* This is a good time to e.g. service your XMPP connection.
|
||||||
*
|
*
|
||||||
* Doesn't need to be overridden if there's no maintenance to do.
|
* Does not need to be overridden if there's no maintenance to do.
|
||||||
*
|
*
|
||||||
* @param int $timeout seconds to sleep if there's nothing to do
|
* @param int $timeout seconds to sleep if there's nothing to do
|
||||||
*/
|
*/
|
||||||
|
@ -386,7 +386,7 @@ class Rss10Action extends Action
|
|||||||
return null;
|
return null;
|
||||||
}
|
}
|
||||||
|
|
||||||
// FIXME: doesn't handle modified profiles, avatars, deleted notices
|
// FIXME: does not handle modified profiles, avatars, deleted notices
|
||||||
|
|
||||||
return strtotime($this->notices[0]->created);
|
return strtotime($this->notices[0]->created);
|
||||||
}
|
}
|
||||||
|
@ -119,7 +119,7 @@ class MySQLSearch extends SearchEngine
|
|||||||
return true;
|
return true;
|
||||||
} else if ('identica_notices' === $this->table) {
|
} else if ('identica_notices' === $this->table) {
|
||||||
|
|
||||||
// Don't show imported notices
|
// Do not show imported notices
|
||||||
$this->target->whereAdd('notice.is_local != ' . Notice::GATEWAY);
|
$this->target->whereAdd('notice.is_local != ' . Notice::GATEWAY);
|
||||||
|
|
||||||
if (strtolower($q) != $q) {
|
if (strtolower($q) != $q) {
|
||||||
|
12
lib/util.php
12
lib/util.php
@ -62,7 +62,7 @@ function common_init_language()
|
|||||||
$locale_set = common_init_locale($language);
|
$locale_set = common_init_locale($language);
|
||||||
setlocale(LC_CTYPE, 'C');
|
setlocale(LC_CTYPE, 'C');
|
||||||
|
|
||||||
// So we don't have to make people install the gettext locales
|
// So we do not have to make people install the gettext locales
|
||||||
$path = common_config('site','locale_path');
|
$path = common_config('site','locale_path');
|
||||||
bindtextdomain("statusnet", $path);
|
bindtextdomain("statusnet", $path);
|
||||||
bind_textdomain_codeset("statusnet", "UTF-8");
|
bind_textdomain_codeset("statusnet", "UTF-8");
|
||||||
@ -139,7 +139,7 @@ function common_check_user($nickname, $password)
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
}else{
|
}else{
|
||||||
//no handler indicated the credentials were valid, and we know their not valid because the user isn't in the database
|
//no handler indicated the credentials were valid, and we know their not valid because the user is not in the database
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
} else {
|
} else {
|
||||||
@ -396,7 +396,7 @@ function common_current_user()
|
|||||||
}
|
}
|
||||||
|
|
||||||
// Logins that are 'remembered' aren't 'real' -- they're subject to
|
// Logins that are 'remembered' aren't 'real' -- they're subject to
|
||||||
// cookie-stealing. So, we don't let them do certain things. New reg,
|
// cookie-stealing. So, we do not let them do certain things. New reg,
|
||||||
// OpenID, and password logins _are_ real.
|
// OpenID, and password logins _are_ real.
|
||||||
|
|
||||||
function common_real_login($real=true)
|
function common_real_login($real=true)
|
||||||
@ -1147,7 +1147,7 @@ function common_accept_to_prefs($accept, $def = '*/*')
|
|||||||
$parts = explode(',', $accept);
|
$parts = explode(',', $accept);
|
||||||
|
|
||||||
foreach($parts as $part) {
|
foreach($parts as $part) {
|
||||||
// FIXME: doesn't deal with params like 'text/html; level=1'
|
// FIXME: does not deal with params like 'text/html; level=1'
|
||||||
@list($value, $qpart) = explode(';', trim($part));
|
@list($value, $qpart) = explode(';', trim($part));
|
||||||
$match = array();
|
$match = array();
|
||||||
if(!isset($qpart)) {
|
if(!isset($qpart)) {
|
||||||
@ -1346,7 +1346,7 @@ function common_error_handler($errno, $errstr, $errfile, $errline, $errcontext)
|
|||||||
}
|
}
|
||||||
|
|
||||||
// FIXME: show error page if we're on the Web
|
// FIXME: show error page if we're on the Web
|
||||||
/* Don't execute PHP internal error handler */
|
/* Do not execute PHP internal error handler */
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -1448,7 +1448,7 @@ function common_shorten_url($long_url)
|
|||||||
}
|
}
|
||||||
global $_shorteners;
|
global $_shorteners;
|
||||||
if (!isset($_shorteners[$svc])) {
|
if (!isset($_shorteners[$svc])) {
|
||||||
//the user selected service doesn't exist, so default to ur1.ca
|
//the user selected service does not exist, so default to ur1.ca
|
||||||
$svc = 'ur1.ca';
|
$svc = 'ur1.ca';
|
||||||
}
|
}
|
||||||
if (!isset($_shorteners[$svc])) {
|
if (!isset($_shorteners[$svc])) {
|
||||||
|
@ -112,7 +112,7 @@ class XMLOutputter
|
|||||||
*
|
*
|
||||||
* Utility for outputting an XML element. A convenient wrapper
|
* Utility for outputting an XML element. A convenient wrapper
|
||||||
* for a bunch of longer XMLWriter calls. This is best for
|
* for a bunch of longer XMLWriter calls. This is best for
|
||||||
* when an element doesn't have any sub-elements; if that's the
|
* when an element does not have any sub-elements; if that's the
|
||||||
* case, use elementStart() and elementEnd() instead.
|
* case, use elementStart() and elementEnd() instead.
|
||||||
*
|
*
|
||||||
* The $content element will be escaped for XML. If you need
|
* The $content element will be escaped for XML. If you need
|
||||||
|
@ -37,7 +37,7 @@ class XmppQueueHandler extends QueueHandler
|
|||||||
|
|
||||||
function start()
|
function start()
|
||||||
{
|
{
|
||||||
# Low priority; we don't want to receive messages
|
# Low priority; we do not want to receive messages
|
||||||
|
|
||||||
$this->log(LOG_INFO, "INITIALIZE");
|
$this->log(LOG_INFO, "INITIALIZE");
|
||||||
$this->conn = jabber_connect($this->_id.$this->transport());
|
$this->conn = jabber_connect($this->_id.$this->transport());
|
||||||
|
@ -79,7 +79,7 @@ class AutocompleteAction extends Action
|
|||||||
function etag()
|
function etag()
|
||||||
{
|
{
|
||||||
return '"' . implode(':', array($this->arg('action'),
|
return '"' . implode(':', array($this->arg('action'),
|
||||||
crc32($this->arg('q')), //the actual string can have funny characters in we don't want showing up in the etag
|
crc32($this->arg('q')), //the actual string can have funny characters in we do not want showing up in the etag
|
||||||
$this->arg('limit'),
|
$this->arg('limit'),
|
||||||
$this->lastModified())) . '"';
|
$this->lastModified())) . '"';
|
||||||
}
|
}
|
||||||
|
@ -85,7 +85,7 @@ class BlogspamNetPlugin extends Plugin
|
|||||||
} else if (preg_match('/^SPAM(:(.*))?$/', $response, $match)) {
|
} else if (preg_match('/^SPAM(:(.*))?$/', $response, $match)) {
|
||||||
throw new ClientException(sprintf(_("Spam checker results: %s"), $match[2]), 400);
|
throw new ClientException(sprintf(_("Spam checker results: %s"), $match[2]), 400);
|
||||||
} else if (preg_match('/^OK$/', $response)) {
|
} else if (preg_match('/^OK$/', $response)) {
|
||||||
// don't do anything
|
// do not do anything
|
||||||
} else {
|
} else {
|
||||||
throw new ServerException(sprintf(_("Unexpected response from %s: %s"), $this->baseUrl, $response), 500);
|
throw new ServerException(sprintf(_("Unexpected response from %s: %s"), $this->baseUrl, $response), 500);
|
||||||
}
|
}
|
||||||
|
@ -71,7 +71,7 @@ class FBConnectauthAction extends Action
|
|||||||
'There is already a local user (' . $flink->user_id .
|
'There is already a local user (' . $flink->user_id .
|
||||||
') linked with this Facebook (' . $this->fbuid . ').');
|
') linked with this Facebook (' . $this->fbuid . ').');
|
||||||
|
|
||||||
// We don't want these cookies
|
// We do not want these cookies
|
||||||
getFacebook()->clear_cookie_state();
|
getFacebook()->clear_cookie_state();
|
||||||
|
|
||||||
$this->clientError(_('There is already a local user linked with this Facebook.'));
|
$this->clientError(_('There is already a local user linked with this Facebook.'));
|
||||||
@ -364,7 +364,7 @@ class FBConnectauthAction extends Action
|
|||||||
{
|
{
|
||||||
$url = common_get_returnto();
|
$url = common_get_returnto();
|
||||||
if ($url) {
|
if ($url) {
|
||||||
// We don't have to return to it again
|
// We do not have to return to it again
|
||||||
common_set_returnto(null);
|
common_set_returnto(null);
|
||||||
} else {
|
} else {
|
||||||
$url = common_local_url('all',
|
$url = common_local_url('all',
|
||||||
|
@ -182,7 +182,7 @@ class FacebookPlugin extends Plugin
|
|||||||
$login_url = common_local_url('FBConnectAuth');
|
$login_url = common_local_url('FBConnectAuth');
|
||||||
$logout_url = common_local_url('logout');
|
$logout_url = common_local_url('logout');
|
||||||
|
|
||||||
// XXX: Facebook says we don't need this FB_RequireFeatures(),
|
// XXX: Facebook says we do not need this FB_RequireFeatures(),
|
||||||
// but we actually do, for IE and Safari. Gar.
|
// but we actually do, for IE and Safari. Gar.
|
||||||
|
|
||||||
$js = '<script type="text/javascript">';
|
$js = '<script type="text/javascript">';
|
||||||
@ -201,7 +201,7 @@ class FacebookPlugin extends Plugin
|
|||||||
// The below function alters the logout link so that it logs the user out
|
// The below function alters the logout link so that it logs the user out
|
||||||
// of Facebook Connect as well as the site. However, for some pages
|
// of Facebook Connect as well as the site. However, for some pages
|
||||||
// (FB Connect Settings) we need to output the FB Connect scripts (to
|
// (FB Connect Settings) we need to output the FB Connect scripts (to
|
||||||
// show an existing FB connection even if the user isn't authenticated
|
// show an existing FB connection even if the user is not authenticated
|
||||||
// with Facebook connect) but NOT alter the logout link. And the only
|
// with Facebook connect) but NOT alter the logout link. And the only
|
||||||
// way to reliably do that is with the FB Connect .js libs. Crazy.
|
// way to reliably do that is with the FB Connect .js libs. Crazy.
|
||||||
|
|
||||||
|
@ -57,7 +57,7 @@ class Facebook {
|
|||||||
* @param api_key your Developer API key
|
* @param api_key your Developer API key
|
||||||
* @param secret your Developer API secret
|
* @param secret your Developer API secret
|
||||||
* @param generate_session_secret whether to automatically generate a session
|
* @param generate_session_secret whether to automatically generate a session
|
||||||
* if the user doesn't have one, but
|
* if the user does not have one, but
|
||||||
* there is an auth token present in the url,
|
* there is an auth token present in the url,
|
||||||
*/
|
*/
|
||||||
public function __construct($api_key, $secret, $generate_session_secret=false) {
|
public function __construct($api_key, $secret, $generate_session_secret=false) {
|
||||||
@ -192,7 +192,7 @@ class Facebook {
|
|||||||
}
|
}
|
||||||
return $session_secret;
|
return $session_secret;
|
||||||
} catch (FacebookRestClientException $e) {
|
} catch (FacebookRestClientException $e) {
|
||||||
// API_EC_PARAM means we don't have a logged in user, otherwise who
|
// API_EC_PARAM means we do not have a logged in user, otherwise who
|
||||||
// knows what it means, so just throw it.
|
// knows what it means, so just throw it.
|
||||||
if ($e->getCode() != FacebookAPIErrorCodes::API_EC_PARAM) {
|
if ($e->getCode() != FacebookAPIErrorCodes::API_EC_PARAM) {
|
||||||
throw $e;
|
throw $e;
|
||||||
@ -204,7 +204,7 @@ class Facebook {
|
|||||||
try {
|
try {
|
||||||
return $this->api_client->auth_getSession($auth_token, $this->generate_session_secret);
|
return $this->api_client->auth_getSession($auth_token, $this->generate_session_secret);
|
||||||
} catch (FacebookRestClientException $e) {
|
} catch (FacebookRestClientException $e) {
|
||||||
// API_EC_PARAM means we don't have a logged in user, otherwise who
|
// API_EC_PARAM means we do not have a logged in user, otherwise who
|
||||||
// knows what it means, so just throw it.
|
// knows what it means, so just throw it.
|
||||||
if ($e->getCode() != FacebookAPIErrorCodes::API_EC_PARAM) {
|
if ($e->getCode() != FacebookAPIErrorCodes::API_EC_PARAM) {
|
||||||
throw $e;
|
throw $e;
|
||||||
@ -265,7 +265,7 @@ class Facebook {
|
|||||||
if ($this->in_fb_canvas()) {
|
if ($this->in_fb_canvas()) {
|
||||||
echo '<fb:redirect url="' . $url . '"/>';
|
echo '<fb:redirect url="' . $url . '"/>';
|
||||||
} else if (preg_match('/^https?:\/\/([^\/]*\.)?facebook\.com(:\d+)?/i', $url)) {
|
} else if (preg_match('/^https?:\/\/([^\/]*\.)?facebook\.com(:\d+)?/i', $url)) {
|
||||||
// make sure facebook.com url's load in the full frame so that we don't
|
// make sure facebook.com url's load in the full frame so that we do not
|
||||||
// get a frame within a frame.
|
// get a frame within a frame.
|
||||||
echo "<script type=\"text/javascript\">\ntop.location.href = \"$url\";\n</script>";
|
echo "<script type=\"text/javascript\">\ntop.location.href = \"$url\";\n</script>";
|
||||||
} else {
|
} else {
|
||||||
|
@ -93,7 +93,7 @@ class FacebookDesktop extends Facebook {
|
|||||||
}
|
}
|
||||||
|
|
||||||
public function verify_signature($fb_params, $expected_sig) {
|
public function verify_signature($fb_params, $expected_sig) {
|
||||||
// we don't want to verify the signature until we have a valid
|
// we do not want to verify the signature until we have a valid
|
||||||
// session secret
|
// session secret
|
||||||
if ($this->verify_sig) {
|
if ($this->verify_sig) {
|
||||||
return parent::verify_signature($fb_params, $expected_sig);
|
return parent::verify_signature($fb_params, $expected_sig);
|
||||||
|
@ -46,7 +46,7 @@ class FacebookRestClient {
|
|||||||
// on canvas pages
|
// on canvas pages
|
||||||
public $added;
|
public $added;
|
||||||
public $is_user;
|
public $is_user;
|
||||||
// we don't pass friends list to iframes, but we want to make
|
// we do not pass friends list to iframes, but we want to make
|
||||||
// friends_get really simple in the canvas_user (non-logged in) case.
|
// friends_get really simple in the canvas_user (non-logged in) case.
|
||||||
// So we use the canvas_user as default arg to friends_get
|
// So we use the canvas_user as default arg to friends_get
|
||||||
public $canvas_user;
|
public $canvas_user;
|
||||||
@ -657,7 +657,7 @@ function toggleDisplay(id, type) {
|
|||||||
* deleted.
|
* deleted.
|
||||||
*
|
*
|
||||||
* IMPORTANT: If your application has registered public tags
|
* IMPORTANT: If your application has registered public tags
|
||||||
* that other applications may be using, don't delete those tags!
|
* that other applications may be using, do not delete those tags!
|
||||||
* Doing so can break the FBML ofapplications that are using them.
|
* Doing so can break the FBML ofapplications that are using them.
|
||||||
*
|
*
|
||||||
* @param array $tag_names the names of the tags to delete (optinal)
|
* @param array $tag_names the names of the tags to delete (optinal)
|
||||||
@ -820,7 +820,7 @@ function toggleDisplay(id, type) {
|
|||||||
|
|
||||||
if (is_array($target_ids)) {
|
if (is_array($target_ids)) {
|
||||||
$target_ids = json_encode($target_ids);
|
$target_ids = json_encode($target_ids);
|
||||||
$target_ids = trim($target_ids, "[]"); // we don't want square brackets
|
$target_ids = trim($target_ids, "[]"); // we do not want square brackets
|
||||||
}
|
}
|
||||||
|
|
||||||
return $this->call_method('facebook.feed.publishUserAction',
|
return $this->call_method('facebook.feed.publishUserAction',
|
||||||
|
@ -1,5 +1,5 @@
|
|||||||
<?php
|
<?php
|
||||||
# In PHP 5.2 or higher we don't need to bring this in
|
# In PHP 5.2 or higher we do not need to bring this in
|
||||||
if (!function_exists('json_encode')) {
|
if (!function_exists('json_encode')) {
|
||||||
require_once 'jsonwrapper_inner.php';
|
require_once 'jsonwrapper_inner.php';
|
||||||
}
|
}
|
||||||
|
@ -95,7 +95,7 @@ class FacebookAction extends Action
|
|||||||
/**
|
/**
|
||||||
* Start an Facebook ready HTML document
|
* Start an Facebook ready HTML document
|
||||||
*
|
*
|
||||||
* For Facebook we don't want to actually output any headers,
|
* For Facebook we do not want to actually output any headers,
|
||||||
* DTD info, etc. Just Stylesheet and JavaScript links.
|
* DTD info, etc. Just Stylesheet and JavaScript links.
|
||||||
*
|
*
|
||||||
* @param string $type MIME type to use; default is to do negotation.
|
* @param string $type MIME type to use; default is to do negotation.
|
||||||
@ -129,7 +129,7 @@ class FacebookAction extends Action
|
|||||||
*/
|
*/
|
||||||
function showNoticeForm()
|
function showNoticeForm()
|
||||||
{
|
{
|
||||||
// don't do it for most of the Facebook pages
|
// do not do it for most of the Facebook pages
|
||||||
}
|
}
|
||||||
|
|
||||||
function showBody()
|
function showBody()
|
||||||
@ -581,7 +581,7 @@ class FacebookNoticeListItem extends NoticeListItem
|
|||||||
/**
|
/**
|
||||||
* recipe function for displaying a single notice in the Facebook App.
|
* recipe function for displaying a single notice in the Facebook App.
|
||||||
*
|
*
|
||||||
* Overridden to strip out some of the controls that we don't
|
* Overridden to strip out some of the controls that we do not
|
||||||
* want to be available.
|
* want to be available.
|
||||||
*
|
*
|
||||||
* @return void
|
* @return void
|
||||||
|
@ -87,12 +87,12 @@ class GeonamesPlugin extends Plugin
|
|||||||
$location->location_id = $n->geonameId;
|
$location->location_id = $n->geonameId;
|
||||||
$location->location_ns = self::NAMESPACE;
|
$location->location_ns = self::NAMESPACE;
|
||||||
|
|
||||||
// handled, don't continue processing!
|
// handled, do not continue processing!
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
// Continue processing; we don't have the answer
|
// Continue processing; we do not have the answer
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -217,7 +217,7 @@ class GeonamesPlugin extends Plugin
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
// For some reason we don't know, so pass.
|
// For some reason we do not know, so pass.
|
||||||
|
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
@ -299,7 +299,7 @@ class GeonamesPlugin extends Plugin
|
|||||||
|
|
||||||
$url = 'http://www.geonames.org/' . $location->location_id;
|
$url = 'http://www.geonames.org/' . $location->location_id;
|
||||||
|
|
||||||
// it's been filled, so don't process further.
|
// it's been filled, so do not process further.
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -341,7 +341,7 @@ class FinishopenidloginAction extends Action
|
|||||||
{
|
{
|
||||||
$url = common_get_returnto();
|
$url = common_get_returnto();
|
||||||
if ($url) {
|
if ($url) {
|
||||||
# We don't have to return to it again
|
# We do not have to return to it again
|
||||||
common_set_returnto(null);
|
common_set_returnto(null);
|
||||||
} else {
|
} else {
|
||||||
$url = common_local_url('all',
|
$url = common_local_url('all',
|
||||||
@ -421,7 +421,7 @@ class FinishopenidloginAction extends Action
|
|||||||
|
|
||||||
$parts = parse_url($openid);
|
$parts = parse_url($openid);
|
||||||
|
|
||||||
# If any of these parts exist, this won't work
|
# If any of these parts exist, this will not work
|
||||||
|
|
||||||
foreach ($bad as $badpart) {
|
foreach ($bad as $badpart) {
|
||||||
if (array_key_exists($badpart, $parts)) {
|
if (array_key_exists($badpart, $parts)) {
|
||||||
|
@ -187,7 +187,7 @@ function oid_authenticate($openid_url, $returnto, $immediate=false)
|
|||||||
$form_html = $auth_request->formMarkup($trust_root, $process_url,
|
$form_html = $auth_request->formMarkup($trust_root, $process_url,
|
||||||
$immediate, array('id' => $form_id));
|
$immediate, array('id' => $form_id));
|
||||||
|
|
||||||
# XXX: This is cheap, but things choke if we don't escape ampersands
|
# XXX: This is cheap, but things choke if we do not escape ampersands
|
||||||
# in the HTML attributes
|
# in the HTML attributes
|
||||||
|
|
||||||
$form_html = preg_replace('/&/', '&', $form_html);
|
$form_html = preg_replace('/&/', '&', $form_html);
|
||||||
|
@ -44,7 +44,7 @@ if (!defined('STATUSNET')) {
|
|||||||
* 'piwikId' => 'id'));
|
* 'piwikId' => 'id'));
|
||||||
*
|
*
|
||||||
* Replace 'example.com/piwik/' with the URL to your Piwik installation and
|
* Replace 'example.com/piwik/' with the URL to your Piwik installation and
|
||||||
* make sure you don't forget the final /.
|
* make sure you do not forget the final /.
|
||||||
* Replace 'id' with the ID your statusnet installation has in your Piwik
|
* Replace 'id' with the ID your statusnet installation has in your Piwik
|
||||||
* analytics setup - for example '8'.
|
* analytics setup - for example '8'.
|
||||||
*
|
*
|
||||||
|
@ -240,7 +240,7 @@ class RealtimePlugin extends Plugin
|
|||||||
// FIXME: this code should be abstracted to a neutral third
|
// FIXME: this code should be abstracted to a neutral third
|
||||||
// party, like Notice::asJson(). I'm not sure of the ethics
|
// party, like Notice::asJson(). I'm not sure of the ethics
|
||||||
// of refactoring from within a plugin, so I'm just abusing
|
// of refactoring from within a plugin, so I'm just abusing
|
||||||
// the ApiAction method. Don't do this unless you're me!
|
// the ApiAction method. Do not do this unless you're me!
|
||||||
|
|
||||||
require_once(INSTALLDIR.'/lib/api.php');
|
require_once(INSTALLDIR.'/lib/api.php');
|
||||||
|
|
||||||
|
@ -115,7 +115,7 @@ class SyncTwitterFriendsDaemon extends ParallelizingDaemon
|
|||||||
// Each child ps needs its own DB connection
|
// Each child ps needs its own DB connection
|
||||||
|
|
||||||
// Note: DataObject::getDatabaseConnection() creates
|
// Note: DataObject::getDatabaseConnection() creates
|
||||||
// a new connection if there isn't one already
|
// a new connection if there is not one already
|
||||||
|
|
||||||
$conn = &$flink->getDatabaseConnection();
|
$conn = &$flink->getDatabaseConnection();
|
||||||
|
|
||||||
|
@ -136,7 +136,7 @@ class TwitterStatusFetcher extends ParallelizingDaemon
|
|||||||
// Each child ps needs its own DB connection
|
// Each child ps needs its own DB connection
|
||||||
|
|
||||||
// Note: DataObject::getDatabaseConnection() creates
|
// Note: DataObject::getDatabaseConnection() creates
|
||||||
// a new connection if there isn't one already
|
// a new connection if there is not one already
|
||||||
|
|
||||||
$conn = &$flink->getDatabaseConnection();
|
$conn = &$flink->getDatabaseConnection();
|
||||||
|
|
||||||
@ -499,7 +499,7 @@ class TwitterStatusFetcher extends ParallelizingDaemon
|
|||||||
$avatar->height = 73;
|
$avatar->height = 73;
|
||||||
}
|
}
|
||||||
|
|
||||||
$avatar->original = 0; // we don't have the original
|
$avatar->original = 0; // we do not have the original
|
||||||
$avatar->mediatype = $mediatype;
|
$avatar->mediatype = $mediatype;
|
||||||
$avatar->filename = $filename;
|
$avatar->filename = $filename;
|
||||||
$avatar->url = Avatar::url($filename);
|
$avatar->url = Avatar::url($filename);
|
||||||
|
@ -33,7 +33,7 @@ function updateTwitter_user($twitter_id, $screen_name)
|
|||||||
|
|
||||||
$fuser->query('BEGIN');
|
$fuser->query('BEGIN');
|
||||||
|
|
||||||
// Dropping down to SQL because regular DB_DataObject udpate stuff doesn't seem
|
// Dropping down to SQL because regular DB_DataObject udpate stuff does not seem
|
||||||
// to work so good with tables that have multiple column primary keys
|
// to work so good with tables that have multiple column primary keys
|
||||||
|
|
||||||
// Any time we update the uri for a forein user we have to make sure there
|
// Any time we update the uri for a forein user we have to make sure there
|
||||||
|
@ -60,9 +60,9 @@ function read_input_line($prompt)
|
|||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* On Unix-like systems where PHP readline extension isn't present,
|
* On Unix-like systems where PHP readline extension is not present,
|
||||||
* -cough- Mac OS X -cough- we can shell out to bash to do it for us.
|
* -cough- Mac OS X -cough- we can shell out to bash to do it for us.
|
||||||
* This lets us at least handle things like arrow keys, but we don't
|
* This lets us at least handle things like arrow keys, but we do not
|
||||||
* get any entry history. :(
|
* get any entry history. :(
|
||||||
*
|
*
|
||||||
* Shamelessly ripped from when I wrote the same code for MediaWiki. :)
|
* Shamelessly ripped from when I wrote the same code for MediaWiki. :)
|
||||||
|
@ -231,7 +231,7 @@ class MailerDaemon
|
|||||||
foreach ($parsed->parts as $part) {
|
foreach ($parsed->parts as $part) {
|
||||||
$this->extract_part($part,$msg,$attachments);
|
$this->extract_part($part,$msg,$attachments);
|
||||||
}
|
}
|
||||||
//we don't want any attachments that are a result of this parsing
|
//we do not want any attachments that are a result of this parsing
|
||||||
return $msg;
|
return $msg;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -69,7 +69,7 @@ class XmppConfirmHandler extends XmppQueueHandler
|
|||||||
continue;
|
continue;
|
||||||
} else {
|
} else {
|
||||||
$this->log(LOG_INFO, 'Confirmation sent for ' . $confirm->address);
|
$this->log(LOG_INFO, 'Confirmation sent for ' . $confirm->address);
|
||||||
# Mark confirmation sent; need a dupe so we don't have the WHERE clause
|
# Mark confirmation sent; need a dupe so we do not have the WHERE clause
|
||||||
$dupe = Confirm_address::staticGet('code', $confirm->code);
|
$dupe = Confirm_address::staticGet('code', $confirm->code);
|
||||||
if (!$dupe) {
|
if (!$dupe) {
|
||||||
common_log(LOG_WARNING, 'Could not refetch confirm', __FILE__);
|
common_log(LOG_WARNING, 'Could not refetch confirm', __FILE__);
|
||||||
|
Loading…
Reference in New Issue
Block a user