summaryrefslogtreecommitdiff
path: root/opml.php
diff options
context:
space:
mode:
authorAndrew Dolgov <[email protected]>2005-11-17 19:03:40 +0100
committerAndrew Dolgov <[email protected]>2005-11-17 19:03:40 +0100
commit5d3f29da4ba7fb7fe898bbde28e8d133f0b15764 (patch)
treea4336730d524f9b4f36a7cc2a31a93903ceab743 /opml.php
parentb58cf26600592cbd6374c689095a817a95349652 (diff)
opml.php uid-aware
Diffstat (limited to 'opml.php')
-rw-r--r--opml.php10
1 files changed, 7 insertions, 3 deletions
diff --git a/opml.php b/opml.php
index d5eb0e0e5..023f29ffe 100644
--- a/opml.php
+++ b/opml.php
@@ -1,4 +1,6 @@
<?
+ session_start();
+
// FIXME there are some brackets issues here
$op = $_REQUEST["op"];
@@ -11,6 +13,8 @@
require_once "db.php";
require_once "db-prefs.php";
+ $_SESSION["uid"] = PLACEHOLDER_UID; // FIXME: placeholder
+
$link = db_connect(DB_HOST, DB_USER, DB_PASS, DB_NAME);
if (DB_TYPE == "pgsql") {
@@ -61,7 +65,7 @@
print "Feed <b>$title</b> ($url)... ";
$result = db_query($link, "SELECT id FROM ttrss_feeds WHERE
- title = '$title' OR feed_url = '$url'");
+ (title = '$title' OR feed_url = '$url') AND owner_uid = ".$_SESSION["uid"]);
if ($result && db_num_rows($result) > 0) {
@@ -69,8 +73,8 @@
} else {
- $result = db_query($link, "INSERT INTO ttrss_feeds (title, feed_url) VALUES
- ('$title', '$url')");
+ $result = db_query($link, "INSERT INTO ttrss_feeds (title, feed_url,owner_uid) VALUES
+ ('$title', '$url', '".$_SESSION["uid"]."')");
print "<b>Done.</b><br>";