This repository was archived by the owner on Nov 25, 2022. It is now read-only.
File tree Expand file tree Collapse file tree
skeleton/controllers/admin Expand file tree Collapse file tree Original file line number Diff line number Diff 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 )
You can’t perform that action at this time.
0 commit comments