diff options
Diffstat (limited to 'engine/lib/database.php')
-rw-r--r-- | engine/lib/database.php | 32 |
1 files changed, 32 insertions, 0 deletions
diff --git a/engine/lib/database.php b/engine/lib/database.php index 045f72c72..0979592c0 100644 --- a/engine/lib/database.php +++ b/engine/lib/database.php @@ -359,6 +359,38 @@ return mysql_real_escape_string(trim($string));
}
+ /**
+ * Wrapper function for Americans
+ *
+ * @param string $string The string to sanitise
+ * @return string Sanitised string
+ * @uses sanitise_string
+ */
+ function sanitize_string($string) {
+ return sanitise_string($string);
+ }
+
+ /**
+ * Sanitises an integer for database use
+ *
+ * @param int $int
+ * @return int Sanitised integer
+ */
+ function sanitise_int($int) {
+ return (int) $int;
+ }
+
+ /**
+ * Wrapper function for Americans
+ *
+ * @param int $int
+ * @return int Sanitised integer
+ * @uses sanitise_string
+ */
+ function sanitize_int($int) {
+ return (int) $int;
+ }
+
// Stuff for initialisation
register_event_handler('boot','system','init_db',0);
|