Merge branch 'master' into jremote

latest master checkins
master
justauser 12 years ago
commit 7aab5617b6

@ -732,6 +732,8 @@ class Handler_Public extends Handler {
} }
function forgotpass() { function forgotpass() {
startup_gettext();
header('Content-Type: text/html; charset=utf-8'); header('Content-Type: text/html; charset=utf-8');
print "<html><head><title>Tiny Tiny RSS</title>"; print "<html><head><title>Tiny Tiny RSS</title>";
@ -825,6 +827,8 @@ class Handler_Public extends Handler {
} }
function dbupdate() { function dbupdate() {
startup_gettext();
if (!SINGLE_USER_MODE && $_SESSION["access_level"] < 10) { if (!SINGLE_USER_MODE && $_SESSION["access_level"] < 10) {
$_SESSION["login_error_msg"] = __("Your access level is insufficient to run this script."); $_SESSION["login_error_msg"] = __("Your access level is insufficient to run this script.");
render_login_form(); render_login_form();

@ -961,7 +961,8 @@
} }
function file_is_locked($filename) { function file_is_locked($filename) {
if (function_exists('flock') && file_exists(LOCK_DIRECTORY . "/$filename")) { if (file_exists(LOCK_DIRECTORY . "/$filename")) {
if (function_exists('flock')) {
$fp = @fopen(LOCK_DIRECTORY . "/$filename", "r"); $fp = @fopen(LOCK_DIRECTORY . "/$filename", "r");
if ($fp) { if ($fp) {
if (flock($fp, LOCK_EX | LOCK_NB)) { if (flock($fp, LOCK_EX | LOCK_NB)) {
@ -976,7 +977,11 @@
} }
} }
return true; // consider the file always locked and skip the test return true; // consider the file always locked and skip the test
} else {
return false;
} }
}
function make_lockfile($filename) { function make_lockfile($filename) {
$fp = fopen(LOCK_DIRECTORY . "/$filename", "w"); $fp = fopen(LOCK_DIRECTORY . "/$filename", "w");

@ -1,3 +1,4 @@
<?php startup_gettext(); ?>
<html> <html>
<head> <head>
<title>Tiny Tiny RSS : Login</title> <title>Tiny Tiny RSS : Login</title>
@ -6,12 +7,12 @@
<link rel="shortcut icon" type="image/png" href="images/favicon.png"> <link rel="shortcut icon" type="image/png" href="images/favicon.png">
<meta http-equiv="Content-Type" content="text/html; charset=utf-8"> <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/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/dojo/tt-rss-layer.js"></script>
<script type="text/javascript" src="lib/prototype.js"></script> <script type="text/javascript" src="lib/prototype.js"></script>
<script type="text/javascript" src="js/functions.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" charset="utf-8" src="errors.php?mode=js"></script>
<script type="text/javascript"> <script type="text/javascript">
require({cache:{}});
Event.observe(window, 'load', function() { Event.observe(window, 'load', function() {
init(); init();
}); });
@ -104,20 +105,19 @@
<script type="text/javascript"> <script type="text/javascript">
function init() { 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(); fetchProfiles();
dijit.byId("bw_limit").attr("checked", getCookie("ttrss_bwlimit") == 'true'); dijit.byId("bw_limit").attr("checked", getCookie("ttrss_bwlimit") == 'true');
document.forms.loginForm.login.focus(); document.forms.loginForm.login.focus();
});
} }
function fetchProfiles() { 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> <label id="bw_limit_label" style='display : inline' for="bw_limit"><?php echo __("Use less traffic") ?></label>
</div> </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."); ?> <?php echo __("Does not display images in articles, reduces automatic refreshes."); ?>
</div> </div>

@ -191,7 +191,7 @@
if (!$result) { if (!$result) {
$query = htmlspecialchars($query); $query = htmlspecialchars($query);
if ($die_on_error) { 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; return $result;

@ -15,6 +15,8 @@
require_once "config.php"; require_once "config.php";
require_once "db.php"; require_once "db.php";
startup_gettext();
$action = $_REQUEST["action"]; $action = $_REQUEST["action"];
if (!init_plugins()) return; if (!init_plugins()) return;

@ -14,6 +14,7 @@ drop table if exists ttrss_labels;
drop table if exists ttrss_filters2_actions; drop table if exists ttrss_filters2_actions;
drop table if exists ttrss_filters2_rules; drop table if exists ttrss_filters2_rules;
drop table if exists ttrss_filters2; 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_types;
drop table if exists ttrss_filter_actions; drop table if exists ttrss_filter_actions;
drop table if exists ttrss_user_prefs; drop table if exists ttrss_user_prefs;

@ -11,6 +11,7 @@ drop table if exists ttrss_labels;
drop table if exists ttrss_filters2_rules; drop table if exists ttrss_filters2_rules;
drop table if exists ttrss_filters2_actions; drop table if exists ttrss_filters2_actions;
drop table if exists ttrss_filters2; 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_types;
drop table if exists ttrss_filter_actions; drop table if exists ttrss_filter_actions;
drop table if exists ttrss_user_prefs; drop table if exists ttrss_user_prefs;

@ -203,6 +203,7 @@
if (!$master_handlers_installed) { if (!$master_handlers_installed) {
_debug("[MASTER] installing shutdown handlers"); _debug("[MASTER] installing shutdown handlers");
pcntl_signal(SIGINT, 'sigint_handler'); pcntl_signal(SIGINT, 'sigint_handler');
pcntl_signal(SIGTERM, 'sigint_handler');
register_shutdown_function('shutdown', posix_getpid()); register_shutdown_function('shutdown', posix_getpid());
$master_handlers_installed = true; $master_handlers_installed = true;
} }

Loading…
Cancel
Save