Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- diff --git a/a/a.php b/b/a.php
- index a787317..e24a541 100644
- --- a/a/a.php
- +++ b/b/a.php
- @@ -1,7 +1,7 @@
- //from ucp_prefs.php
- if ($submit)
- {
- - $data['style'] = ($config['override_user_style']) ? $config['default_style'] : $data['style'];
- + $data['style'] = ($config['override_user_style']) ? $config['default_style'] : ((!style_select('', false, $data['style'])) ? $data['style'] : ((int) $user->data['user_style']));
- $error = validate_data($data, array(
- 'dateformat' => array('string', false, 1, 30),
- @@ -15,17 +15,21 @@ if ($submit)
- }
- //from functions.php
- -function style_select($default = '', $all = false)
- +function style_select($default = '', $all = false, $pick = false)
- {
- global $db;
- $sql_where = (!$all) ? 'WHERE style_active = 1 ' : '';
- + $sql_where .= (!$pick) ? '' : "AND style_id = $pick";
- $sql = 'SELECT style_id, style_name
- FROM ' . STYLES_TABLE . "
- $sql_where
- ORDER BY style_name";
- $result = $db->sql_query($sql);
- + if(!$pick)
- + return !count($db->sql_fetchrow($result));
- +
- $style_options = '';
- while ($row = $db->sql_fetchrow($result))
- {
Add Comment
Please, Sign In to add comment