Skip to content
Snippets Groups Projects
Commit 66064f4f authored by lechuck's avatar lechuck Committed by agata
Browse files

Removed old rss.php

parent cea5ecc9
No related branches found
No related tags found
1 merge request!3Noblogs 5.4
<?php
function get_blog_domain($old_blog_id) {
global $wpdb;
$id = int($old_blog_id);
$sql = sprintf("SELECT blog form old_noblogs_id WHERE id=%d", $id);
$result = $wpdb->get_row($sql);
if (!$result) {
return;
}
return sprintf("%s.noblogs.org", $result->blog);
}
ob_start();
// Load wordpress api.
define('WP_CACHE',false);
require_once('/opt/noblogs/www/wp-load.php');
if (isset($_GET['blogId']) && is_numeric($_GET['blogId'])) {
$domain = get_blog_domain($_GET['blogId']);
if (!$domain) {
header("Location: https://noblogs.org");
} else {
if (isset($_SERVER['HTTPS']) && $_SERVER['HTTPS'] == 'on') {
$scheme = 'https://';
} else {
$scheme = 'http://';
}
header(sprintf("Location: %s%s/rss2", $scheme, $domain));
}
}
ob_flush();
?>
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment