Skip to content

Commit da833dc

Browse files
committed
Merge branch 'master' into dev/4.0
2 parents 8aa2522 + 098426f commit da833dc

2 files changed

Lines changed: 3 additions & 6 deletions

File tree

controller/wizard.php

Lines changed: 1 addition & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -23,9 +23,6 @@
2323
*/
2424
class wizard
2525
{
26-
/** @var string The default BBvideo site */
27-
public const BBVIDEO_DEFAULT = 'youtube';
28-
2926
/** @var cache_driver */
3027
protected cache_driver $cache;
3128

@@ -83,7 +80,7 @@ public function bbcode_wizard(string $mode): Response
8380
$sites = $this->get_bbvideo_sites();
8481
$this->template->assign_vars([
8582
'ABBC3_BBVIDEO_SITES' => $sites,
86-
'ABBC3_BBVIDEO_DEFAULT' => array_key_exists(self::BBVIDEO_DEFAULT, $sites) ? self::BBVIDEO_DEFAULT : key($sites),
83+
'ABBC3_BBVIDEO_DEFAULT' => array_key_exists('youtube', $sites) ? 'youtube' : key($sites),
8784
]);
8885
}
8986

tests/controller/wizard_test.php

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -98,7 +98,7 @@ public function test_bbcode_wizard($mode, $ajax, $status_code, $page_content)
9898
->method('assign_vars')
9999
->with([
100100
'ABBC3_BBVIDEO_SITES' => [],
101-
'ABBC3_BBVIDEO_DEFAULT' => wizard::BBVIDEO_DEFAULT,
101+
'ABBC3_BBVIDEO_DEFAULT' => null,
102102
]);
103103

104104
$response = $this->controller->bbcode_wizard($mode);
@@ -126,7 +126,7 @@ public function test_bbvideo_sites_cached()
126126
->method('assign_vars')
127127
->with([
128128
'ABBC3_BBVIDEO_SITES' => $cached_data,
129-
'ABBC3_BBVIDEO_DEFAULT' => wizard::BBVIDEO_DEFAULT,
129+
'ABBC3_BBVIDEO_DEFAULT' => 'youtube',
130130
]);
131131

132132
$response = $this->controller->bbcode_wizard('bbvideo');

0 commit comments

Comments
 (0)