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

Commit

Permalink
Themes details are no longer stored in database. It is useless.
Browse files Browse the repository at this point in the history
  • Loading branch information
bkader committed May 29, 2018
1 parent 9381313 commit efec4a3
Showing 1 changed file with 1 addition and 26 deletions.
27 changes: 1 addition & 26 deletions skeleton/controllers/admin/Themes.php
Original file line number Diff line number Diff line change
Expand Up @@ -106,32 +106,7 @@ public function __construct()
public function index()
{
// Get themes stored in database and in folder.
$db_themes = $this->kbcore->options->get('themes');
$folder_themes = $this->theme->get_themes(true);

// The options does not exist in database? Create it.
if (false === $db_themes)
{
// We create the option.
$this->kbcore->options->create(array(
'name' => 'themes',
'value' => $folder_themes,
'tab' => 'theme',
));

// Then we get it.
$db_themes = $this->kbcore->options->get('themes');
}
// Was themes folder update for some reason?
elseif ($folder_themes <> $db_themes->value)
{
// we retrieve all themes and update the option.
$db_themes->set('value', $folder_themes);
$db_themes->save();
}

// Prepare our themes array.
$themes = $db_themes->value;
$themes = $this->theme->get_themes(true);

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

0 comments on commit efec4a3

Please sign in to comment.