mirror of
https://github.com/phpbb/phpbb.git
synced 2025-06-10 13:28:55 +00:00
[ticket/12559] Use short array syntax
PHPBB3-12559
This commit is contained in:
parent
7df08fe12e
commit
85837d48b2
2 changed files with 26 additions and 26 deletions
|
@ -22,28 +22,28 @@ class forums_legend_limit extends \phpbb\db\migration\migration
|
||||||
|
|
||||||
static public function depends_on()
|
static public function depends_on()
|
||||||
{
|
{
|
||||||
return array('\phpbb\db\migration\data\v330\v330b1');
|
return ['\phpbb\db\migration\data\v330\v330b1'];
|
||||||
}
|
}
|
||||||
|
|
||||||
public function update_schema()
|
public function update_schema()
|
||||||
{
|
{
|
||||||
return array(
|
return [
|
||||||
'add_columns' => array(
|
'add_columns' => [
|
||||||
$this->table_prefix . 'forums' => array(
|
$this->table_prefix . 'forums' => [
|
||||||
'display_subforum_limit' => array('BOOL', 0, 'after' => 'display_subforum_list'),
|
'display_subforum_limit' => ['BOOL', 0, 'after' => 'display_subforum_list'],
|
||||||
),
|
],
|
||||||
),
|
],
|
||||||
);
|
];
|
||||||
}
|
}
|
||||||
|
|
||||||
public function revert_schema()
|
public function revert_schema()
|
||||||
{
|
{
|
||||||
return array(
|
return [
|
||||||
'drop_columns' => array(
|
'drop_columns' => [
|
||||||
$this->table_prefix . 'forums' => array(
|
$this->table_prefix . 'forums' => [
|
||||||
'display_subforum_limit',
|
'display_subforum_limit',
|
||||||
),
|
],
|
||||||
),
|
],
|
||||||
);
|
];
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -23,38 +23,38 @@ class phpbb_functional_subforum_test extends phpbb_functional_test_case
|
||||||
|
|
||||||
$forum_name = 'Subforum Test #1';
|
$forum_name = 'Subforum Test #1';
|
||||||
$crawler = self::request('GET', "adm/index.php?i=acp_forums&mode=manage&sid={$this->sid}");
|
$crawler = self::request('GET', "adm/index.php?i=acp_forums&mode=manage&sid={$this->sid}");
|
||||||
$form = $crawler->selectButton('addforum')->form(array(
|
$form = $crawler->selectButton('addforum')->form([
|
||||||
'forum_name' => $forum_name,
|
'forum_name' => $forum_name,
|
||||||
));
|
]);
|
||||||
$crawler = self::submit($form);
|
$crawler = self::submit($form);
|
||||||
$form = $crawler->selectButton('update')->form(array(
|
$form = $crawler->selectButton('update')->form([
|
||||||
'forum_perm_from' => 2,
|
'forum_perm_from' => 2,
|
||||||
));
|
]);
|
||||||
self::submit($form);
|
self::submit($form);
|
||||||
$forum_id = self::get_forum_id($forum_name);
|
$forum_id = self::get_forum_id($forum_name);
|
||||||
|
|
||||||
// 'Feeds #1.1' is a sub-forum of 'Feeds #1'
|
// 'Feeds #1.1' is a sub-forum of 'Feeds #1'
|
||||||
$forum_name = 'Subforum Test #1.1';
|
$forum_name = 'Subforum Test #1.1';
|
||||||
$crawler = self::request('GET', "adm/index.php?i=acp_forums&sid={$this->sid}&icat=6&mode=manage&parent_id={$forum_id}");
|
$crawler = self::request('GET', "adm/index.php?i=acp_forums&sid={$this->sid}&icat=6&mode=manage&parent_id={$forum_id}");
|
||||||
$form = $crawler->selectButton('addforum')->form(array(
|
$form = $crawler->selectButton('addforum')->form([
|
||||||
'forum_name' => $forum_name,
|
'forum_name' => $forum_name,
|
||||||
));
|
]);
|
||||||
$crawler = self::submit($form);
|
$crawler = self::submit($form);
|
||||||
$form = $crawler->selectButton('update')->form(array(
|
$form = $crawler->selectButton('update')->form([
|
||||||
'forum_perm_from' => 2,
|
'forum_perm_from' => 2,
|
||||||
));
|
]);
|
||||||
self::submit($form);
|
self::submit($form);
|
||||||
$forum_id = self::get_forum_id('Subforum Test #1.1');
|
$forum_id = self::get_forum_id('Subforum Test #1.1');
|
||||||
|
|
||||||
// 'Feeds #news' will be used for feed.php?mode=news
|
// 'Feeds #news' will be used for feed.php?mode=news
|
||||||
$crawler = self::request('GET', "adm/index.php?i=acp_forums&sid={$this->sid}&icat=6&mode=manage&parent_id={$forum_id}");
|
$crawler = self::request('GET', "adm/index.php?i=acp_forums&sid={$this->sid}&icat=6&mode=manage&parent_id={$forum_id}");
|
||||||
$form = $crawler->selectButton('addforum')->form(array(
|
$form = $crawler->selectButton('addforum')->form([
|
||||||
'forum_name' => 'Subforum Test #1.1.1',
|
'forum_name' => 'Subforum Test #1.1.1',
|
||||||
));
|
]);
|
||||||
$crawler = self::submit($form);
|
$crawler = self::submit($form);
|
||||||
$form = $crawler->selectButton('update')->form(array(
|
$form = $crawler->selectButton('update')->form([
|
||||||
'forum_perm_from' => 2,
|
'forum_perm_from' => 2,
|
||||||
));
|
]);
|
||||||
self::submit($form);
|
self::submit($form);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Add table
Reference in a new issue