diff --git a/phpgwapi/inc/class.egw.inc.php b/phpgwapi/inc/class.egw.inc.php
index 0f463e87e0..42d0dd7119 100644
--- a/phpgwapi/inc/class.egw.inc.php
+++ b/phpgwapi/inc/class.egw.inc.php
@@ -1,7 +1,7 @@
db->select('phpgw_config','COUNT(config_name)',false,__LINE__,__FILE__)->fetchSingle())
{
- throw new Exception('
Fatal Error: You need to update eGroupWare before you can continue using it.',999);
}
else
@@ -150,7 +150,7 @@ class egw extends egw_minimal
{
$this->verify_session();
$this->applications->read_installed_apps(); // to get translated app-titles, has to be after verify_session
-
+
$this->define_egw_constants();
$this->check_app_rights();
@@ -173,7 +173,7 @@ class egw extends egw_minimal
$GLOBALS['egw'] =& $this; // we need to be immediately available there for the other classes we instantiate
// for the migration: reference us to the old phpgw object
$GLOBALS['phpgw'] =& $this;
-
+
if ($GLOBALS['egw_info']['server']['system_charset'])
{
$this->db->Link_ID->SetCharSet($GLOBALS['egw_info']['server']['system_charset']);
@@ -357,7 +357,7 @@ class egw extends egw_minimal
* Needs to be called if user-preferences, system-config or enabled apps of the current user have been changed and
* the change should have immediate effect
*/
- function invalidate_session_cache()
+ static function invalidate_session_cache()
{
unset($_SESSION['egw_info_cache']);
unset($_SESSION['egw_object_cache']);
@@ -369,7 +369,7 @@ class egw extends egw_minimal
* @param string $s
* @return string The string with html special characters replaced with entities
*/
- function strip_html($s)
+ static function strip_html($s)
{
return htmlspecialchars(stripslashes($s));
}
@@ -381,9 +381,9 @@ class egw extends egw_minimal
* @param string/array $extravars Extra params to be passed to the url
* @return string The full url after processing
*/
- function link($url = '', $extravars = '')
+ static function link($url = '', $extravars = '')
{
- return $this->session->link($url, $extravars);
+ return $GLOBALS['egw']->session->link($url, $extravars);
}
/**
@@ -393,9 +393,9 @@ class egw extends egw_minimal
* @param string/array $extravars Extra params to be passed to the url
* @return string The full url after processing
*/
- function redirect_link($url = '',$extravars='')
+ static function redirect_link($url = '',$extravars='')
{
- $this->redirect($this->session->link($url, $extravars));
+ self::redirect($GLOBALS['egw']->session->link($url, $extravars));
}
/**
@@ -405,7 +405,7 @@ class egw extends egw_minimal
*
* @param string The url ro redirect to
*/
- function redirect($url = '')
+ static function redirect($url = '')
{
/* global $HTTP_ENV_VARS; */
@@ -449,7 +449,7 @@ class egw extends egw_minimal
}
return $this->translation->translate($key,$args);
}
-
+
/**
* eGW's shutdown handler
*/
@@ -492,7 +492,7 @@ class egw_minimal
{
/**
* Instance of the db-object
- *
+ *
* @var egw_db
*/
var $db;
@@ -535,7 +535,7 @@ class egw_minimal
//error_log(__METHOD__."($name)");
return isset($this->$name);
}
-
+
/**
* Magic function to return a sub-object
*
@@ -545,12 +545,12 @@ class egw_minimal
function __get($name)
{
//error_log(__METHOD__."($name)".function_backtrace());
-
+
if (isset($this->$name))
{
return $this->$name;
}
-
+
if (!isset(self::$sub_objects[$name]) && !class_exists($name))
{
error_log(__METHOD__.": There's NO $name object! ".function_backtrace());