]> git.wh0rd.org - tt-rss.git/blobdiff - plugins/updater/init.php
Updater: check whether system() is useable.
[tt-rss.git] / plugins / updater / init.php
index 69d9b08b2f0404baa8f4ad58da843e3bccf2b3f3..6ee018f74d766ec87285a36b69ee76ed8d9aa029 100644 (file)
@@ -63,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;
@@ -236,6 +250,7 @@ class Updater extends Plugin {
                                        CACHE_DIR . "/images",
                                        CACHE_DIR . "/js",
                                        CACHE_DIR . "/simplepie",
+                                       CACHE_DIR . "/upload",
                                        ICONS_DIR,
                                        LOCK_DIRECTORY);
 
@@ -341,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