diff options
Diffstat (limited to 'plugins/updater/init.php')
-rw-r--r-- | plugins/updater/init.php | 21 |
1 files changed, 21 insertions, 0 deletions
diff --git a/plugins/updater/init.php b/plugins/updater/init.php index fa283c8be..6ee018f74 100644 --- a/plugins/updater/init.php +++ b/plugins/updater/init.php @@ -24,6 +24,8 @@ class Updater extends Plugin { // __FILE__ is in plugins/updater so we need to go one level up $work_dir = dirname(dirname(dirname(__FILE__))); $parent_dir = dirname($work_dir); + // Set PATH to run "which" + putenv('PATH="$PATH:/bin:/sbin:/usr/bin:/usr/sbin:/usr/local/bin:/usr/local/sbin"'); $log = array(); if (!is_array($params)) $params = array(); @@ -61,6 +63,20 @@ class Updater extends Plugin { putenv("PATH=" . getenv("PATH") . PATH_SEPARATOR . "/bin" . PATH_SEPARATOR . "/usr/bin"); + array_push($log, "Checking for system() call..."); + + $disabled = explode(',', ini_get('disable_functions')); + foreach ($disabled as $function) { + if ( trim($function) == 'system' ) { + array_push($log, "Can not execute commands with PHP's system() function."); + $stop = true; + } + } + + if ( $stop == true ) { + break; + } + array_push($log, "Checking for tar..."); $system_rc = 0; @@ -234,6 +250,7 @@ class Updater extends Plugin { CACHE_DIR . "/images", CACHE_DIR . "/js", CACHE_DIR . "/simplepie", + CACHE_DIR . "/upload", ICONS_DIR, LOCK_DIRECTORY); @@ -339,6 +356,10 @@ class Updater extends Plugin { } else { print_notice(__("Your Tiny Tiny RSS installation is up to date.")); + + print "<br/> <button dojoType=\"dijit.form.Button\" onclick=\"return updateSelf()\">". + __('Force update')."</button></p>"; + } print "</div>"; #pane |