We are no longer offering accounts on this server. Consider https://gitlab.freedesktop.org/ as a place to host projects.

Commit fa91bc71 authored by mattl's avatar mattl

Some getStaticProperty calls to PEAR globalized

parent fd0a16ba
...@@ -68,6 +68,8 @@ class IMChannel extends Channel ...@@ -68,6 +68,8 @@ class IMChannel extends Channel
function setNotify($user, $notify) function setNotify($user, $notify)
{ {
global $_PEAR;
$user_im_prefs = new User_im_prefs(); $user_im_prefs = new User_im_prefs();
$user_im_prefs->transport = $this->imPlugin->transport; $user_im_prefs->transport = $this->imPlugin->transport;
$user_im_prefs->user_id = $user->id; $user_im_prefs->user_id = $user->id;
...@@ -81,7 +83,7 @@ class IMChannel extends Channel ...@@ -81,7 +83,7 @@ class IMChannel extends Channel
$result = $user_im_prefs->update($original); $result = $user_im_prefs->update($original);
if (!$result) { if (!$result) {
$last_error = &PEAR::getStaticProperty('DB_DataObject','lastError'); $last_error = &$_PEAR->getStaticProperty('DB_DataObject','lastError');
common_log(LOG_ERR, common_log(LOG_ERR,
'Could not set notify flag to ' . $notify . 'Could not set notify flag to ' . $notify .
' for user ' . common_log_objstring($user) . ' for user ' . common_log_objstring($user) .
......
...@@ -1678,8 +1678,10 @@ function common_debug($msg, $filename=null) ...@@ -1678,8 +1678,10 @@ function common_debug($msg, $filename=null)
function common_log_db_error(&$object, $verb, $filename=null) function common_log_db_error(&$object, $verb, $filename=null)
{ {
global $_PEAR;
$objstr = common_log_objstring($object); $objstr = common_log_objstring($object);
$last_error = &PEAR::getStaticProperty('DB_DataObject','lastError'); $last_error = &$_PEAR->getStaticProperty('DB_DataObject','lastError');
if (is_object($last_error)) { if (is_object($last_error)) {
$msg = $last_error->message; $msg = $last_error->message;
} else { } else {
......
...@@ -85,6 +85,8 @@ class OpenidtrustAction extends Action ...@@ -85,6 +85,8 @@ class OpenidtrustAction extends Action
function handleSubmit() function handleSubmit()
{ {
global $_PEAR;
unset($_SESSION['openid_trust_root']); unset($_SESSION['openid_trust_root']);
unset($_SESSION['openid_allow_url']); unset($_SESSION['openid_allow_url']);
unset($_SESSION['openid_deny_url']); unset($_SESSION['openid_deny_url']);
...@@ -96,7 +98,7 @@ class OpenidtrustAction extends Action ...@@ -96,7 +98,7 @@ class OpenidtrustAction extends Action
$user_openid_trustroot->trustroot = $this->trust_root; $user_openid_trustroot->trustroot = $this->trust_root;
$user_openid_trustroot->created = common_sql_now(); $user_openid_trustroot->created = common_sql_now();
if (!$user_openid_trustroot->insert()) { if (!$user_openid_trustroot->insert()) {
$err = PEAR::getStaticProperty('DB_DataObject','lastError'); $err = &$_PEAR->getStaticProperty('DB_DataObject','lastError');
} }
common_redirect($this->allowUrl, $code=302); common_redirect($this->allowUrl, $code=302);
}else{ }else{
......
...@@ -85,6 +85,8 @@ function oid_get_last() ...@@ -85,6 +85,8 @@ function oid_get_last()
function oid_link_user($id, $canonical, $display) function oid_link_user($id, $canonical, $display)
{ {
global $_PEAR;
$oid = new User_openid(); $oid = new User_openid();
$oid->user_id = $id; $oid->user_id = $id;
$oid->canonical = $canonical; $oid->canonical = $canonical;
...@@ -92,7 +94,7 @@ function oid_link_user($id, $canonical, $display) ...@@ -92,7 +94,7 @@ function oid_link_user($id, $canonical, $display)
$oid->created = common_sql_now(); $oid->created = common_sql_now();
if (!$oid->insert()) { if (!$oid->insert()) {
$err = PEAR::getStaticProperty('DB_DataObject','lastError'); $err = &$_PEAR->getStaticProperty('DB_DataObject','lastError');
return false; return false;
} }
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment