Skip to content

Commit 8b58cfd

Browse files
Merge branch 'branch-7.5' of github.com:wanderleihuttel/webacula
2 parents 8166dcd + 083a272 commit 8b58cfd

File tree

18 files changed

+64
-40
lines changed

18 files changed

+64
-40
lines changed

html/index.php

+10-4
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,7 @@
1818
*
1919
*/
2020

21-
define('WEBACULA_VERSION', '7.5.3' . ' build 07Nov2017');
21+
define('WEBACULA_VERSION', '7.5.4' . ' build 05Dec2018');
2222

2323
define('ROOT_DIR', dirname(dirname(__FILE__)) );
2424
define('CACHE_DIR', ROOT_DIR.'/data/cache' );
@@ -113,6 +113,12 @@
113113

114114
// setup database bacula
115115
Zend_Registry::set('DB_ADAPTER', strtoupper($config->general->db->adapter) );
116+
if($config->general->db->adapter == "PDO_PGSQL"){
117+
$db_name = "PostgreSQL";
118+
} else {
119+
$db_name = "MySQL/MariaDB";
120+
}
121+
116122
$params = $config->general->db->config->toArray();
117123
// for cross database compatibility with PDO, MySQL, PostgreSQL
118124
$params['options'] = array(Zend_Db::CASE_FOLDING => Zend_Db::CASE_LOWER, Zend_DB::AUTO_QUOTE_IDENTIFIERS => FALSE);
@@ -214,16 +220,16 @@
214220
} catch (Zend_Db_Adapter_Exception $e) {
215221
echo '<pre>';
216222
// possible database is not running
217-
throw new Zend_Exception("Fatal error: Can't connect to SQL server.");
223+
throw new Zend_Exception("Fatal error: Can't connect to Database " . $db_name. "\n" . $e);
218224
}
219225
/*
220226
* Check Bacula Catalog version
221227
*/
222228
$ver = new Version();
223229
if ( !$ver->checkVersion(BACULA_VERSION) ) {
224230
echo '<pre>';
225-
throw new Zend_Exception("Bacula version mismatch for the Catalog database.".
226-
"Wanted ".BACULA_VERSION.", got ". $ver->getVersion().". ");
231+
throw new Zend_Exception("Bacula version mismatch for the Catalog database. ". "Wanted ".BACULA_VERSION." got ". $ver->getVersion().".\n" .
232+
"Update your webacula tables and modify the 'catalog.version' in application/config.ini.");
227233
}
228234
/*
229235
* Check CACHE_DIR is writable

languages/pt/webacula_pt_BR.mo

-2 Bytes
Binary file not shown.

languages/pt/webacula_pt_BR.po

+4-4
Original file line numberDiff line numberDiff line change
@@ -2,8 +2,8 @@ msgid ""
22
msgstr ""
33
"Project-Id-Version: webacula\n"
44
"Report-Msgid-Bugs-To: \n"
5-
"POT-Creation-Date: 2017-11-07 09:29-0200\n"
6-
"PO-Revision-Date: 2017-11-07 09:35-0200\n"
5+
"POT-Creation-Date: 2018-12-05 14:15-0200\n"
6+
"PO-Revision-Date: 2018-12-05 14:15-0200\n"
77
"Last-Translator: Wanderlei Hüttel <[email protected]>\n"
88
"Language-Team: Samuel Rios Carvalho <[email protected]>, "
99
"Wanderlei Hüttel <[email protected]>\n"
@@ -15,7 +15,7 @@ msgstr ""
1515
"X-Poedit-KeywordsList: $this->translate->_;$this_view->translate->_;$this-"
1616
">view->translate->_\n"
1717
"X-Poedit-Basepath: Y:/webacula\n"
18-
"X-Generator: Poedit 2.0.4\n"
18+
"X-Generator: Poedit 2.0.8\n"
1919
"X-Poedit-SearchPath-0: application\n"
2020
"X-Poedit-SearchPath-1: html\n"
2121
"X-Poedit-SearchPath-2: library/MyClass\n"
@@ -1129,7 +1129,7 @@ msgstr "Cliente de restauração"
11291129
#: application/forms/FormRestoreOptions.php:153
11301130
#: application/views/scripts/decorators/formRestoreoptions.phtml:129
11311131
msgid "Restore Job Resource"
1132-
msgstr "Restaurar Job Resource"
1132+
msgstr "Job de Restauração"
11331133

11341134
#: application/forms/FormRestoreOptions.php:174
11351135
#: application/views/scripts/admin/role-main-form.phtml:68

library/Zend/Cache/Backend.php

+1-1
Original file line numberDiff line numberDiff line change
@@ -76,7 +76,7 @@ public function __construct(array $options = array())
7676
public function setDirectives($directives)
7777
{
7878
if (!is_array($directives)) Zend_Cache::throwException('Directives parameter must be an array');
79-
while (list($name, $value) = each($directives)) {
79+
foreach ($directives as $name => $value) {
8080
if (!is_string($name)) {
8181
Zend_Cache::throwException("Incorrect option name : $name");
8282
}

library/Zend/Config/Yaml.php

+8-6
Original file line numberDiff line numberDiff line change
@@ -202,7 +202,7 @@ public function __construct($yaml, $section = null, $options = false)
202202
if (!isset($config[$sectionName])) {
203203
require_once 'Zend/Config/Exception.php';
204204
throw new Zend_Config_Exception(sprintf(
205-
'Section "%s" cannot be found',
205+
'Section "%s" cannot be found',
206206
implode(' ', (array)$section)
207207
));
208208
}
@@ -214,7 +214,7 @@ public function __construct($yaml, $section = null, $options = false)
214214
if (!isset($config[$section])) {
215215
require_once 'Zend/Config/Exception.php';
216216
throw new Zend_Config_Exception(sprintf(
217-
'Section "%s" cannot be found',
217+
'Section "%s" cannot be found',
218218
implode(' ', (array)$section)
219219
));
220220
}
@@ -289,8 +289,10 @@ protected static function _decodeYaml($currentIndent, &$lines)
289289
{
290290
$config = array();
291291
$inIndent = false;
292-
while (list($n, $line) = each($lines)) {
293-
$lineno = $n + 1;
292+
while (key($lines) !== null) {
293+
$line = current($lines);
294+
$lineno = key($lines) + 1;
295+
next($lines);
294296

295297
$line = rtrim(preg_replace("/#.*$/", "", $line));
296298
if (strlen($line) == 0) {
@@ -363,10 +365,10 @@ protected static function _parseValue($value)
363365

364366
// remove quotes from string.
365367
if ('"' == $value['0']) {
366-
if ('"' == $value[count($value) -1]) {
368+
if ('"' == $value[strlen($value) -1]) {
367369
$value = substr($value, 1, -1);
368370
}
369-
} elseif ('\'' == $value['0'] && '\'' == $value[count($value) -1]) {
371+
} elseif ('\'' == $value['0'] && '\'' == $value[strlen($value) -1]) {
370372
$value = strtr($value, array("''" => "'", "'" => ''));
371373
}
372374

library/Zend/Date/DateObject.php

+4-4
Original file line numberDiff line numberDiff line change
@@ -313,10 +313,10 @@ protected function date($format, $timestamp = null, $gmt = false)
313313

314314
if (abs($timestamp) <= 0x7FFFFFFF) {
315315
// See ZF-11992
316-
// "o" will sometimes resolve to the previous year (see
317-
// http://php.net/date ; it's part of the ISO 8601
318-
// standard). However, this is not desired, so replacing
319-
// all occurrences of "o" not preceded by a backslash
316+
// "o" will sometimes resolve to the previous year (see
317+
// http://php.net/date ; it's part of the ISO 8601
318+
// standard). However, this is not desired, so replacing
319+
// all occurrences of "o" not preceded by a backslash
320320
// with "Y"
321321
$format = preg_replace('/(?<!\\\\)o/', 'Y', $format);
322322
$result = ($gmt) ? @gmdate($format, $timestamp) : @date($format, $timestamp);

library/Zend/Db/Table/Abstract.php

+1-1
Original file line numberDiff line numberDiff line change
@@ -1304,13 +1304,13 @@ public function find()
13041304
$whereList = array();
13051305
$numberTerms = 0;
13061306
foreach ($args as $keyPosition => $keyValues) {
1307-
$keyValuesCount = count($keyValues);
13081307
// Coerce the values to an array.
13091308
// Don't simply typecast to array, because the values
13101309
// might be Zend_Db_Expr objects.
13111310
if (!is_array($keyValues)) {
13121311
$keyValues = array($keyValues);
13131312
}
1313+
$keyValuesCount = count($keyValues);
13141314
if ($numberTerms == 0) {
13151315
$numberTerms = $keyValuesCount;
13161316
} else if ($keyValuesCount != $numberTerms) {

library/Zend/Feed/Reader/Entry/Rss.php

+1-1
Original file line numberDiff line numberDiff line change
@@ -201,7 +201,7 @@ public function getAuthors()
201201
);
202202
}
203203

204-
if (count($authors) == 0) {
204+
if ($authors !== null && count($authors) == 0) {
205205
$authors = null;
206206
}
207207

library/Zend/Feed/Reader/Feed/Rss.php

+1-1
Original file line numberDiff line numberDiff line change
@@ -151,7 +151,7 @@ public function getAuthors()
151151
);
152152
}
153153

154-
if (count($authors) == 0) {
154+
if ($authors !== null && count($authors) == 0) {
155155
$authors = null;
156156
}
157157

library/Zend/Http/UserAgent/Features/Adapter/TeraWurfl.php

+1-1
Original file line numberDiff line numberDiff line change
@@ -88,7 +88,7 @@ public static function getAllCapabilities(TeraWurfl $wurflObj)
8888
if (!is_array($group)) {
8989
continue;
9090
}
91-
while (list ($key, $value) = each($group)) {
91+
foreach ($group as $key => $value) {
9292
if (is_bool($value)) {
9393
// to have the same type than the official WURFL API
9494
$features[$key] = ($value ? 'true' : 'false');

library/Zend/Mail/Part.php

+14-8
Original file line numberDiff line numberDiff line change
@@ -47,7 +47,7 @@
4747
* @copyright Copyright (c) 2005-2015 Zend Technologies USA Inc. (http://www.zend.com)
4848
* @license http://framework.zend.com/license/new-bsd New BSD License
4949
*/
50-
class Zend_Mail_Part implements RecursiveIterator, Zend_Mail_Part_Interface
50+
class Zend_Mail_Part implements RecursiveIterator, Zend_Mail_Part_Interface, Countable
5151
{
5252
/**
5353
* headers of part as array
@@ -96,10 +96,10 @@ class Zend_Mail_Part implements RecursiveIterator, Zend_Mail_Part_Interface
9696
* @var int
9797
*/
9898
protected $_messageNum = 0;
99-
99+
100100
/**
101101
* Class to use when creating message parts
102-
* @var string
102+
* @var string
103103
*/
104104
protected $_partClass;
105105

@@ -138,7 +138,7 @@ public function __construct(array $params)
138138
$this->_mail = $params['handler'];
139139
$this->_messageNum = $params['id'];
140140
}
141-
141+
142142
if (isset($params['partclass'])) {
143143
$this->setPartClass($params['partclass']);
144144
}
@@ -162,7 +162,7 @@ public function __construct(array $params)
162162
}
163163
}
164164
}
165-
165+
166166
/**
167167
* Set name pf class used to encapsulate message parts
168168
* @param string $class
@@ -184,14 +184,14 @@ public function setPartClass($class)
184184
require_once 'Zend/Mail/Exception.php';
185185
throw new Zend_Mail_Exception("Class '{$class}' must implement Zend_Mail_Part_Interface");
186186
}
187-
187+
188188
$this->_partClass = $class;
189189
return $this;
190190
}
191-
191+
192192
/**
193193
* Retrieve the class name used to encapsulate message parts
194-
* @return string
194+
* @return string
195195
*/
196196
public function getPartClass()
197197
{
@@ -201,6 +201,12 @@ public function getPartClass()
201201
return $this->_partClass;
202202
}
203203

204+
public function count()
205+
{
206+
return $this->countParts();
207+
}
208+
209+
204210
/**
205211
* Check if part is a multipart message
206212
*

library/Zend/Oauth/Token.php

+1-1
Original file line numberDiff line numberDiff line change
@@ -71,7 +71,7 @@ public function __construct(
7171
if ($response !== null) {
7272
$this->_response = $response;
7373
$params = $this->_parseParameters($response);
74-
if (count($params) > 0) {
74+
if ($params !== null && count($params) > 0) {
7575
$this->setParams($params);
7676
}
7777
}

library/Zend/Rest/Route.php

+3-1
Original file line numberDiff line numberDiff line change
@@ -239,9 +239,11 @@ public function match($request, $partial = false)
239239
* @param array $data An array of variable and value pairs used as parameters
240240
* @param bool $reset Weither to reset the current params
241241
* @param bool $encode Weither to return urlencoded string
242+
* @param bool $partial
243+
*
242244
* @return string Route path with user submitted parameters
243245
*/
244-
public function assemble($data = array(), $reset = false, $encode = true)
246+
public function assemble($data = array(), $reset = false, $encode = true, $partial = false)
245247
{
246248
if (!$this->_keysSet) {
247249
if (null === $this->_request) {

library/Zend/Test/DbStatement.php

+5-1
Original file line numberDiff line numberDiff line change
@@ -140,7 +140,11 @@ public function setRowCount($rowCount)
140140
*/
141141
public function append($row)
142142
{
143-
$this->_columnCount = count($row);
143+
if (!is_array($row)) {
144+
$this->_columnCount = 1;
145+
} else {
146+
$this->_columnCount = count($row);
147+
}
144148
$this->_fetchStack[] = $row;
145149
}
146150

library/Zend/Tool/Project/Profile/Resource/Container.php

+1-1
Original file line numberDiff line numberDiff line change
@@ -383,7 +383,7 @@ public function valid()
383383
*/
384384
public function hasChildren()
385385
{
386-
return (count($this->_subResources > 0)) ? true : false;
386+
return (count($this->_subResources) > 0) ? true : false;
387387
}
388388

389389
/**

library/Zend/Validate/EmailAddress.php

+1-1
Original file line numberDiff line numberDiff line change
@@ -453,7 +453,7 @@ private function _validateMXRecords()
453453

454454
//decode IDN domain name if possible
455455
if (function_exists('idn_to_ascii')) {
456-
$hostname = idn_to_ascii($this->_hostname);
456+
$hostname = idn_to_ascii($this->_hostname, 0, INTL_IDNA_VARIANT_UTS46);
457457
}
458458

459459
$result = getmxrr($hostname, $mxHosts);

library/Zend/Validate/File/Upload.php

+1-1
Original file line numberDiff line numberDiff line change
@@ -129,7 +129,7 @@ public function getFiles($file = null)
129129
*/
130130
public function setFiles($files = array())
131131
{
132-
if (count($files) === 0) {
132+
if ($files === null || count($files) === 0) {
133133
$this->_files = $_FILES;
134134
} else {
135135
$this->_files = $files;

library/Zend/XmlRpc/Value.php

+7-3
Original file line numberDiff line numberDiff line change
@@ -486,13 +486,17 @@ protected static function _createSimpleXMLElement(&$xml)
486486
*/
487487
protected static function _extractTypeAndValue(SimpleXMLElement $xml, &$type, &$value)
488488
{
489-
list($type, $value) = each($xml);
489+
$type = key($xml);
490+
$value = current($xml);
491+
next($xml);
490492

491-
if (!$type and $value === null) {
493+
if ($type === null && $value === false) {
492494
$namespaces = array('ex' => 'http://ws.apache.org/xmlrpc/namespaces/extensions');
493495
foreach ($namespaces as $namespaceName => $namespaceUri) {
494496
$namespaceXml = $xml->children($namespaceUri);
495-
list($type, $value) = each($namespaceXml);
497+
$type = key($namespaceXml);
498+
$value = current($namespaceXml);
499+
next($namespaceXml);
496500
if ($type !== null) {
497501
$type = $namespaceName . ':' . $type;
498502
break;

0 commit comments

Comments
 (0)