Fix admin edit_access wrong enabled type, other fixes

General notice fixes as much as possible
This commit is contained in:
Clemens Schwaighofer
2018-11-07 13:32:58 +09:00
parent 433b21ab6f
commit 9d918f3b43
10 changed files with 457 additions and 108 deletions

View File

@@ -2259,7 +2259,11 @@ class Basic
// DESC : full wrapper for html entities
public function htmlent($string)
{
return htmlentities($string, ENT_COMPAT|ENT_HTML401, 'UTF-8', false);
if (is_string($string)) {
return htmlentities($string, ENT_COMPAT|ENT_HTML401, 'UTF-8', false);
} else {
return $string;
}
}
// METHOD: setFormToken

View File

@@ -409,6 +409,8 @@ class ArrayIO extends \CoreLibs\DB\IO
$_value = $this->table_array[$column]["value"];
}
$q_data .= $_value;
} elseif ($this->table_array[$column]['bool']) {
$q_data .= "'".$this->dbBoolean($this->table_array[$column]["value"], true)."'";
} elseif ($this->table_array[$column]["interval"]) {
// for interval we check if no value, then we set null
if (!$this->table_array[$column]["value"]) {

View File

@@ -879,8 +879,8 @@ class Generate extends \CoreLibs\DB\Extended\ArrayIO
break;
case "alphanumericspace":
// $this->debug('edit', 'IN Alphanumericspace');
if (!preg_match("/^[0-9A-Za-z\ ]+$/", $this->table_array[$key]["value"])) {
$this->msg .= sprintf($this->l->__("Please enter a valid alphanumeric (Numbers and Letters, spaces allowed) value for the <b>%s</b> Field!<br>"), $this->table_array[$key]["output_name"]);
if (!preg_match("/^[0-9A-Za-z_\-\ ]+$/", $this->table_array[$key]["value"])) {
$this->msg .= sprintf($this->l->__("Please enter a valid alphanumeric (Numbers and Letters, -, _ and spaces allowed) value for the <b>%s</b> Field!<br>"), $this->table_array[$key]["output_name"]);
}
break;
case "alphanumeric":