batch feed editor:

- fix some field changes not applying because of DB type errors
 - rework to use bound vars instead of sql query concatenation
deprecate: checkbox_to_sql_bool(), bool_to_sql_bool()
This commit is contained in:
Andrew Dolgov
2022-12-30 19:07:15 +03:00
parent 2be8d58509
commit a16acd65fc
2 changed files with 40 additions and 36 deletions

View File

@@ -357,6 +357,7 @@
return $s && ($s !== "f" && $s !== "false"); //no-op for PDO, backwards compat for legacy layer
}
/** @deprecated misleading name, seems to be pointless wrapper */
function bool_to_sql_bool(bool $s): int {
return $s ? 1 : 0;
}
@@ -412,6 +413,7 @@
/**
* @param mixed $val
* @deprecated misleading name, seems to be a pointless wrapper
*/
function checkbox_to_sql_bool($val): int {
return ($val == "on") ? 1 : 0;