diff options
author | Andreas Fischer <bantu@phpbb.com> | 2012-04-08 21:59:06 +0200 |
---|---|---|
committer | Andreas Fischer <bantu@phpbb.com> | 2012-04-08 21:59:06 +0200 |
commit | 156ae40d6fae2067a65a2125924e39e8dc5f35e1 (patch) | |
tree | 59bd94fe14d2b3ff69b43c346c2416cc4a21ab8a /phpBB/includes/functions_user.php | |
parent | 3ec941937afc5cbcd0313a6a5cee394c6f4113f2 (diff) | |
parent | 2a48284fc9125edad2dbd9de41dfb1ef61926b6b (diff) | |
download | forums-156ae40d6fae2067a65a2125924e39e8dc5f35e1.tar forums-156ae40d6fae2067a65a2125924e39e8dc5f35e1.tar.gz forums-156ae40d6fae2067a65a2125924e39e8dc5f35e1.tar.bz2 forums-156ae40d6fae2067a65a2125924e39e8dc5f35e1.tar.xz forums-156ae40d6fae2067a65a2125924e39e8dc5f35e1.zip |
Merge remote-tracking branch 'sadu/ticket/10561' into develop-olympus
* sadu/ticket/10561:
[ticket/10561] Removed extra tabs, changes made to $db->sql_query()
[ticket/10561] Changed $temp_style_id to $style_id
[ticket/10561] Added function desc for phpbb_style_is_active()
[ticket/10561] Casted $config['default_style'] to int
[ticket/10561] Reverted to phpbb_style_is_active()
[ticket/10561] Added to database_update:database_update_info()
[ticket/10561] Added section in database_update.php
[ticket/10561] Moved and renamed the funtion validate_style().
[ticket/10561] Fixed syntax error and renamed return variables.
[ticket/10561] Changes made to $db->sql_fetchrow().
[ticket/10561] Changes made to function phpbb_style_is_active().
[ticket/10561] All users can choose deactivated styles (fixed).
Diffstat (limited to 'phpBB/includes/functions_user.php')
-rw-r--r-- | phpBB/includes/functions_user.php | 21 |
1 files changed, 21 insertions, 0 deletions
diff --git a/phpBB/includes/functions_user.php b/phpBB/includes/functions_user.php index 10fb57ea97..83316be2a3 100644 --- a/phpBB/includes/functions_user.php +++ b/phpBB/includes/functions_user.php @@ -1949,6 +1949,27 @@ 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 +*/ +function phpbb_style_is_active($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) |