Index: trunk/kernel/admin_templates/img/itemicons/icon16_orders_disabled.gif =================================================================== diff -u -N Binary files differ Index: trunk/kernel/admin_templates/img/my_orders_s.gif =================================================================== diff -u -N -r1685 -r1723 Binary files differ Index: trunk/core/kernel/application.php =================================================================== diff -u -N -r1690 -r1723 --- trunk/core/kernel/application.php (.../application.php) (revision 1690) +++ trunk/core/kernel/application.php (.../application.php) (revision 1723) @@ -16,27 +16,26 @@ class kApplication { /** + * Is true, when Init method was called already, prevents double initialization + * + * @var bool + */ + var $InitDone = false; + + /** * Holds internal TemplateParser object * @access private * @var TemplateParser */ var $Parser; - var $Profiler; - /** * Holds parser output buffer * @access private * @var string */ var $HTML; - var $DocRoot; - var $BasePath; - var $KernelPath; - var $Server; - - /** * Prevents request from beeing proceeded twice in case if application init is called mere then one time * @@ -55,8 +54,6 @@ */ var $Factory; - var $XMLFactory; // in use? - /** * Holds all phrases used * in code and template @@ -73,24 +70,6 @@ var $DB; /** - * Constucts KernelApplication - constructor is PRIVATE - * - * The constuructor of KernelApplication should NOT be called directly - * To create KernelApplication, call its Instance() method - * @see KerenelApplication::Instance - * @access private - */ - function kApplication() - { - global $doc_root, $base_path, $kernel_path, $protocol, $server; - $this->DocRoot = $doc_root; - $this->BasePath = $base_path; - $this->KernelPath = $kernel_path; - $this->Protocol = $protocol; - $this->Server = $server; - } - - /** * Returns kApplication instance anywhere in the script. * * This method should be used to get single kApplication object instance anywhere in the @@ -115,7 +94,8 @@ { static $instance = false; - if (!$instance) { + if(!$instance) + { if (!defined('APPLICATION_CLASS')) define('APPLICATION_CLASS', 'kApplication'); $class = APPLICATION_CLASS; $instance = new $class(); @@ -126,15 +106,16 @@ /** * Initializes the Application * - * Creates Utilites instance, HTTPQuery, Session, Profiler, TemplatesCache, Parser * @access public * @see HTTPQuery * @see Session * @see TemplatesCache - * @return void + * @return bool Was Init actually made now or before */ function Init() { + if($this->InitDone) return false; + if (defined('DEBUG_MODE') && DEBUG_MODE && dbg_ConstOn('DBG_PROFILE_MEMORY') ) { global $debugger; $debugger->appendMemoryUsage('Application before Init:'); @@ -156,7 +137,7 @@ $config_reader =& $this->recallObject('kUnitConfigReader'); if( !$this->GetVar('m_lang') ) $this->SetVar('m_lang', $this->GetDefaultLanguageId() ); - if( !$this->GetVar('m_theme') ) $this->SetVar('m_theme', $this->GetDefaultThemeId()); + if( !$this->GetVar('m_theme') ) $this->SetVar('m_theme', $this->GetDefaultThemeId() ); $this->Phrases = new PhrasesCache( $this->GetVar('m_lang') ); $this->SetVar('lang.current_id', $this->GetVar('m_lang') ); @@ -179,6 +160,9 @@ global $debugger; $debugger->profileFinish('kernel4_startup'); } + + $this->InitDone = true; + return true; } function GetDefaultLanguageId() @@ -286,11 +270,6 @@ function SetDefaultConstants() { if (!defined('SERVER_NAME')) define('SERVER_NAME', $_SERVER['HTTP_HOST']); - if (!defined('LOGIN_CONTROLLER')) define('LOGIN_CONTROLLER', 'LoginController'); - if (!defined('XML_FACTORY')) define('XML_FACTORY', 'XMLFactory'); - if (!defined('ADMINS_LIST')) define('ADMINS_LIST', '/users/users.php'); - if (!defined('USER_MODEL')) define('USER_MODEL', 'Users'); - if (!defined('DEFAULT_LANGUAGE_ID')) define('DEFAULT_LANGUAGE_ID', 1); $admin_dir = $this->ConfigValue('AdminDirectory'); if(!$admin_dir) $admin_dir = 'admin'; Index: trunk/kernel/admin_templates/img/itemicons/icon16_orders.gif =================================================================== diff -u -N Binary files differ Index: trunk/kernel/admin/include/summary/root.php =================================================================== diff -u -N -r1715 -r1723 --- trunk/kernel/admin/include/summary/root.php (.../root.php) (revision 1715) +++ trunk/kernel/admin/include/summary/root.php (.../root.php) (revision 1723) @@ -148,12 +148,13 @@ } else { - $pending_count = $GLOBALS[ $params['list_var_name'] ]->CountPending(); + $pending_count = $GLOBALS[ $params['list_var_name'] ]->CountPending(); + $params['link'] = 'javascript:'.$params['link']; } $o = ''."\n"; $o .= ''."\n"; - $o .= ''."\n"; + $o .= ''."\n"; $o .= ''."\n"; $o .= admin_language($params['phrase']); $o .= ' ('.$pending_count.')'."\n"; Index: trunk/kernel/admin_templates/img/itemicons/icon16_orders_pending.gif =================================================================== diff -u -N Binary files differ Index: trunk/admin/subitems.php =================================================================== diff -u -N -r1715 -r1723 --- trunk/admin/subitems.php (.../subitems.php) (revision 1715) +++ trunk/admin/subitems.php (.../subitems.php) (revision 1723) @@ -1,6 +1,7 @@