update.php: display error message when running from the browser
mention self-updating in new version dialog
This commit is contained in:
@@ -899,6 +899,8 @@ class Dlg extends Handler_Protected {
|
|||||||
$details = "http://tt-rss.org/redmine/versions/show/$id";
|
$details = "http://tt-rss.org/redmine/versions/show/$id";
|
||||||
$download = "http://tt-rss.org/#Download";
|
$download = "http://tt-rss.org/#Download";
|
||||||
|
|
||||||
|
print "<p align='center'>".__("You can try updating automatically using update.php")."</p>";
|
||||||
|
|
||||||
print "<div style='text-align : center'>";
|
print "<div style='text-align : center'>";
|
||||||
print "<button dojoType=\"dijit.form.Button\"
|
print "<button dojoType=\"dijit.form.Button\"
|
||||||
onclick=\"return window.open('$details')\">".__("Details")."</button>";
|
onclick=\"return window.open('$details')\">".__("Details")."</button>";
|
||||||
|
|||||||
19
update.php
19
update.php
@@ -14,6 +14,25 @@
|
|||||||
require_once "db.php";
|
require_once "db.php";
|
||||||
require_once "db-prefs.php";
|
require_once "db-prefs.php";
|
||||||
|
|
||||||
|
if (!defined('STDIN')) {
|
||||||
|
?> <html>
|
||||||
|
<head>
|
||||||
|
<title>Database Updater</title>
|
||||||
|
<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
|
||||||
|
<link rel="stylesheet" type="text/css" href="utility.css">
|
||||||
|
</head>
|
||||||
|
|
||||||
|
<body>
|
||||||
|
<div class="floatingLogo"><img src="images/logo_wide.png"></div>
|
||||||
|
<h1><?php echo __("Update") ?></h1>
|
||||||
|
|
||||||
|
<?php print_error("Please run this script from the command line."); ?>
|
||||||
|
|
||||||
|
</body></html>
|
||||||
|
<?php
|
||||||
|
exit;
|
||||||
|
}
|
||||||
|
|
||||||
if (!defined('PHP_EXECUTABLE'))
|
if (!defined('PHP_EXECUTABLE'))
|
||||||
define('PHP_EXECUTABLE', '/usr/bin/php');
|
define('PHP_EXECUTABLE', '/usr/bin/php');
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user