From: Andrew Dolgov Date: Mon, 5 Mar 2007 16:27:48 +0000 (+0100) Subject: mobile: sync login stuff and such with desktop version X-Git-Tag: 1.2.9~26 X-Git-Url: https://git.wh0rd.org/?a=commitdiff_plain;h=793185a9a51e3c5a104f4addb736b6372516d17e;p=tt-rss.git mobile: sync login stuff and such with desktop version --- diff --git a/functions.php b/functions.php index 14c68e86..4c5059d1 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 1d50767e..86a07bd1 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 a9ee69be..00000000 --- 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 00000000..567d1aa9 --- /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 76641467..89db6846 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 890c1e0a..d75796a3 100644 --- a/mobile/tt-rss.php +++ b/mobile/tt-rss.php @@ -1,4 +1,6 @@