mirror of
https://git.tt-rss.org/git/tt-rss.git
synced 2025-12-16 07:15:56 +00:00
fix several issues with updater (refs #562)
This commit is contained in:
@@ -27,15 +27,17 @@ class Updater extends Plugin {
|
|||||||
$work_dir = dirname(dirname(dirname(__FILE__)));
|
$work_dir = dirname(dirname(dirname(__FILE__)));
|
||||||
$parent_dir = dirname($work_dir);
|
$parent_dir = dirname($work_dir);
|
||||||
|
|
||||||
if (!chdir($work_dir)) {
|
|
||||||
array_push($log, "Unable to change to work directory: $work_dir");
|
|
||||||
$stop = true; break;
|
|
||||||
}
|
|
||||||
|
|
||||||
$stop = false;
|
|
||||||
$log = array();
|
$log = array();
|
||||||
if (!is_array($params)) $params = array();
|
if (!is_array($params)) $params = array();
|
||||||
|
|
||||||
|
$stop = false;
|
||||||
|
|
||||||
|
if (!chdir($work_dir)) {
|
||||||
|
array_push($log, "Unable to change to work directory: $work_dir");
|
||||||
|
$stop = true;
|
||||||
|
}
|
||||||
|
|
||||||
|
if (!$stop) {
|
||||||
switch ($step) {
|
switch ($step) {
|
||||||
case 0:
|
case 0:
|
||||||
array_push($log, "Work directory: $work_dir");
|
array_push($log, "Work directory: $work_dir");
|
||||||
@@ -241,6 +243,7 @@ class Updater extends Plugin {
|
|||||||
default:
|
default:
|
||||||
$stop = true;
|
$stop = true;
|
||||||
}
|
}
|
||||||
|
}
|
||||||
|
|
||||||
return array("step" => $step, "stop" => $stop, "params" => $params, "log" => $log);
|
return array("step" => $step, "stop" => $stop, "params" => $params, "log" => $log);
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user