Index: branches/unlabeled/unlabeled-1.5.2/kernel/units/general/helpers/mod_rewrite_helper.php =================================================================== diff -u -r6134 -r6239 --- branches/unlabeled/unlabeled-1.5.2/kernel/units/general/helpers/mod_rewrite_helper.php (.../mod_rewrite_helper.php) (revision 6134) +++ branches/unlabeled/unlabeled-1.5.2/kernel/units/general/helpers/mod_rewrite_helper.php (.../mod_rewrite_helper.php) (revision 6239) @@ -279,7 +279,7 @@ */ function ProcessVirtualTemplate(&$url_parts, &$vars) { - if (!isset($url_parts[0]) || !$this->Application->isModuleEnabled('In-CMS')) return false; + if (!isset($url_parts[0]) || !$this->Application->isModuleEnabled('In-Edit')) return false; $template_path = implode('/', $url_parts); $sql = 'SELECT p.PageId, ci.CategoryId FROM '.TABLE_PREFIX.'Pages AS p @@ -380,8 +380,6 @@ $this->ProcessCategory($url_parts, $vars); - - if ( $this->ProcessModuleIndex($url_parts, $vars) ) { foreach ($this->Application->ModuleInfo as $module_name => $info) { $passed[] = $info['Var']; @@ -428,6 +426,16 @@ return $vars; } + if ( $this->isModuleEnabled('In-Edit') && $this->Application->GetVar('admin') == 1) { + $adm_ses =& $this->Application->recallObject('Session.admin'); + $user = $admin_ses->RecallVar('user_id'); + $perm_helper =& $this->Application->recallObject('PermissionsHelper'); + if ($perm_helper->CheckUserPermission($user, 'PAGE.ADD', 0)) { + $vars['t'] = implode('/', $url_parts); + return $vars; + } + } + $not_found = $this->Application->ConfigValue('ErrorTemplate'); $vars['t'] = $not_found ? $not_found : 'error_notfound';