diff options
author | Andrew Dolgov <[email protected]> | 2017-12-03 13:54:03 +0300 |
---|---|---|
committer | Andrew Dolgov <[email protected]> | 2017-12-03 13:54:31 +0300 |
commit | 2cf93c046c790005e66670c5c4bfe5b6b3e72a67 (patch) | |
tree | 4f6e74e6bb67f8910612a37b0f55e6ce815c8a36 /include | |
parent | 3eecebc34f548cb135b5285515729ed91184e9e4 (diff) |
pref-users: fix sorting the table
Diffstat (limited to 'include')
-rw-r--r-- | include/functions.php | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/include/functions.php b/include/functions.php index e781eee51..54fa2bd9d 100644 --- a/include/functions.php +++ b/include/functions.php @@ -2548,6 +2548,13 @@ return $bad_tables; } + function validate_field($string, $allowed, $default = "") { + if (in_array($string, $allowed)) + return $string; + else + return $default; + } + function arr_qmarks($arr) { return str_repeat('?,', count($arr) - 1) . '?'; } |