mirror of
https://tt-rss.org/git/tt-rss.git
synced 2024-06-26 11:59:02 +02:00
fix called-from-browser detection in update.php
This commit is contained in:
parent
7e992eca46
commit
3de78afd3b
18
update.php
18
update.php
|
@ -15,30 +15,30 @@
|
||||||
require_once "db-prefs.php";
|
require_once "db-prefs.php";
|
||||||
require_once "update_self.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>
|
?> <html>
|
||||||
<head>
|
<head>
|
||||||
<title>Update Tool</title>
|
<title>Tiny Tiny RSS data update script.</title>
|
||||||
<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
|
<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
|
||||||
<link rel="stylesheet" type="text/css" href="utility.css">
|
<link rel="stylesheet" type="text/css" href="utility.css">
|
||||||
</head>
|
</head>
|
||||||
|
|
||||||
<body>
|
<body>
|
||||||
<div class="floatingLogo"><img src="images/logo_wide.png"></div>
|
<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>
|
</body></html>
|
||||||
<?php
|
<?php
|
||||||
exit;
|
exit;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (!defined('PHP_EXECUTABLE'))
|
|
||||||
define('PHP_EXECUTABLE', '/usr/bin/php');
|
|
||||||
|
|
||||||
$op = $argv;
|
|
||||||
|
|
||||||
if (count($argv) == 1 || in_array("-help", $op) ) {
|
if (count($argv) == 1 || in_array("-help", $op) ) {
|
||||||
print "Tiny Tiny RSS data update script.\n\n";
|
print "Tiny Tiny RSS data update script.\n\n";
|
||||||
print "Options:\n";
|
print "Options:\n";
|
||||||
|
|
Loading…
Reference in New Issue
Block a user