From b509d64e960fd527a35366f44ee022ce831ae9f8 Mon Sep 17 00:00:00 2001 From: Andrew Dolgov Date: Fri, 19 Nov 2010 21:05:28 +0300 Subject: rework headlines menu and openArticleInNewWindow() --- backend.php | 17 +++++++++++++++++ 1 file changed, 17 insertions(+) (limited to 'backend.php') diff --git a/backend.php b/backend.php index c17344a79..8110d4370 100644 --- a/backend.php +++ b/backend.php @@ -201,6 +201,23 @@ break; // feeds + case "la": + $id = db_escape_string($_REQUEST['id']); + + $result = db_query($link, "SELECT link FROM ttrss_entries, ttrss_user_entries + WHERE id = '$id' AND id = ref_id AND owner_uid = '".$_SESSION['uid']."'"); + + if (db_num_rows($result) == 1) { + $article_url = db_fetch_result($result, 0, 'link'); + + header("Location: $article_url"); + return; + + } else { + print_error(__("Article not found.")); + } + break; + case "view": $id = db_escape_string($_REQUEST["id"]); -- cgit v1.2.3-54-g00ecf