Commit c51e2dbe authored by Cédric Anne's avatar Cédric Anne Committed by Johan Cwiklinski

Fix errors on last step of install wizard

parent 307a8080
......@@ -346,8 +346,6 @@ class DBmysqlIterator implements Iterator, Countable {
* @return string
*/
public function analyseCrit ($crit, $bool = "AND") {
global $DB;
static $operators = ['=', '<', '<=', '>', '>=', '<>', 'LIKE', 'REGEXP', 'NOT LIKE', 'NOT REGEX', '&'];
if (!is_array($crit)) {
......@@ -391,11 +389,11 @@ class DBmysqlIterator implements Iterator, Countable {
if (count($value) == 2
&& isset($value[0]) && in_array($value[0], $operators, true)) {
$ret .= DBmysql::quoteName($name) . " {$value[0]} " . $DB::quoteValue($value[1]);
$ret .= DBmysql::quoteName($name) . " {$value[0]} " . DBmysql::quoteValue($value[1]);
} else {
// Array of Values
foreach ($value as $k => $v) {
$value[$k] = $DB::quoteValue($v);
$value[$k] = DBmysql::quoteValue($v);
}
$ret .= DBmysql::quoteName($name) . ' IN (' . implode(', ', $value) . ')';
}
......@@ -403,7 +401,7 @@ class DBmysqlIterator implements Iterator, Countable {
// NULL condition
$ret .= DBmysql::quoteName($name) . " IS NULL";
} else {
$ret .= DBmysql::quoteName($name) . " = " . $DB::quoteValue($value);
$ret .= DBmysql::quoteName($name) . " = " . DBmysql::quoteValue($value);
}
}
return $ret;
......
......@@ -486,7 +486,7 @@ function step7() {
$url_base_api = "$url_base/apirest.php/";
$DB->update(
'glpi_configs',
['value' => $Db->escape($url_base_api)], [
['value' => $DB->escape($url_base_api)], [
'context' => 'core',
'name' => 'url_base_api'
]
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment