aboutsummaryrefslogtreecommitdiff
path: root/frontend
diff options
context:
space:
mode:
authorWojciech Polak <polak@gnu.org>2010-05-11 23:21:46 +0200
committerWojciech Polak <polak@gnu.org>2010-05-11 23:21:46 +0200
commite577933281b5c423445b510aa272cd4f9acf06e2 (patch)
treebe1685af6122877ef0534663d65d87b529d0c645 /frontend
parent2e4a3188a3553febeae578940665e23098d16f64 (diff)
downloadcheetah-e577933281b5c423445b510aa272cd4f9acf06e2.tar.gz
cheetah-e577933281b5c423445b510aa272cd4f9acf06e2.tar.bz2
Remove feedaddqueue.
Diffstat (limited to 'frontend')
-rw-r--r--frontend/add.php29
-rw-r--r--frontend/fetch.php18
2 files changed, 7 insertions, 40 deletions
diff --git a/frontend/add.php b/frontend/add.php
index 9d3582c..c98135c 100644
--- a/frontend/add.php
+++ b/frontend/add.php
@@ -2,7 +2,7 @@
/*
Cheetah News add.php
- Copyright (C) 2005, 2006 Wojciech Polak.
+ Copyright (C) 2005, 2006, 2010 Wojciech Polak.
This program is free software; you can redistribute it and/or modify it
under the terms of the GNU General Public License as published by the
@@ -20,30 +20,15 @@
require 'lib/include.php';
-$feedurl = '';
if (isset ($_SERVER['QUERY_STRING']))
{
- if (substr ($_SERVER['QUERY_STRING'], 0, 8) == 'feedurl=')
+ if (substr ($_SERVER['QUERY_STRING'], 0, 8) == 'feedurl=') {
$feedurl = urldecode (substr ($_SERVER['QUERY_STRING'], 8));
-}
-
-start_session (null);
-$session->auth ('afterlogged', $feedurl);
-
-$db = new Database ();
-if (!empty ($feedurl))
-{
- if (!strstr ($feedurl, '://'))
- $feedurl = 'http://' . $feedurl;
- if ($feedurl[strlen ($feedurl) - 1] == '/')
- $feedurl = substr ($feedurl, 0, -1);
-
- $feedurl = $db->escape (strip_tags ($feedurl));
- $db->query ("SELECT id FROM feedaddqueue WHERE userid='".
- $session->id."' AND url='$feedurl'");
- if (!$db->next_record ()) {
- $db->query ("INSERT INTO feedaddqueue SET userid=".
- $session->id.", url='$feedurl'");
+ if (!strstr ($feedurl, '://'))
+ $feedurl = 'http://' . $feedurl;
+ if ($feedurl[strlen ($feedurl) - 1] == '/')
+ $feedurl = substr ($feedurl, 0, -1);
+ setcookie ('cheetahFeedUrl', strip_tags ($feedurl), 0, '/');
}
}
diff --git a/frontend/fetch.php b/frontend/fetch.php
index a967a60..120112c 100644
--- a/frontend/fetch.php
+++ b/frontend/fetch.php
@@ -61,20 +61,6 @@ if ($session->status['afterlogged'] == 'yes')
if (!empty ($lucid)) $lucid = md5 ($lucid);
}
- $feedAddUrl = null;
- $feedAddSid = null;
- $db->query ("SELECT url FROM feedaddqueue WHERE userid='".
- $session->id."'");
- if ($db->next_record ()) {
- $feedAddUrl = $db->f ('url');
- $db->query ("SELECT f.id FROM feed f, subscription s WHERE f.url='".
- $feedAddUrl."' AND f.id=s.feedid");
- if ($db->next_record ())
- $feedAddSid = $db->f ('id');
- $db->query ("DELETE LOW_PRIORITY FROM feedaddqueue WHERE userid='".
- $session->id."'");
- }
-
$db->query ("SELECT s.feedid, s.latest, s.expand, s.folder, ".
"s.active, s.description, f.url FROM subscription s, feed f ".
"WHERE f.id=s.feedid AND s.userid='".$session->id.
@@ -88,10 +74,6 @@ if ($session->status['afterlogged'] == 'yes')
this.safs = $safs;
this.oldf = $oldestFirst;
this.frequency = $refresh;\n";
- if ($feedAddSid)
- echo " this.feedAddSid = '".encodeJsEntities ($feedAddSid)."';\n";
- else if ($feedAddUrl)
- echo " this.feedAddUrl = '".encodeJsEntities ($feedAddUrl)."';\n";
echo " this.folderOrder = [";
$end = count ($folders);

Return to:

Send suggestions and report system problems to the System administrator.