aboutsummaryrefslogtreecommitdiffstats
path: root/phpBB/includes/functions_user.php
diff options
context:
space:
mode:
authorHari Sankar R <hsr@theinglorio.us>2012-04-05 19:31:18 +0530
committerHari Sankar R <hsr@theinglorio.us>2012-04-05 19:31:18 +0530
commit018419b36cf4d81cf2fa3f82d85f9bc8580c9c19 (patch)
treedb73d96507a8639e8f815871354a78351d07b01e /phpBB/includes/functions_user.php
parenta84b97f58e8177eb28ad41cfb261200d523c9ff5 (diff)
downloadforums-018419b36cf4d81cf2fa3f82d85f9bc8580c9c19.tar
forums-018419b36cf4d81cf2fa3f82d85f9bc8580c9c19.tar.gz
forums-018419b36cf4d81cf2fa3f82d85f9bc8580c9c19.tar.bz2
forums-018419b36cf4d81cf2fa3f82d85f9bc8580c9c19.tar.xz
forums-018419b36cf4d81cf2fa3f82d85f9bc8580c9c19.zip
[ticket/10561] Moved and renamed the funtion validate_style().
Fixed minor changes as suggested by @bantu. PHPBB3-10561
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)