reverting unwanted changes

This commit is contained in:
real_nowhereman 2009-02-15 11:18:44 +00:00
parent 73191e6033
commit 34926b37df
2 changed files with 4 additions and 82 deletions

View File

@ -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';
}

View File

@ -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);