diff options
author | justauser <[email protected]> | 2013-05-29 07:52:20 -0400 |
---|---|---|
committer | justauser <[email protected]> | 2013-05-29 07:52:20 -0400 |
commit | 7aab5617b689701cd9b6210132ed4e9dd55d3941 (patch) | |
tree | 7c8d51231f0c0bc9207e048437a50546c961c60d | |
parent | 991418fa566ff462d9616123168c5f7f839cdc15 (diff) | |
parent | 67e0cf9a371fca46405e7df26ccc970ce6b408cc (diff) |
Merge branch 'master' into jremote
latest master checkins
-rw-r--r-- | classes/handler/public.php | 4 | ||||
-rw-r--r-- | include/functions.php | 25 | ||||
-rw-r--r-- | include/login_form.php | 28 | ||||
-rw-r--r-- | install/index.php | 2 | ||||
-rw-r--r-- | register.php | 2 | ||||
-rw-r--r-- | schema/ttrss_schema_mysql.sql | 1 | ||||
-rw-r--r-- | schema/ttrss_schema_pgsql.sql | 1 | ||||
-rwxr-xr-x | update_daemon2.php | 1 |
8 files changed, 39 insertions, 25 deletions
diff --git a/classes/handler/public.php b/classes/handler/public.php index 3e868d56e..727976a82 100644 --- a/classes/handler/public.php +++ b/classes/handler/public.php @@ -732,6 +732,8 @@ class Handler_Public extends Handler { } function forgotpass() { + startup_gettext(); + header('Content-Type: text/html; charset=utf-8'); print "<html><head><title>Tiny Tiny RSS</title>"; @@ -825,6 +827,8 @@ class Handler_Public extends Handler { } function dbupdate() { + startup_gettext(); + if (!SINGLE_USER_MODE && $_SESSION["access_level"] < 10) { $_SESSION["login_error_msg"] = __("Your access level is insufficient to run this script."); render_login_form(); diff --git a/include/functions.php b/include/functions.php index 01ffa751f..bad01eb96 100644 --- a/include/functions.php +++ b/include/functions.php @@ -961,23 +961,28 @@ } function file_is_locked($filename) { - if (function_exists('flock') && file_exists(LOCK_DIRECTORY . "/$filename")) { - $fp = @fopen(LOCK_DIRECTORY . "/$filename", "r"); - if ($fp) { - if (flock($fp, LOCK_EX | LOCK_NB)) { - flock($fp, LOCK_UN); + if (file_exists(LOCK_DIRECTORY . "/$filename")) { + if (function_exists('flock')) { + $fp = @fopen(LOCK_DIRECTORY . "/$filename", "r"); + if ($fp) { + if (flock($fp, LOCK_EX | LOCK_NB)) { + flock($fp, LOCK_UN); + fclose($fp); + return false; + } fclose($fp); + return true; + } else { return false; } - fclose($fp); - return true; - } else { - return false; } + return true; // consider the file always locked and skip the test + } else { + return false; } - return true; // consider the file always locked and skip the test } + function make_lockfile($filename) { $fp = fopen(LOCK_DIRECTORY . "/$filename", "w"); diff --git a/include/login_form.php b/include/login_form.php index 0637c453a..891e25e13 100644 --- a/include/login_form.php +++ b/include/login_form.php @@ -1,3 +1,4 @@ +<?php startup_gettext(); ?> <html> <head> <title>Tiny Tiny RSS : Login</title> @@ -6,12 +7,12 @@ <link rel="shortcut icon" type="image/png" href="images/favicon.png"> <meta http-equiv="Content-Type" content="text/html; charset=utf-8"> <script type="text/javascript" src="lib/dojo/dojo.js"></script> - <script type="text/javascript" src="lib/dijit/dijit.js"></script> <script type="text/javascript" src="lib/dojo/tt-rss-layer.js"></script> <script type="text/javascript" src="lib/prototype.js"></script> <script type="text/javascript" src="js/functions.js"></script> <script type="text/javascript" charset="utf-8" src="errors.php?mode=js"></script> <script type="text/javascript"> + require({cache:{}}); Event.observe(window, 'load', function() { init(); }); @@ -104,20 +105,19 @@ <script type="text/javascript"> function init() { - dojo.require("dijit.form.Button"); - dojo.require("dijit.form.CheckBox"); - dojo.require("dijit.form.Form"); - dojo.require("dijit.form.Select"); - dojo.require("dijit.form.TextBox"); - dojo.require("dijit.form.ValidationTextBox"); - dojo.parser.parse(); + require(['dojo/parser','dijit/form/Button','dijit/form/CheckBox','dijit/form/Form', + 'dijit/form/Select','dijit/form/TextBox','dijit/form/ValidationTextBox'],function(parser){ + parser.parse(); + //show tooltip node only after this widget is instaniated. + dojo.query('div[dojoType="dijit.Tooltip"]').style({ + display:'' + }); + fetchProfiles(); + dijit.byId("bw_limit").attr("checked", getCookie("ttrss_bwlimit") == 'true'); + document.forms.loginForm.login.focus(); + }); - fetchProfiles(); - - dijit.byId("bw_limit").attr("checked", getCookie("ttrss_bwlimit") == 'true'); - - document.forms.loginForm.login.focus(); } function fetchProfiles() { @@ -217,7 +217,7 @@ function bwLimitChange(elem) { <label id="bw_limit_label" style='display : inline' for="bw_limit"><?php echo __("Use less traffic") ?></label> </div> - <div dojoType="dijit.Tooltip" connectId="bw_limit_label" position="below"> + <div dojoType="dijit.Tooltip" connectId="bw_limit_label" position="below" style="display:none"> <?php echo __("Does not display images in articles, reduces automatic refreshes."); ?> </div> diff --git a/install/index.php b/install/index.php index efa917d95..06f13fe14 100644 --- a/install/index.php +++ b/install/index.php @@ -191,7 +191,7 @@ if (!$result) { $query = htmlspecialchars($query); if ($die_on_error) { - die("Query <i>$query</i> failed: " . ($link ? mysql_error($link) : "No connection")); + die("Query <i>$query</i> failed: " . ($link ? function_exists("mysqli_connect") ? mysqli_error($link) : mysql_error($link) : "No connection")); } } return $result; diff --git a/register.php b/register.php index f50ef14a4..eaab98e04 100644 --- a/register.php +++ b/register.php @@ -15,6 +15,8 @@ require_once "config.php"; require_once "db.php"; + startup_gettext(); + $action = $_REQUEST["action"]; if (!init_plugins()) return; diff --git a/schema/ttrss_schema_mysql.sql b/schema/ttrss_schema_mysql.sql index aa1197091..e8d5f64b9 100644 --- a/schema/ttrss_schema_mysql.sql +++ b/schema/ttrss_schema_mysql.sql @@ -14,6 +14,7 @@ drop table if exists ttrss_labels; drop table if exists ttrss_filters2_actions; drop table if exists ttrss_filters2_rules; drop table if exists ttrss_filters2; +drop table if exists ttrss_filters; drop table if exists ttrss_filter_types; drop table if exists ttrss_filter_actions; drop table if exists ttrss_user_prefs; diff --git a/schema/ttrss_schema_pgsql.sql b/schema/ttrss_schema_pgsql.sql index 79634678d..feb5cece3 100644 --- a/schema/ttrss_schema_pgsql.sql +++ b/schema/ttrss_schema_pgsql.sql @@ -11,6 +11,7 @@ drop table if exists ttrss_labels; drop table if exists ttrss_filters2_rules; drop table if exists ttrss_filters2_actions; drop table if exists ttrss_filters2; +drop table if exists ttrss_filters; drop table if exists ttrss_filter_types; drop table if exists ttrss_filter_actions; drop table if exists ttrss_user_prefs; diff --git a/update_daemon2.php b/update_daemon2.php index d5b6a45e3..9d948a64d 100755 --- a/update_daemon2.php +++ b/update_daemon2.php @@ -203,6 +203,7 @@ if (!$master_handlers_installed) { _debug("[MASTER] installing shutdown handlers"); pcntl_signal(SIGINT, 'sigint_handler'); + pcntl_signal(SIGTERM, 'sigint_handler'); register_shutdown_function('shutdown', posix_getpid()); $master_handlers_installed = true; } |