Code style cleanup: dropped some unnecessary =& reference assignments where they're used only out of habit for PHP 4-style object semantics
This commit is contained in:
parent
9e0f89ba4f
commit
c89b10ffe4
|
@ -160,7 +160,7 @@ class AllAction extends ProfileAction
|
||||||
|
|
||||||
function showPageTitle()
|
function showPageTitle()
|
||||||
{
|
{
|
||||||
$user =& common_current_user();
|
$user = common_current_user();
|
||||||
if ($user && ($user->id == $this->user->id)) {
|
if ($user && ($user->id == $this->user->id)) {
|
||||||
$this->element('h1', null, _("You and friends"));
|
$this->element('h1', null, _("You and friends"));
|
||||||
} else {
|
} else {
|
||||||
|
|
|
@ -57,7 +57,7 @@ class SubscribersAction extends GalleryAction
|
||||||
|
|
||||||
function showPageNotice()
|
function showPageNotice()
|
||||||
{
|
{
|
||||||
$user =& common_current_user();
|
$user = common_current_user();
|
||||||
if ($user && ($user->id == $this->profile->id)) {
|
if ($user && ($user->id == $this->profile->id)) {
|
||||||
$this->element('p', null,
|
$this->element('p', null,
|
||||||
_('These are the people who listen to '.
|
_('These are the people who listen to '.
|
||||||
|
|
|
@ -59,7 +59,7 @@ class SubscriptionsAction extends GalleryAction
|
||||||
|
|
||||||
function showPageNotice()
|
function showPageNotice()
|
||||||
{
|
{
|
||||||
$user =& common_current_user();
|
$user = common_current_user();
|
||||||
if ($user && ($user->id == $this->profile->id)) {
|
if ($user && ($user->id == $this->profile->id)) {
|
||||||
$this->element('p', null,
|
$this->element('p', null,
|
||||||
_('These are the people whose notices '.
|
_('These are the people whose notices '.
|
||||||
|
|
|
@ -69,7 +69,7 @@ class UserbyidAction extends Action
|
||||||
if (!$id) {
|
if (!$id) {
|
||||||
$this->clientError(_('No id.'));
|
$this->clientError(_('No id.'));
|
||||||
}
|
}
|
||||||
$user =& User::staticGet($id);
|
$user = User::staticGet($id);
|
||||||
if (!$user) {
|
if (!$user) {
|
||||||
$this->clientError(_('No such user.'));
|
$this->clientError(_('No such user.'));
|
||||||
}
|
}
|
||||||
|
|
|
@ -94,7 +94,7 @@ class Schema
|
||||||
|
|
||||||
public function getTableDef($name)
|
public function getTableDef($name)
|
||||||
{
|
{
|
||||||
$res =& $this->conn->query('DESCRIBE ' . $name);
|
$res = $this->conn->query('DESCRIBE ' . $name);
|
||||||
|
|
||||||
if (PEAR::isError($res)) {
|
if (PEAR::isError($res)) {
|
||||||
throw new Exception($res->getMessage());
|
throw new Exception($res->getMessage());
|
||||||
|
@ -213,7 +213,7 @@ class Schema
|
||||||
|
|
||||||
$sql .= "); ";
|
$sql .= "); ";
|
||||||
|
|
||||||
$res =& $this->conn->query($sql);
|
$res = $this->conn->query($sql);
|
||||||
|
|
||||||
if (PEAR::isError($res)) {
|
if (PEAR::isError($res)) {
|
||||||
throw new Exception($res->getMessage());
|
throw new Exception($res->getMessage());
|
||||||
|
@ -234,7 +234,7 @@ class Schema
|
||||||
|
|
||||||
public function dropTable($name)
|
public function dropTable($name)
|
||||||
{
|
{
|
||||||
$res =& $this->conn->query("DROP TABLE $name");
|
$res = $this->conn->query("DROP TABLE $name");
|
||||||
|
|
||||||
if (PEAR::isError($res)) {
|
if (PEAR::isError($res)) {
|
||||||
throw new Exception($res->getMessage());
|
throw new Exception($res->getMessage());
|
||||||
|
@ -269,7 +269,7 @@ class Schema
|
||||||
$name = "$table_".implode("_", $columnNames)."_idx";
|
$name = "$table_".implode("_", $columnNames)."_idx";
|
||||||
}
|
}
|
||||||
|
|
||||||
$res =& $this->conn->query("ALTER TABLE $table ".
|
$res = $this->conn->query("ALTER TABLE $table ".
|
||||||
"ADD INDEX $name (".
|
"ADD INDEX $name (".
|
||||||
implode(",", $columnNames).")");
|
implode(",", $columnNames).")");
|
||||||
|
|
||||||
|
@ -291,7 +291,7 @@ class Schema
|
||||||
|
|
||||||
public function dropIndex($table, $name)
|
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)) {
|
if (PEAR::isError($res)) {
|
||||||
throw new Exception($res->getMessage());
|
throw new Exception($res->getMessage());
|
||||||
|
@ -314,7 +314,7 @@ class Schema
|
||||||
{
|
{
|
||||||
$sql = "ALTER TABLE $table ADD COLUMN " . $this->_columnSql($columndef);
|
$sql = "ALTER TABLE $table ADD COLUMN " . $this->_columnSql($columndef);
|
||||||
|
|
||||||
$res =& $this->conn->query($sql);
|
$res = $this->conn->query($sql);
|
||||||
|
|
||||||
if (PEAR::isError($res)) {
|
if (PEAR::isError($res)) {
|
||||||
throw new Exception($res->getMessage());
|
throw new Exception($res->getMessage());
|
||||||
|
@ -339,7 +339,7 @@ class Schema
|
||||||
$sql = "ALTER TABLE $table MODIFY COLUMN " .
|
$sql = "ALTER TABLE $table MODIFY COLUMN " .
|
||||||
$this->_columnSql($columndef);
|
$this->_columnSql($columndef);
|
||||||
|
|
||||||
$res =& $this->conn->query($sql);
|
$res = $this->conn->query($sql);
|
||||||
|
|
||||||
if (PEAR::isError($res)) {
|
if (PEAR::isError($res)) {
|
||||||
throw new Exception($res->getMessage());
|
throw new Exception($res->getMessage());
|
||||||
|
@ -363,7 +363,7 @@ class Schema
|
||||||
{
|
{
|
||||||
$sql = "ALTER TABLE $table DROP COLUMN $columnName";
|
$sql = "ALTER TABLE $table DROP COLUMN $columnName";
|
||||||
|
|
||||||
$res =& $this->conn->query($sql);
|
$res = $this->conn->query($sql);
|
||||||
|
|
||||||
if (PEAR::isError($res)) {
|
if (PEAR::isError($res)) {
|
||||||
throw new Exception($res->getMessage());
|
throw new Exception($res->getMessage());
|
||||||
|
@ -446,7 +446,7 @@ class Schema
|
||||||
|
|
||||||
$sql = 'ALTER TABLE ' . $tableName . ' ' . implode(', ', $phrase);
|
$sql = 'ALTER TABLE ' . $tableName . ' ' . implode(', ', $phrase);
|
||||||
|
|
||||||
$res =& $this->conn->query($sql);
|
$res = $this->conn->query($sql);
|
||||||
|
|
||||||
if (PEAR::isError($res)) {
|
if (PEAR::isError($res)) {
|
||||||
throw new Exception($res->getMessage());
|
throw new Exception($res->getMessage());
|
||||||
|
|
|
@ -127,7 +127,7 @@ function common_check_user($nickname, $password)
|
||||||
if (0 == strcmp(common_munge_password($password, $user->id),
|
if (0 == strcmp(common_munge_password($password, $user->id),
|
||||||
$user->password)) {
|
$user->password)) {
|
||||||
//internal checking passed
|
//internal checking passed
|
||||||
$authenticatedUser =& $user;
|
$authenticatedUser = $user;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -80,7 +80,7 @@ class FinishaddopenidAction extends Action
|
||||||
|
|
||||||
function tryLogin()
|
function tryLogin()
|
||||||
{
|
{
|
||||||
$consumer =& oid_consumer();
|
$consumer = oid_consumer();
|
||||||
|
|
||||||
$response = $consumer->complete(common_local_url('finishaddopenid'));
|
$response = $consumer->complete(common_local_url('finishaddopenid'));
|
||||||
|
|
||||||
|
@ -103,7 +103,7 @@ class FinishaddopenidAction extends Action
|
||||||
$sreg = $sreg_resp->contents();
|
$sreg = $sreg_resp->contents();
|
||||||
}
|
}
|
||||||
|
|
||||||
$cur =& common_current_user();
|
$cur = common_current_user();
|
||||||
|
|
||||||
$other = oid_get_user($canonical);
|
$other = oid_get_user($canonical);
|
||||||
|
|
||||||
|
|
|
@ -145,7 +145,7 @@ class UTF8FixerUpper
|
||||||
|
|
||||||
echo "$id...";
|
echo "$id...";
|
||||||
|
|
||||||
$result =& $this->dbu->execute($sth, array($content, $rendered, $id));
|
$result = $this->dbu->execute($sth, array($content, $rendered, $id));
|
||||||
|
|
||||||
if (PEAR::isError($result)) {
|
if (PEAR::isError($result)) {
|
||||||
echo "ERROR: " . $result->getMessage() . "\n";
|
echo "ERROR: " . $result->getMessage() . "\n";
|
||||||
|
@ -209,7 +209,7 @@ class UTF8FixerUpper
|
||||||
|
|
||||||
echo "$id...";
|
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)) {
|
if (PEAR::isError($result)) {
|
||||||
echo "ERROR: " . $result->getMessage() . "\n";
|
echo "ERROR: " . $result->getMessage() . "\n";
|
||||||
|
@ -273,7 +273,7 @@ class UTF8FixerUpper
|
||||||
|
|
||||||
echo "$id...";
|
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)) {
|
if (PEAR::isError($result)) {
|
||||||
echo "ERROR: " . $result->getMessage() . "\n";
|
echo "ERROR: " . $result->getMessage() . "\n";
|
||||||
|
@ -330,7 +330,7 @@ class UTF8FixerUpper
|
||||||
|
|
||||||
echo "$id...";
|
echo "$id...";
|
||||||
|
|
||||||
$result =& $this->dbu->execute($sth, array($content, $rendered, $id));
|
$result = $this->dbu->execute($sth, array($content, $rendered, $id));
|
||||||
|
|
||||||
if (PEAR::isError($result)) {
|
if (PEAR::isError($result)) {
|
||||||
echo "ERROR: " . $result->getMessage() . "\n";
|
echo "ERROR: " . $result->getMessage() . "\n";
|
||||||
|
|
Loading…
Reference in New Issue
Block a user