serveArchives(); } else if (preg_match(PAT_PERMALINK, $uri, $matches) || preg_match(PAT_COMMENTSUB, $uri, $matches) || isset($serendipity['GET']['id']) || isset($_GET['p'])) { $routing->serveEntry($matches); } elseif (preg_match(PAT_PERMALINK_FEEDCATEGORIES, $uri, $matches) || preg_match(PAT_PERMALINK_FEEDAUTHORS, $uri, $matches) || preg_match(PAT_FEEDS, $uri)) { $routing->serveFeed($matches); exit; } else if (preg_match(PAT_PLUGIN, $uri, $matches)) { $routing->servePlugin($matches); exit; } else if (preg_match(PAT_ADMIN, $uri)) { $routing->gotoAdmin(); exit; } else if (preg_match(PAT_ARCHIVE, $uri)) { $routing->serveArchive(); } else if ((isset($serendipity['POST']['isMultiCat']) && is_array($serendipity['POST']['multiCat'])) || preg_match(PAT_PERMALINK_CATEGORIES, $uri, $matches)) { $routing->serveCategory($matches); } else if (preg_match(PAT_PERMALINK_AUTHORS, $uri, $matches)) { $routing->serveAuthorPage($matches); } else if (preg_match(PAT_SEARCH, $uri, $matches)) { $routing->serveSearch(); } elseif (preg_match(PAT_CSS, $uri, $matches)) { $routing->serveCSS($matches[1]); exit; } elseif (preg_match(PAT_JS, $uri, $matches)) { $routing->serveJS($matches[1]); exit; } else if (preg_match(PAT_COMMENTS, $uri, $matches)) { $routing->serveComments(); } else if (preg_match('@/(index(\.php|\.html)?)|'. preg_quote($serendipity['indexFile']) .'@', $uri) || preg_match('@^/' . preg_quote(trim($serendipity['serendipityHTTPPath'], '/')) . '/?(\?.*)?$@', $uri)) { $routing->serveIndex(); } else { $routing->serve404(); } if (empty($serendipity['smarty_file'])) { $serendipity['smarty_file'] = '404.tpl'; $serendipity['viewtype'] = '404_5'; } serendipity_gzCompression(); if ($serendipity['smarty']->getTemplateVars('raw_data') == null) { $serendipity['smarty']->assign( array( 'raw_data' => '' ) ); } $serendipity['smarty']->display(serendipity_getTemplateFile($serendipity['smarty_file'], 'serendipityPath')); /* vim: set sts=4 ts=4 expandtab : */