Index: trunk/core/kernel/application.php =================================================================== diff -u -r4771 -r4782 --- trunk/core/kernel/application.php (.../application.php) (revision 4771) +++ trunk/core/kernel/application.php (.../application.php) (revision 4782) @@ -174,41 +174,6 @@ } /** - * Returns module information. Searches module by requested field - * - * @param string $field - * @param mixed $value - * @param string field value to returns, if not specified, then return all fields - * @param string field to return - * @param string field case-insensitive compare - * @return Array - */ - function findModule($field, $value, $return_field = null, $ci=false) - { - $found = false; - foreach ($this->ModuleInfo as $module_name => $module_info) { - if ($ci) { - if (strtolower($module_info[$field]) == strtolower($value)) { - $found = true; - break; - } - } - else { - if ($module_info[$field] == $value) { - $found = true; - break; - } - } - } - - if ($found) { - return isset($return_field) ? $module_info[$return_field] : $module_info; - } - - return false; - } - - /** * Initializes the Application * * @access public @@ -264,7 +229,7 @@ $this->Session =& $this->recallObject('Session'); $this->HttpQuery->AfterInit(); - + $this->UnitConfigReader->AfterConfigRead(); $this->LoadCache(); @@ -305,6 +270,41 @@ return true; } + /** + * Returns module information. Searches module by requested field + * + * @param string $field + * @param mixed $value + * @param string field value to returns, if not specified, then return all fields + * @param string field to return + * @param string field case-insensitive compare + * @return Array + */ + function findModule($field, $value, $return_field = null, $ci=false) + { + $found = false; + foreach ($this->ModuleInfo as $module_name => $module_info) { + if ($ci) { + if (strtolower($module_info[$field]) == strtolower($value)) { + $found = true; + break; + } + } + else { + if ($module_info[$field] == $value) { + $found = true; + break; + } + } + } + + if ($found) { + return isset($return_field) ? $module_info[$return_field] : $module_info; + } + + return false; + } + function refreshModuleInfo() { $modules_helper =& $this->recallObject('ModulesHelper'); @@ -339,7 +339,7 @@ $this->SetVar('m_lang', $language_id ); $lang =& $this->recallObject('lang.current'); if ( !$lang->IsLoaded() || (!$this->Application->IsAdmin() && !$lang->GetDBField('Enabled')) ) { - die ('Unknown or disabled language'); + if (!defined('IS_INSTALL')) die ('Unknown or disabled language'); } } @@ -362,7 +362,7 @@ $this->SetVar('theme.current_id', $theme_id ); // KOSTJA: this is to fool theme' getPassedId $theme =& $this->recallObject('theme.current'); if (!$theme->IsLoaded() || !$theme->GetDBField('Enabled')) { - die('Unknown or disabled theme'); + if (!defined('IS_INSTALL')) die('Unknown or disabled theme'); } } @@ -1823,7 +1823,7 @@ { if ( isset($this->Debugger) ) { - $errorLevel = constOn('DBG_SQL_FAILURE') ? E_USER_ERROR : E_USER_WARNING; + $errorLevel = constOn('DBG_SQL_FAILURE') && !defined('IS_INSTALL') ? E_USER_ERROR : E_USER_WARNING; $this->Debugger->dumpVars($_REQUEST); $this->Debugger->appendTrace();