From 018419b36cf4d81cf2fa3f82d85f9bc8580c9c19 Mon Sep 17 00:00:00 2001 From: Hari Sankar R Date: Thu, 5 Apr 2012 19:31:18 +0530 Subject: [ticket/10561] Moved and renamed the funtion validate_style(). Fixed minor changes as suggested by @bantu. PHPBB3-10561 --- phpBB/includes/functions_user.php | 19 +++++++++++++++++++ 1 file changed, 19 insertions(+) (limited to 'phpBB/includes/functions_user.php') diff --git a/phpBB/includes/functions_user.php b/phpBB/includes/functions_user.php index 10fb57ea97..7313844955 100644 --- a/phpBB/includes/functions_user.php +++ b/phpBB/includes/functions_user.php @@ -1948,6 +1948,25 @@ function validate_jabber($jid) return false; } +/** +* @param int $style_id The style_id of a style which should be checked if activated or not. +* @return boolean +*/ +function phpbb_validate_style($style_id) +{ + global $db; + + $sql = 'SELECT style_active + FROM ' . STYLES_TABLE . ' + WHERE style_id = '. (int) $style_id; + $result = $db->sql_query($sql); + + $style_is_active = (bool) $db->sql_fetchfield('style_active'); + $db->sql_freeresult($result); + + return $style_is_active; +} + /** * Remove avatar */ -- cgit v1.2.1 From 03a35581c4b0dcb7c20885d4ca807ea7117872cb Mon Sep 17 00:00:00 2001 From: Hari Sankar R Date: Sat, 7 Apr 2012 23:15:12 +0530 Subject: [ticket/10561] Reverted to phpbb_style_is_active() Changes made to function name, reverted to old. PHPBB3-10561 --- phpBB/includes/functions_user.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'phpBB/includes/functions_user.php') diff --git a/phpBB/includes/functions_user.php b/phpBB/includes/functions_user.php index 7313844955..770eab48d5 100644 --- a/phpBB/includes/functions_user.php +++ b/phpBB/includes/functions_user.php @@ -1952,7 +1952,7 @@ function validate_jabber($jid) * @param int $style_id The style_id of a style which should be checked if activated or not. * @return boolean */ -function phpbb_validate_style($style_id) +function phpbb_style_is_active($style_id) { global $db; -- cgit v1.2.1 From 9bce716081f55f209afbfb3ecf1a097b47292da4 Mon Sep 17 00:00:00 2001 From: Hari Sankar R Date: Mon, 9 Apr 2012 00:57:29 +0530 Subject: [ticket/10561] Added function desc for phpbb_style_is_active() PHPBB3-10561 --- phpBB/includes/functions_user.php | 2 ++ 1 file changed, 2 insertions(+) (limited to 'phpBB/includes/functions_user.php') diff --git a/phpBB/includes/functions_user.php b/phpBB/includes/functions_user.php index 770eab48d5..83316be2a3 100644 --- a/phpBB/includes/functions_user.php +++ b/phpBB/includes/functions_user.php @@ -1949,6 +1949,8 @@ function validate_jabber($jid) } /** +* Verifies whether a style ID corresponds to an active style. +* * @param int $style_id The style_id of a style which should be checked if activated or not. * @return boolean */ -- cgit v1.2.1