From c89b10ffe4adb1df724b6a7c5c31b42c7dd3376b Mon Sep 17 00:00:00 2001 From: Brion Vibber Date: Wed, 2 Dec 2009 09:47:02 -0800 Subject: Code style cleanup: dropped some unnecessary =& reference assignments where they're used only out of habit for PHP 4-style object semantics --- actions/all.php | 2 +- actions/subscribers.php | 2 +- actions/subscriptions.php | 2 +- actions/userbyid.php | 2 +- lib/schema.php | 18 +++++++++--------- lib/util.php | 2 +- plugins/OpenID/finishaddopenid.php | 4 ++-- scripts/fixup_utf8.php | 8 ++++---- 8 files changed, 20 insertions(+), 20 deletions(-) diff --git a/actions/all.php b/actions/all.php index 61cedce74..5a9d97dd7 100644 --- a/actions/all.php +++ b/actions/all.php @@ -160,7 +160,7 @@ class AllAction extends ProfileAction function showPageTitle() { - $user =& common_current_user(); + $user = common_current_user(); if ($user && ($user->id == $this->user->id)) { $this->element('h1', null, _("You and friends")); } else { diff --git a/actions/subscribers.php b/actions/subscribers.php index df9ec9961..cc9452820 100644 --- a/actions/subscribers.php +++ b/actions/subscribers.php @@ -57,7 +57,7 @@ class SubscribersAction extends GalleryAction function showPageNotice() { - $user =& common_current_user(); + $user = common_current_user(); if ($user && ($user->id == $this->profile->id)) { $this->element('p', null, _('These are the people who listen to '. diff --git a/actions/subscriptions.php b/actions/subscriptions.php index cc7b38ee4..0dc5ee762 100644 --- a/actions/subscriptions.php +++ b/actions/subscriptions.php @@ -59,7 +59,7 @@ class SubscriptionsAction extends GalleryAction function showPageNotice() { - $user =& common_current_user(); + $user = common_current_user(); if ($user && ($user->id == $this->profile->id)) { $this->element('p', null, _('These are the people whose notices '. diff --git a/actions/userbyid.php b/actions/userbyid.php index 86a61f20b..ebff7e4a7 100644 --- a/actions/userbyid.php +++ b/actions/userbyid.php @@ -69,7 +69,7 @@ class UserbyidAction extends Action if (!$id) { $this->clientError(_('No id.')); } - $user =& User::staticGet($id); + $user = User::staticGet($id); if (!$user) { $this->clientError(_('No such user.')); } diff --git a/lib/schema.php b/lib/schema.php index df7cb65f5..a8ba91b87 100644 --- a/lib/schema.php +++ b/lib/schema.php @@ -94,7 +94,7 @@ class Schema public function getTableDef($name) { - $res =& $this->conn->query('DESCRIBE ' . $name); + $res = $this->conn->query('DESCRIBE ' . $name); if (PEAR::isError($res)) { throw new Exception($res->getMessage()); @@ -213,7 +213,7 @@ class Schema $sql .= "); "; - $res =& $this->conn->query($sql); + $res = $this->conn->query($sql); if (PEAR::isError($res)) { throw new Exception($res->getMessage()); @@ -234,7 +234,7 @@ class Schema public function dropTable($name) { - $res =& $this->conn->query("DROP TABLE $name"); + $res = $this->conn->query("DROP TABLE $name"); if (PEAR::isError($res)) { throw new Exception($res->getMessage()); @@ -269,7 +269,7 @@ class Schema $name = "$table_".implode("_", $columnNames)."_idx"; } - $res =& $this->conn->query("ALTER TABLE $table ". + $res = $this->conn->query("ALTER TABLE $table ". "ADD INDEX $name (". implode(",", $columnNames).")"); @@ -291,7 +291,7 @@ class Schema public function dropIndex($table, $name) { - $res =& $this->conn->query("ALTER TABLE $table DROP INDEX $name"); + $res = $this->conn->query("ALTER TABLE $table DROP INDEX $name"); if (PEAR::isError($res)) { throw new Exception($res->getMessage()); @@ -314,7 +314,7 @@ class Schema { $sql = "ALTER TABLE $table ADD COLUMN " . $this->_columnSql($columndef); - $res =& $this->conn->query($sql); + $res = $this->conn->query($sql); if (PEAR::isError($res)) { throw new Exception($res->getMessage()); @@ -339,7 +339,7 @@ class Schema $sql = "ALTER TABLE $table MODIFY COLUMN " . $this->_columnSql($columndef); - $res =& $this->conn->query($sql); + $res = $this->conn->query($sql); if (PEAR::isError($res)) { throw new Exception($res->getMessage()); @@ -363,7 +363,7 @@ class Schema { $sql = "ALTER TABLE $table DROP COLUMN $columnName"; - $res =& $this->conn->query($sql); + $res = $this->conn->query($sql); if (PEAR::isError($res)) { throw new Exception($res->getMessage()); @@ -446,7 +446,7 @@ class Schema $sql = 'ALTER TABLE ' . $tableName . ' ' . implode(', ', $phrase); - $res =& $this->conn->query($sql); + $res = $this->conn->query($sql); if (PEAR::isError($res)) { throw new Exception($res->getMessage()); diff --git a/lib/util.php b/lib/util.php index 99a0a1db3..ab046e871 100644 --- a/lib/util.php +++ b/lib/util.php @@ -127,7 +127,7 @@ function common_check_user($nickname, $password) if (0 == strcmp(common_munge_password($password, $user->id), $user->password)) { //internal checking passed - $authenticatedUser =& $user; + $authenticatedUser = $user; } } } diff --git a/plugins/OpenID/finishaddopenid.php b/plugins/OpenID/finishaddopenid.php index 6e889205d..7cd916523 100644 --- a/plugins/OpenID/finishaddopenid.php +++ b/plugins/OpenID/finishaddopenid.php @@ -80,7 +80,7 @@ class FinishaddopenidAction extends Action function tryLogin() { - $consumer =& oid_consumer(); + $consumer = oid_consumer(); $response = $consumer->complete(common_local_url('finishaddopenid')); @@ -103,7 +103,7 @@ class FinishaddopenidAction extends Action $sreg = $sreg_resp->contents(); } - $cur =& common_current_user(); + $cur = common_current_user(); $other = oid_get_user($canonical); diff --git a/scripts/fixup_utf8.php b/scripts/fixup_utf8.php index 5a9fba7c3..30befadfd 100755 --- a/scripts/fixup_utf8.php +++ b/scripts/fixup_utf8.php @@ -145,7 +145,7 @@ class UTF8FixerUpper echo "$id..."; - $result =& $this->dbu->execute($sth, array($content, $rendered, $id)); + $result = $this->dbu->execute($sth, array($content, $rendered, $id)); if (PEAR::isError($result)) { echo "ERROR: " . $result->getMessage() . "\n"; @@ -209,7 +209,7 @@ class UTF8FixerUpper echo "$id..."; - $result =& $this->dbu->execute($sth, array($fullname, $location, $bio, $id)); + $result = $this->dbu->execute($sth, array($fullname, $location, $bio, $id)); if (PEAR::isError($result)) { echo "ERROR: " . $result->getMessage() . "\n"; @@ -273,7 +273,7 @@ class UTF8FixerUpper echo "$id..."; - $result =& $this->dbu->execute($sth, array($fullname, $location, $description, $id)); + $result = $this->dbu->execute($sth, array($fullname, $location, $description, $id)); if (PEAR::isError($result)) { echo "ERROR: " . $result->getMessage() . "\n"; @@ -330,7 +330,7 @@ class UTF8FixerUpper echo "$id..."; - $result =& $this->dbu->execute($sth, array($content, $rendered, $id)); + $result = $this->dbu->execute($sth, array($content, $rendered, $id)); if (PEAR::isError($result)) { echo "ERROR: " . $result->getMessage() . "\n"; -- cgit v1.2.3-54-g00ecf