Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[ticket/15201] Set user style to default style when it is disabled or uninstalled #4930

Merged
merged 7 commits into from Oct 22, 2017

Conversation

Projects
None yet
3 participants
@rubencm
Copy link
Member

commented Sep 7, 2017

Checklist:

  • Correct branch: master for new features; 3.2.x, 3.1.x for fixes
  • Tests pass
  • Code follows coding guidelines: master / 3.2.x, 3.1.x
  • Commit follows commit message format

Tracker ticket (set the ticket ID to your ticket ID):

https://tracker.phpbb.com/browse/PHPBB3-15201

SET user_style = 0
WHERE ' . $this->db->sql_in_set('user_style', $valid_styles, true));
$this->sql_query('UPDATE ' . USERS_TABLE . "
SET user_style = '" . $valid_styles[0] . "'

This comment has been minimized.

Copy link
@Nicofuma

Nicofuma Sep 8, 2017

Member

int cast

[ticket/15201] Fix tests
PHPBB3-15201

@rubencm rubencm force-pushed the rubencm:ticket/15201 branch from 168089d to 4b1ec6a Sep 8, 2017

$this->db->sql_freeresult($result);
$this->config->set('default_style', $default_style);
$sql = 'UPDATE ' . USERS_TABLE . ' SET user_style = 0';
$sql = 'UPDATE ' . USERS_TABLE . ' SET user_style = ' . $default_style;

This comment has been minimized.

Copy link
@Nicofuma

Nicofuma Sep 8, 2017

Member

I'll recast it here (even if it's already an int)

// Set the default style to users who have an invalid style
$this->sql_query('UPDATE ' . USERS_TABLE . "
SET user_style = $default_style

This comment has been minimized.

Copy link
@Nicofuma

Nicofuma Sep 8, 2017

Member

same here

[ticket/15201] Add casting
PHPBB3-15201

@marc1706 marc1706 added this to the 3.2.2 milestone Oct 22, 2017

marc1706 added a commit to marc1706/phpbb that referenced this pull request Oct 22, 2017

Merge pull request phpbb#4930 from rubencm/ticket/15201
[ticket/15201] Set user style to default style when it is disabled or uninstalled

@marc1706 marc1706 merged commit bace8dd into phpbb:3.2.x Oct 22, 2017

1 check passed

continuous-integration/travis-ci/pr The Travis CI build passed
Details
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.