function setNotify($user, $notify)
{
+ global $_PEAR;
+
$user_im_prefs = new User_im_prefs();
$user_im_prefs->transport = $this->imPlugin->transport;
$user_im_prefs->user_id = $user->id;
$result = $user_im_prefs->update($original);
if (!$result) {
- $last_error = &PEAR::getStaticProperty('DB_DataObject','lastError');
+ $last_error = &$_PEAR->getStaticProperty('DB_DataObject','lastError');
common_log(LOG_ERR,
'Could not set notify flag to ' . $notify .
' for user ' . common_log_objstring($user) .
function common_log_db_error(&$object, $verb, $filename=null)
{
+ global $_PEAR;
+
$objstr = common_log_objstring($object);
- $last_error = &PEAR::getStaticProperty('DB_DataObject','lastError');
+ $last_error = &$_PEAR->getStaticProperty('DB_DataObject','lastError');
if (is_object($last_error)) {
$msg = $last_error->message;
} else {
function handleSubmit()
{
+ global $_PEAR;
+
unset($_SESSION['openid_trust_root']);
unset($_SESSION['openid_allow_url']);
unset($_SESSION['openid_deny_url']);
$user_openid_trustroot->trustroot = $this->trust_root;
$user_openid_trustroot->created = common_sql_now();
if (!$user_openid_trustroot->insert()) {
- $err = PEAR::getStaticProperty('DB_DataObject','lastError');
+ $err = &$_PEAR->getStaticProperty('DB_DataObject','lastError');
}
common_redirect($this->allowUrl, $code=302);
}else{
function oid_link_user($id, $canonical, $display)
{
+ global $_PEAR;
+
$oid = new User_openid();
$oid->user_id = $id;
$oid->canonical = $canonical;
$oid->created = common_sql_now();
if (!$oid->insert()) {
- $err = PEAR::getStaticProperty('DB_DataObject','lastError');
+ $err = &$_PEAR->getStaticProperty('DB_DataObject','lastError');
return false;
}