1
0
mirror of https://github.com/phpbb/phpbb.git synced 2025-08-05 16:27:38 +02:00

[ticket/10561] Changes made to function phpbb_style_is_active().

Fixed return type, documented function and, removed
style_id from fetch.

PHPBB3-10561
This commit is contained in:
Hari Sankar R
2012-04-03 22:56:06 +05:30
parent 084e1ae560
commit b81a5afc25
2 changed files with 8 additions and 6 deletions

View File

@@ -1239,21 +1239,23 @@ function style_select($default = '', $all = false)
}
/**
* Check if style is activated
* @author Hari Sankar R <hsr@theinglorio.us>
* @param int $style_id The style_id of a style which should be checked if activated or not.
* @return boolean
*/
function style_verify($style_id = 0)
function phpbb_style_is_active($style_id)
{
global $db;
$sql = 'SELECT style_id, style_active
$sql = 'SELECT style_active
FROM ' . STYLES_TABLE . "
WHERE style_id = $style_id";
WHERE style_id = ". (int) $style_id;
$result = $db->sql_query($sql);
$style_verified = $db->sql_fetchrow($result);
$db->sql_freeresult($result);
return $style_verified['style_active'];
return (bool) $style_verified['style_active'];
}
/**