Index: trunk/core/kernel/application.php =================================================================== diff -u -r3220 -r3229 --- trunk/core/kernel/application.php (.../application.php) (revision 3220) +++ trunk/core/kernel/application.php (.../application.php) (revision 3229) @@ -58,6 +58,7 @@ * All ConfigurationValues table content (hash) here * * @var Array + * @access private */ var $ConfigHash = Array(); Index: trunk/core/kernel/utility/http_query.php =================================================================== diff -u -r3220 -r3229 --- trunk/core/kernel/utility/http_query.php (.../http_query.php) (revision 3220) +++ trunk/core/kernel/utility/http_query.php (.../http_query.php) (revision 3229) @@ -438,6 +438,27 @@ }while (!$template_found && $template_parts); } + + // guess template if no existing template found + if(!$template_found && $module_folder) + { + // 1. try index template of module + $sql = 'SELECT FileId FROM '.TABLE_PREFIX.'ThemeFiles WHERE CONCAT(FilePath, "/", FileName) = '.$this->Conn->qstr('/'.$module_folder.'/index.tpl'); + $template_found = $this->Conn->GetOne($sql); + if($template_found) + { + $template_path = $module_folder.'/index'; + } + else + { + // 2. return error template then + $template_found = true; + $template_path = $this->Application->ConfigValue('ErrorTemplate'); + if(!$template_path) $template_path = 'error_template'; + } + } + + $this->Set('t', $this->getDefaultTemplate($template_found ? $template_path : '') ); // pass params left to module Index: trunk/admin/install/upgrades/inportal_upgrade_v1.1.4.sql =================================================================== diff -u -r3195 -r3229 --- trunk/admin/install/upgrades/inportal_upgrade_v1.1.4.sql (.../inportal_upgrade_v1.1.4.sql) (revision 3195) +++ trunk/admin/install/upgrades/inportal_upgrade_v1.1.4.sql (.../inportal_upgrade_v1.1.4.sql) (revision 3229) @@ -1,12 +1,16 @@ -INSERT INTO ConfigurationAdmin VALUES ('SessionReferrerCheck', 'la_Text_Website', 'la_promt_ReferrerCheck', 'checkbox', NULL , NULL , '9', '1'); INSERT INTO ConfigurationValues VALUES ('SessionReferrerCheck', '1', 'In-Portal', 'in-portal:configure_general'); - INSERT INTO ConfigurationValues VALUES ('SessionCookieName', 'sid', 'In-Portal', 'in-portal:configure_general'); INSERT INTO ConfigurationValues VALUES ('UseModRewrite', '0', 'In-Portal', 'in-portal:configure_general'); +INSERT INTO ConfigurationValues VALUES ('ErrorTemplate', 'error_template', 'In-Portal', 'in-portal:configure_general'); +INSERT INTO ConfigurationAdmin VALUES ('SessionReferrerCheck', 'la_Text_Website', 'la_promt_ReferrerCheck', 'checkbox', NULL , NULL , '9', '1'); INSERT INTO ConfigurationAdmin VALUES ('SessionCookieName', 'la_Text_Website', 'la_prompt_session_cookie_name', 'text', '', '', 8, 1); INSERT INTO ConfigurationAdmin VALUES ('UseModRewrite', 'la_Text_Website', 'la_config_use_modrewrite', 'checkbox', '', '', 14, 1); +INSERT INTO ConfigurationAdmin VALUES ('ErrorTemplate', 'la_Text_Website', 'la_config_error_template', 'text', '', '', 15, 0); + + + ALTER TABLE Category ADD Filename varchar(255) NOT NULL AFTER Name; ALTER TABLE Category ADD AutomaticFilename TINYINT UNSIGNED NOT NULL AFTER Filename ; ALTER TABLE Category ADD NamedParentPath TEXT NOT NULL AFTER ParentPath; Index: trunk/admin/install/inportal_data.sql =================================================================== diff -u -r3148 -r3229 --- trunk/admin/install/inportal_data.sql (.../inportal_data.sql) (revision 3148) +++ trunk/admin/install/inportal_data.sql (.../inportal_data.sql) (revision 3229) @@ -49,6 +49,7 @@ INSERT INTO ConfigurationAdmin VALUES ('SessionCookieName', 'la_Text_Website', 'la_prompt_session_cookie_name', 'text', '', '', 8, 1); INSERT INTO ConfigurationAdmin VALUES ('UseModRewrite', 'la_Text_Website', 'la_config_use_modrewrite', 'checkbox', '', '', 14, 1); INSERT INTO ConfigurationAdmin VALUES ('SessionReferrerCheck', 'la_Text_Website', 'la_promt_ReferrerCheck', 'checkbox', NULL , NULL , '9', '1'); +INSERT INTO ConfigurationAdmin VALUES ('ErrorTemplate', 'la_Text_Website', 'la_config_error_template', 'text', '', '', 15, 0); INSERT INTO ConfigurationValues VALUES ('Columns_Category', '2', 'In-Portal', 'Categories') INSERT INTO ConfigurationValues VALUES ('DomainSelect','1','In-Portal','in-portal:configure_general') @@ -173,6 +174,7 @@ INSERT INTO ConfigurationValues VALUES ('SessionCookieName', 'sid', 'In-Portal', 'in-portal:configure_general'); INSERT INTO ConfigurationValues VALUES ('UseModRewrite', '0', 'In-Portal', 'in-portal:configure_general'); INSERT INTO ConfigurationValues VALUES ('SessionReferrerCheck', '1', 'In-Portal', 'in-portal:configure_general'); +INSERT INTO ConfigurationValues VALUES ('ErrorTemplate', 'error_template', 'In-Portal', 'in-portal:configure_general'); INSERT INTO Events VALUES (30, 'USER.ADD', 1, 0, 'In-Portal:Users', 'la_event_user.add', 0) INSERT INTO Events VALUES (32, 'USER.ADD', 2, 0, 'In-Portal:Users', 'la_event_user.add', 1)