diff options
Diffstat (limited to 'classes/backend.php')
-rw-r--r-- | classes/backend.php | 19 |
1 files changed, 12 insertions, 7 deletions
diff --git a/classes/backend.php b/classes/backend.php index bd6b1ff19..4be38e0c4 100644 --- a/classes/backend.php +++ b/classes/backend.php @@ -7,13 +7,18 @@ class Backend extends Handler { } function digestTest() { - header("Content-type: text/html"); - - $rv = Digest::prepare_headlines_digest($_SESSION['uid'], 1, 1000); + if (isset($_SESSION['uid'])) { + header("Content-type: text/html"); - $rv[3] = "<pre>" . $rv[3] . "</pre>"; + $rv = Digest::prepare_headlines_digest($_SESSION['uid'], 1, 1000); - print_r($rv); + print "<h1>HTML</h1>"; + print $rv[0]; + print "<h1>Plain text</h1>"; + print "<pre>".$rv[3]."</pre>"; + } else { + print error_json(6); + } } private function display_main_help() { @@ -149,13 +154,13 @@ class Backend extends Handler { print "</ul>"; } - print "<div class='dlgButtons'>"; + print "<footer>"; print "<button dojoType='dijit.form.Button' style='float : left' class='alt-info' onclick='window.open(\"https://tt-rss.org/wiki/InterfaceTips\")'> <i class='material-icons'>help</i> ".__("More info...")."</button>"; print "<button dojoType='dijit.form.Button' onclick=\"return dijit.byId('helpDlg').hide()\">".__('Close this window')."</button>"; - print "</div>"; + print "</footer>"; } } |