summaryrefslogtreecommitdiff
path: root/update.php
diff options
context:
space:
mode:
authorAndrew Dolgov <[email protected]>2012-10-24 00:25:56 +0400
committerAndrew Dolgov <[email protected]>2012-10-24 00:25:56 +0400
commit3de78afd3bc9b01da3a03391dc566430b490886c (patch)
tree8014f70b6a97596fbbd864abfa19032e6b37f243 /update.php
parent7e992eca46667c5c0e17a2527cd46bf86de47bb9 (diff)
fix called-from-browser detection in update.php
Diffstat (limited to 'update.php')
-rwxr-xr-xupdate.php18
1 files changed, 9 insertions, 9 deletions
diff --git a/update.php b/update.php
index afe70b903..6e23892e2 100755
--- a/update.php
+++ b/update.php
@@ -15,30 +15,30 @@
require_once "db-prefs.php";
require_once "update_self.php";
- if (!defined('STDIN')) {
+ if (!defined('PHP_EXECUTABLE'))
+ define('PHP_EXECUTABLE', '/usr/bin/php');
+
+ $op = $argv;
+
+ if (count($argv) == 0 && !defined('STDIN')) {
?> <html>
<head>
- <title>Update Tool</title>
+ <title>Tiny Tiny RSS data update script.</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>
+ <h1><?php echo __("Tiny Tiny RSS data update script.") ?></h1>
- <?php print_error("Please run this script from the command line."); ?>
+ <?php print_error("Please run this script from the command line. Use option \"-help\" to display command help if this error is displayed erroneously."); ?>
</body></html>
<?php
exit;
}
- if (!defined('PHP_EXECUTABLE'))
- define('PHP_EXECUTABLE', '/usr/bin/php');
-
- $op = $argv;
-
if (count($argv) == 1 || in_array("-help", $op) ) {
print "Tiny Tiny RSS data update script.\n\n";
print "Options:\n";