]> git.ipfire.org Git - thirdparty/bacula.git/commitdiff
baculum: Fix not showing 'gui on' command in bconsole output
authorMarcin Haba <marcin.haba@bacula.pl>
Tue, 1 May 2018 05:56:36 +0000 (07:56 +0200)
committerMarcin Haba <marcin.haba@bacula.pl>
Tue, 1 May 2018 05:56:36 +0000 (07:56 +0200)
gui/baculum/protected/API/Class/Bconsole.php

index 255a50172e670b9001221b2518d635b7c3895156..c3433aa87909cf998d04a5d8ff0481ac5c6162ae 100644 (file)
@@ -130,10 +130,10 @@ class Bconsole extends APIModule {
        }
 
        private function prepareResult(array $output, $exitcode, $bconsole_command) {
-               array_shift($output); // deleted 'gui on'
                array_pop($output); // deleted 'quit' bconsole command
-               for($i = 0; $i < count($output); $i++) {
-                       if(strstr($output[$i], $bconsole_command) == false) {
+               $out = $output;
+               for($i = 0; $i < count($out); $i++) {
+                       if(strstr($out[$i], $bconsole_command) == false) {
                                unset($output[$i]);
                        } else {
                                break;