summaryrefslogtreecommitdiff
path: root/plugins/updater/init.php
diff options
context:
space:
mode:
authorYoungMin Park <[email protected]>2014-11-04 11:49:43 +0900
committerYoungMin Park <[email protected]>2014-11-04 11:49:43 +0900
commita5bbb2bec133bdee08b361628f32430ae3884107 (patch)
treeb203105149ec234ebe155d5718d2cbb6390b4a45 /plugins/updater/init.php
parent12727ad17d125eb2f3f243231ccca1cb0a5a7b4b (diff)
parent2f43089de1ead3f164b8b31967d1abbb784319fa (diff)
Merge pull request #1 from gothfox/master
Update from original
Diffstat (limited to 'plugins/updater/init.php')
-rw-r--r--plugins/updater/init.php21
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