]> git.sur5r.net Git - bacula/bacula/commitdiff
baculum: Fix show job log with national characters
authorMarcin Haba <marcin.haba@bacula.pl>
Sun, 8 Feb 2015 19:55:43 +0000 (20:55 +0100)
committerMarcin Haba <marcin.haba@bacula.pl>
Sun, 8 Feb 2015 19:55:43 +0000 (20:55 +0100)
gui/baculum/protected/Pages/API/JobLog.php

index b36efebd4fbf26b74aab86a8d62cdabf01e0f60c..ba4ccbad75f118c6b41c0a0d2942eb9ddea6935c 100644 (file)
@@ -23,7 +23,8 @@ class JobLog extends BaculumAPI {
                $job = $this->getModule('job')->getJobById($jobid);
                if(!is_null($job)) {
                        $log = $this->getModule('joblog')->getLogByJobId($job->jobid);
-                       $this->output = $log;
+                       // Output may contain national characters.
+                       $this->output = array_map('utf8_encode', $log);
                        $this->error = JobError::ERROR_NO_ERRORS;
                } else {
                        $this->output = JobError::MSG_ERROR_JOB_DOES_NOT_EXISTS;
@@ -32,4 +33,4 @@ class JobLog extends BaculumAPI {
        }
 }
 
-?>
\ No newline at end of file
+?>