summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorEvan Prodromou <evan@status.net>2009-11-10 14:26:49 -0500
committerEvan Prodromou <evan@status.net>2009-11-10 14:26:49 -0500
commit7ae10c27b0725a7108b63a788affd4d07e37afdc (patch)
tree92f952319071ba770136d3e69a82e51040ecb6b5
parent8d5c2b3129a1d7cefd78e311d5cbbe9ab426bb72 (diff)
parent737fe763471bcb6ebd95c318363308a33e28e889 (diff)
Merge branch '0.9.x' of git@gitorious.org:statusnet/mainline into 0.9.x
Conflicts: lib/util.php
-rw-r--r--EVENTS.txt10
-rw-r--r--actions/allrss.php2
-rw-r--r--actions/apiaccountratelimitstatus.php2
-rw-r--r--actions/apifriendshipsdestroy.php2
-rw-r--r--actions/attachment.php4
-rw-r--r--actions/avatarbynickname.php2
-rw-r--r--actions/block.php4
-rw-r--r--actions/groupblock.php19
-rw-r--r--actions/login.php2
-rw-r--r--actions/logout.php2
-rw-r--r--actions/newmessage.php2
-rw-r--r--actions/newnotice.php2
-rw-r--r--actions/opensearch.php2
-rw-r--r--actions/passwordsettings.php16
-rw-r--r--actions/register.php2
-rw-r--r--actions/showgroup.php2
-rw-r--r--actions/showmessage.php8
-rw-r--r--actions/shownotice.php6
-rw-r--r--actions/showstream.php2
-rw-r--r--actions/sup.php2
-rw-r--r--actions/twitapisearchatom.php2
-rw-r--r--actions/twitapitrends.php2
-rw-r--r--classes/File_redirection.php8
-rw-r--r--classes/Notice.php6
-rw-r--r--classes/Profile.php4
-rw-r--r--classes/User.php6
-rw-r--r--db/08to09.sql9
-rw-r--r--db/08to09_pg.sql9
-rw-r--r--db/statusnet.sql6
-rw-r--r--db/statusnet_pg.sql6
-rw-r--r--lib/accountsettingsaction.php35
-rw-r--r--lib/api.php14
-rw-r--r--lib/apiauth.php2
-rw-r--r--lib/dberroraction.php6
-rw-r--r--lib/error.php4
-rw-r--r--lib/groupnav.php79
-rw-r--r--lib/htmloutputter.php2
-rw-r--r--lib/imagefile.php2
-rw-r--r--lib/jabber.php2
-rw-r--r--lib/mail.php6
-rw-r--r--lib/noticelist.php4
-rw-r--r--lib/queuehandler.php12
-rw-r--r--lib/rssaction.php2
-rw-r--r--lib/search_engines.php2
-rw-r--r--lib/util.php11
-rw-r--r--lib/xmloutputter.php2
-rw-r--r--lib/xmppqueuehandler.php2
-rw-r--r--plugins/Autocomplete/autocomplete.php2
-rw-r--r--plugins/BlogspamNetPlugin.php2
-rw-r--r--plugins/Facebook/FBConnectAuth.php4
-rw-r--r--plugins/Facebook/FacebookPlugin.php4
-rw-r--r--plugins/Facebook/facebook/facebook.php8
-rw-r--r--plugins/Facebook/facebook/facebook_desktop.php2
-rwxr-xr-xplugins/Facebook/facebook/facebookapi_php5_restlib.php6
-rw-r--r--plugins/Facebook/facebook/jsonwrapper/jsonwrapper.php2
-rw-r--r--plugins/Facebook/facebookaction.php6
-rw-r--r--plugins/GeonamesPlugin.php8
-rw-r--r--plugins/Ldap/LdapPlugin.php11
-rw-r--r--plugins/OpenID/finishopenidlogin.php4
-rw-r--r--plugins/OpenID/openid.php2
-rw-r--r--plugins/PiwikAnalyticsPlugin.php2
-rw-r--r--plugins/Realtime/RealtimePlugin.php2
-rwxr-xr-xplugins/TwitterBridge/daemons/synctwitterfriends.php2
-rwxr-xr-xplugins/TwitterBridge/daemons/twitterstatusfetcher.php4
-rw-r--r--plugins/TwitterBridge/twitter.php2
-rwxr-xr-xscripts/console.php4
-rwxr-xr-xscripts/maildaemon.php2
-rwxr-xr-xscripts/xmppconfirmhandler.php2
68 files changed, 241 insertions, 178 deletions
diff --git a/EVENTS.txt b/EVENTS.txt
index 25a51516b..af686b9cd 100644
--- a/EVENTS.txt
+++ b/EVENTS.txt
@@ -191,6 +191,12 @@ StartPersonalGroupNav: beginning of personal group nav menu
EndPersonalGroupNav: end of personal group nav menu (good place to add a menu item)
- $action: action object being shown
+StartGroupGroupNav: Showing the group nav menu
+- $action: the current action
+
+EndGroupGroupNav: At the end of the group nav menu
+- $action: the current action
+
StartEndHTML: just before the </html> tag
- $action: action object being shown
@@ -489,6 +495,10 @@ ChangePassword: Handle a password change request
- $newpassword: the desired new password
- &$errormsg: set this to an error message if the password could not be changed. If the password was changed, leave this as false
+CanUserChangeField: Determines if a user is allowed to change a specific profile field
+- $nickname: nickname of the user who would like to know which of their profile fields are mutable
+- $field: name of the field the user wants to change (nickname, fullname, password, avatar, etc)
+
UserDeleteRelated: Specify additional tables to delete entries from when deleting users
- $user: User object
- &$related: array of DB_DataObject class names to delete entries on matching user_id.
diff --git a/actions/allrss.php b/actions/allrss.php
index 4a5d15c7b..28b1be27d 100644
--- a/actions/allrss.php
+++ b/actions/allrss.php
@@ -56,7 +56,7 @@ class AllrssAction extends Rss10Action
*
* @param array $args Web and URL arguments
*
- * @return boolean false if user does not exist
+ * @return boolean false if user doesn't exist
*/
function prepare($args)
{
diff --git a/actions/apiaccountratelimitstatus.php b/actions/apiaccountratelimitstatus.php
index c7c0e7c00..96179f175 100644
--- a/actions/apiaccountratelimitstatus.php
+++ b/actions/apiaccountratelimitstatus.php
@@ -36,7 +36,7 @@ if (!defined('STATUSNET')) {
require_once INSTALLDIR . '/lib/apibareauth.php';
/**
- * We do not have a rate limit, but some clients check this method.
+ * We don't have a rate limit, but some clients check this method.
* It always returns the same thing: 150 hits left.
*
* @category API
diff --git a/actions/apifriendshipsdestroy.php b/actions/apifriendshipsdestroy.php
index fb73624c9..3d9b7e001 100644
--- a/actions/apifriendshipsdestroy.php
+++ b/actions/apifriendshipsdestroy.php
@@ -113,7 +113,7 @@ class ApiFriendshipsDestroyAction extends ApiAuthAction
return;
}
- // Do not allow unsubscribing from yourself!
+ // Don't allow unsubscribing from yourself!
if ($this->user->id == $this->other->id) {
$this->clientError(
diff --git a/actions/attachment.php b/actions/attachment.php
index ca9e57845..6981354d1 100644
--- a/actions/attachment.php
+++ b/actions/attachment.php
@@ -146,7 +146,7 @@ class AttachmentAction extends Action
}
/**
- * Do not show local navigation
+ * Don't show local navigation
*
* @return void
*/
@@ -170,7 +170,7 @@ class AttachmentAction extends Action
}
/**
- * Do not show page notice
+ * Don't show page notice
*
* @return void
*/
diff --git a/actions/avatarbynickname.php b/actions/avatarbynickname.php
index 1a6925e11..537950792 100644
--- a/actions/avatarbynickname.php
+++ b/actions/avatarbynickname.php
@@ -49,7 +49,7 @@ class AvatarbynicknameAction extends Action
*
* @param array $args query arguments
*
- * @return boolean false if nickname or user is not found
+ * @return boolean false if nickname or user isn't found
*/
function handle($args)
{
diff --git a/actions/block.php b/actions/block.php
index 408f16434..b125d2d8b 100644
--- a/actions/block.php
+++ b/actions/block.php
@@ -146,8 +146,8 @@ class BlockAction extends Action
$this->hidden($k, $v);
}
}
- $this->submit('form_action-no', _('No'), 'submit form_action-primary', 'no', _("Do not block this user from this group"));
- $this->submit('form_action-yes', _('Yes'), 'submit form_action-secondary', 'yes', _('Block this user from this group'));
+ $this->submit('form_action-no', _('No'), 'submit form_action-primary', 'no', _("Do not block this user"));
+ $this->submit('form_action-yes', _('Yes'), 'submit form_action-secondary', 'yes', _('Block this user'));
$this->elementEnd('fieldset');
$this->elementEnd('form');
}
diff --git a/actions/groupblock.php b/actions/groupblock.php
index 133101eb7..faf18c6ad 100644
--- a/actions/groupblock.php
+++ b/actions/groupblock.php
@@ -95,7 +95,7 @@ class GroupblockAction extends Action
$this->clientError(_('User is already blocked from group.'));
return false;
}
- // XXX: could have proactive blocks, but we do not have UI for it.
+ // XXX: could have proactive blocks, but we don't have UI for it.
if (!$this->profile->isMember($this->group)) {
$this->clientError(_('User is not a member of group.'));
return false;
@@ -151,17 +151,19 @@ class GroupblockAction extends Action
function areYouSureForm()
{
$id = $this->profile->id;
+ $this->elementStart('form', array('id' => 'block-' . $id,
+ 'method' => 'post',
+ 'class' => 'form_settings form_entity_block',
+ 'action' => common_local_url('groupblock')));
+ $this->elementStart('fieldset');
+ $this->hidden('token', common_session_token());
+ $this->element('legend', _('Block user'));
$this->element('p', null,
sprintf(_('Are you sure you want to block user "%s" from the group "%s"? '.
'They will be removed from the group, unable to post, and '.
'unable to subscribe to the group in the future.'),
$this->profile->getBestName(),
$this->group->getBestName()));
- $this->elementStart('form', array('id' => 'block-' . $id,
- 'method' => 'post',
- 'class' => 'block',
- 'action' => common_local_url('groupblock')));
- $this->hidden('token', common_session_token());
$this->hidden('blockto-' . $this->profile->id,
$this->profile->id,
'blockto');
@@ -173,8 +175,9 @@ class GroupblockAction extends Action
$this->hidden($k, $v);
}
}
- $this->submit('no', _('No'));
- $this->submit('yes', _('Yes'));
+ $this->submit('form_action-no', _('No'), 'submit form_action-primary', 'no', _("Do not block this user from this group"));
+ $this->submit('form_action-yes', _('Yes'), 'submit form_action-secondary', 'yes', _('Block this user from this group'));
+ $this->elementEnd('fieldset');
$this->elementEnd('form');
}
diff --git a/actions/login.php b/actions/login.php
index 679817520..ad57dd667 100644
--- a/actions/login.php
+++ b/actions/login.php
@@ -159,7 +159,7 @@ class LoginAction extends Action
$url = common_get_returnto();
if ($url) {
- // We do not have to return to it again
+ // We don't have to return to it again
common_set_returnto(null);
} else {
$url = common_local_url('all',
diff --git a/actions/logout.php b/actions/logout.php
index 7e768fca6..1e0adae57 100644
--- a/actions/logout.php
+++ b/actions/logout.php
@@ -81,7 +81,7 @@ class LogoutAction extends Action
{
common_set_user(null);
common_real_login(false); // not logged in
- common_forgetme(); // do not log back in!
+ common_forgetme(); // don't log back in!
}
}
diff --git a/actions/newmessage.php b/actions/newmessage.php
index 73307fdfc..0db2e7181 100644
--- a/actions/newmessage.php
+++ b/actions/newmessage.php
@@ -61,7 +61,7 @@ class NewmessageAction extends Action
/**
* Title of the page
*
- * Note that this usually does not get called unless something went wrong
+ * Note that this usually doesn't get called unless something went wrong
*
* @return string page title
*/
diff --git a/actions/newnotice.php b/actions/newnotice.php
index fc06e5c98..fbd7ab6bc 100644
--- a/actions/newnotice.php
+++ b/actions/newnotice.php
@@ -59,7 +59,7 @@ class NewnoticeAction extends Action
/**
* Title of the page
*
- * Note that this usually does not get called unless something went wrong
+ * Note that this usually doesn't get called unless something went wrong
*
* @return string page title
*/
diff --git a/actions/opensearch.php b/actions/opensearch.php
index b205d2fe2..861b53d7d 100644
--- a/actions/opensearch.php
+++ b/actions/opensearch.php
@@ -52,7 +52,7 @@ class OpensearchAction extends Action
*
* @param array $args query arguments
*
- * @return boolean false if user does not exist
+ * @return boolean false if user doesn't exist
*/
function handle($args)
{
diff --git a/actions/passwordsettings.php b/actions/passwordsettings.php
index 6658d279f..024f1287f 100644
--- a/actions/passwordsettings.php
+++ b/actions/passwordsettings.php
@@ -58,6 +58,19 @@ class PasswordsettingsAction extends AccountSettingsAction
return _('Change password');
}
+ function prepare($args){
+ parent::prepare($args);
+
+ $user = common_current_user();
+
+ Event::handle('CanUserChangeField', array($user->nickname, 'password'));
+
+ if(! $fields['password']){
+ //user is not allowed to change his password
+ $this->clientError(_('You are not allowed to change your password'));
+ }
+ }
+
/**
* Instructions for use
*
@@ -86,6 +99,7 @@ class PasswordsettingsAction extends AccountSettingsAction
function showContent()
{
$user = common_current_user();
+
$this->elementStart('form', array('method' => 'POST',
'id' => 'form_password',
'class' => 'form_settings',
@@ -97,7 +111,7 @@ class PasswordsettingsAction extends AccountSettingsAction
$this->elementStart('ul', 'form_data');
- // Users who logged in with OpenID will not have a pwd
+ // Users who logged in with OpenID won't have a pwd
if ($user->password) {
$this->elementStart('li');
$this->password('oldpassword', _('Old password'));
diff --git a/actions/register.php b/actions/register.php
index c4f6760aa..57f8e7bdf 100644
--- a/actions/register.php
+++ b/actions/register.php
@@ -174,7 +174,7 @@ class RegisterAction extends Action
$bio = $this->trimmed('bio');
$location = $this->trimmed('location');
- // We do not trim these... whitespace is OK in a password!
+ // We don't trim these... whitespace is OK in a password!
$password = $this->arg('password');
$confirm = $this->arg('confirm');
diff --git a/actions/showgroup.php b/actions/showgroup.php
index ae956befa..a4af29391 100644
--- a/actions/showgroup.php
+++ b/actions/showgroup.php
@@ -418,7 +418,7 @@ class ShowgroupAction extends GroupDesignAction
// XXX: WORM cache this
$members = $this->group->getMembers();
$members_count = 0;
- /** $member->count() does not work. */
+ /** $member->count() doesn't work. */
while ($members->fetch()) {
$members_count++;
}
diff --git a/actions/showmessage.php b/actions/showmessage.php
index cf3a819c1..db757948b 100644
--- a/actions/showmessage.php
+++ b/actions/showmessage.php
@@ -137,7 +137,7 @@ class ShowmessageAction extends MailboxAction
}
/**
- * Do not show local navigation
+ * Don't show local navigation
*
* @return void
*/
@@ -147,7 +147,7 @@ class ShowmessageAction extends MailboxAction
}
/**
- * Do not show page notice
+ * Don't show page notice
*
* @return void
*/
@@ -157,7 +157,7 @@ class ShowmessageAction extends MailboxAction
}
/**
- * Do not show aside
+ * Don't show aside
*
* @return void
*/
@@ -167,7 +167,7 @@ class ShowmessageAction extends MailboxAction
}
/**
- * Do not show any instructions
+ * Don't show any instructions
*
* @return string
*/
diff --git a/actions/shownotice.php b/actions/shownotice.php
index 688089f02..5d16fdad9 100644
--- a/actions/shownotice.php
+++ b/actions/shownotice.php
@@ -208,7 +208,7 @@ class ShownoticeAction extends OwnerDesignAction
}
/**
- * Do not show local navigation
+ * Don't show local navigation
*
* @return void
*/
@@ -234,7 +234,7 @@ class ShownoticeAction extends OwnerDesignAction
}
/**
- * Do not show page notice
+ * Don't show page notice
*
* @return void
*/
@@ -244,7 +244,7 @@ class ShownoticeAction extends OwnerDesignAction
}
/**
- * Do not show aside
+ * Don't show aside
*
* @return void
*/
diff --git a/actions/showstream.php b/actions/showstream.php
index 4952ebdb7..663638c18 100644
--- a/actions/showstream.php
+++ b/actions/showstream.php
@@ -253,7 +253,7 @@ class ShowstreamAction extends ProfileAction
}
}
-// We do not show the author for a profile, since we already know who it is!
+// We don't show the author for a profile, since we already know who it is!
class ProfileNoticeList extends NoticeList
{
diff --git a/actions/sup.php b/actions/sup.php
index a199f247e..5daf0a1c1 100644
--- a/actions/sup.php
+++ b/actions/sup.php
@@ -61,7 +61,7 @@ class SupAction extends Action
$notice = new Notice();
# XXX: cache this. Depends on how big this protocol becomes;
- # Re-doing this query every 15 seconds is not the end of the world.
+ # Re-doing this query every 15 seconds isn't the end of the world.
$divider = common_sql_date(time() - $seconds);
diff --git a/actions/twitapisearchatom.php b/actions/twitapisearchatom.php
index 511d7cdc6..7d618c471 100644
--- a/actions/twitapisearchatom.php
+++ b/actions/twitapisearchatom.php
@@ -250,7 +250,7 @@ class TwitapisearchatomAction extends ApiAction
}
// FIXME: this alternate link is not quite right because our
- // web-based notice search does not support a rpp (responses per
+ // web-based notice search doesn't support a rpp (responses per
// page) param yet
$this->element('link', array('type' => 'text/html',
diff --git a/actions/twitapitrends.php b/actions/twitapitrends.php
index 2d17e77cc..779405e6d 100644
--- a/actions/twitapitrends.php
+++ b/actions/twitapitrends.php
@@ -55,7 +55,7 @@ class TwitapitrendsAction extends ApiAction
*
* @param array $args Web and URL arguments
*
- * @return boolean false if user does not exist
+ * @return boolean false if user doesn't exist
*/
function prepare($args)
{
diff --git a/classes/File_redirection.php b/classes/File_redirection.php
index c951c1ee7..08a6e8d8b 100644
--- a/classes/File_redirection.php
+++ b/classes/File_redirection.php
@@ -53,7 +53,7 @@ class File_redirection extends Memcached_DataObject
'connect_timeout' => 10, // # seconds to wait
'max_redirs' => $redirs, // # max number of http redirections to follow
'follow_redirects' => true, // Follow redirects
- 'store_body' => false, // We will not need body content here.
+ 'store_body' => false, // We won't need body content here.
));
return $request;
}
@@ -81,12 +81,12 @@ class File_redirection extends Memcached_DataObject
}
try {
$request = self::_commonHttp($short_url, $redirs);
- // Do not include body in output
+ // Don't include body in output
$request->setMethod(HTTP_Request2::METHOD_HEAD);
$response = $request->send();
if (405 == $response->getStatus()) {
- // Server does not support HEAD method? Can this really happen?
+ // Server doesn't support HEAD method? Can this really happen?
// We'll try again as a GET and ignore the response data.
$request = self::_commonHttp($short_url, $redirs);
$response = $request->send();
@@ -178,7 +178,7 @@ class File_redirection extends Memcached_DataObject
case 'aim':
case 'jabber':
case 'xmpp':
- // do not touch anything
+ // don't touch anything
break;
default:
diff --git a/classes/Notice.php b/classes/Notice.php
index 32a8b693c..9886875cb 100644
--- a/classes/Notice.php
+++ b/classes/Notice.php
@@ -146,7 +146,7 @@ class Notice extends Memcached_DataObject
/* Add them to the database */
foreach(array_unique($hashtags) as $hashtag) {
- /* elide characters we do not want in the tag */
+ /* elide characters we don't want in the tag */
$this->saveTag($hashtag);
}
return true;
@@ -1105,7 +1105,7 @@ class Notice extends Memcached_DataObject
if (empty($recipient)) {
continue;
}
- // Do not save replies from blocked profile to local user
+ // Don't save replies from blocked profile to local user
$recipient_user = User::staticGet('id', $recipient->id);
if (!empty($recipient_user) && $recipient_user->hasBlocked($sender)) {
continue;
@@ -1131,7 +1131,7 @@ class Notice extends Memcached_DataObject
$tagged = Profile_tag::getTagged($sender->id, $tag);
foreach ($tagged as $t) {
if (!$replied[$t->id]) {
- // Do not save replies from blocked profile to local user
+ // Don't save replies from blocked profile to local user
$t_user = User::staticGet('id', $t->id);
if ($t_user && $t_user->hasBlocked($sender)) {
continue;
diff --git a/classes/Profile.php b/classes/Profile.php
index a50f4951d..7c1e9db33 100644
--- a/classes/Profile.php
+++ b/classes/Profile.php
@@ -101,7 +101,7 @@ class Profile extends Memcached_DataObject
}
foreach (array(AVATAR_PROFILE_SIZE, AVATAR_STREAM_SIZE, AVATAR_MINI_SIZE) as $size) {
- # We do not do a scaled one if original is our scaled size
+ # We don't do a scaled one if original is our scaled size
if (!($avatar->width == $size && $avatar->height == $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)
{
- // XXX: I'm not sure this is going to be any faster. It probably is not.
+ // XXX: I'm not sure this is going to be any faster. It probably isn't.
$ids = Notice::stream(array($this, '_streamDirect'),
array(),
'profile:notice_ids:' . $this->id,
diff --git a/classes/User.php b/classes/User.php
index c529b82e0..9b90ce61b 100644
--- a/classes/User.php
+++ b/classes/User.php
@@ -87,7 +87,7 @@ class User extends Memcached_DataObject
return (is_null($sub)) ? false : true;
}
- // 'update' will not write key columns, so we have to do it ourselves.
+ // 'update' won't write key columns, so we have to do it ourselves.
function updateKeys(&$orig)
{
@@ -384,7 +384,7 @@ class User extends Memcached_DataObject
return false;
}
- // Otherwise, cache does not have all faves;
+ // Otherwise, cache doesn't have all faves;
// fall through to the default
}
@@ -463,7 +463,7 @@ class User extends Memcached_DataObject
{
$cache = common_memcache();
if ($cache) {
- // Faves do not happen chronologically, so we need to blow
+ // Faves don't happen chronologically, so we need to blow
// ;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.';last'));
diff --git a/db/08to09.sql b/db/08to09.sql
index a0e37f0f1..1d37a759d 100644
--- a/db/08to09.sql
+++ b/db/08to09.sql
@@ -42,3 +42,12 @@ create table login_token (
constraint primary key (user_id)
) ENGINE=InnoDB CHARACTER SET utf8 COLLATE utf8_bin;
+alter table fave
+ drop index fave_user_id_idx,
+ add index fave_user_id_idx (user_id,modified);
+
+alter table subscription
+ drop index subscription_subscriber_idx,
+ add index subscription_subscriber_idx (subscriber,created),
+ drop index subscription_subscribed_idx,
+ add index subscription_subscribed_idx (subscribed,created);
diff --git a/db/08to09_pg.sql b/db/08to09_pg.sql
index 197fcabfd..004c77b36 100644
--- a/db/08to09_pg.sql
+++ b/db/08to09_pg.sql
@@ -48,3 +48,12 @@ create table login_token (
constraint primary key (user_id)
);
+alter table fave
+ drop index fave_user_id_idx,
+ add index fave_user_id_idx using btree(user_id,modified);
+
+alter table subscription
+ drop index subscription_subscriber_idx,
+ add index subscription_subscriber_idx using btree(subscriber,created),
+ drop index subscription_subscribed_idx,
+ add index subscription_subscribed_idx using btree(subscribed,created);
diff --git a/db/statusnet.sql b/db/statusnet.sql
index 3ed4e2c48..2983c67cf 100644
--- a/db/statusnet.sql
+++ b/db/statusnet.sql
@@ -107,8 +107,8 @@ create table subscription (
modified timestamp comment 'date this record was modified',
constraint primary key (subscriber, subscribed),
- index subscription_subscriber_idx (subscriber),
- index subscription_subscribed_idx (subscribed),
+ index subscription_subscriber_idx (subscriber, created),
+ index subscription_subscribed_idx (subscribed, created),
index subscription_token_idx (token)
) ENGINE=InnoDB CHARACTER SET utf8 COLLATE utf8_bin;
@@ -165,7 +165,7 @@ create table fave (
constraint primary key (notice_id, user_id),
index fave_notice_id_idx (notice_id),
- index fave_user_id_idx (user_id),
+ index fave_user_id_idx (user_id,modified),
index fave_modified_idx (modified)
) ENGINE=InnoDB CHARACTER SET utf8 COLLATE utf8_bin;
diff --git a/db/statusnet_pg.sql b/db/statusnet_pg.sql
index 0e5e96c32..392a6a5f3 100644
--- a/db/statusnet_pg.sql
+++ b/db/statusnet_pg.sql
@@ -115,8 +115,8 @@ create table subscription (
primary key (subscriber, subscribed)
);
-create index subscription_subscriber_idx on subscription using btree(subscriber);
-create index subscription_subscribed_idx on subscription using btree(subscribed);
+create index subscription_subscriber_idx on subscription using btree(subscriber,created);
+create index subscription_subscribed_idx on subscription using btree(subscribed,created);
create sequence notice_seq;
create table notice (
@@ -171,7 +171,7 @@ create table fave (
);
create index fave_notice_id_idx on fave using btree(notice_id);
-create index fave_user_id_idx on fave using btree(user_id);
+create index fave_user_id_idx on fave using btree(user_id,modified);
create index fave_modified_idx on fave using btree(modified);
/* tables for OAuth */
diff --git a/lib/accountsettingsaction.php b/lib/accountsettingsaction.php
index a004a3ed9..9865e1748 100644
--- a/lib/accountsettingsaction.php
+++ b/lib/accountsettingsaction.php
@@ -102,26 +102,31 @@ class AccountSettingsNav extends Widget
$this->action->elementStart('ul', array('class' => 'nav'));
if (Event::handle('StartAccountSettingsNav', array(&$this->action))) {
+ $user = common_current_user();
- $menu =
- array('profilesettings' =>
+ $menu = array();
+ $menu['profilesettings'] =
array(_('Profile'),
- _('Change your profile settings')),
- 'avatarsettings' =>
- array(_('Avatar'),
- _('Upload an avatar')),
- 'passwordsettings' =>
- array(_('Password'),
- _('Change your password')),
- 'emailsettings' =>
+ _('Change your profile settings'));
+ if(Event::handle('CanUserChangeField', array($user->nickname, 'avatar'))){
+ $menu['avatarsettings'] =
+ array(_('Avatar'),
+ _('Upload an avatar'));
+ }
+ if(Event::handle('CanUserChangeField', array($user->nickname, 'password'))){
+ $menu['passwordsettings'] =
+ array(_('Password'),
+ _('Change your password'));
+ }
+ $menu['emailsettings'] =
array(_('Email'),
- _('Change email handling')),
- 'userdesignsettings' =>
+ _('Change email handling'));
+ $menu['userdesignsettings'] =
array(_('Design'),
- _('Design your profile')),
- 'othersettings' =>
+ _('Design your profile'));
+ $menu['othersettings'] =
array(_('Other'),
- _('Other options')));
+ _('Other options'));
foreach ($menu as $menuaction => $menudesc) {
$this->action->menuItem(common_local_url($menuaction),
diff --git a/lib/api.php b/lib/api.php
index fb4c4289b..a1236ab7e 100644
--- a/lib/api.php
+++ b/lib/api.php
@@ -66,7 +66,7 @@ class ApiAction extends Action
*
* @param array $args Web and URL arguments
*
- * @return boolean false if user does not exist
+ * @return boolean false if user doesn't exist
*/
function prepare($args)
@@ -138,7 +138,7 @@ class ApiAction extends Action
$design = null;
$user = $profile->getUser();
- // Note: some profiles do not have an associated user
+ // Note: some profiles don't have an associated user
if (!empty($user)) {
$design = $user->getDesign();
@@ -203,7 +203,7 @@ class ApiAction extends Action
if ($get_notice) {
$notice = $profile->getCurrentNotice();
if ($notice) {
- # do not get user!
+ # don't get user!
$twitter_user['status'] = $this->twitterStatusArray($notice, false);
}
}
@@ -263,7 +263,7 @@ class ApiAction extends Action
}
if ($include_user) {
- # Do not get notice (recursive!)
+ # Don't get notice (recursive!)
$twitter_user = $this->twitterUserArray($profile, false);
$twitter_status['user'] = $twitter_user;
}
@@ -1074,7 +1074,7 @@ class ApiAction extends Action
function initTwitterAtom()
{
$this->startXML();
- // FIXME: do not hardcode the language here!
+ // FIXME: don't hardcode the language here!
$this->elementStart('feed', array('xmlns' => 'http://www.w3.org/2005/Atom',
'xml:lang' => 'en-US',
'xmlns:thr' => 'http://purl.org/syndication/thread/1.0'));
@@ -1116,7 +1116,7 @@ class ApiAction extends Action
return User::staticGet('nickname', $nickname);
} else if ($this->arg('user_id')) {
// This is to ensure that a non-numeric user_id still
- // overrides screen_name even if it does not get used
+ // overrides screen_name even if it doesn't get used
if (is_numeric($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);
} else if ($this->arg('group_id')) {
// This is to ensure that a non-numeric user_id still
- // overrides screen_name even if it does not get used
+ // overrides screen_name even if it doesn't get used
if (is_numeric($this->arg('group_id'))) {
return User_group::staticGet('id', $this->arg('group_id'));
}
diff --git a/lib/apiauth.php b/lib/apiauth.php
index b8189f15d..2f2e44a26 100644
--- a/lib/apiauth.php
+++ b/lib/apiauth.php
@@ -87,7 +87,7 @@ class ApiAuthAction extends ApiAction
}
/**
- * Check for a user specified via HTTP basic auth. If there is not
+ * Check for a user specified via HTTP basic auth. If there isn't
* one, try to get one by outputting the basic auth header.
*
* @return boolean true or false
diff --git a/lib/dberroraction.php b/lib/dberroraction.php
index 893797b70..2cb66a022 100644
--- a/lib/dberroraction.php
+++ b/lib/dberroraction.php
@@ -39,7 +39,7 @@ require_once INSTALLDIR.'/lib/servererroraction.php';
*
* 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
- * to the DB, so we do not trigger it again.
+ * to the DB, so we don't trigger it again.
*
* @category Action
* @package StatusNet
@@ -62,12 +62,12 @@ class DBErrorAction extends ServerErrorAction
function getLanguage()
{
- // Do not try to figure out user's language; just show the page
+ // Don't try to figure out user's language; just show the page
return common_config('site', 'language');
}
function showPrimaryNav()
{
- // do not show primary nav
+ // don't show primary nav
}
}
diff --git a/lib/error.php b/lib/error.php
index 5ed5dec1b..3162cfe65 100644
--- a/lib/error.php
+++ b/lib/error.php
@@ -104,11 +104,11 @@ class ErrorAction extends Action
{
parent::showPage();
- // We do not want to have any more output after this
+ // We don't want to have any more output after this
exit();
}
- // Overload a bunch of stuff so the page is not too bloated
+ // Overload a bunch of stuff so the page isn't too bloated
function showBody()
{
diff --git a/lib/groupnav.php b/lib/groupnav.php
index 31cf378c8..131b38fa2 100644
--- a/lib/groupnav.php
+++ b/lib/groupnav.php
@@ -79,46 +79,49 @@ class GroupNav extends Widget
$nickname = $this->group->nickname;
$this->out->elementStart('ul', array('class' => 'nav'));
- $this->out->menuItem(common_local_url('showgroup', array('nickname' =>
- $nickname)),
- _('Group'),
- sprintf(_('%s group'), $nickname),
- $action_name == 'showgroup',
- 'nav_group_group');
- $this->out->menuItem(common_local_url('groupmembers', array('nickname' =>
- $nickname)),
- _('Members'),
- sprintf(_('%s group members'), $nickname),
- $action_name == 'groupmembers',
- 'nav_group_members');
+ if (Event::handle('StartGroupGroupNav', array($this))) {
+ $this->out->menuItem(common_local_url('showgroup', array('nickname' =>
+ $nickname)),
+ _('Group'),
+ sprintf(_('%s group'), $nickname),
+ $action_name == 'showgroup',
+ 'nav_group_group');
+ $this->out->menuItem(common_local_url('groupmembers', array('nickname' =>
+ $nickname)),
+ _('Members'),
+ sprintf(_('%s group members'), $nickname),
+ $action_name == 'groupmembers',
+ 'nav_group_members');
- $cur = common_current_user();
+ $cur = common_current_user();
- if ($cur && $cur->isAdmin($this->group)) {
- $this->out->menuItem(common_local_url('blockedfromgroup', array('nickname' =>
- $nickname)),
- _('Blocked'),
- sprintf(_('%s blocked users'), $nickname),
- $action_name == 'blockedfromgroup',
- 'nav_group_blocked');
- $this->out->menuItem(common_local_url('editgroup', array('nickname' =>
- $nickname)),
- _('Admin'),
- sprintf(_('Edit %s group properties'), $nickname),
- $action_name == 'editgroup',
- 'nav_group_admin');
- $this->out->menuItem(common_local_url('grouplogo', array('nickname' =>
- $nickname)),
- _('Logo'),
- sprintf(_('Add or edit %s logo'), $nickname),
- $action_name == 'grouplogo',
- 'nav_group_logo');
- $this->out->menuItem(common_local_url('groupdesignsettings', array('nickname' =>
- $nickname)),
- _('Design'),
- sprintf(_('Add or edit %s design'), $nickname),
- $action_name == 'groupdesignsettings',
- 'nav_group_design');
+ if ($cur && $cur->isAdmin($this->group)) {
+ $this->out->menuItem(common_local_url('blockedfromgroup', array('nickname' =>
+ $nickname)),
+ _('Blocked'),
+ sprintf(_('%s blocked users'), $nickname),
+ $action_name == 'blockedfromgroup',
+ 'nav_group_blocked');
+ $this->out->menuItem(common_local_url('editgroup', array('nickname' =>
+ $nickname)),
+ _('Admin'),
+ sprintf(_('Edit %s group properties'), $nickname),
+ $action_name == 'editgroup',
+ 'nav_group_admin');
+ $this->out->menuItem(common_local_url('grouplogo', array('nickname' =>
+ $nickname)),
+ _('Logo'),
+ sprintf(_('Add or edit %s logo'), $nickname),
+ $action_name == 'grouplogo',
+ 'nav_group_logo');
+ $this->out->menuItem(common_local_url('groupdesignsettings', array('nickname' =>
+ $nickname)),
+ _('Design'),
+ sprintf(_('Add or edit %s design'), $nickname),
+ $action_name == 'groupdesignsettings',
+ 'nav_group_design');
+ }
+ Event::handle('EndGroupGroupNav', array($this));
}
$this->out->elementEnd('ul');
}
diff --git a/lib/htmloutputter.php b/lib/htmloutputter.php
index 73bd9ce81..c2ec83c28 100644
--- a/lib/htmloutputter.php
+++ b/lib/htmloutputter.php
@@ -76,7 +76,7 @@ class HTMLOutputter extends XMLOutputter
/**
* Start an HTML document
*
- * If $type is not specified, will attempt to do content negotiation.
+ * If $type isn't specified, will attempt to do content negotiation.
*
* Attempts to do content negotiation for language, also.
*
diff --git a/lib/imagefile.php b/lib/imagefile.php
index edc7218d0..cf1668f20 100644
--- a/lib/imagefile.php
+++ b/lib/imagefile.php
@@ -119,7 +119,7 @@ class ImageFile
return;
}
- // Do not crop/scale if it is not necessary
+ // Don't crop/scale if it isn't necessary
if ($size === $this->width
&& $size === $this->height
&& $x === 0
diff --git a/lib/jabber.php b/lib/jabber.php
index d666fcbb3..73f2ec660 100644
--- a/lib/jabber.php
+++ b/lib/jabber.php
@@ -437,7 +437,7 @@ function jabber_public_notice($notice)
$public = common_config('xmpp', 'public');
- // FIXME PRIV do not send out private messages here
+ // FIXME PRIV don't send out private messages here
// XXX: should we send out non-local messages if public,localonly
// = false? I think not
diff --git a/lib/mail.php b/lib/mail.php
index 79630b721..5218059e9 100644
--- a/lib/mail.php
+++ b/lib/mail.php
@@ -467,7 +467,7 @@ function mail_notify_nudge($from, $to)
"these days and is inviting you to post some news.\n\n".
"So let's hear from you :)\n\n".
"%3\$s\n\n".
- "Do not reply to this email. It will not get to them.\n\n".
+ "Don't reply to this email; it won't get to them.\n\n".
"With kind regards,\n".
"%4\$s\n"),
$from_profile->getBestName(),
@@ -516,7 +516,7 @@ function mail_notify_message($message, $from=null, $to=null)
"------------------------------------------------------\n\n".
"You can reply to their message here:\n\n".
"%4\$s\n\n".
- "Do not reply to this email. It will not get to them.\n\n".
+ "Don't reply to this email; it won't get to them.\n\n".
"With kind regards,\n".
"%5\$s\n"),
$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'
*
- * Does not check that the user has an email address nor if they
+ * Doesn't check that the user has an email address nor if they
* want to receive notification of faves. Maybe this happens higher
* up the stack...?
*
diff --git a/lib/noticelist.php b/lib/noticelist.php
index 4e5623ded..bf12bb73c 100644
--- a/lib/noticelist.php
+++ b/lib/noticelist.php
@@ -347,7 +347,7 @@ class NoticeListItem extends Widget
* show the link to the main page for the notice
*
* Displays a link to the page for a notice, with "relative" time. Tries to
- * get remote notice URLs correct, but does not always succeed.
+ * get remote notice URLs correct, but doesn't always succeed.
*
* @return void
*/
@@ -483,7 +483,7 @@ class NoticeListItem extends Widget
* show a link to reply to the current notice
*
* Should either do the reply in the current notice form (if available), or
- * link out to the notice-posting form. A little flakey, does not always work.
+ * link out to the notice-posting form. A little flakey, doesn't always work.
*
* @return void
*/
diff --git a/lib/queuehandler.php b/lib/queuehandler.php
index 7c07ca4f9..cd43b1e09 100644
--- a/lib/queuehandler.php
+++ b/lib/queuehandler.php
@@ -96,8 +96,8 @@ class QueueHandler extends Daemon
* Initialization, run when the queue handler starts.
* If this function indicates failure, the handler run will be aborted.
*
- * @fixme run() will abort if this does not return true,
- * but some subclasses do not bother.
+ * @fixme run() will abort if this doesn't return true,
+ * but some subclasses don't bother.
* @return boolean true on success, false on failure
*/
function start()
@@ -108,8 +108,8 @@ class QueueHandler extends Daemon
* Cleanup, run when the queue handler ends.
* If this function indicates failure, a warning will be logged.
*
- * @fixme run() will throw warnings if this does not return true,
- * but many subclasses do not bother.
+ * @fixme run() will throw warnings if this doesn't return true,
+ * but many subclasses don't bother.
* @return boolean true on success, false on failure
*/
function finish()
@@ -137,7 +137,7 @@ class QueueHandler extends Daemon
* method, which passes control back to our handle_notice() method for
* each notice that comes in on the queue.
*
- * Most of the time this will not need to be overridden in a subclass.
+ * Most of the time this won't need to be overridden in a subclass.
*
* @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.
* This is a good time to e.g. service your XMPP connection.
*
- * Does not need to be overridden if there's no maintenance to do.
+ * Doesn't need to be overridden if there's no maintenance to do.
*
* @param int $timeout seconds to sleep if there's nothing to do
*/
diff --git a/lib/rssaction.php b/lib/rssaction.php
index 0e84a65e9..faf6bec7d 100644
--- a/lib/rssaction.php
+++ b/lib/rssaction.php
@@ -386,7 +386,7 @@ class Rss10Action extends Action
return null;
}
- // FIXME: does not handle modified profiles, avatars, deleted notices
+ // FIXME: doesn't handle modified profiles, avatars, deleted notices
return strtotime($this->notices[0]->created);
}
diff --git a/lib/search_engines.php b/lib/search_engines.php
index 82713235c..69f6ff468 100644
--- a/lib/search_engines.php
+++ b/lib/search_engines.php
@@ -119,7 +119,7 @@ class MySQLSearch extends SearchEngine
return true;
} else if ('identica_notices' === $this->table) {
- // Do not show imported notices
+ // Don't show imported notices
$this->target->whereAdd('notice.is_local != ' . Notice::GATEWAY);
if (strtolower($q) != $q) {
diff --git a/lib/util.php b/lib/util.php
index 0ed0688eb..65bc6544d 100644
--- a/lib/util.php
+++ b/lib/util.php
@@ -61,7 +61,6 @@ function common_init_language()
$language = common_language();
$locale_set = common_init_locale($language);
setlocale(LC_CTYPE, 'C');
-
// So we do not have to make people install the gettext locales
$path = common_config('site','locale_path');
bindtextdomain("statusnet", $path);
@@ -139,7 +138,7 @@ function common_check_user($nickname, $password)
}
}
}else{
- //no handler indicated the credentials were valid, and we know their not valid because the user is not in the database
+ //no handler indicated the credentials were valid, and we know their not valid because the user isn't in the database
return false;
}
} else {
@@ -396,7 +395,7 @@ function common_current_user()
}
// Logins that are 'remembered' aren't 'real' -- they're subject to
-// cookie-stealing. So, we do not let them do certain things. New reg,
+// cookie-stealing. So, we don't let them do certain things. New reg,
// OpenID, and password logins _are_ real.
function common_real_login($real=true)
@@ -1151,7 +1150,7 @@ function common_accept_to_prefs($accept, $def = '*/*')
$parts = explode(',', $accept);
foreach($parts as $part) {
- // FIXME: does not deal with params like 'text/html; level=1'
+ // FIXME: doesn't deal with params like 'text/html; level=1'
@list($value, $qpart) = explode(';', trim($part));
$match = array();
if(!isset($qpart)) {
@@ -1350,7 +1349,7 @@ function common_error_handler($errno, $errstr, $errfile, $errline, $errcontext)
}
// FIXME: show error page if we're on the Web
- /* Do not execute PHP internal error handler */
+ /* Don't execute PHP internal error handler */
return true;
}
@@ -1452,7 +1451,7 @@ function common_shorten_url($long_url)
}
global $_shorteners;
if (!isset($_shorteners[$svc])) {
- //the user selected service does not exist, so default to ur1.ca
+ //the user selected service doesn't exist, so default to ur1.ca
$svc = 'ur1.ca';
}
if (!isset($_shorteners[$svc])) {
diff --git a/lib/xmloutputter.php b/lib/xmloutputter.php
index 9d862b2d0..5f06e491d 100644
--- a/lib/xmloutputter.php
+++ b/lib/xmloutputter.php
@@ -112,7 +112,7 @@ class XMLOutputter
*
* Utility for outputting an XML element. A convenient wrapper
* for a bunch of longer XMLWriter calls. This is best for
- * when an element does not have any sub-elements; if that's the
+ * when an element doesn't have any sub-elements; if that's the
* case, use elementStart() and elementEnd() instead.
*
* The $content element will be escaped for XML. If you need
diff --git a/lib/xmppqueuehandler.php b/lib/xmppqueuehandler.php
index 7caa078ae..f28fc9088 100644
--- a/lib/xmppqueuehandler.php
+++ b/lib/xmppqueuehandler.php
@@ -37,7 +37,7 @@ class XmppQueueHandler extends QueueHandler
function start()
{
- # Low priority; we do not want to receive messages
+ # Low priority; we don't want to receive messages
$this->log(LOG_INFO, "INITIALIZE");
$this->conn = jabber_connect($this->_id.$this->transport());
diff --git a/plugins/Autocomplete/autocomplete.php b/plugins/Autocomplete/autocomplete.php
index aeb100cfa..379390ffd 100644
--- a/plugins/Autocomplete/autocomplete.php
+++ b/plugins/Autocomplete/autocomplete.php
@@ -79,7 +79,7 @@ class AutocompleteAction extends Action
function etag()
{
return '"' . implode(':', array($this->arg('action'),
- crc32($this->arg('q')), //the actual string can have funny characters in we do not want showing up in the etag
+ crc32($this->arg('q')), //the actual string can have funny characters in we don't want showing up in the etag
$this->arg('limit'),
$this->lastModified())) . '"';
}
diff --git a/plugins/BlogspamNetPlugin.php b/plugins/BlogspamNetPlugin.php
index bf60fdcaf..51236001a 100644
--- a/plugins/BlogspamNetPlugin.php
+++ b/plugins/BlogspamNetPlugin.php
@@ -85,7 +85,7 @@ class BlogspamNetPlugin extends Plugin
} else if (preg_match('/^SPAM(:(.*))?$/', $response, $match)) {
throw new ClientException(sprintf(_("Spam checker results: %s"), $match[2]), 400);
} else if (preg_match('/^OK$/', $response)) {
- // do not do anything
+ // don't do anything
} else {
throw new ServerException(sprintf(_("Unexpected response from %s: %s"), $this->baseUrl, $response), 500);
}
diff --git a/plugins/Facebook/FBConnectAuth.php b/plugins/Facebook/FBConnectAuth.php
index 165477419..b909a4977 100644
--- a/plugins/Facebook/FBConnectAuth.php
+++ b/plugins/Facebook/FBConnectAuth.php
@@ -71,7 +71,7 @@ class FBConnectauthAction extends Action
'There is already a local user (' . $flink->user_id .
') linked with this Facebook (' . $this->fbuid . ').');
- // We do not want these cookies
+ // We don't want these cookies
getFacebook()->clear_cookie_state();
$this->clientError(_('There is already a local user linked with this Facebook.'));
@@ -364,7 +364,7 @@ class FBConnectauthAction extends Action
{
$url = common_get_returnto();
if ($url) {
- // We do not have to return to it again
+ // We don't have to return to it again
common_set_returnto(null);
} else {
$url = common_local_url('all',
diff --git a/plugins/Facebook/FacebookPlugin.php b/plugins/Facebook/FacebookPlugin.php
index cd1ad7b45..b68534b24 100644
--- a/plugins/Facebook/FacebookPlugin.php
+++ b/plugins/Facebook/FacebookPlugin.php
@@ -182,7 +182,7 @@ class FacebookPlugin extends Plugin
$login_url = common_local_url('FBConnectAuth');
$logout_url = common_local_url('logout');
- // XXX: Facebook says we do not need this FB_RequireFeatures(),
+ // XXX: Facebook says we don't need this FB_RequireFeatures(),
// but we actually do, for IE and Safari. Gar.
$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
// of Facebook Connect as well as the site. However, for some pages
// (FB Connect Settings) we need to output the FB Connect scripts (to
- // show an existing FB connection even if the user is not authenticated
+ // show an existing FB connection even if the user isn't authenticated
// 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.
diff --git a/plugins/Facebook/facebook/facebook.php b/plugins/Facebook/facebook/facebook.php
index 7b0107788..016e8e8e0 100644
--- a/plugins/Facebook/facebook/facebook.php
+++ b/plugins/Facebook/facebook/facebook.php
@@ -57,7 +57,7 @@ class Facebook {
* @param api_key your Developer API key
* @param secret your Developer API secret
* @param generate_session_secret whether to automatically generate a session
- * if the user does not have one, but
+ * if the user doesn't have one, but
* there is an auth token present in the url,
*/
public function __construct($api_key, $secret, $generate_session_secret=false) {
@@ -192,7 +192,7 @@ class Facebook {
}
return $session_secret;
} catch (FacebookRestClientException $e) {
- // API_EC_PARAM means we do not have a logged in user, otherwise who
+ // API_EC_PARAM means we don't have a logged in user, otherwise who
// knows what it means, so just throw it.
if ($e->getCode() != FacebookAPIErrorCodes::API_EC_PARAM) {
throw $e;
@@ -204,7 +204,7 @@ class Facebook {
try {
return $this->api_client->auth_getSession($auth_token, $this->generate_session_secret);
} catch (FacebookRestClientException $e) {
- // API_EC_PARAM means we do not have a logged in user, otherwise who
+ // API_EC_PARAM means we don't have a logged in user, otherwise who
// knows what it means, so just throw it.
if ($e->getCode() != FacebookAPIErrorCodes::API_EC_PARAM) {
throw $e;
@@ -265,7 +265,7 @@ class Facebook {
if ($this->in_fb_canvas()) {
echo '<fb:redirect url="' . $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 do not
+ // make sure facebook.com url's load in the full frame so that we don't
// get a frame within a frame.
echo "<script type=\"text/javascript\">\ntop.location.href = \"$url\";\n</script>";
} else {
diff --git a/plugins/Facebook/facebook/facebook_desktop.php b/plugins/Facebook/facebook/facebook_desktop.php
index 425bb5c7b..e79a2ca34 100644
--- a/plugins/Facebook/facebook/facebook_desktop.php
+++ b/plugins/Facebook/facebook/facebook_desktop.php
@@ -93,7 +93,7 @@ class FacebookDesktop extends Facebook {
}
public function verify_signature($fb_params, $expected_sig) {
- // we do not want to verify the signature until we have a valid
+ // we don't want to verify the signature until we have a valid
// session secret
if ($this->verify_sig) {
return parent::verify_signature($fb_params, $expected_sig);
diff --git a/plugins/Facebook/facebook/facebookapi_php5_restlib.php b/plugins/Facebook/facebook/facebookapi_php5_restlib.php
index c742df748..55cb7fb86 100755
--- a/plugins/Facebook/facebook/facebookapi_php5_restlib.php
+++ b/plugins/Facebook/facebook/facebookapi_php5_restlib.php
@@ -46,7 +46,7 @@ class FacebookRestClient {
// on canvas pages
public $added;
public $is_user;
- // we do not pass friends list to iframes, but we want to make
+ // we don't pass friends list to iframes, but we want to make
// friends_get really simple in the canvas_user (non-logged in) case.
// So we use the canvas_user as default arg to friends_get
public $canvas_user;
@@ -657,7 +657,7 @@ function toggleDisplay(id, type) {
* deleted.
*
* IMPORTANT: If your application has registered public tags
- * that other applications may be using, do not delete those tags!
+ * that other applications may be using, don't delete those tags!
* Doing so can break the FBML ofapplications that are using them.
*
* @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)) {
$target_ids = json_encode($target_ids);
- $target_ids = trim($target_ids, "[]"); // we do not want square brackets
+ $target_ids = trim($target_ids, "[]"); // we don't want square brackets
}
return $this->call_method('facebook.feed.publishUserAction',
diff --git a/plugins/Facebook/facebook/jsonwrapper/jsonwrapper.php b/plugins/Facebook/facebook/jsonwrapper/jsonwrapper.php
index 9c6c62663..29509deba 100644
--- a/plugins/Facebook/facebook/jsonwrapper/jsonwrapper.php
+++ b/plugins/Facebook/facebook/jsonwrapper/jsonwrapper.php
@@ -1,5 +1,5 @@
<?php
-# In PHP 5.2 or higher we do not need to bring this in
+# In PHP 5.2 or higher we don't need to bring this in
if (!function_exists('json_encode')) {
require_once 'jsonwrapper_inner.php';
}
diff --git a/plugins/Facebook/facebookaction.php b/plugins/Facebook/facebookaction.php
index 2327694e4..a10fdf90d 100644
--- a/plugins/Facebook/facebookaction.php
+++ b/plugins/Facebook/facebookaction.php
@@ -95,7 +95,7 @@ class FacebookAction extends Action
/**
* Start an Facebook ready HTML document
*
- * For Facebook we do not want to actually output any headers,
+ * For Facebook we don't want to actually output any headers,
* DTD info, etc. Just Stylesheet and JavaScript links.
*
* @param string $type MIME type to use; default is to do negotation.
@@ -129,7 +129,7 @@ class FacebookAction extends Action
*/
function showNoticeForm()
{
- // do not do it for most of the Facebook pages
+ // don't do it for most of the Facebook pages
}
function showBody()
@@ -581,7 +581,7 @@ class FacebookNoticeListItem extends NoticeListItem
/**
* recipe function for displaying a single notice in the Facebook App.
*
- * Overridden to strip out some of the controls that we do not
+ * Overridden to strip out some of the controls that we don't
* want to be available.
*
* @return void
diff --git a/plugins/GeonamesPlugin.php b/plugins/GeonamesPlugin.php
index 8059d49d7..e18957c36 100644
--- a/plugins/GeonamesPlugin.php
+++ b/plugins/GeonamesPlugin.php
@@ -87,12 +87,12 @@ class GeonamesPlugin extends Plugin
$location->location_id = $n->geonameId;
$location->location_ns = self::NAMESPACE;
- // handled, do not continue processing!
+ // handled, don't continue processing!
return false;
}
}
- // Continue processing; we do not have the answer
+ // Continue processing; we don't have the answer
return true;
}
@@ -217,7 +217,7 @@ class GeonamesPlugin extends Plugin
}
}
- // For some reason we do not know, so pass.
+ // For some reason we don't know, so pass.
return true;
}
@@ -299,7 +299,7 @@ class GeonamesPlugin extends Plugin
$url = 'http://www.geonames.org/' . $location->location_id;
- // it's been filled, so do not process further.
+ // it's been filled, so don't process further.
return false;
}
}
diff --git a/plugins/Ldap/LdapPlugin.php b/plugins/Ldap/LdapPlugin.php
index 755562f54..3795ffd7f 100644
--- a/plugins/Ldap/LdapPlugin.php
+++ b/plugins/Ldap/LdapPlugin.php
@@ -102,4 +102,15 @@ class LdapPlugin extends Plugin
//return false, indicating that the event has been handled
return false;
}
+
+ function onCanUserChangeField($nickname, $field)
+ {
+ switch($field)
+ {
+ case 'password':
+ case 'nickname':
+ case 'email':
+ return false;
+ }
+ }
}
diff --git a/plugins/OpenID/finishopenidlogin.php b/plugins/OpenID/finishopenidlogin.php
index b5d978294..ff0b451d3 100644
--- a/plugins/OpenID/finishopenidlogin.php
+++ b/plugins/OpenID/finishopenidlogin.php
@@ -341,7 +341,7 @@ class FinishopenidloginAction extends Action
{
$url = common_get_returnto();
if ($url) {
- # We do not have to return to it again
+ # We don't have to return to it again
common_set_returnto(null);
} else {
$url = common_local_url('all',
@@ -421,7 +421,7 @@ class FinishopenidloginAction extends Action
$parts = parse_url($openid);
- # If any of these parts exist, this will not work
+ # If any of these parts exist, this won't work
foreach ($bad as $badpart) {
if (array_key_exists($badpart, $parts)) {
diff --git a/plugins/OpenID/openid.php b/plugins/OpenID/openid.php
index c5f6d1713..ff7a93899 100644
--- a/plugins/OpenID/openid.php
+++ b/plugins/OpenID/openid.php
@@ -187,7 +187,7 @@ function oid_authenticate($openid_url, $returnto, $immediate=false)
$form_html = $auth_request->formMarkup($trust_root, $process_url,
$immediate, array('id' => $form_id));
- # XXX: This is cheap, but things choke if we do not escape ampersands
+ # XXX: This is cheap, but things choke if we don't escape ampersands
# in the HTML attributes
$form_html = preg_replace('/&/', '&amp;', $form_html);
diff --git a/plugins/PiwikAnalyticsPlugin.php b/plugins/PiwikAnalyticsPlugin.php
index 81ef7c683..54faa0bdb 100644
--- a/plugins/PiwikAnalyticsPlugin.php
+++ b/plugins/PiwikAnalyticsPlugin.php
@@ -44,7 +44,7 @@ if (!defined('STATUSNET')) {
* 'piwikId' => 'id'));
*
* Replace 'example.com/piwik/' with the URL to your Piwik installation and
- * make sure you do not forget the final /.
+ * make sure you don't forget the final /.
* Replace 'id' with the ID your statusnet installation has in your Piwik
* analytics setup - for example '8'.
*
diff --git a/plugins/Realtime/RealtimePlugin.php b/plugins/Realtime/RealtimePlugin.php
index 88a87dcf9..0c7c1240c 100644
--- a/plugins/Realtime/RealtimePlugin.php
+++ b/plugins/Realtime/RealtimePlugin.php
@@ -240,7 +240,7 @@ class RealtimePlugin extends Plugin
// FIXME: this code should be abstracted to a neutral third
// party, like Notice::asJson(). I'm not sure of the ethics
// of refactoring from within a plugin, so I'm just abusing
- // the ApiAction method. Do not do this unless you're me!
+ // the ApiAction method. Don't do this unless you're me!
require_once(INSTALLDIR.'/lib/api.php');
diff --git a/plugins/TwitterBridge/daemons/synctwitterfriends.php b/plugins/TwitterBridge/daemons/synctwitterfriends.php
index c89c02eed..671e3c7af 100755
--- a/plugins/TwitterBridge/daemons/synctwitterfriends.php
+++ b/plugins/TwitterBridge/daemons/synctwitterfriends.php
@@ -115,7 +115,7 @@ class SyncTwitterFriendsDaemon extends ParallelizingDaemon
// Each child ps needs its own DB connection
// Note: DataObject::getDatabaseConnection() creates
- // a new connection if there is not one already
+ // a new connection if there isn't one already
$conn = &$flink->getDatabaseConnection();
diff --git a/plugins/TwitterBridge/daemons/twitterstatusfetcher.php b/plugins/TwitterBridge/daemons/twitterstatusfetcher.php
index 25df0d839..b5428316b 100755
--- a/plugins/TwitterBridge/daemons/twitterstatusfetcher.php
+++ b/plugins/TwitterBridge/daemons/twitterstatusfetcher.php
@@ -136,7 +136,7 @@ class TwitterStatusFetcher extends ParallelizingDaemon
// Each child ps needs its own DB connection
// Note: DataObject::getDatabaseConnection() creates
- // a new connection if there is not one already
+ // a new connection if there isn't one already
$conn = &$flink->getDatabaseConnection();
@@ -499,7 +499,7 @@ class TwitterStatusFetcher extends ParallelizingDaemon
$avatar->height = 73;
}
- $avatar->original = 0; // we do not have the original
+ $avatar->original = 0; // we don't have the original
$avatar->mediatype = $mediatype;
$avatar->filename = $filename;
$avatar->url = Avatar::url($filename);
diff --git a/plugins/TwitterBridge/twitter.php b/plugins/TwitterBridge/twitter.php
index d48089caa..3c6803e49 100644
--- a/plugins/TwitterBridge/twitter.php
+++ b/plugins/TwitterBridge/twitter.php
@@ -33,7 +33,7 @@ function updateTwitter_user($twitter_id, $screen_name)
$fuser->query('BEGIN');
- // Dropping down to SQL because regular DB_DataObject udpate stuff does not seem
+ // Dropping down to SQL because regular DB_DataObject udpate stuff doesn't seem
// 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
diff --git a/scripts/console.php b/scripts/console.php
index 2a000d39b..41dd43f28 100755
--- a/scripts/console.php
+++ b/scripts/console.php
@@ -60,9 +60,9 @@ function read_input_line($prompt)
}
/**
- * On Unix-like systems where PHP readline extension is not present,
+ * On Unix-like systems where PHP readline extension isn't present,
* -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 do not
+ * This lets us at least handle things like arrow keys, but we don't
* get any entry history. :(
*
* Shamelessly ripped from when I wrote the same code for MediaWiki. :)
diff --git a/scripts/maildaemon.php b/scripts/maildaemon.php
index 4ec4526ef..b4e4d9f08 100755
--- a/scripts/maildaemon.php
+++ b/scripts/maildaemon.php
@@ -231,7 +231,7 @@ class MailerDaemon
foreach ($parsed->parts as $part) {
$this->extract_part($part,$msg,$attachments);
}
- //we do not want any attachments that are a result of this parsing
+ //we don't want any attachments that are a result of this parsing
return $msg;
}
diff --git a/scripts/xmppconfirmhandler.php b/scripts/xmppconfirmhandler.php
index f5f824dee..c7ed15e49 100755
--- a/scripts/xmppconfirmhandler.php
+++ b/scripts/xmppconfirmhandler.php
@@ -69,7 +69,7 @@ class XmppConfirmHandler extends XmppQueueHandler
continue;
} else {
$this->log(LOG_INFO, 'Confirmation sent for ' . $confirm->address);
- # Mark confirmation sent; need a dupe so we do not have the WHERE clause
+ # Mark confirmation sent; need a dupe so we don't have the WHERE clause
$dupe = Confirm_address::staticGet('code', $confirm->code);
if (!$dupe) {
common_log(LOG_WARNING, 'Could not refetch confirm', __FILE__);