From 793185a9a51e3c5a104f4addb736b6372516d17e Mon Sep 17 00:00:00 2001 From: Andrew Dolgov Date: Mon, 5 Mar 2007 17:27:48 +0100 Subject: mobile: sync login stuff and such with desktop version --- functions.php | 12 ++++-- mobile/functions.php | 2 + mobile/login.php | 103 -------------------------------------------------- mobile/login_form.php | 35 +++++++++++++++++ mobile/logout.php | 39 ++----------------- mobile/tt-rss.php | 6 ++- 6 files changed, 53 insertions(+), 144 deletions(-) delete mode 100644 mobile/login.php create mode 100644 mobile/login_form.php diff --git a/functions.php b/functions.php index 14c68e864..4c5059d14 100644 --- a/functions.php +++ b/functions.php @@ -1192,7 +1192,7 @@ return true; } - function login_sequence($link) { + function login_sequence($link, $mobile = false) { if (!SINGLE_USER_MODE) { if (defined('_DEBUG_USER_SWITCH') && $_SESSION["uid"]) { @@ -1227,7 +1227,7 @@ // print_r($_SESSION); if (!$_SESSION["uid"] || !validate_session($link)) { - render_login_form($link); + render_login_form($link, $mobile); exit; } @@ -3165,8 +3165,12 @@ return true; } - function render_login_form($link) { - require_once "login_form.php"; + function render_login_form($link, $mobile = false) { + if (!$mobile) { + require_once "login_form.php"; + } else { + require_once "mobile/login_form.php"; + } } // from http://developer.apple.com/internet/safari/faq.html diff --git a/mobile/functions.php b/mobile/functions.php index 1d50767e4..86a07bd10 100644 --- a/mobile/functions.php +++ b/mobile/functions.php @@ -2,6 +2,8 @@ define('MOBILE_FEEDLIST_ENABLE_ICONS', false); define('TTRSS_SESSION_NAME', 'ttrss_m_sid'); + require_once "../gettext/gettext.inc"; + function render_feeds_list($link) { $tags = $_GET["tags"]; diff --git a/mobile/login.php b/mobile/login.php deleted file mode 100644 index a9ee69be0..000000000 --- a/mobile/login.php +++ /dev/null @@ -1,103 +0,0 @@ - - - - Tiny Tiny RSS : Login - - - - - - -
-
Tiny Tiny RSS
- -
- - - - -
- - - - - - - -
Login:
Password:
- - -
- -
- -
- - - - - - diff --git a/mobile/login_form.php b/mobile/login_form.php new file mode 100644 index 000000000..567d1aa97 --- /dev/null +++ b/mobile/login_form.php @@ -0,0 +1,35 @@ + + + Tiny Tiny RSS : Login + + + + + + +
+
Tiny Tiny RSS
+ +
+ + + + +
+ + + + + + + + +
+ +
+
+
+ + + + diff --git a/mobile/logout.php b/mobile/logout.php index 76641467d..89db68464 100644 --- a/mobile/logout.php +++ b/mobile/logout.php @@ -1,40 +1,9 @@ - - - - - Tiny Tiny RSS : Logout - - -

You have been logged out.

- -

Warning: - As there is no way to reliably clear HTTP Authentication - credentials from your browser, it is recommended for you to close - this browser window, otherwise your browser could automatically - authenticate again using previously supplied credentials, which - is a security risk.

- - - - + header("Location: tt-rss.php"); +?> diff --git a/mobile/tt-rss.php b/mobile/tt-rss.php index 890c1e0a1..d75796a39 100644 --- a/mobile/tt-rss.php +++ b/mobile/tt-rss.php @@ -1,4 +1,6 @@ -- cgit v1.2.3