Correctly redirects from old style links using system settingsand not via hardcoded strings
This commit is contained in:
parent
bee0261315
commit
c4f437a47b
10
blog.php
10
blog.php
@ -4,7 +4,13 @@
|
||||
require_once 'defaults.php';
|
||||
require_once (INCLUDES_DIR.'includes.php');
|
||||
|
||||
@utils_status_header(301);
|
||||
@utils_redirect('?'.$_SERVER['QUERY_STRING']);
|
||||
/* backward compatibility */
|
||||
|
||||
if (!@$_GET['entry']) {
|
||||
@utils_redirect('?'.$_SERVER['QUERY_STRING']);
|
||||
} else {
|
||||
@utils_status_header(301);
|
||||
@utils_redirect(str_replace('&','&', get_permalink($_GET['entry'])), true);
|
||||
}
|
||||
|
||||
?>
|
||||
|
13
comments.php
13
comments.php
@ -3,8 +3,17 @@
|
||||
if (!defined('MOD_INDEX')) {
|
||||
include 'defaults.php';
|
||||
include INCLUDES_DIR . 'includes.php';
|
||||
@utils_status_header(301);
|
||||
@utils_redirect("?entry={$_GET['page']}&comments");
|
||||
|
||||
/* backward compatibility */
|
||||
|
||||
if (!@$_GET['entry']) {
|
||||
@utils_redirect();
|
||||
} else {
|
||||
@utils_status_header(301);
|
||||
@utils_redirect(str_replace('&','&', get_comments_link($_GET['entry'])), true);
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
|
||||
$module = comment_main($module);
|
||||
|
39
rss.php
39
rss.php
@ -4,40 +4,9 @@
|
||||
require_once 'defaults.php';
|
||||
require_once (INCLUDES_DIR.'includes.php');
|
||||
|
||||
// this is only for index
|
||||
if (!file_exists(LOCKFILE)) {
|
||||
utils_redirect('setup.php');
|
||||
}
|
||||
|
||||
|
||||
class LayoutRSSFeed extends Abstract_LayoutIndex {
|
||||
|
||||
function LayoutRSSFeed() {
|
||||
/*
|
||||
|
||||
RSS feeds use new theme constracts,
|
||||
which are now deprecated and that will
|
||||
be unsupported from Crescendo+1 on
|
||||
|
||||
so let me use this hackish trick
|
||||
to force legacy mode off :P
|
||||
|
||||
|
||||
*/
|
||||
define('THEME_LEGACY_MODE', false);
|
||||
parent::Abstract_LayoutIndex();
|
||||
$this->tpl = SHARED_TPLS . 'rss.tpl';
|
||||
}
|
||||
|
||||
function main() {
|
||||
header('Content-type: application/xml;');
|
||||
$this->fpdb->query('fullparse:true');
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
$FLATPRESS =& new LayoutRSSFeed;
|
||||
$FLATPRESS->display();
|
||||
|
||||
/* backward compatibility */
|
||||
|
||||
@utils_status_header(301);
|
||||
@utils_redirect('?'. str_replace('&','&', theme_feed_link()) . '&' . $_SERVER['QUERY_STRING']);
|
||||
|
||||
?>
|
||||
|
13
static.php
13
static.php
@ -2,6 +2,15 @@
|
||||
|
||||
include 'defaults.php';
|
||||
include INCLUDES_DIR . 'includes.php';
|
||||
@utils_status_header(301);
|
||||
@utils_redirect("?page={$_GET['page']}");
|
||||
|
||||
/* backward compatibility */
|
||||
|
||||
if (!@$_GET['page']) {
|
||||
@utils_redirect();
|
||||
} else {
|
||||
@utils_status_header(301);
|
||||
@utils_redirect(str_replace('&','&', theme_staticlink($_GET['page'])), true);
|
||||
}
|
||||
|
||||
|
||||
?>
|
||||
|
Loading…
x
Reference in New Issue
Block a user