1
0
mirror of https://github.com/phpbb/phpbb.git synced 2025-07-30 21:40:43 +02:00

Merge branch 'develop-olympus' into develop

* develop-olympus:
  [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).

Conflicts:
	phpBB/install/database_update.php
This commit is contained in:
Andreas Fischer
2012-04-08 22:04:33 +02:00
3 changed files with 57 additions and 1 deletions

View File

@@ -1947,6 +1947,27 @@ function validate_jabber($jid)
return false;
}
/**
* 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
*/