From 2cf93c046c790005e66670c5c4bfe5b6b3e72a67 Mon Sep 17 00:00:00 2001 From: Andrew Dolgov Date: Sun, 3 Dec 2017 13:54:03 +0300 Subject: pref-users: fix sorting the table --- include/functions.php | 7 +++++++ 1 file changed, 7 insertions(+) (limited to 'include/functions.php') 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) . '?'; } -- cgit v1.2.3-54-g00ecf