summaryrefslogtreecommitdiff
path: root/update.php
diff options
context:
space:
mode:
authorAndrew Dolgov <[email protected]>2012-08-23 13:17:22 +0400
committerAndrew Dolgov <[email protected]>2012-08-23 13:17:22 +0400
commit366f06f7cfc37895089ee53c41e79bc48802820e (patch)
treef53a64224bd308e166f03dd61fd469952e9489c0 /update.php
parent3bdc2b999b7e89815052ee97e6f530da6111c22a (diff)
update.php: display error message when running from the browser
mention self-updating in new version dialog
Diffstat (limited to 'update.php')
-rwxr-xr-xupdate.php19
1 files changed, 19 insertions, 0 deletions
diff --git a/update.php b/update.php
index f23244d84..01ce6df81 100755
--- a/update.php
+++ b/update.php
@@ -14,6 +14,25 @@
require_once "db.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'))
define('PHP_EXECUTABLE', '/usr/bin/php');