Merge pull request #868 from ArthurHoaro/theme/default-as-default
Use the new 'default' theme... as default
This commit is contained in:
commit
61c15aa555
2 changed files with 0 additions and 55 deletions
|
@ -328,21 +328,6 @@ public function updateMethodMoveUserCss()
|
||||||
return rename('inc/user.css', 'data/user.css');
|
return rename('inc/user.css', 'data/user.css');
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
|
||||||
* While the new default theme is in an unstable state
|
|
||||||
* continue to use the vintage theme
|
|
||||||
*/
|
|
||||||
public function updateMethodDefaultThemeVintage()
|
|
||||||
{
|
|
||||||
if ($this->conf->get('resource.theme') !== 'default') {
|
|
||||||
return true;
|
|
||||||
}
|
|
||||||
$this->conf->set('resource.theme', 'vintage');
|
|
||||||
$this->conf->write($this->isLoggedIn);
|
|
||||||
|
|
||||||
return true;
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* * `markdown_escape` is a new setting, set to true as default.
|
* * `markdown_escape` is a new setting, set to true as default.
|
||||||
*
|
*
|
||||||
|
|
|
@ -469,46 +469,6 @@ public function testDefaultThemeWithCustomTheme()
|
||||||
rmdir('sandbox/'. $theme);
|
rmdir('sandbox/'. $theme);
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
|
||||||
* Test updateMethodDefaultThemeVintage with the default theme enabled.
|
|
||||||
*/
|
|
||||||
public function testSetDefaultThemeToVintage()
|
|
||||||
{
|
|
||||||
$sandboxConf = 'sandbox/config';
|
|
||||||
copy(self::$configFile . '.json.php', $sandboxConf . '.json.php');
|
|
||||||
$this->conf = new ConfigManager($sandboxConf);
|
|
||||||
|
|
||||||
$this->conf->set('resource.theme', 'default');
|
|
||||||
$updater = new Updater([], [], $this->conf, true);
|
|
||||||
$this->assertTrue($updater->updateMethodDefaultThemeVintage());
|
|
||||||
$this->assertEquals('vintage', $this->conf->get('resource.theme'));
|
|
||||||
|
|
||||||
// reload from file
|
|
||||||
$this->conf = new ConfigManager($sandboxConf);
|
|
||||||
$this->assertEquals('vintage', $this->conf->get('resource.theme'));
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
|
||||||
* Test updateMethodDefaultThemeVintage with custom theme enabled => nothing to do.
|
|
||||||
*/
|
|
||||||
public function testSetDefaultThemeNothingToDo()
|
|
||||||
{
|
|
||||||
$sandboxConf = 'sandbox/config';
|
|
||||||
copy(self::$configFile . '.json.php', $sandboxConf . '.json.php');
|
|
||||||
$this->conf = new ConfigManager($sandboxConf);
|
|
||||||
|
|
||||||
$theme = 'myawesometheme';
|
|
||||||
$this->conf->set('resource.theme', $theme);
|
|
||||||
$this->conf->write(true);
|
|
||||||
$updater = new Updater([], [], $this->conf, true);
|
|
||||||
$this->assertTrue($updater->updateMethodDefaultThemeVintage());
|
|
||||||
$this->assertEquals($theme, $this->conf->get('resource.theme'));
|
|
||||||
|
|
||||||
// reload from file
|
|
||||||
$this->conf = new ConfigManager($sandboxConf);
|
|
||||||
$this->assertEquals($theme, $this->conf->get('resource.theme'));
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Test updateMethodEscapeMarkdown with markdown plugin enabled
|
* Test updateMethodEscapeMarkdown with markdown plugin enabled
|
||||||
* => setting markdown_escape set to false.
|
* => setting markdown_escape set to false.
|
||||||
|
|
Loading…
Reference in a new issue