Skip to content

Commit 03c5d47

Browse files
authored
Merge pull request #128 from VSEphpbb/remove-unused-opts
Remove unused site URL option
2 parents fdfdeb5 + b24c7dd commit 03c5d47

5 files changed

Lines changed: 35 additions & 12 deletions

File tree

adm/style/acp_phpbb_ideas.html

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -20,10 +20,6 @@ <h3>{{ lang('WARNING') }}</h3>
2020
<dt><label for="ideas_forum_id">{{ lang('ACP_IDEAS_FORUM_ID') ~ lang('COLON') }}</label><br /><span>{{ lang('ACP_IDEAS_FORUM_ID_EXPLAIN') }}</span></dt>
2121
<dd>{{ S_FORUM_SELECT_BOX }}</dd>
2222
</dl>
23-
<dl>
24-
<dt><label for="ideas_base_url">{{ lang('ACP_IDEAS_BASE_URL') ~ lang('COLON') }}</label><br /><span>{{ lang('ACP_IDEAS_BASE_URL_EXPLAIN') }}</span></dt>
25-
<dd><input id="ideas_base_url" type="text" size="45" maxlength="255" name="config[ideas_base_url]" value="{{ IDEAS_BASE_URL }}" /></dd>
26-
</dl>
2723

2824
<fieldset class="submit-buttons">
2925
<input class="button1" type="submit" id="submit" name="submit" value="{{ lang('SUBMIT') }}" />&nbsp;

controller/admin_controller.php

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -84,8 +84,6 @@ public function __construct(\phpbb\config\config $config, \phpbb\db\driver\drive
8484
public function display_options()
8585
{
8686
$this->template->assign_vars(array(
87-
'IDEAS_BASE_URL' => $this->config['ideas_base_url'] ?: '',
88-
8987
'S_FORUM_SELECT_BOX' => $this->select_ideas_forum(),
9088
'S_IDEAS_FORUM_ID' => !empty($this->config['ideas_forum_id']),
9189

@@ -130,7 +128,6 @@ public function set_config_options()
130128
// Configuration options to list through
131129
$display_vars = array(
132130
'ideas_forum_id',
133-
'ideas_base_url',
134131
'ideas_forum_setup',
135132
);
136133

event/listener.php

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -101,9 +101,7 @@ public function ideas_forum_redirect($event)
101101
{
102102
if ($this->is_ideas_forum($event['forum_id']))
103103
{
104-
// Use the custom base url if set, otherwise default to normal routing
105-
$url = $this->config['ideas_base_url'] ?: $this->helper->route('phpbb_ideas_index_controller');
106-
redirect($url);
104+
redirect($this->helper->route('phpbb_ideas_index_controller'));
107105
}
108106
}
109107

language/en/phpbb_ideas_acp.php

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -29,7 +29,5 @@
2929
'ACP_IDEAS_NO_FORUM' => 'No forum selected',
3030
'ACP_IDEAS_SETTINGS_UPDATED' => 'phpBB Ideas settings updated.',
3131
'ACP_IDEAS_UTILITIES' => 'Ideas utilities',
32-
'ACP_IDEAS_BASE_URL' => 'Ideas base URL (optional)',
33-
'ACP_IDEAS_BASE_URL_EXPLAIN' => 'Enter the full URL to Ideas, e.g.: <samp>http://www.phpbb.com/ideas</samp>. This should only be set if your board has custom routing configurations that prevent Ideas from working as expected.',
3432
'ACP_PHPBB_IDEAS_EXPLAIN' => 'Here you can configure phpBB Ideas extension. phpBB Ideas is an ideas centre for phpBB. It allows users to suggest and vote on ideas that would help to improve and enhance phpBB.',
3533
));
Lines changed: 34 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,34 @@
1+
<?php
2+
/**
3+
*
4+
* Ideas extension for the phpBB Forum Software package.
5+
*
6+
* @copyright (c) phpBB Limited <https://www.phpbb.com>
7+
* @license GNU General Public License, version 2 (GPL-2.0)
8+
*
9+
*/
10+
11+
namespace phpbb\ideas\migrations;
12+
13+
class m12_drop_base_url_config extends \phpbb\db\migration\migration
14+
{
15+
public function effectively_installed()
16+
{
17+
return !$this->config->offsetExists('ideas_base_url');
18+
}
19+
20+
public static function depends_on()
21+
{
22+
return [
23+
'\phpbb\ideas\migrations\m1_initial_schema',
24+
'\phpbb\ideas\migrations\m5_base_url_config',
25+
];
26+
}
27+
28+
public function update_data()
29+
{
30+
return [
31+
['config.remove', ['ideas_base_url']],
32+
];
33+
}
34+
}

0 commit comments

Comments
 (0)