Index: branches/unlabeled/unlabeled-1.170.2/core/kernel/application.php =================================================================== diff -u -r7837 -r7874 --- branches/unlabeled/unlabeled-1.170.2/core/kernel/application.php (.../application.php) (revision 7837) +++ branches/unlabeled/unlabeled-1.170.2/core/kernel/application.php (.../application.php) (revision 7874) @@ -320,11 +320,6 @@ function refreshModuleInfo() { - if (defined('IS_INSTALL') && IS_INSTALL && !$this->TableFound('Modules')) { - $this->registerModuleConstants(); - return false; - } - $modules_helper =& $this->recallObject('ModulesHelper'); $sql = 'SELECT * FROM '.TABLE_PREFIX.'Modules @@ -1589,13 +1584,11 @@ } ob_end_flush(); - // session expiration is called from session initialization, // that's why $this->Session may be not defined here - $session =& $this->Application->recallObject('Session'); - /* @var $session Session */ - - $session->SaveData(); + if (is_object($this->Session)) { + $this->Session->SaveData(); + } exit; } @@ -1728,10 +1721,6 @@ $res = isset($this->ConfigHash[$name]) ? $this->ConfigHash[$name] : false; if ($res !== false) return $res; - if (defined('IS_INSTALL') && IS_INSTALL && !$this->TableFound('ConfigurationValues')) { - return false; - } - $res = $this->Conn->GetRow('SELECT VariableId, VariableValue FROM '.TABLE_PREFIX.'ConfigurationValues WHERE VariableName = '.$this->Conn->qstr($name)); if ($res) { $this->ConfigHash[$name] = $res['VariableValue']; @@ -2074,6 +2063,7 @@ if ( isset($this->Debugger) ) { $errorLevel = constOn('DBG_SQL_FAILURE') && !defined('IS_INSTALL') ? E_USER_ERROR : E_USER_WARNING; + $this->Debugger->dumpVars($_REQUEST); $this->Debugger->appendTrace(); $error_msg = ''.$msg.' ('.$code.')
SQL: '.$this->Debugger->formatSQL($sql); @@ -2241,14 +2231,16 @@ return $event; } - /** - * Allows to check if user in this session is logged in or not - * - * @return bool - */ + function LoggedIn() { - return $this->Session->LoggedIn(); + $user_id = $this->Application->RecallVar('user_id'); + + $ret = $user_id > 0; + if ($this->IsAdmin() && ($user_id == -1)) { + $ret = true; + } + return $ret; } /** @@ -2446,27 +2438,6 @@ return $is_spider; } - - /** - * Allows to detect table's presense in database - * - * @param string $table_name - * @return bool - */ - function TableFound($table_name) - { - static $table_found = Array(); - - if (!preg_match('/^'.preg_quote(TABLE_PREFIX, '/').'(.*)/', $table_name)) { - $table_name = TABLE_PREFIX.$table_name; - } - - if (!isset($table_found[$table_name])) { - $table_found[$table_name] = $this->Conn->Query('SHOW TABLES LIKE "'.$table_name.'"'); - } - - return $table_found[$table_name]; - } } ?> \ No newline at end of file