From 942afb43a1357b8189f21937fe3abd413a14a21d Mon Sep 17 00:00:00 2001 From: Andrew Dolgov Date: Mon, 8 Feb 2021 08:49:21 +0300 Subject: sanity checks: use better CLI detection, shorten most of the text --- update.php | 33 +++++---------------------------- 1 file changed, 5 insertions(+), 28 deletions(-) (limited to 'update.php') diff --git a/update.php b/update.php index 2963c00f2..e708aad71 100755 --- a/update.php +++ b/update.php @@ -72,9 +72,6 @@ return $tags_deleted; } - if (!defined('PHP_EXECUTABLE')) - define('PHP_EXECUTABLE', '/usr/bin/php'); - $pdo = Db::pdo(); init_plugins(); @@ -106,34 +103,14 @@ array_push($longopts, $command . $data["suffix"]); } - $options = getopt("", $longopts); - - if (!is_array($options)) { - die("error: getopt() failed. ". - "Most probably you are using PHP CGI to run this script ". - "instead of required PHP CLI. Check tt-rss wiki page on updating feeds for ". - "additional information.\n"); - } - - if (count($options) == 0 && !defined('STDIN')) { - ?> - - - - Tiny Tiny RSS data update script. - - - - -

- - - - -