]> git.sur5r.net Git - bacula/bacula/blobdiff - gui/baculum/protected/API/Pages/API/Directors.php
baculum: API endpoints code refactor
[bacula/bacula] / gui / baculum / protected / API / Pages / API / Directors.php
index 4050eea08fc2fb518ec9b2c1e47f2a952e8a4b91..b9fb3d44a71809bd0a6d503bb7bb329747c0bde0 100644 (file)
@@ -3,7 +3,7 @@
  * Bacula(R) - The Network Backup Solution
  * Baculum   - Bacula web interface
  *
- * Copyright (C) 2013-2016 Kern Sibbald
+ * Copyright (C) 2013-2017 Kern Sibbald
  *
  * The main author of Baculum is Marcin Haba.
  * The original author of Bacula is Kern Sibbald, with contributions
 
 class Directors extends BaculumAPIServer {
        public function get() {
-               $directors = $this->getModule('bconsole')->getDirectors();
-               if($directors->exitcode === 0) {
-                       $this->output = $directors->output;
+               $result = $this->getModule('bconsole')->getDirectors();
+               if($result->exitcode === 0) {
+                       $this->output = $result->output;
                        $this->error = BconsoleError::ERROR_NO_ERRORS;
                } else {
-                       $this->output = $directors->output;
-                       $this->error = $directors->exitcode;
+                       $this->output = $result->output;
+                       $this->error = $result->exitcode;
                }
        }
 }