mirror of
https://github.com/phpbb/phpbb.git
synced 2025-02-24 20:13:22 +01:00
[ticket/10561] Reverted to phpbb_style_is_active()
Changes made to function name, reverted to old. PHPBB3-10561
This commit is contained in:
parent
1808a61fe3
commit
03a35581c4
@ -1952,7 +1952,7 @@ function validate_jabber($jid)
|
|||||||
* @param int $style_id The style_id of a style which should be checked if activated or not.
|
* @param int $style_id The style_id of a style which should be checked if activated or not.
|
||||||
* @return boolean
|
* @return boolean
|
||||||
*/
|
*/
|
||||||
function phpbb_validate_style($style_id)
|
function phpbb_style_is_active($style_id)
|
||||||
{
|
{
|
||||||
global $db;
|
global $db;
|
||||||
|
|
||||||
|
@ -65,9 +65,9 @@ class ucp_prefs
|
|||||||
{
|
{
|
||||||
$data['style'] = $config['default_style'];
|
$data['style'] = $config['default_style'];
|
||||||
}
|
}
|
||||||
else if (!phpbb_validate_style($data['style']))
|
else if (!phpbb_style_is_active($data['style']))
|
||||||
{
|
{
|
||||||
$data['style'] = (int) $user->data['user_style']);
|
$data['style'] = (int) $user->data['user_style'];
|
||||||
}
|
}
|
||||||
|
|
||||||
$error = validate_data($data, array(
|
$error = validate_data($data, array(
|
||||||
|
@ -2030,18 +2030,18 @@ function change_database_data(&$no_updates, $version)
|
|||||||
// Changes from 3.0.10 to 3.0.11-RC1
|
// Changes from 3.0.10 to 3.0.11-RC1
|
||||||
case '3.0.10':
|
case '3.0.10':
|
||||||
// Updates users having current style a deactivated one
|
// Updates users having current style a deactivated one
|
||||||
$deactivated_style_ids = array();
|
|
||||||
$sql = 'SELECT style_id
|
$sql = 'SELECT style_id
|
||||||
FROM ' . STYLES_TABLE . '
|
FROM ' . STYLES_TABLE . '
|
||||||
WHERE style_active = 0';
|
WHERE style_active = 0';
|
||||||
$result = $db->sql_query($sql);
|
$result = $db->sql_query($sql);
|
||||||
|
|
||||||
|
$deactivated_style_ids = array();
|
||||||
while ($temp_style_id = $db->sql_fetchfield('style_id', false, $result))
|
while ($temp_style_id = $db->sql_fetchfield('style_id', false, $result))
|
||||||
{
|
{
|
||||||
$deactivated_style_ids[] = (int) $temp_style_id;
|
$deactivated_style_ids[] = (int) $temp_style_id;
|
||||||
}
|
}
|
||||||
|
|
||||||
$db->sql_freeresult($result);
|
$db->sql_freeresult($result);
|
||||||
|
|
||||||
if (!empty($deactivated_style_ids))
|
if (!empty($deactivated_style_ids))
|
||||||
{
|
{
|
||||||
$sql = 'UPDATE ' . USERS_TABLE . '
|
$sql = 'UPDATE ' . USERS_TABLE . '
|
||||||
@ -2049,6 +2049,7 @@ function change_database_data(&$no_updates, $version)
|
|||||||
WHERE ' . $db->sql_in_set('user_style', $deactivated_style_ids);
|
WHERE ' . $db->sql_in_set('user_style', $deactivated_style_ids);
|
||||||
$result = $db->sql_query($sql);
|
$result = $db->sql_query($sql);
|
||||||
}
|
}
|
||||||
|
|
||||||
$no_updates = false;
|
$no_updates = false;
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user