Skip to content
This repository was archived by the owner on Nov 25, 2022. It is now read-only.

Commit efec4a3

Browse files
committed
Themes details are no longer stored in database. It is useless.
1 parent 9381313 commit efec4a3

1 file changed

Lines changed: 1 addition & 26 deletions

File tree

skeleton/controllers/admin/Themes.php

Lines changed: 1 addition & 26 deletions
Original file line numberDiff line numberDiff line change
@@ -106,32 +106,7 @@ public function __construct()
106106
public function index()
107107
{
108108
// Get themes stored in database and in folder.
109-
$db_themes = $this->kbcore->options->get('themes');
110-
$folder_themes = $this->theme->get_themes(true);
111-
112-
// The options does not exist in database? Create it.
113-
if (false === $db_themes)
114-
{
115-
// We create the option.
116-
$this->kbcore->options->create(array(
117-
'name' => 'themes',
118-
'value' => $folder_themes,
119-
'tab' => 'theme',
120-
));
121-
122-
// Then we get it.
123-
$db_themes = $this->kbcore->options->get('themes');
124-
}
125-
// Was themes folder update for some reason?
126-
elseif ($folder_themes <> $db_themes->value)
127-
{
128-
// we retrieve all themes and update the option.
129-
$db_themes->set('value', $folder_themes);
130-
$db_themes->save();
131-
}
132-
133-
// Prepare our themes array.
134-
$themes = $db_themes->value;
109+
$themes = $this->theme->get_themes(true);
135110

136111
// Format some elements before final output.
137112
foreach ($themes as $folder => &$t)

0 commit comments

Comments
 (0)