Index: trunk/core/kernel/utility/http_query.php =================================================================== diff -u -N -r4637 -r4645 --- trunk/core/kernel/utility/http_query.php (.../http_query.php) (revision 4637) +++ trunk/core/kernel/utility/http_query.php (.../http_query.php) (revision 4645) @@ -158,7 +158,7 @@ } } - if ($this->Application->RewriteURLs()) { + if ($this->Application->RewriteURLs() || $this->Get('_mod_rw_url_')) { if( $this->Application->isDebugMode() ) { $this->Application->Debugger->profileStart('url_parsing'); @@ -535,6 +535,13 @@ } }while (!$template_found && $template_parts); + + if (!$template_found && $this->Application->GetVar('admin')) { + // used when admin is clicking on non-existing in-cms page + $template_found = true; + $template_path = implode('/', $url_parts); + } + } } @@ -789,8 +796,15 @@ $admin_mark = $this->Application->IsAdmin() ? 'ADMIN' : 'FRONT'; $data = '['.date('D M d H:i:s Y').'] '.$admin_mark.'; ip: '.$_SERVER['REMOTE_ADDR'].'; user_id: '.$user_id.'; sid: '.$this->Application->GetSID().'; request: '."\n"; - $data .= "_GET:\n".print_r($this->Get, true)."_POST:\n".print_r($this->Post, true)."_COOKIE:\n".print_r($this->Cookie, true)."\n".str_repeat('=', 100)."\n"; + if ($this->Get) { + $data .= "_GET:\n".print_r($this->Get, true); + } + if ($this->Post) { + $data .= "_POST:\n".print_r($this->Post, true); + } + $data .= str_repeat('=', 100)."\n"; + fwrite($fp, $data); fclose($fp); }