diff --git a/phpgwapi/inc/class.auth.inc.php b/phpgwapi/inc/class.auth.inc.php index 85e6a3baac..2c2eabff13 100644 --- a/phpgwapi/inc/class.auth.inc.php +++ b/phpgwapi/inc/class.auth.inc.php @@ -49,7 +49,7 @@ class auth $this->backend = new $backend_class; - if (!is_a($this->backend,'auth_backend')) + if (!($this->backend instanceof auth_backend)) { throw new egw_exception_assertion_failed("Auth backend class $backend_class is NO auth_backend!"); } diff --git a/phpgwapi/inc/class.egw_db.inc.php b/phpgwapi/inc/class.egw_db.inc.php index e1af0764b3..733835dd7c 100644 --- a/phpgwapi/inc/class.egw_db.inc.php +++ b/phpgwapi/inc/class.egw_db.inc.php @@ -1417,9 +1417,9 @@ class egw_db { case 'int': // if DateTime object given, convert it to a unix timestamp (NOT converting the timezone!) - if (is_object($value) && is_a($value,'DateTime')) + if (is_object($value) && ($value instanceof DateTime)) { - return is_a($value,'egw_time') ? $value->format('ts') : egw_time::to($value,'ts'); + return ($value instanceof egw_time) ? $value->format('ts') : egw_time::to($value,'ts'); } case 'auto': // atm. (php5.2) php has only 32bit integers, it converts everything else to float. @@ -1453,14 +1453,14 @@ class egw_db break; // handled like strings case 'date': // if DateTime object given, convert it (NOT converting the timezone!) - if (is_object($value) && is_a($value,'DateTime')) + if (is_object($value) && ($value instanceof DateTime)) { return $this->Link_ID->qstr($value->format('Y-m-d')); } return $this->Link_ID->DBDate($value); case 'timestamp': // if DateTime object given, convert it (NOT converting the timezone!) - if (is_object($value) && is_a($value,'DateTime')) + if (is_object($value) && ($value instanceof DateTime)) { return $this->Link_ID->qstr($value->format('Y-m-d H:i:s')); } diff --git a/phpgwapi/inc/class.egw_time.inc.php b/phpgwapi/inc/class.egw_time.inc.php index ef0897f5a7..dd404a0ff8 100644 --- a/phpgwapi/inc/class.egw_time.inc.php +++ b/phpgwapi/inc/class.egw_time.inc.php @@ -149,7 +149,7 @@ class egw_time extends DateTime break; case 'object': - if (is_a($time,'DateTime')) + if ($time instanceof DateTime) { parent::__construct($time->format('Y-m-d H:i:s'),$time->getTimezone()); $this->setTimezone($tz); @@ -269,7 +269,8 @@ class egw_time extends DateTime */ public static function server2user($time,$type=null) { - if (!is_a($time,$typeof='egw_time')) + $typeof='egw_time'; + if (!($time instanceof egw_time)) { try { @@ -297,7 +298,8 @@ class egw_time extends DateTime */ public static function user2server($time,$type=null) { - if (!is_a($time,$typeof='egw_time')) + $typeof='egw_time'; + if (!($time instanceof egw_time)) { try { @@ -327,7 +329,7 @@ class egw_time extends DateTime */ public static function to($time='now',$type='') { - if (!is_a($time,'egw_time')) + if (!($time instanceof egw_time)) { try { @@ -390,7 +392,7 @@ class egw_time extends DateTime */ public static function tz_offset_s($time='now') { - if (!is_a($time,'DateTime')) $time = new egw_time($time); + if (!($time instanceof DateTime)) $time = new egw_time($time); return egw_time::$user_timezone->getOffset($time) - egw_time::$server_timezone->getOffset($time); } diff --git a/phpgwapi/inc/class.ldap.inc.php b/phpgwapi/inc/class.ldap.inc.php index 52a575a4b5..f49455ef4b 100644 --- a/phpgwapi/inc/class.ldap.inc.php +++ b/phpgwapi/inc/class.ldap.inc.php @@ -51,7 +51,7 @@ class ldap */ function getLDAPServerInfo($_host) { - if(is_a($this->ldapServerInfo[$_host], 'ldapserverinfo')) + if($this->ldapServerInfo[$_host] instanceof ldapserverinfo) { return $this->ldapServerInfo[$_host]; } diff --git a/phpgwapi/inc/class.preferences.inc.php b/phpgwapi/inc/class.preferences.inc.php index 221def3952..070521001e 100644 --- a/phpgwapi/inc/class.preferences.inc.php +++ b/phpgwapi/inc/class.preferences.inc.php @@ -312,6 +312,7 @@ class preferences $this->forced[$app] = $value; break; case self::DEFAULT_ID: + //if ($app=='common') error_log(__METHOD__.__LINE__.array2string($value)); $this->default[$app] = $value; break; case $this->account_id: // user @@ -354,6 +355,7 @@ class preferences { if (!isset($this->data[$app][$var]) || $this->data[$app][$var] === '') { + //if ($var=='remote_application_url') error_log(__METHOD__.__LINE__.' default for '.$var.' with '.$value); $this->data[$app][$var] = $value; } } @@ -384,6 +386,10 @@ class preferences echo 'group
';    print_r($this->group); echo "
\n"; echo 'effectiv
'; print_r($this->data); echo "
\n"; } +//error_log(__METHOD__.__LINE__.'->user: remote_application_url:'.array2string($this->user['common']['remote_application_url'])); +//error_log(__METHOD__.__LINE__.'->default: remote_application_url:'.array2string($this->default['common']['remote_application_url'])); +//error_log(__METHOD__.__LINE__.'->forced: remote_application_url:'.array2string($this->forced['common']['remote_application_url'])); +//error_log(__METHOD__.__LINE__.'->effective: remote_application_url:'.array2string($this->data['common']['remote_application_url'])); $this->check_set_tz_offset(); return $this->data; @@ -405,7 +411,7 @@ class preferences //echo "

".__METHOD__."() tz=$prefs[tz] --> tz_offset={$GLOBALS['egw_info']['user']['preferences']['common']['tz_offset']}

\n"; // ToDo: get rid of that - if (isset($GLOBALS['egw']) && is_a($GLOBALS['egw'],'egw')) + if (isset($GLOBALS['egw']) && ($GLOBALS['egw'] instanceof egw)) { $GLOBALS['egw']->unset_datetime(); // to force an update } diff --git a/phpgwapi/inc/functions.inc.php b/phpgwapi/inc/functions.inc.php index 506590aa17..f24adc0c1e 100644 --- a/phpgwapi/inc/functions.inc.php +++ b/phpgwapi/inc/functions.inc.php @@ -78,7 +78,7 @@ if (egw_session::init_handler()) } $GLOBALS['egw'] = unserialize($_SESSION[egw_session::EGW_OBJECT_CACHE]); - if (is_object($GLOBALS['egw']) && is_a($GLOBALS['egw'], 'egw')) // only egw object has wakeup2, setups egw_minimal eg. has not! + if (is_object($GLOBALS['egw']) && ($GLOBALS['egw'] instanceof egw)) // only egw object has wakeup2, setups egw_minimal eg. has not! { $GLOBALS['egw']->wakeup2(); // adapt the restored egw-object/enviroment to this request (eg. changed current app)