From 34926b37dfd534015717c6930907eea1eab79d89 Mon Sep 17 00:00:00 2001 From: real_nowhereman Date: Sun, 15 Feb 2009 11:18:44 +0000 Subject: [PATCH] reverting unwanted changes --- comments.php | 4 +-- index.php | 82 ++-------------------------------------------------- 2 files changed, 4 insertions(+), 82 deletions(-) diff --git a/comments.php b/comments.php index 010c301..0570ac3 100644 --- a/comments.php +++ b/comments.php @@ -38,12 +38,12 @@ case 'atom': header('Content-type: application/atom+xml'); - $module = SHARED_TPLS . 'comment-atom'; + $module = SHARED_TPLS . 'comment-atom.tpl'; break; case 'rss2': default: header('Content-type: application/rss+xml'); - $module = SHARED_TPLS . 'comment-rss'; + $module = SHARED_TPLS . 'comment-rss.tpl'; } diff --git a/index.php b/index.php index 592b6e9..1196c01 100644 --- a/index.php +++ b/index.php @@ -10,8 +10,6 @@ if (!file_exists(CONFIG_FILE)) utils_redirect('setup.php'); - - /* local function defines follow */ @@ -132,82 +130,7 @@ $params['page'] = 1; } - - $fp_uri_handlers = array(); - - function register_uri_param($handler, $function, $priority = 10) { - global $fp_uri_handlers; - if (is_callable($function)) - $fp_uri_handlers[$priority][$handler][] = $function; - } - - function unregister_uri_param($handler, $function) { - global $fp_uri_handlers; - foreach($fp_uri_handlers as $priority => $handler) { - if ($i = array_search($function, $hand)) { - unset($fp_uri_handlers[$priority][$handler][$i]); - } - } - } - - function handle_uri_params() { - global $fp_uri_handlers, $fp_params; - - $params = array(); - $module = 'default'; - - ksort($fp_uri_handlers); - foreach($fp_uri_handlers as $priority => $handler_group) { - foreach($handler_group as $handle_id => $func_group) { - if (empty($fp_params[$handle_id])) - continue; - foreach($func_group as $func) { - $continue = call_user_func_array($func, array(&$params, &$module)); - if (!$continue) break; - } - } - } - - return $module; - - } - - register_uri_param('entry', 'handle_entry'); - register_uri_param('comments', 'handle_comments'); - - function handle_entry(&$params, &$module/*&$handle*/) { - global $fpdb, $theme, $fp_params; - - $params['id'] = $fp_params['entry']; - $params['fullparse']=true; - - $fpdb->query($params); - - if (@$theme['hassingle']) - $module='single.tpl'; - - add_filter('wp_title', 'index_permatitle', 10, 2); - - $module = 'index'; - - return true; - - } - - function handle_comments(&$params, &$module) { - global $fpdb, $theme, $fp_params; - - $module = 'comments'; - $params['comments'] = true; - - include('comments.php'); - - return false; - } - - - function index_main() { global $fpdb, $smarty, $fp_config, $fp_params; @@ -275,13 +198,12 @@ function index_display() { global $smarty; - $module = handle_uri_params(); - //$module = index_main(); + $module = index_main(); theme_init($smarty); - $smarty->display($module.'.tpl'); + $smarty->display($module); unset($smarty);