Skip to content

Commit 2ab962d

Browse files
committed
Clean namespaces
1 parent e8608ba commit 2ab962d

File tree

161 files changed

+705
-700
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

161 files changed

+705
-700
lines changed

Plugins/Test.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@
99

1010
namespace Plugins;
1111

12-
use \FeatherBB\Plugin as Plugin;
12+
use \FeatherBB\Core\Plugin as Plugin;
1313

1414
class Test extends Plugin
1515
{

cache/85f15bc57d6c4e8a3a00b5f5c72a639f5f734f32.cache

Lines changed: 1 addition & 1 deletion
Large diffs are not rendered by default.

cache/cache_parser_data.php

Lines changed: 19 additions & 19 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
<?php // File: cache_parser_data.php. Automatically generated: 2015-08-23 06:16:14. DO NOT EDIT!!!
1+
<?php // File: cache_parser_data.php. Automatically generated: 2015-09-06 05:08:39. DO NOT EDIT!!!
22
$pd = array (
33
'newer_php_version' => true,
44
'in_signature' => false,
@@ -166,92 +166,92 @@
166166
':)' =>
167167
array (
168168
'file' => 'smile.png',
169-
'html' => '<img width="15" height="15" src="proxy.php?url=https%3A%2F%2Fgithub.com%2Ffeatherbb%2Fimg%2Fsmilies%2Fsmile.png" alt="Smile" title="Smile" />',
169+
'html' => '<img width="15" height="15" src="proxy.php?url=https%3A%2F%2Fgithub.com%2Ffeatherbb%2F%3Cspan+class%3D"x x-first x-last">style/img/smilies/smile.png" alt="Smile" title="Smile" />',
170170
),
171171
'=)' =>
172172
array (
173173
'file' => 'smile.png',
174-
'html' => '<img width="15" height="15" src="proxy.php?url=https%3A%2F%2Fgithub.com%2Ffeatherbb%2Fimg%2Fsmilies%2Fsmile.png" alt="Smile" title="Smile" />',
174+
'html' => '<img width="15" height="15" src="proxy.php?url=https%3A%2F%2Fgithub.com%2Ffeatherbb%2F%3Cspan+class%3D"x x-first x-last">style/img/smilies/smile.png" alt="Smile" title="Smile" />',
175175
),
176176
':|' =>
177177
array (
178178
'file' => 'neutral.png',
179-
'html' => '<img width="15" height="15" src="proxy.php?url=https%3A%2F%2Fgithub.com%2Ffeatherbb%2Fimg%2Fsmilies%2Fneutral.png" alt="Neutral" title="Neutral" />',
179+
'html' => '<img width="15" height="15" src="proxy.php?url=https%3A%2F%2Fgithub.com%2Ffeatherbb%2F%3Cspan+class%3D"x x-first x-last">style/img/smilies/neutral.png" alt="Neutral" title="Neutral" />',
180180
),
181181
'=|' =>
182182
array (
183183
'file' => 'neutral.png',
184-
'html' => '<img width="15" height="15" src="proxy.php?url=https%3A%2F%2Fgithub.com%2Ffeatherbb%2Fimg%2Fsmilies%2Fneutral.png" alt="Neutral" title="Neutral" />',
184+
'html' => '<img width="15" height="15" src="proxy.php?url=https%3A%2F%2Fgithub.com%2Ffeatherbb%2F%3Cspan+class%3D"x x-first x-last">style/img/smilies/neutral.png" alt="Neutral" title="Neutral" />',
185185
),
186186
':(' =>
187187
array (
188188
'file' => 'sad.png',
189-
'html' => '<img width="15" height="15" src="proxy.php?url=https%3A%2F%2Fgithub.com%2Ffeatherbb%2Fimg%2Fsmilies%2Fsad.png" alt="Sad" title="Sad" />',
189+
'html' => '<img width="15" height="15" src="proxy.php?url=https%3A%2F%2Fgithub.com%2Ffeatherbb%2F%3Cspan+class%3D"x x-first x-last">style/img/smilies/sad.png" alt="Sad" title="Sad" />',
190190
),
191191
'=(' =>
192192
array (
193193
'file' => 'sad.png',
194-
'html' => '<img width="15" height="15" src="proxy.php?url=https%3A%2F%2Fgithub.com%2Ffeatherbb%2Fimg%2Fsmilies%2Fsad.png" alt="Sad" title="Sad" />',
194+
'html' => '<img width="15" height="15" src="proxy.php?url=https%3A%2F%2Fgithub.com%2Ffeatherbb%2F%3Cspan+class%3D"x x-first x-last">style/img/smilies/sad.png" alt="Sad" title="Sad" />',
195195
),
196196
':D' =>
197197
array (
198198
'file' => 'big_smile.png',
199-
'html' => '<img width="15" height="15" src="proxy.php?url=https%3A%2F%2Fgithub.com%2Ffeatherbb%2Fimg%2Fsmilies%2Fbig_smile.png" alt="Big Smile" title="Big Smile" />',
199+
'html' => '<img width="15" height="15" src="proxy.php?url=https%3A%2F%2Fgithub.com%2Ffeatherbb%2F%3Cspan+class%3D"x x-first x-last">style/img/smilies/big_smile.png" alt="Big Smile" title="Big Smile" />',
200200
),
201201
'=D' =>
202202
array (
203203
'file' => 'big_smile.png',
204-
'html' => '<img width="15" height="15" src="proxy.php?url=https%3A%2F%2Fgithub.com%2Ffeatherbb%2Fimg%2Fsmilies%2Fbig_smile.png" alt="Big Smile" title="Big Smile" />',
204+
'html' => '<img width="15" height="15" src="proxy.php?url=https%3A%2F%2Fgithub.com%2Ffeatherbb%2F%3Cspan+class%3D"x x-first x-last">style/img/smilies/big_smile.png" alt="Big Smile" title="Big Smile" />',
205205
),
206206
':o' =>
207207
array (
208208
'file' => 'yikes.png',
209-
'html' => '<img width="15" height="15" src="proxy.php?url=https%3A%2F%2Fgithub.com%2Ffeatherbb%2Fimg%2Fsmilies%2Fyikes.png" alt="Yikes" title="Yikes" />',
209+
'html' => '<img width="15" height="15" src="proxy.php?url=https%3A%2F%2Fgithub.com%2Ffeatherbb%2F%3Cspan+class%3D"x x-first x-last">style/img/smilies/yikes.png" alt="Yikes" title="Yikes" />',
210210
),
211211
':O' =>
212212
array (
213213
'file' => 'yikes.png',
214-
'html' => '<img width="15" height="15" src="proxy.php?url=https%3A%2F%2Fgithub.com%2Ffeatherbb%2Fimg%2Fsmilies%2Fyikes.png" alt="Yikes" title="Yikes" />',
214+
'html' => '<img width="15" height="15" src="proxy.php?url=https%3A%2F%2Fgithub.com%2Ffeatherbb%2F%3Cspan+class%3D"x x-first x-last">style/img/smilies/yikes.png" alt="Yikes" title="Yikes" />',
215215
),
216216
';)' =>
217217
array (
218218
'file' => 'wink.png',
219-
'html' => '<img width="15" height="15" src="proxy.php?url=https%3A%2F%2Fgithub.com%2Ffeatherbb%2Fimg%2Fsmilies%2Fwink.png" alt="Wink" title="Wink" />',
219+
'html' => '<img width="15" height="15" src="proxy.php?url=https%3A%2F%2Fgithub.com%2Ffeatherbb%2F%3Cspan+class%3D"x x-first x-last">style/img/smilies/wink.png" alt="Wink" title="Wink" />',
220220
),
221221
':/' =>
222222
array (
223223
'file' => 'hmm.png',
224-
'html' => '<img width="15" height="15" src="proxy.php?url=https%3A%2F%2Fgithub.com%2Ffeatherbb%2Fimg%2Fsmilies%2Fhmm.png" alt="Hmm" title="Hmm" />',
224+
'html' => '<img width="15" height="15" src="proxy.php?url=https%3A%2F%2Fgithub.com%2Ffeatherbb%2F%3Cspan+class%3D"x x-first x-last">style/img/smilies/hmm.png" alt="Hmm" title="Hmm" />',
225225
),
226226
':P' =>
227227
array (
228228
'file' => 'tongue.png',
229-
'html' => '<img width="15" height="15" src="proxy.php?url=https%3A%2F%2Fgithub.com%2Ffeatherbb%2Fimg%2Fsmilies%2Ftongue.png" alt="Tongue" title="Tongue" />',
229+
'html' => '<img width="15" height="15" src="proxy.php?url=https%3A%2F%2Fgithub.com%2Ffeatherbb%2F%3Cspan+class%3D"x x-first x-last">style/img/smilies/tongue.png" alt="Tongue" title="Tongue" />',
230230
),
231231
':p' =>
232232
array (
233233
'file' => 'tongue.png',
234-
'html' => '<img width="15" height="15" src="proxy.php?url=https%3A%2F%2Fgithub.com%2Ffeatherbb%2Fimg%2Fsmilies%2Ftongue.png" alt="Tongue" title="Tongue" />',
234+
'html' => '<img width="15" height="15" src="proxy.php?url=https%3A%2F%2Fgithub.com%2Ffeatherbb%2F%3Cspan+class%3D"x x-first x-last">style/img/smilies/tongue.png" alt="Tongue" title="Tongue" />',
235235
),
236236
':lol:' =>
237237
array (
238238
'file' => 'lol.png',
239-
'html' => '<img width="15" height="15" src="proxy.php?url=https%3A%2F%2Fgithub.com%2Ffeatherbb%2Fimg%2Fsmilies%2Flol.png" alt="Lol" title="Lol" />',
239+
'html' => '<img width="15" height="15" src="proxy.php?url=https%3A%2F%2Fgithub.com%2Ffeatherbb%2F%3Cspan+class%3D"x x-first x-last">style/img/smilies/lol.png" alt="Lol" title="Lol" />',
240240
),
241241
':mad:' =>
242242
array (
243243
'file' => 'mad.png',
244-
'html' => '<img width="15" height="15" src="proxy.php?url=https%3A%2F%2Fgithub.com%2Ffeatherbb%2Fimg%2Fsmilies%2Fmad.png" alt="Mad" title="Mad" />',
244+
'html' => '<img width="15" height="15" src="proxy.php?url=https%3A%2F%2Fgithub.com%2Ffeatherbb%2F%3Cspan+class%3D"x x-first x-last">style/img/smilies/mad.png" alt="Mad" title="Mad" />',
245245
),
246246
':rolleyes:' =>
247247
array (
248248
'file' => 'roll.png',
249-
'html' => '<img width="15" height="15" src="proxy.php?url=https%3A%2F%2Fgithub.com%2Ffeatherbb%2Fimg%2Fsmilies%2Froll.png" alt="Roll" title="Roll" />',
249+
'html' => '<img width="15" height="15" src="proxy.php?url=https%3A%2F%2Fgithub.com%2Ffeatherbb%2F%3Cspan+class%3D"x x-first x-last">style/img/smilies/roll.png" alt="Roll" title="Roll" />',
250250
),
251251
':cool:' =>
252252
array (
253253
'file' => 'cool.png',
254-
'html' => '<img width="15" height="15" src="proxy.php?url=https%3A%2F%2Fgithub.com%2Ffeatherbb%2Fimg%2Fsmilies%2Fcool.png" alt="Cool" title="Cool" />',
254+
'html' => '<img width="15" height="15" src="proxy.php?url=https%3A%2F%2Fgithub.com%2Ffeatherbb%2F%3Cspan+class%3D"x x-first x-last">style/img/smilies/cool.png" alt="Cool" title="Cool" />',
255255
),
256256
),
257257
'bbcd' =>

composer.json

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -18,8 +18,8 @@
1818
"autoload": {
1919
"classmap": ["featherbb/Core/Database.php", "featherbb/Core/pomo/MO.php"],
2020
"psr-4": {
21-
"Plugins\\": "/plugins",
22-
"FeatherBB\\": "featherbb/Core",
21+
"Plugins\\": "plugins/",
22+
"FeatherBB\\": "featherbb/",
2323
"": ""
2424
}
2525
},

extern.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -224,7 +224,7 @@ function authenticate_user($user, $password, $password_is_hash = false)
224224

225225
if (!isset($feather->user->id) ||
226226
($password_is_hash && $password != $feather->user->password) ||
227-
(!$password_is_hash && \FeatherBB\Utils::hash($password) != $feather->user->password)) {
227+
(!$password_is_hash && \FeatherBB\Core\Utils::hash($password) != $feather->user->password)) {
228228
set_default_user();
229229
} else {
230230
$feather->user->is_guest = false;

featherbb/Controller/Admin/Bans.php

Lines changed: 7 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -9,8 +9,9 @@
99

1010
namespace FeatherBB\Controller\Admin;
1111

12-
use FeatherBB\Utils;
13-
use FeatherBB\Url;
12+
use FeatherBB\Core\Utils;
13+
use FeatherBB\Core\AdminUtils;
14+
use FeatherBB\Core\Url;
1415

1516
class Bans
1617
{
@@ -25,7 +26,7 @@ public function __construct()
2526
load_textdomain('featherbb', $this->feather->forum_env['FEATHER_ROOT'].'featherbb/lang/'.$this->user->language.'/admin/bans.mo');
2627

2728
if ($this->user->g_id != FEATHER_ADMIN && ($this->user->g_moderator != '1' || $this->user->g_mod_ban_users == '0')) {
28-
throw new \FeatherBB\Error(__('No permission'), '403');
29+
throw new \FeatherBB\Core\Error(__('No permission'), '403');
2930
}
3031
}
3132

@@ -58,7 +59,7 @@ public function display()
5859
)->addTemplate('admin/bans/search_ban.php')->display();
5960
}
6061
else {
61-
\FeatherBB\AdminUtils::generateAdminMenu('bans');
62+
AdminUtils::generateAdminMenu('bans');
6263

6364
$this->feather->template->setPageInfo(array(
6465
'admin_console' => true,
@@ -75,7 +76,7 @@ public function add($id = null)
7576
$this->model->insert_ban();
7677
}
7778

78-
\FeatherBB\AdminUtils::generateAdminMenu('bans');
79+
AdminUtils::generateAdminMenu('bans');
7980

8081
$this->feather->template->setPageInfo(array(
8182
'admin_console' => true,
@@ -97,7 +98,7 @@ public function edit($id)
9798
if ($this->request->post('add_edit_ban')) {
9899
$this->model->insert_ban();
99100
}
100-
\FeatherBB\AdminUtils::generateAdminMenu('bans');
101+
AdminUtils::generateAdminMenu('bans');
101102

102103
$this->feather->template->setPageInfo(array(
103104
'admin_console' => true,

featherbb/Controller/Admin/Categories.php

Lines changed: 6 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -9,8 +9,9 @@
99

1010
namespace FeatherBB\Controller\Admin;
1111

12-
use FeatherBB\Utils;
13-
use FeatherBB\Url;
12+
use FeatherBB\Core\Utils;
13+
use FeatherBB\Core\AdminUtils;
14+
use FeatherBB\Core\Url;
1415

1516
class Categories
1617
{
@@ -47,7 +48,7 @@ public function add_category()
4748
public function edit_categories()
4849
{
4950
if (empty($this->request->post('cat'))) {
50-
throw new \FeatherBB\Error(__('Bad request'), '400');
51+
throw new \FeatherBB\Core\Error(__('Bad request'), '400');
5152
}
5253

5354
foreach ($this->request->post('cat') as $cat_id => $properties) {
@@ -71,7 +72,7 @@ public function delete_category()
7172
$cat_to_delete = (int) $this->request->post('cat_to_delete');
7273

7374
if ($cat_to_delete < 1) {
74-
throw new \FeatherBB\Error(__('Bad request'), '400');
75+
throw new \FeatherBB\Core\Error(__('Bad request'), '400');
7576
}
7677

7778
if (intval($this->request->post('disclaimer')) != 1) {
@@ -87,7 +88,7 @@ public function delete_category()
8788

8889
public function display()
8990
{
90-
\FeatherBB\AdminUtils::generateAdminMenu('categories');
91+
AdminUtils::generateAdminMenu('categories');
9192

9293
$this->feather->template->setPageInfo(array(
9394
'title' => array(Utils::escape($this->config['o_board_title']), __('Admin'), __('Categories')),

featherbb/Controller/Admin/Censoring.php

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -9,8 +9,9 @@
99

1010
namespace FeatherBB\Controller\Admin;
1111

12-
use FeatherBB\Utils;
13-
use FeatherBB\Url;
12+
use FeatherBB\Core\Utils;
13+
use FeatherBB\Core\AdminUtils;
14+
use FeatherBB\Core\Url;
1415

1516
class Censoring
1617
{
@@ -47,7 +48,7 @@ public function display()
4748
$this->model->remove_word();
4849
}
4950

50-
\FeatherBB\AdminUtils::generateAdminMenu('censoring');
51+
AdminUtils::generateAdminMenu('censoring');
5152

5253
$this->feather->template->setPageInfo(array(
5354
'title' => array(Utils::escape($this->config['o_board_title']), __('Admin'), __('Censoring')),

featherbb/Controller/Admin/Forums.php

Lines changed: 6 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -9,8 +9,9 @@
99

1010
namespace FeatherBB\Controller\Admin;
1111

12-
use FeatherBB\Utils;
13-
use FeatherBB\Url;
12+
use FeatherBB\Core\Utils;
13+
use FeatherBB\Core\AdminUtils;
14+
use FeatherBB\Core\Url;
1415

1516
class Forums
1617
{
@@ -115,7 +116,7 @@ public function edit_forum($forum_id)
115116
}
116117

117118
} else {
118-
\FeatherBB\AdminUtils::generateAdminMenu('forums');
119+
AdminUtils::generateAdminMenu('forums');
119120

120121
$this->feather->template->setPageInfo(array(
121122
'title' => array(Utils::escape($this->config['o_board_title']), __('Admin'), __('Forums')),
@@ -141,7 +142,7 @@ public function delete_forum($forum_id)
141142

142143
} else { // If the user hasn't confirmed
143144

144-
\FeatherBB\AdminUtils::generateAdminMenu('forums');
145+
AdminUtils::generateAdminMenu('forums');
145146

146147
$this->feather->template->setPageInfo(array(
147148
'title' => array(Utils::escape($this->config['o_board_title']), __('Admin'), __('Forums')),
@@ -174,7 +175,7 @@ public function display()
174175
$this->edit_positions();
175176
}
176177

177-
\FeatherBB\AdminUtils::generateAdminMenu('forums');
178+
AdminUtils::generateAdminMenu('forums');
178179

179180
$categories_model = new \FeatherBB\Model\Admin\Categories();
180181
$this->feather->template->setPageInfo(array(

featherbb/Controller/Admin/Groups.php

Lines changed: 9 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -9,8 +9,9 @@
99

1010
namespace FeatherBB\Controller\Admin;
1111

12-
use FeatherBB\Utils;
13-
use FeatherBB\Url;
12+
use FeatherBB\Core\Utils;
13+
use FeatherBB\Core\AdminUtils;
14+
use FeatherBB\Core\Url;
1415

1516
class Groups
1617
{
@@ -39,7 +40,7 @@ public function display()
3940
$this->model->set_default_group($groups, $this->feather);
4041
}
4142

42-
\FeatherBB\AdminUtils::generateAdminMenu('groups');
43+
AdminUtils::generateAdminMenu('groups');
4344

4445
$this->feather->template->setPageInfo(array(
4546
'title' => array(Utils::escape($this->config['o_board_title']), __('Admin'), __('User groups')),
@@ -54,12 +55,12 @@ public function display()
5455
public function delete($id)
5556
{
5657
if ($id < 5) {
57-
throw new \FeatherBB\Error(__('Bad request'), 403);
58+
throw new \FeatherBB\Core\Error(__('Bad request'), 403);
5859
}
5960

6061
// Make sure we don't remove the default group
6162
if ($id == $this->config['o_default_user_group']) {
62-
throw new \FeatherBB\Error(__('Cannot remove default message'), 403);
63+
throw new \FeatherBB\Core\Error(__('Cannot remove default message'), 403);
6364
}
6465

6566
// Check if this group has any members
@@ -70,7 +71,7 @@ public function delete($id)
7071
if ($this->request->post('del_group_comply') || $this->request->post('del_group')) {
7172
$this->model->delete_group($id);
7273
} else {
73-
\FeatherBB\AdminUtils::generateAdminMenu('groups');
74+
AdminUtils::generateAdminMenu('groups');
7475

7576
$this->feather->template->setPageInfo(array(
7677
'title' => array(Utils::escape($this->config['o_board_title']), __('Admin'), __('User groups')),
@@ -83,7 +84,7 @@ public function delete($id)
8384
}
8485
}
8586

86-
\FeatherBB\AdminUtils::generateAdminMenu('groups');
87+
AdminUtils::generateAdminMenu('groups');
8788

8889
$this->feather->template->setPageInfo(array(
8990
'title' => array(Utils::escape($this->config['o_board_title']), __('Admin'), __('User groups')),
@@ -108,7 +109,7 @@ public function addedit($id = '')
108109
// Add/edit a group (stage 1)
109110
elseif ($this->request->post('add_group') || isset($id)) {
110111

111-
\FeatherBB\AdminUtils::generateAdminMenu('groups');
112+
AdminUtils::generateAdminMenu('groups');
112113

113114
$group = $this->model->info_add_group($groups, $id);
114115

0 commit comments

Comments
 (0)