aboutsummaryrefslogtreecommitdiffstats
path: root/phpBB/includes/functions_user.php
diff options
context:
space:
mode:
Diffstat (limited to 'phpBB/includes/functions_user.php')
-rw-r--r--phpBB/includes/functions_user.php19
1 files changed, 19 insertions, 0 deletions
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
@@ -1949,6 +1949,25 @@ 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)
+{
+ 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
*/
function avatar_delete($mode, $row, $clean_db = false)