Skip to content

Commit 0ad19b6

Browse files
committed
Merge branch 'development' into plugins
Conflicts: plugins/bbcode-toolbar/BbcodeToolbar.php plugins/private-messages/src/PrivateMessages.php
2 parents 3efb081 + b5cd0dc commit 0ad19b6

57 files changed

Lines changed: 872 additions & 806 deletions

Some content is hidden

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

‎composer.json‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@
1616
"role": "Contributor"
1717
}],
1818
"autoload": {
19-
"classmap": ["featherbb/Core/Database.php", "featherbb/Core/pomo/MO.php"],
19+
"classmap": ["featherbb/Core/pomo/MO.php"],
2020
"psr-4": {
2121
"Plugins\\": "plugins/",
2222
"FeatherBB\\": "featherbb/",

‎extern.php‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -56,7 +56,7 @@
5656
-----------------------------------------------------------------------------*/
5757

5858
namespace FeatherBB;
59-
use DB;
59+
use FeatherBB\Core\DB;
6060
use FeatherBB\Core\Cache;
6161
use FeatherBB\Core\Url;
6262
use FeatherBB\Core\Utils;

‎featherbb/Controller/Admin/Bans.php‎

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -33,6 +33,8 @@ public function __construct()
3333

3434
public function display()
3535
{
36+
$this->feather->hooks->fire('controller.admin.bans.display');
37+
3638
// Display bans
3739
if ($this->request->get('find_ban')) {
3840
$ban_info = $this->model->find_ban();
@@ -68,6 +70,8 @@ public function display()
6870

6971
public function add($id = null)
7072
{
73+
$this->feather->hooks->fire('controller.admin.bans.add');
74+
7175
if ($this->request->post('add_edit_ban')) {
7276
$this->model->insert_ban();
7377
}
@@ -85,12 +89,16 @@ public function add($id = null)
8589

8690
public function delete($id)
8791
{
92+
$this->feather->hooks->fire('controller.admin.bans.delete');
93+
8894
// Remove the ban
8995
$this->model->remove_ban($id);
9096
}
9197

9298
public function edit($id)
9399
{
100+
$this->feather->hooks->fire('controller.admin.bans.edit');
101+
94102
if ($this->request->post('add_edit_ban')) {
95103
$this->model->insert_ban();
96104
}

‎featherbb/Controller/Admin/Categories.php‎

Lines changed: 11 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -28,8 +28,10 @@ public function __construct()
2828
load_textdomain('featherbb', $this->feather->forum_env['FEATHER_ROOT'].'featherbb/lang/'.$this->user->language.'/admin/categories.mo');
2929
}
3030

31-
public function add_category()
31+
public function add()
3232
{
33+
$this->feather->hooks->fire('controller.admin.categories.add');
34+
3335
$cat_name = Utils::trim($this->request->post('cat_name'));
3436
if ($cat_name == '') {
3537
Url::redirect($this->feather->urlFor('adminCategories'), __('Must enter name message'));
@@ -42,8 +44,10 @@ public function add_category()
4244
}
4345
}
4446

45-
public function edit_categories()
47+
public function edit()
4648
{
49+
$this->feather->hooks->fire('controller.admin.categories.edit');
50+
4751
if (empty($this->request->post('cat'))) {
4852
throw new Error(__('Bad request'), '400');
4953
}
@@ -65,8 +69,10 @@ public function edit_categories()
6569

6670
}
6771

68-
public function delete_category()
72+
public function delete()
6973
{
74+
$this->feather->hooks->fire('controller.admin.categories.delete');
75+
7076
$cat_to_delete = (int) $this->request->post('cat_to_delete');
7177

7278
if ($cat_to_delete < 1) {
@@ -86,6 +92,8 @@ public function delete_category()
8692

8793
public function display()
8894
{
95+
$this->feather->hooks->fire('controller.admin.categories.display');
96+
8997
AdminUtils::generateAdminMenu('categories');
9098

9199
$this->feather->template->setPageInfo(array(

‎featherbb/Controller/Admin/Censoring.php‎

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -27,6 +27,8 @@ public function __construct()
2727

2828
public function display()
2929
{
30+
$this->feather->hooks->fire('controller.admin.censoring.display');
31+
3032
// Add a censor word
3133
if ($this->request->post('add_word')) {
3234
$this->model->add_word();

‎featherbb/Controller/Admin/Forums.php‎

Lines changed: 13 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -27,12 +27,10 @@ public function __construct()
2727
load_textdomain('featherbb', $this->feather->forum_env['FEATHER_ROOT'].'featherbb/lang/'.$this->user->language.'/admin/forums.mo');
2828
}
2929

30-
//
31-
// CRUD
32-
//
33-
34-
public function add_forum()
30+
public function add()
3531
{
32+
$this->feather->hooks->fire('controller.admin.forums.add');
33+
3634
$cat_id = (int) $this->request->post('cat');
3735

3836
if ($cat_id < 1) {
@@ -49,8 +47,10 @@ public function add_forum()
4947
}
5048
}
5149

52-
public function edit_forum($forum_id)
50+
public function edit($forum_id)
5351
{
52+
$this->feather->hooks->fire('controller.admin.forums.edit');
53+
5454
if($this->request->isPost()) {
5555
if ($this->request->post('save') && $this->request->post('read_forum_old')) {
5656

@@ -128,8 +128,10 @@ public function edit_forum($forum_id)
128128
}
129129
}
130130

131-
public function delete_forum($forum_id)
131+
public function delete($forum_id)
132132
{
133+
$this->feather->hooks->fire('controller.admin.forums.delete');
134+
133135
if($this->request->isPost()) {
134136
$this->model->delete_forum($forum_id);
135137
// Regenerate the quick jump cache
@@ -151,10 +153,10 @@ public function delete_forum($forum_id)
151153
}
152154
}
153155

154-
// -- //
155-
156156
public function edit_positions()
157157
{
158+
$this->feather->hooks->fire('controller.admin.forums.edit_positions');
159+
158160
foreach ($this->request->post('position') as $forum_id => $position) {
159161
$position = (int) Utils::trim($position);
160162
$this->model->update_positions($forum_id, $position);
@@ -168,6 +170,8 @@ public function edit_positions()
168170

169171
public function display()
170172
{
173+
$this->feather->hooks->fire('controller.admin.forums.display');
174+
171175
if ($this->request->post('update_positions')) {
172176
$this->edit_positions();
173177
}

‎featherbb/Controller/Admin/Groups.php‎

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -28,6 +28,8 @@ public function __construct()
2828

2929
public function display()
3030
{
31+
$this->feather->hooks->fire('controller.admin.groups.display');
32+
3133
$groups = $this->model->fetch_groups();
3234

3335
// Set default group
@@ -49,6 +51,8 @@ public function display()
4951

5052
public function delete($id)
5153
{
54+
$this->feather->hooks->fire('controller.admin.groups.delete');
55+
5256
if ($id < 5) {
5357
throw new Error(__('Bad request'), 403);
5458
}
@@ -94,6 +98,8 @@ public function delete($id)
9498

9599
public function addedit($id = '')
96100
{
101+
$this->feather->hooks->fire('controller.admin.groups.addedit');
102+
97103
$groups = $this->model->fetch_groups();
98104

99105
// Add/edit a group (stage 2)

‎featherbb/Controller/Admin/Index.php‎

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -28,6 +28,8 @@ public function __construct()
2828

2929
public function display($action = null)
3030
{
31+
$this->feather->hooks->fire('controller.admin.index.display');
32+
3133
// Check for upgrade
3234
if ($action == 'check_upgrade') {
3335
if (!ini_get('allow_url_fopen')) {

‎featherbb/Controller/Admin/Maintenance.php‎

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -23,6 +23,8 @@ public function __construct()
2323

2424
public function display()
2525
{
26+
$this->feather->hooks->fire('controller.admin.maintenance.display');
27+
2628
$action = '';
2729
if ($this->feather->request->post('action')) {
2830
$action = $this->feather->request->post('action');

‎featherbb/Controller/Admin/Options.php‎

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -27,6 +27,8 @@ public function __construct()
2727

2828
public function display()
2929
{
30+
$this->feather->hooks->fire('controller.admin.options.display');
31+
3032
if ($this->feather->request->isPost()) {
3133
$this->model->update_options();
3234
}

0 commit comments

Comments
 (0)