From 83fb5e60235b7cc5acbb01f1c4f398b131d2bbae Mon Sep 17 00:00:00 2001 From: Evan Prodromou Date: Tue, 22 Mar 2011 11:54:23 -0400 Subject: [PATCH] Mass replacement of #-comments with //-comments like leprous boils in our code. So, I've replaced all of them with // comments instead. It's a massive, meaningless, and potentially buggy change -- great one for the middle of a release cycle, eh? --- actions/invite.php | 2 +- actions/passwordsettings.php | 2 +- actions/publictagcloud.php | 2 +- actions/recoverpassword.php | 24 +++++++-------- actions/sup.php | 4 +-- actions/userrss.php | 2 +- classes/Avatar.php | 2 +- classes/Foreign_link.php | 2 +- classes/Foreign_user.php | 2 +- classes/Memcached_DataObject.php | 2 +- classes/Notice.php | 20 ++++++------- classes/Oauth_application_user.php | 2 +- classes/Profile.php | 4 +-- classes/Profile_tag.php | 8 ++--- classes/Queue_item.php | 6 ++-- classes/Subscription.php | 6 ++-- classes/User_group.php | 4 +-- lib/apiaction.php | 8 ++--- lib/channel.php | 6 ++-- lib/framework.php | 4 +-- lib/galleryaction.php | 2 +- lib/grouplist.php | 6 ++-- lib/mailhandler.php | 4 +-- lib/oauthstore.php | 4 +-- lib/ping.php | 2 +- lib/rssaction.php | 8 ++--- lib/util.php | 12 ++++---- plugins/Enjit/enjitqueuehandler.php | 4 +-- plugins/Irc/Irc_waiting_message.php | 6 ++-- plugins/Msn/msn_waiting_message.php | 6 ++-- plugins/OpenID/finishopenidlogin.php | 44 ++++++++++++++-------------- plugins/OpenID/openid.php | 18 ++++++------ plugins/Xmpp/xmppmanager.php | 2 +- scripts/allsites.php | 2 +- scripts/console.php | 2 +- scripts/fixup_hashtags.php | 2 +- scripts/fixup_inboxes.php | 2 +- scripts/fixup_notices_rendered.php | 2 +- scripts/fixup_replies.php | 2 +- scripts/fixup_utf8.php | 2 +- scripts/make-release.php | 2 +- scripts/setconfig.php | 2 +- scripts/useremail.php | 4 +-- 43 files changed, 126 insertions(+), 126 deletions(-) diff --git a/actions/invite.php b/actions/invite.php index c64ff8adda..bbb6b26c11 100644 --- a/actions/invite.php +++ b/actions/invite.php @@ -54,7 +54,7 @@ class InviteAction extends CurrentUserDesignAction function sendInvitations() { - # CSRF protection + // CSRF protection $token = $this->trimmed('token'); if (!$token || $token != common_session_token()) { $this->showForm(_('There was a problem with your session token. Try again, please.')); diff --git a/actions/passwordsettings.php b/actions/passwordsettings.php index 465cb558a4..d9a6d32ae0 100644 --- a/actions/passwordsettings.php +++ b/actions/passwordsettings.php @@ -156,7 +156,7 @@ class PasswordsettingsAction extends SettingsAction $newpassword = $this->arg('newpassword'); $confirm = $this->arg('confirm'); - # Some validation + // Some validation if (strlen($newpassword) < 6) { // TRANS: Form validation error on page where to change password. diff --git a/actions/publictagcloud.php b/actions/publictagcloud.php index 1432ca66a8..db8185bb13 100644 --- a/actions/publictagcloud.php +++ b/actions/publictagcloud.php @@ -100,7 +100,7 @@ class PublictagcloudAction extends Action function showContent() { - # This should probably be cached rather than recalculated + // This should probably be cached rather than recalculated $tags = new Notice_tag(); #Need to clear the selection and then only re-add the field diff --git a/actions/recoverpassword.php b/actions/recoverpassword.php index e30bf7af2e..71f673bd3b 100644 --- a/actions/recoverpassword.php +++ b/actions/recoverpassword.php @@ -19,7 +19,7 @@ if (!defined('STATUSNET') && !defined('LACONICA')) { exit(1); } -# You have 24 hours to claim your password +// You have 24 hours to claim your password define('MAX_RECOVERY_TIME', 24 * 60 * 60); @@ -81,7 +81,7 @@ class RecoverpasswordAction extends Action $touched = strtotime($confirm->modified); $email = $confirm->address; - # Burn this code + // Burn this code $result = $confirm->delete(); @@ -92,8 +92,8 @@ class RecoverpasswordAction extends Action return; } - # These should be reaped, but for now we just check mod time - # Note: it's still deleted; let's avoid a second attempt! + // These should be reaped, but for now we just check mod time + // Note: it's still deleted; let's avoid a second attempt! if ((time() - $touched) > MAX_RECOVERY_TIME) { common_log(LOG_WARNING, @@ -105,8 +105,8 @@ class RecoverpasswordAction extends Action return; } - # If we used an outstanding confirmation to send the email, - # it's been confirmed at this point. + // If we used an outstanding confirmation to send the email, + // it's been confirmed at this point. if (!$user->email) { $orig = clone($user); @@ -120,7 +120,7 @@ class RecoverpasswordAction extends Action } } - # Success! + // Success! $this->setTempUser($user); $this->showPasswordForm(); @@ -289,7 +289,7 @@ class RecoverpasswordAction extends Action } } - # See if it's an unconfirmed email address + // See if it's an unconfirmed email address if (!$user) { // Warning: it may actually be legit to have multiple folks @@ -314,7 +314,7 @@ class RecoverpasswordAction extends Action return; } - # Try to get an unconfirmed email address if they used a user name + // Try to get an unconfirmed email address if they used a user name if (!$user->email && !$confirm_email) { $confirm_email = new Confirm_address(); @@ -332,7 +332,7 @@ class RecoverpasswordAction extends Action return; } - # Success! We have a valid user and a confirmed or unconfirmed email address + // Success! We have a valid user and a confirmed or unconfirmed email address $confirm = new Confirm_address(); $confirm->code = common_confirmation_code(128); @@ -380,7 +380,7 @@ class RecoverpasswordAction extends Action function resetPassword() { - # CSRF protection + // CSRF protection $token = $this->trimmed('token'); if (!$token || $token != common_session_token()) { // TRANS: Form validation error message. @@ -410,7 +410,7 @@ class RecoverpasswordAction extends Action return; } - # OK, we're ready to go + // OK, we're ready to go $original = clone($user); diff --git a/actions/sup.php b/actions/sup.php index c4da9d3db6..911f0d9e55 100644 --- a/actions/sup.php +++ b/actions/sup.php @@ -61,8 +61,8 @@ class SupAction extends Action { $notice = new Notice(); - # XXX: cache this. Depends on how big this protocol becomes; - # Re-doing this query every 15 seconds isn't the end of the world. + // XXX: cache this. Depends on how big this protocol becomes; + // Re-doing this query every 15 seconds isn't the end of the world. $divider = common_sql_date(time() - $seconds); diff --git a/actions/userrss.php b/actions/userrss.php index b7078fcaf8..ba9f64f8ac 100644 --- a/actions/userrss.php +++ b/actions/userrss.php @@ -112,7 +112,7 @@ class UserrssAction extends Rss10Action return ($avatar) ? $avatar->url : null; } - # override parent to add X-SUP-ID URL + // override parent to add X-SUP-ID URL function initRss($limit=0) { diff --git a/classes/Avatar.php b/classes/Avatar.php index 6edc817685..34ec4a3caf 100644 --- a/classes/Avatar.php +++ b/classes/Avatar.php @@ -27,7 +27,7 @@ class Avatar extends Memcached_DataObject /* the code above is auto generated do not remove the tag below */ ###END_AUTOCODE - # We clean up the file, too + // We clean up the file, too function delete() { diff --git a/classes/Foreign_link.php b/classes/Foreign_link.php index 60db51595e..57a10dcedb 100644 --- a/classes/Foreign_link.php +++ b/classes/Foreign_link.php @@ -91,7 +91,7 @@ class Foreign_link extends Memcached_DataObject $this->profilesync = 0; } - # Convenience methods + // Convenience methods function getForeignUser() { $fuser = new Foreign_user(); diff --git a/classes/Foreign_user.php b/classes/Foreign_user.php index 8e6e0b33e0..82ca749a59 100644 --- a/classes/Foreign_user.php +++ b/classes/Foreign_user.php @@ -65,7 +65,7 @@ class Foreign_user extends Memcached_DataObject } } if (count($parts) == 0) { - # No changes + // No changes return true; } $toupdate = implode(', ', $parts); diff --git a/classes/Memcached_DataObject.php b/classes/Memcached_DataObject.php index 97f793f4d8..59809dc8f7 100644 --- a/classes/Memcached_DataObject.php +++ b/classes/Memcached_DataObject.php @@ -34,7 +34,7 @@ class Memcached_DataObject extends Safe_DataObject { if (is_null($v)) { $v = $k; - # XXX: HACK! + // XXX: HACK! $i = new $cls; $keys = $i->keys(); $k = $keys[0]; diff --git a/classes/Notice.php b/classes/Notice.php index a158a4930d..b228a49c7c 100644 --- a/classes/Notice.php +++ b/classes/Notice.php @@ -312,7 +312,7 @@ class Notice extends Memcached_DataObject $autosource = common_config('public', 'autosource'); - # Sandboxed are non-false, but not 1, either + // Sandboxed are non-false, but not 1, either if (!$profile->hasRight(Right::PUBLICNOTICE) || ($source && $autosource && in_array($source, $autosource))) { @@ -410,8 +410,8 @@ class Notice extends Memcached_DataObject } - # Clear the cache for subscribed users, so they'll update at next request - # XXX: someone clever could prepend instead of clearing the cache + // Clear the cache for subscribed users, so they'll update at next request + // XXX: someone clever could prepend instead of clearing the cache $notice->blowOnInsert(); @@ -559,8 +559,8 @@ class Notice extends Memcached_DataObject } } } - # If we get here, oldest item in cache window is not - # old enough for dupe limit; do direct check against DB + // If we get here, oldest item in cache window is not + // old enough for dupe limit; do direct check against DB $notice = new Notice(); $notice->profile_id = $profile_id; $notice->content = $content; @@ -576,16 +576,16 @@ class Notice extends Memcached_DataObject if (empty($profile)) { return false; } - # Get the Nth notice + // Get the Nth notice $notice = $profile->getNotices(common_config('throttle', 'count') - 1, 1); if ($notice && $notice->fetch()) { - # If the Nth notice was posted less than timespan seconds ago + // If the Nth notice was posted less than timespan seconds ago if (time() - strtotime($notice->created) <= common_config('throttle', 'timespan')) { - # Then we throttle + // Then we throttle return false; } } - # Either not N notices in the stream, OR the Nth was not posted within timespan seconds + // Either not N notices in the stream, OR the Nth was not posted within timespan seconds return true; } @@ -695,7 +695,7 @@ class Notice extends Memcached_DataObject if (common_config('public', 'localonly')) { $notice->whereAdd('is_local = ' . Notice::LOCAL_PUBLIC); } else { - # -1 == blacklisted, -2 == gateway (i.e. Twitter) + // -1 == blacklisted, -2 == gateway (i.e. Twitter) $notice->whereAdd('is_local !='. Notice::LOCAL_NONPUBLIC); $notice->whereAdd('is_local !='. Notice::GATEWAY); } diff --git a/classes/Oauth_application_user.php b/classes/Oauth_application_user.php index e1b4b8c046..834e38d2be 100644 --- a/classes/Oauth_application_user.php +++ b/classes/Oauth_application_user.php @@ -51,7 +51,7 @@ class Oauth_application_user extends Memcached_DataObject } } if (count($parts) == 0) { - # No changes + // No changes return true; } $toupdate = implode(', ', $parts); diff --git a/classes/Profile.php b/classes/Profile.php index 126bc25a66..9566226951 100644 --- a/classes/Profile.php +++ b/classes/Profile.php @@ -93,7 +93,7 @@ class Profile extends Memcached_DataObject $avatar->url = Avatar::url($filename); $avatar->created = DB_DataObject_Cast::dateTime(); # current time - # XXX: start a transaction here + // XXX: start a transaction here if (!$this->delete_avatars() || !$avatar->insert()) { @unlink(Avatar::path($filename)); @@ -101,7 +101,7 @@ class Profile extends Memcached_DataObject } 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 don't do a scaled one if original is our scaled size if (!($avatar->width == $size && $avatar->height == $size)) { $scaled_filename = $imagefile->resize($size); diff --git a/classes/Profile_tag.php b/classes/Profile_tag.php index ab6bab0964..bd45ce0b45 100644 --- a/classes/Profile_tag.php +++ b/classes/Profile_tag.php @@ -25,7 +25,7 @@ class Profile_tag extends Memcached_DataObject static function getTags($tagger, $tagged) { $tags = array(); - # XXX: store this in memcached + // XXX: store this in memcached $profile_tag = new Profile_tag(); $profile_tag->tagger = $tagger; @@ -46,11 +46,11 @@ class Profile_tag extends Memcached_DataObject $newtags = array_unique($newtags); $oldtags = Profile_tag::getTags($tagger, $tagged); - # Delete stuff that's old that not in new + // Delete stuff that's old that not in new $to_delete = array_diff($oldtags, $newtags); - # Insert stuff that's in new and not in old + // Insert stuff that's in new and not in old $to_insert = array_diff($newtags, $oldtags); @@ -84,7 +84,7 @@ class Profile_tag extends Memcached_DataObject return true; } - # Return profiles with a given tag + // Return profiles with a given tag static function getTagged($tagger, $tag) { $profile = new Profile(); $profile->query('SELECT profile.* ' . diff --git a/classes/Queue_item.php b/classes/Queue_item.php index 007d4ed232..d17e512b96 100644 --- a/classes/Queue_item.php +++ b/classes/Queue_item.php @@ -46,9 +46,9 @@ class Queue_item extends Memcached_DataObject $cnt = $qi->find(true); if ($cnt) { - # XXX: potential race condition - # can we force it to only update if claimed is still null - # (or old)? + // XXX: potential race condition + // can we force it to only update if claimed is still null + // (or old)? common_log(LOG_INFO, 'claiming queue item id = ' . $qi->id . ' for transport ' . $qi->transport); $orig = clone($qi); diff --git a/classes/Subscription.php b/classes/Subscription.php index 1d4f37929b..797e6fef1c 100644 --- a/classes/Subscription.php +++ b/classes/Subscription.php @@ -146,9 +146,9 @@ class Subscription extends Memcached_DataObject function notify() { - # XXX: add other notifications (Jabber, SMS) here - # XXX: queue this and handle it offline - # XXX: Whatever happens, do it in Twitter-like API, too + // XXX: add other notifications (Jabber, SMS) here + // XXX: queue this and handle it offline + // XXX: Whatever happens, do it in Twitter-like API, too $this->notifyEmail(); } diff --git a/classes/User_group.php b/classes/User_group.php index c044594f1f..707acbd13c 100644 --- a/classes/User_group.php +++ b/classes/User_group.php @@ -306,11 +306,11 @@ class User_group extends Memcached_DataObject $oldaliases = $this->getAliases(); - # Delete stuff that's old that not in new + // Delete stuff that's old that not in new $to_delete = array_diff($oldaliases, $newaliases); - # Insert stuff that's in new and not in old + // Insert stuff that's in new and not in old $to_insert = array_diff($newaliases, $oldaliases); diff --git a/lib/apiaction.php b/lib/apiaction.php index ebda36db7f..3b3ece17cd 100644 --- a/lib/apiaction.php +++ b/lib/apiaction.php @@ -292,7 +292,7 @@ class ApiAction extends Action if ($get_notice) { $notice = $profile->getCurrentNotice(); if ($notice) { - # don't get user! + // don't get user! $twitter_user['status'] = $this->twitterStatusArray($notice, false); } } @@ -397,7 +397,7 @@ class ApiAction extends Action } if ($include_user && $profile) { - # Don't get notice (recursive!) + // Don't get notice (recursive!) $twitter_user = $this->twitterUserArray($profile, false); $twitter_status['user'] = $twitter_user; } @@ -698,7 +698,7 @@ class ApiAction extends Action $this->element('guid', null, $entry['guid']); $this->element('link', null, $entry['link']); - # RSS only supports 1 enclosure per item + // RSS only supports 1 enclosure per item if(array_key_exists('enclosures', $entry) and !empty($entry['enclosures'])){ $enclosure = $entry['enclosures'][0]; $this->element('enclosure', array('url'=>$enclosure['url'],'type'=>$enclosure['mimetype'],'length'=>$enclosure['size']), null); @@ -833,7 +833,7 @@ class ApiAction extends Action } if (!is_null($suplink)) { - # For FriendFeed's SUP protocol + // For FriendFeed's SUP protocol $this->element('link', array('rel' => 'http://api.friendfeed.com/2008/03#sup', 'href' => $suplink, 'type' => 'application/json')); diff --git a/lib/channel.php b/lib/channel.php index ae9b2d214f..e5e8eaa0f5 100644 --- a/lib/channel.php +++ b/lib/channel.php @@ -95,9 +95,9 @@ class WebChannel extends Channel function output($user, $text) { - # XXX: buffer all output and send it at the end - # XXX: even better, redirect to appropriate page - # depending on what command was run + // XXX: buffer all output and send it at the end + // XXX: even better, redirect to appropriate page + // depending on what command was run $this->out->startHTML(); $this->out->elementStart('head'); // TRANS: Title for command results. diff --git a/lib/framework.php b/lib/framework.php index da96c8e1d4..d85b99f5c8 100644 --- a/lib/framework.php +++ b/lib/framework.php @@ -48,7 +48,7 @@ define('NOTICE_INBOX_SOURCE_REPLY', 3); define('NOTICE_INBOX_SOURCE_FORWARD', 4); define('NOTICE_INBOX_SOURCE_GATEWAY', -1); -# append our extlib dir as the last-resort place to find libs +// append our extlib dir as the last-resort place to find libs set_include_path(get_include_path() . PATH_SEPARATOR . INSTALLDIR . '/extlib/'); @@ -69,7 +69,7 @@ if (!function_exists('dl')) { } } -# global configuration object +// global configuration object require_once('PEAR.php'); require_once('PEAR/Exception.php'); diff --git a/lib/galleryaction.php b/lib/galleryaction.php index 3db46dd09c..275a7bb57b 100644 --- a/lib/galleryaction.php +++ b/lib/galleryaction.php @@ -84,7 +84,7 @@ class GalleryAction extends OwnerDesignAction { parent::handle($args); - # Post from the tag dropdown; redirect to a GET + // Post from the tag dropdown; redirect to a GET if ($_SERVER['REQUEST_METHOD'] == 'POST') { common_redirect($this->selfUrl(), 303); diff --git a/lib/grouplist.php b/lib/grouplist.php index 854bc34e2c..34a43e61ae 100644 --- a/lib/grouplist.php +++ b/lib/grouplist.php @@ -137,7 +137,7 @@ class GroupList extends Widget $this->out->elementEnd('p'); } - # If we're on a list with an owner (subscriptions or subscribers)... + // If we're on a list with an owner (subscriptions or subscribers)... if (!empty($user) && !empty($this->owner) && $user->id == $this->owner->id) { $this->showOwnerControls(); @@ -149,8 +149,8 @@ class GroupList extends Widget $this->out->elementStart('div', 'entity_actions'); $this->out->elementStart('ul'); $this->out->elementStart('li', 'entity_subscribe'); - # XXX: special-case for user looking at own - # subscriptions page + // XXX: special-case for user looking at own + // subscriptions page if ($user->isMember($this->group)) { $lf = new LeaveForm($this->out, $this->group); $lf->show(); diff --git a/lib/mailhandler.php b/lib/mailhandler.php index 459657ffe0..bbeb69a8f9 100644 --- a/lib/mailhandler.php +++ b/lib/mailhandler.php @@ -21,8 +21,8 @@ require_once(INSTALLDIR . '/lib/mail.php'); require_once(INSTALLDIR . '/lib/mediafile.php'); require_once('Mail/mimeDecode.php'); -# FIXME: we use both Mail_mimeDecode and mailparse -# Need to move everything to mailparse +// FIXME: we use both Mail_mimeDecode and mailparse +// Need to move everything to mailparse class MailHandler { diff --git a/lib/oauthstore.php b/lib/oauthstore.php index 1c8e725009..a52f6cee33 100644 --- a/lib/oauthstore.php +++ b/lib/oauthstore.php @@ -264,8 +264,8 @@ class StatusNetOAuthDataStore extends OAuthDataStore $profile = Profile::staticGet($remote->id); $orig_remote = clone($remote); $orig_profile = clone($profile); - # XXX: compare current postNotice and updateProfile URLs to the ones - # stored in the DB to avoid (possibly...) above attack + // XXX: compare current postNotice and updateProfile URLs to the ones + // stored in the DB to avoid (possibly...) above attack } else { $exists = false; $remote = new Remote_profile(); diff --git a/lib/ping.php b/lib/ping.php index e1c7c748e2..4d370593cc 100644 --- a/lib/ping.php +++ b/lib/ping.php @@ -24,7 +24,7 @@ function ping_broadcast_notice($notice) { return true; } - # Array of servers, URL => type + // Array of servers, URL => type $notify = common_config('ping', 'notify'); try { $profile = $notice->getProfile(); diff --git a/lib/rssaction.php b/lib/rssaction.php index f366db9729..dac7fa4606 100644 --- a/lib/rssaction.php +++ b/lib/rssaction.php @@ -34,7 +34,7 @@ define('DEFAULT_RSS_LIMIT', 48); class Rss10Action extends Action { - # This will contain the details of each feed item's author and be used to generate SIOC data. + // This will contain the details of each feed item's author and be used to generate SIOC data. var $creators = array(); var $limit = DEFAULT_RSS_LIMIT; @@ -88,10 +88,10 @@ class Rss10Action extends Action if (common_config('site', 'private')) { if (!isset($_SERVER['PHP_AUTH_USER'])) { - # This header makes basic auth go + // This header makes basic auth go header('WWW-Authenticate: Basic realm="StatusNet RSS"'); - # If the user hits cancel -- bam! + // If the user hits cancel -- bam! $this->show_basic_auth_error(); return; } else { @@ -99,7 +99,7 @@ class Rss10Action extends Action $password = $_SERVER['PHP_AUTH_PW']; if (!common_check_user($nickname, $password)) { - # basic authentication failed + // basic authentication failed list($proxy, $ip) = common_client_ip(); common_log(LOG_WARNING, "Failed RSS auth attempt, nickname = $nickname, proxy = $proxy, ip = $ip."); diff --git a/lib/util.php b/lib/util.php index 511dcdfb86..c2b50f7045 100644 --- a/lib/util.php +++ b/lib/util.php @@ -2137,7 +2137,7 @@ function common_url_to_nickname($url) $parts = parse_url($url); - # If any of these parts exist, this won't work + // If any of these parts exist, this won't work foreach ($bad as $badpart) { if (array_key_exists($badpart, $parts)) { @@ -2145,15 +2145,15 @@ function common_url_to_nickname($url) } } - # We just have host and/or path + // We just have host and/or path - # If it's just a host... + // If it's just a host... if (array_key_exists('host', $parts) && (!array_key_exists('path', $parts) || strcmp($parts['path'], '/') == 0)) { $hostparts = explode('.', $parts['host']); - # Try to catch common idiom of nickname.service.tld + // Try to catch common idiom of nickname.service.tld if ((count($hostparts) > 2) && (strlen($hostparts[count($hostparts) - 2]) > 3) && # try to skip .co.uk, .com.au @@ -2161,12 +2161,12 @@ function common_url_to_nickname($url) { return common_nicknamize($hostparts[0]); } else { - # Do the whole hostname + // Do the whole hostname return common_nicknamize($parts['host']); } } else { if (array_key_exists('path', $parts)) { - # Strip starting, ending slashes + // Strip starting, ending slashes $path = preg_replace('@/$@', '', $parts['path']); $path = preg_replace('@^/@', '', $path); $path = basename($path); diff --git a/plugins/Enjit/enjitqueuehandler.php b/plugins/Enjit/enjitqueuehandler.php index 56fc396d17..4a68f4f6b6 100644 --- a/plugins/Enjit/enjitqueuehandler.php +++ b/plugins/Enjit/enjitqueuehandler.php @@ -45,7 +45,7 @@ class EnjitQueueHandler extends QueueHandler } # - # Build an Atom message from the notice + // Build an Atom message from the notice # $noticeurl = common_local_url('shownotice', array('notice' => $notice->id)); $msg = $profile->nickname . ': ' . $notice->content; @@ -73,7 +73,7 @@ class EnjitQueueHandler extends QueueHandler ); # - # POST the message to $config['enjit']['apiurl'] + // POST the message to $config['enjit']['apiurl'] # $request = HTTPClient::start(); $response = $request->post($url, null, $data); diff --git a/plugins/Irc/Irc_waiting_message.php b/plugins/Irc/Irc_waiting_message.php index 59eec63d8d..6c6fd454c6 100644 --- a/plugins/Irc/Irc_waiting_message.php +++ b/plugins/Irc/Irc_waiting_message.php @@ -94,9 +94,9 @@ class Irc_waiting_message extends Memcached_DataObject { $cnt = $wm->find(true); if ($cnt) { - # XXX: potential race condition - # can we force it to only update if claimed is still null - # (or old)? + // XXX: potential race condition + // can we force it to only update if claimed is still null + // (or old)? common_log(LOG_INFO, 'claiming IRC waiting message id = ' . $wm->id); $orig = clone($wm); $wm->claimed = common_sql_now(); diff --git a/plugins/Msn/msn_waiting_message.php b/plugins/Msn/msn_waiting_message.php index 0af7c4f3ec..707cd04389 100644 --- a/plugins/Msn/msn_waiting_message.php +++ b/plugins/Msn/msn_waiting_message.php @@ -100,9 +100,9 @@ class Msn_waiting_message extends Memcached_DataObject { $cnt = $wm->find(true); if ($cnt) { - # XXX: potential race condition - # can we force it to only update if claimed is still null - # (or old)? + // XXX: potential race condition + // can we force it to only update if claimed is still null + // (or old)? common_log(LOG_INFO, 'claiming msn waiting message id = ' . $wm->id); $orig = clone($wm); $wm->claimed = common_sql_now(); diff --git a/plugins/OpenID/finishopenidlogin.php b/plugins/OpenID/finishopenidlogin.php index dfabdd7903..6d2c5f31f0 100644 --- a/plugins/OpenID/finishopenidlogin.php +++ b/plugins/OpenID/finishopenidlogin.php @@ -266,9 +266,9 @@ class FinishopenidloginAction extends Action if ($user) { oid_set_last($display); - # XXX: commented out at @edd's request until better - # control over how data flows from OpenID provider. - # oid_update_user($user, $sreg); + // XXX: commented out at @edd's request until better + // control over how data flows from OpenID provider. + // oid_update_user($user, $sreg); common_set_user($user); common_real_login(true); if (isset($_SESSION['openid_rememberme']) && $_SESSION['openid_rememberme']) { @@ -306,7 +306,7 @@ class FinishopenidloginAction extends Action function createNewUser() { - # FIXME: save invite code before redirect, and check here + // FIXME: save invite code before redirect, and check here if (!Event::handle('StartRegistrationTry', array($this))) { return; @@ -364,7 +364,7 @@ class FinishopenidloginAction extends Action return; } - # Possible race condition... let's be paranoid + // Possible race condition... let's be paranoid $other = oid_get_user($canonical); @@ -379,8 +379,8 @@ class FinishopenidloginAction extends Action $location = ''; if (!empty($sreg['country'])) { if ($sreg['postcode']) { - # XXX: use postcode to get city and region - # XXX: also, store postcode somewhere -- it's valuable! + // XXX: use postcode to get city and region + // XXX: also, store postcode somewhere -- it's valuable! $location = $sreg['postcode'] . ', ' . $sreg['country']; } else { $location = $sreg['country']; @@ -395,8 +395,8 @@ class FinishopenidloginAction extends Action $email = $this->getEmail(); - # XXX: add language - # XXX: add timezone + // XXX: add language + // XXX: add timezone $args = array('nickname' => $nickname, 'email' => $email, @@ -438,7 +438,7 @@ class FinishopenidloginAction extends Action return; } - # They're legit! + // They're legit! $user = User::staticGet('nickname', $nickname); @@ -477,7 +477,7 @@ class FinishopenidloginAction extends Action { $url = common_get_returnto(); if ($url) { - # We don't have to return to it again + // We don't have to return to it again common_set_returnto(null); $url = common_inject_session($url); } else { @@ -491,7 +491,7 @@ class FinishopenidloginAction extends Action function bestNewNickname($display, $sreg) { - # Try the passed-in nickname + // Try the passed-in nickname if (!empty($sreg['nickname'])) { $nickname = $this->nicknamize($sreg['nickname']); @@ -500,7 +500,7 @@ class FinishopenidloginAction extends Action } } - # Try the full name + // Try the full name if (!empty($sreg['fullname'])) { $fullname = $this->nicknamize($sreg['fullname']); @@ -509,7 +509,7 @@ class FinishopenidloginAction extends Action } } - # Try the URL + // Try the URL $from_url = $this->openidToNickname($display); @@ -517,7 +517,7 @@ class FinishopenidloginAction extends Action return $from_url; } - # XXX: others? + // XXX: others? return null; } @@ -545,10 +545,10 @@ class FinishopenidloginAction extends Action } } - # We try to use an OpenID URL as a legal StatusNet user name in this order - # 1. Plain hostname, like http://evanp.myopenid.com/ - # 2. One element in path, like http://profile.typekey.com/EvanProdromou/ - # or http://getopenid.com/evanprodromou + // We try to use an OpenID URL as a legal StatusNet user name in this order + // 1. Plain hostname, like http://evanp.myopenid.com/ + // 2. One element in path, like http://profile.typekey.com/EvanProdromou/ + // or http://getopenid.com/evanprodromou function urlToNickname($openid) { @@ -562,8 +562,8 @@ class FinishopenidloginAction extends Action if (!$base) { return null; } else { - # =evan.prodromou - # or @gratis*evan.prodromou + // =evan.prodromou + // or @gratis*evan.prodromou $parts = explode('*', substr($base, 1)); return $this->nicknamize(array_pop($parts)); } @@ -578,7 +578,7 @@ class FinishopenidloginAction extends Action } } - # Given a string, try to make it work as a nickname + // Given a string, try to make it work as a nickname function nicknamize($str) { diff --git a/plugins/OpenID/openid.php b/plugins/OpenID/openid.php index ad251aa2cd..d13db28a47 100644 --- a/plugins/OpenID/openid.php +++ b/plugins/OpenID/openid.php @@ -27,7 +27,7 @@ require_once('Auth/OpenID/Server.php'); require_once('Auth/OpenID/SReg.php'); require_once('Auth/OpenID/MySQLStore.php'); -# About one year cookie expiry +// About one year cookie expiry define('OPENID_COOKIE_EXPIRY', round(365.25 * 24 * 60 * 60)); define('OPENID_COOKIE_KEY', 'lastusedopenid'); @@ -36,7 +36,7 @@ function oid_store() { static $store = null; if (!$store) { - # Can't be called statically + // Can't be called statically $user = new User(); $conn = $user->getDatabaseConnection(); $store = new Auth_OpenID_MySQLStore($conn); @@ -213,8 +213,8 @@ 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 don't escape ampersands - # in the HTML attributes + // XXX: This is cheap, but things choke if we don't escape ampersands + // in the HTML attributes $form_html = preg_replace('/&/', '&', $form_html); @@ -235,7 +235,7 @@ function oid_authenticate($openid_url, $returnto, $immediate=false) */ } -# Half-assed attempt at a module-private function +// Half-assed attempt at a module-private function function _oid_print_instructions() { @@ -264,16 +264,16 @@ function oid_update_user($user, $sreg) if (!empty($sreg['country'])) { if ($sreg['postcode']) { - # XXX: use postcode to get city and region - # XXX: also, store postcode somewhere -- it's valuable! + // XXX: use postcode to get city and region + // XXX: also, store postcode somewhere -- it's valuable! $profile->location = $sreg['postcode'] . ', ' . $sreg['country']; } else { $profile->location = $sreg['country']; } } - # XXX save language if it's passed - # XXX save timezone if it's passed + // XXX save language if it's passed + // XXX save timezone if it's passed if (!$profile->update($orig_profile)) { // TRANS: OpenID plugin server error. diff --git a/plugins/Xmpp/xmppmanager.php b/plugins/Xmpp/xmppmanager.php index 1a4e9546d8..4aaed677b5 100644 --- a/plugins/Xmpp/xmppmanager.php +++ b/plugins/Xmpp/xmppmanager.php @@ -81,7 +81,7 @@ class XmppManager extends ImManager */ public function handleInput($socket) { - # Process the queue for as long as needed + // Process the queue for as long as needed try { common_log(LOG_DEBUG, "Servicing the XMPP queue."); $this->stats('xmpp_process'); diff --git a/scripts/allsites.php b/scripts/allsites.php index cf1419e550..a67db12337 100755 --- a/scripts/allsites.php +++ b/scripts/allsites.php @@ -18,7 +18,7 @@ * along with this program. If not, see . */ -# Abort if called from a web server +// Abort if called from a web server define('INSTALLDIR', realpath(dirname(__FILE__) . '/..')); diff --git a/scripts/console.php b/scripts/console.php index 4d207c261b..c260ffaa00 100755 --- a/scripts/console.php +++ b/scripts/console.php @@ -18,7 +18,7 @@ * along with this program. If not, see . */ -# Abort if called from a web server +// Abort if called from a web server define('INSTALLDIR', realpath(dirname(__FILE__) . '/..')); diff --git a/scripts/fixup_hashtags.php b/scripts/fixup_hashtags.php index 5cfebd8ee8..87bbecfb44 100755 --- a/scripts/fixup_hashtags.php +++ b/scripts/fixup_hashtags.php @@ -18,7 +18,7 @@ * along with this program. If not, see . */ -# Abort if called from a web server +// Abort if called from a web server if (isset($_SERVER) && array_key_exists('REQUEST_METHOD', $_SERVER)) { print "This script must be run from the command line\n"; exit(); diff --git a/scripts/fixup_inboxes.php b/scripts/fixup_inboxes.php index c6e4fd0717..2aa5d16900 100755 --- a/scripts/fixup_inboxes.php +++ b/scripts/fixup_inboxes.php @@ -18,7 +18,7 @@ * along with this program. If not, see . */ -# Abort if called from a web server +// Abort if called from a web server if (isset($_SERVER) && array_key_exists('REQUEST_METHOD', $_SERVER)) { print "This script must be run from the command line\n"; exit(); diff --git a/scripts/fixup_notices_rendered.php b/scripts/fixup_notices_rendered.php index 359cd6cce4..cfbdc7479b 100755 --- a/scripts/fixup_notices_rendered.php +++ b/scripts/fixup_notices_rendered.php @@ -18,7 +18,7 @@ * along with this program. If not, see . */ -# Abort if called from a web server +// Abort if called from a web server if (isset($_SERVER) && array_key_exists('REQUEST_METHOD', $_SERVER)) { print "This script must be run from the command line\n"; exit(); diff --git a/scripts/fixup_replies.php b/scripts/fixup_replies.php index 7328635d3c..dd55e6ed40 100755 --- a/scripts/fixup_replies.php +++ b/scripts/fixup_replies.php @@ -18,7 +18,7 @@ * along with this program. If not, see . */ -# Abort if called from a web server +// Abort if called from a web server if (isset($_SERVER) && array_key_exists('REQUEST_METHOD', $_SERVER)) { print "This script must be run from the command line\n"; exit(); diff --git a/scripts/fixup_utf8.php b/scripts/fixup_utf8.php index 2af6f9cb04..796021b721 100755 --- a/scripts/fixup_utf8.php +++ b/scripts/fixup_utf8.php @@ -18,7 +18,7 @@ * along with this program. If not, see . */ -# Abort if called from a web server +// Abort if called from a web server define('INSTALLDIR', realpath(dirname(__FILE__) . '/..')); diff --git a/scripts/make-release.php b/scripts/make-release.php index a62d2f4480..f815428039 100644 --- a/scripts/make-release.php +++ b/scripts/make-release.php @@ -18,7 +18,7 @@ * along with this program. If not, see . */ -# Abort if called from a web server +// Abort if called from a web server define('INSTALLDIR', realpath(dirname(__FILE__) . '/..')); diff --git a/scripts/setconfig.php b/scripts/setconfig.php index 401dda0f2b..009c50dbf2 100755 --- a/scripts/setconfig.php +++ b/scripts/setconfig.php @@ -46,7 +46,7 @@ if (empty($args)) { foreach ($config as $section => $section_value) { foreach ($section_value as $setting => $value) { if (have_option('v', 'verbose') || !is_array($value)) { - # Don't print array's without the verbose flag + // Don't print array's without the verbose flag printf("%-20s %-20s %s\n", $section, $setting, var_export($value, true)); } } diff --git a/scripts/useremail.php b/scripts/useremail.php index 0a59d36f83..a53d857d56 100755 --- a/scripts/useremail.php +++ b/scripts/useremail.php @@ -53,7 +53,7 @@ if (have_option('i', 'id')) { if (!empty($user)) { if (empty($user->email)) { - # Check for unconfirmed emails + // Check for unconfirmed emails $unconfirmed_email = new Confirm_address(); $unconfirmed_email->user_id = $user->id; $unconfirmed_email->address_type = 'email'; @@ -75,7 +75,7 @@ if (have_option('e', 'email')) { $user->email = get_option_value('e', 'email'); $user->find(false); if (!$user->fetch()) { - # Check unconfirmed emails + // Check unconfirmed emails $unconfirmed_email = new Confirm_address(); $unconfirmed_email->address = $user->email; $unconfirmed_email->address_type = 'email';