mirror of
https://github.com/e107inc/e107.git
synced 2025-08-16 03:24:20 +02:00
Deprecated some old themeHandler methods in favor of e_theme class. Should see a speed increase in theme manager.
This commit is contained in:
@@ -20,7 +20,7 @@
|
||||
try
|
||||
{
|
||||
$this->tm = $this->make('e_theme');
|
||||
$this->tm->__construct();
|
||||
|
||||
}
|
||||
catch (Exception $e)
|
||||
{
|
||||
@@ -176,8 +176,47 @@
|
||||
|
||||
|
||||
}
|
||||
/*
|
||||
public function testGetThemesMigrations()
|
||||
{
|
||||
$thm = e107::getSingleton('themeHandler');
|
||||
|
||||
$tests = array(null, 'id', 'xml');
|
||||
|
||||
foreach($tests as $mode)
|
||||
{
|
||||
$old = $thm->getThemes($mode);
|
||||
|
||||
$this->tm->__construct(['force'=>true]);
|
||||
$new = $this->tm->getThemes($mode);
|
||||
|
||||
$this->assertSame($old,$new);
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
*/
|
||||
|
||||
/*
|
||||
public function testThemeInfoMigration()
|
||||
{
|
||||
$thm = e107::getSingleton('themeHandler');
|
||||
|
||||
$name = 'bootstrap3';
|
||||
|
||||
$this->tm->__construct(['themedir'=>$name, 'force'=>true]);
|
||||
$old = $thm->getThemeInfo($name);
|
||||
|
||||
$new = $this->tm->get();
|
||||
|
||||
$this->assertNotEmpty($new, "New parsing of ".$name." returned null");
|
||||
$this->assertNotEmpty($old, "Old parsing of ".$name." returned null");
|
||||
|
||||
// unset($new['id']); // introduced.
|
||||
|
||||
$this->assertSame($old, $new);
|
||||
|
||||
}
|
||||
*/
|
||||
|
||||
}
|
||||
|
Reference in New Issue
Block a user