Skip to content

Commit 3925203

Browse files
committed
Remove unnecessary IN_PHPBB checks
1 parent e434cb1 commit 3925203

4 files changed

Lines changed: 8 additions & 38 deletions

File tree

acp/quickstyle_info.php

Lines changed: 0 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -12,14 +12,6 @@
1212

1313
namespace paybas\quickstyle\acp;
1414

15-
/**
16-
* @ignore
17-
*/
18-
if (!defined('IN_PHPBB'))
19-
{
20-
exit;
21-
}
22-
2315
class quickstyle_info
2416
{
2517
function module()

acp/quickstyle_module.php

Lines changed: 0 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -12,14 +12,6 @@
1212

1313
namespace paybas\quickstyle\acp;
1414

15-
/**
16-
* @ignore
17-
*/
18-
if (!defined('IN_PHPBB'))
19-
{
20-
exit;
21-
}
22-
2315
class quickstyle_module
2416
{
2517
public $u_action;

event/listener.php

Lines changed: 6 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -12,14 +12,6 @@
1212

1313
namespace paybas\quickstyle\event;
1414

15-
/**
16-
* @ignore
17-
*/
18-
if (!defined('IN_PHPBB'))
19-
{
20-
exit;
21-
}
22-
2315
use Symfony\Component\EventDispatcher\EventSubscriberInterface;
2416

2517
class listener implements EventSubscriberInterface
@@ -91,9 +83,11 @@ public function select_style_form()
9183
$redirect = 'redirect=' . urlencode(str_replace(array('&', '../'), array('&', ''), build_url('style'))); // Build redirect URL
9284
$action = append_sid("{$this->root_path}ucp.$this->phpEx", 'i=prefs&mode=personal&' . $redirect); // Build form submit URL + redirect
9385
$action = preg_replace('/(?:&|(\?))style=[^&]*(?(1)&|)?/i', "$1", $action); // Remove style= param if it exists
94-
$this->template->assign_var('S_QUICK_STYLE_ACTION', $action);
95-
$this->template->assign_var('S_QUICK_STYLE_OPTIONS', ($this->config['override_user_style']) ? '' : $style_options);
96-
$this->template->assign_var('S_QUICK_STYLE_DEFAULT_LOC', $this->default_loc);
86+
$this->template->assign_vars(array(
87+
'S_QUICK_STYLE_ACTION' => $action,
88+
'S_QUICK_STYLE_OPTIONS' => ($this->config['override_user_style']) ? '' : $style_options,
89+
'S_QUICK_STYLE_DEFAULT_LOC' => $this->default_loc,
90+
));
9791
}
9892
}
9993
}
@@ -146,7 +140,7 @@ public function set_guest_style($event)
146140

147141
/**
148142
*/
149-
public function request_cookie($name, $default = null)
143+
private function request_cookie($name, $default = null)
150144
{
151145
$name = $this->config['cookie_name'] . '_' . $name;
152146

migrations/release_1_3_0.php

Lines changed: 2 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -12,21 +12,13 @@
1212

1313
namespace paybas\quickstyle\migrations;
1414

15-
/**
16-
* @ignore
17-
*/
18-
if (!defined('IN_PHPBB'))
19-
{
20-
exit;
21-
}
22-
2315
class release_1_3_0 extends \phpbb\db\migration\migration
2416
{
2517
public function effectively_installed()
2618
{
2719
return isset($this->config['quickstyle_version']) && version_compare($this->config['quickstyle_version'], '1.3.0', '>=');
2820
}
29-
21+
3022
public function update_data()
3123
{
3224
return array(
@@ -44,7 +36,7 @@ public function update_data()
4436
'ACP_CAT_DOT_MODS',
4537
'QUICK_STYLE'
4638
)),
47-
39+
4840
array('module.add', array(
4941
'acp',
5042
'QUICK_STYLE',

0 commit comments

Comments
 (0)