Skip to content
GitLab
Projects
Groups
Snippets
Help
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
N
noblogs-wp
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
39
Issues
39
List
Boards
Labels
Service Desk
Milestones
Merge Requests
1
Merge Requests
1
Operations
Operations
Incidents
Analytics
Analytics
Repository
Value Stream
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Commits
Issue Boards
Open sidebar
ai
noblogs-wp
Commits
a4352d91
Commit
a4352d91
authored
May 03, 2014
by
lechuck
Committed by
agata
Oct 17, 2019
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Removed old rss.php
parent
52700c72
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
0 additions
and
31 deletions
+0
-31
rss.php
rss.php
+0
-31
No files found.
rss.php
deleted
100644 → 0
View file @
52700c72
<?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
();
?>
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment