]> git.wh0rd.org - tt-rss.git/commitdiff
allow redirect to login page when calling external feed subscription url (using bookm...
authorAndrew Dolgov <fox@madoka.volgo-balt.ru>
Tue, 14 Jun 2011 10:19:47 +0000 (14:19 +0400)
committerAndrew Dolgov <fox@madoka.volgo-balt.ru>
Tue, 14 Jun 2011 10:19:47 +0000 (14:19 +0400)
backend.php

index 6b93d1b3c5444c55079fa68e8bdc05b1ca3cc40c..ef2c42fb59390feebc475f9f2c3106fab1430331 100644 (file)
                        $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;
        }