Skip to content

Commit

Permalink
Fix coding guidelines
Browse files Browse the repository at this point in the history
  • Loading branch information
paul999 committed Jun 1, 2019
1 parent 194fc9b commit bd8dcf5
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 3 deletions.
5 changes: 3 additions & 2 deletions event/main_listener.php
Original file line number Diff line number Diff line change
Expand Up @@ -223,10 +223,11 @@ public function acp_board_settings($event)
*/
public function validate_config($event)
{
if($event['config_definition']['validate'] === 'mention_hex')
if ($event['config_definition']['validate'] === 'mention_hex')
{
$value = $event['cfg_array'][$event['config_name']];
if (!preg_match("/([a-f0-9]{3}){1,2}\b/i", $value)) {
if (!preg_match("/([a-f0-9]{3}){1,2}\b/i", $value))
{
$error = $event['error'];
$error[] = sprintf($this->user->lang('MENTION_COLOR_INVALID'), $value);
$event['error'] = $error;
Expand Down
2 changes: 1 addition & 1 deletion migrations/add_config.php
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ public function update_data()
{
return [
['config.add', ['simple_mention_minlength', '1', false]],
['config.add', ['simple_mention_color', 'ff0000', false]],
['config.add', ['simple_mention_color', 'ff0000', false]],
];
}
}

0 comments on commit bd8dcf5

Please sign in to comment.