summaryrefslogtreecommitdiff
path: root/mobile
diff options
context:
space:
mode:
authorAndrew Dolgov <[email protected]>2007-12-05 07:28:19 +0100
committerAndrew Dolgov <[email protected]>2007-12-05 07:28:19 +0100
commit510ac75fa088fd69e2311c82c375de50e13b39e4 (patch)
treee810d391bb0583abbbaf25abc759f9ded3c04e52 /mobile
parent85233b8ea0b065c96a883635efa80152347523de (diff)
mobile: add support for publishing articles
Diffstat (limited to 'mobile')
-rw-r--r--mobile/functions.php9
-rw-r--r--mobile/tt-rss.php11
2 files changed, 19 insertions, 1 deletions
diff --git a/mobile/functions.php b/mobile/functions.php
index 3d67f4a23..0bd65082a 100644
--- a/mobile/functions.php
+++ b/mobile/functions.php
@@ -458,7 +458,13 @@
} else {
$marked_pic = "<img class='marked' src=\"../images/mark_unset.png\">";
}
-
+
+ if ($line["published"] == "t" || $line["published"] == "1") {
+ $published_pic = "<img class='marked' src=\"../images/pub_set.gif\">";
+ } else {
+ $published_pic = "<img class='marked' src=\"../images/pub_unset.gif\">";
+ }
+
$content_link = "<a href=\"?go=view&id=$id&ret_feed=$feed&feed=$feed_id\">" .
$line["title"] . "</a>";
@@ -472,6 +478,7 @@
print "<li class='$class'>";
print "<a href=\"?go=vf&id=$feed&ts=$id\">$marked_pic</a>";
+ print "<a href=\"?go=vf&id=$feed&tp=$id\">$published_pic</a>";
print $content_link;
diff --git a/mobile/tt-rss.php b/mobile/tt-rss.php
index 1b3b0763f..0793ce497 100644
--- a/mobile/tt-rss.php
+++ b/mobile/tt-rss.php
@@ -59,6 +59,17 @@
header("Location: tt-rss.php?$query_string");
return;
}
+
+ $tp_id = db_escape_string($_GET["tp"]);
+
+ if ($go == "vf" && $tp_id) {
+ $result = db_query($link, "UPDATE ttrss_user_entries SET published = NOT published
+ WHERE ref_id = '$tp_id' AND owner_uid = " . $_SESSION["uid"]);
+ $query_string = preg_replace("/&tp=[0-9]*/", "", $_SERVER["QUERY_STRING"]);
+ header("Location: tt-rss.php?$query_string");
+ return;
+ }
+
?>
<html>
<head>