From 9cc5d6d7fcd4dd3a4a6bc6309e86cd83f751b355 Mon Sep 17 00:00:00 2001 From: ben Date: Tue, 15 Apr 2008 16:23:25 +0000 Subject: get_entities now allows for arrays of GUIDs to be supplied as an owner, and can be asked to count entities rather than return them; as a result, get_user_friends_objects and count_* functionality is also now available git-svn-id: https://code.elgg.org/elgg/trunk@468 36083f99-b078-4883-b0ff-0f9b5a30f544 --- engine/lib/database.php | 32 ++++++++++++++++++++++++++++++++ 1 file changed, 32 insertions(+) (limited to 'engine/lib/database.php') 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); -- cgit v1.2.3