diff --git a/framework/Dispatcher.php b/framework/Dispatcher.php index 9fcbf35c0..de866d59e 100644 --- a/framework/Dispatcher.php +++ b/framework/Dispatcher.php @@ -168,6 +168,10 @@ private function URIinterpreter() { $interfacePath = 'interface/'.$pathPart.'/index.php'; break; default: + if(!empty($uri['fragment'][0])) { + $pathPart = ''; + $interfacePath = 'interface/page.php'; + } } } @@ -175,9 +179,10 @@ private function URIinterpreter() { if (empty($interfacePath)) $interfacePath = 'interface/'.(empty($pathPart) ? '' : $pathPart.'/').'index.php'; define('PATH', 'interface/'.(empty($pathPart) ? '' : $pathPart.'/')); unset($pathPart); - if (!file_exists($interfacePath)) { + if (!file_exists($interfacePath)) { header("HTTP/1.0 404 Not Found");exit; } + unset($pathPart); $uri['interfacePath'] = $this->interfacePath = $interfacePath; } $this->uri = $uri; diff --git a/framework/model/URIHandler.php b/framework/model/URIHandler.php index d8c5e2a51..adecc5424 100644 --- a/framework/model/URIHandler.php +++ b/framework/model/URIHandler.php @@ -32,7 +32,7 @@ private function __URIParser() { $url = $this->uri['fullpath']; $defaultblogid = Setting::getServiceSetting("defaultBlogId",1,true); - $this->suri = array('url' => $url, 'value' => ''); + $this->suri = array('url' => $url, 'value' => ''); $this->blogid = null; $this->uri['isStrictBlogURL'] = true; $depth = substr_count($this->context->getProperty('path'), '/'); diff --git a/interface/page.php b/interface/page.php new file mode 100644 index 000000000..8340f1b24 --- /dev/null +++ b/interface/page.php @@ -0,0 +1,34 @@ + 0)) { + if (!isset($suri['id']) || (Setting::getBlogSettingGlobal('useSloganOnPost',1) == 1)) { + list($entries, $paging) = getEntryWithPagingBySlogan($blogid, $suri['value'], true); + } else { + list($entries, $paging) = getEntryWithPaging($blogid, $suri['id'], true); + } + fireEvent('OBStart'); + require ROOT . '/interface/common/blog/begin.php'; + + if (empty($entries)) { + header('HTTP/1.1 404 Not Found'); + if (empty($skin->pageError)) { + dress('article_rep', '