From: Andrew Dolgov Date: Tue, 14 Jun 2011 10:19:47 +0000 (+0400) Subject: allow redirect to login page when calling external feed subscription url (using bookm... X-Git-Tag: 1.5.5~7 X-Git-Url: https://git.wh0rd.org/?a=commitdiff_plain;h=d0f73380099e5a258b73bb69304bc6146859d1ef;p=tt-rss.git allow redirect to login page when calling external feed subscription url (using bookmarklet, for example) (refs #344) --- diff --git a/backend.php b/backend.php index 6b93d1b3..ef2c42fb 100644 --- a/backend.php +++ b/backend.php @@ -62,8 +62,14 @@ $op != "rss" && $op != "getUnread" && $op != "getProfiles" && $op != "fbexport" && $op != "logout" && $op != "pubsub") { - header("Content-Type: text/plain"); - print json_encode(array("error" => array("code" => 6))); + if ($op == 'pref-feeds' && $_REQUEST['subop'] == 'add') { + header("Content-Type: text/html"); + login_sequence($link); + render_login_form($link); + } else { + header("Content-Type: text/plain"); + print json_encode(array("error" => array("code" => 6))); + } return; }