1
0
mirror of https://github.com/monstra-cms/monstra.git synced 2025-08-10 23:24:07 +02:00

Themes Plugin: fix all get files methods. Return empty array if folders doesnt exists.

This commit is contained in:
Awilum
2012-09-26 01:18:24 +03:00
parent 9196601896
commit fb76534523
2 changed files with 15 additions and 16 deletions

View File

@@ -18,12 +18,11 @@
// Init vsrs
$themes_site = Themes::getSiteThemes();
$themes_admin = Themes::getAdminThemes();
$templates = Themes::getTemplates();
$chunks = Themes::getChunks();
$styles = Themes::getStyles();
$scripts = Themes::getScripts();
$errors = array();
$templates = Themes::getTemplates();
$chunks = Themes::getChunks();
$styles = Themes::getStyles();
$scripts = Themes::getScripts();
$errors = array();
$chunk_path = THEMES_SITE . DS . $current_site_theme . DS;
$template_path = THEMES_SITE . DS . $current_site_theme . DS;
$style_path = THEMES_SITE . DS . $current_site_theme . DS . 'css' . DS;
@@ -477,7 +476,7 @@
// Delete script
// -------------------------------------
case "delete_script":
File::delete($style_path.Request::get('filename').'.js');
File::delete($script_path.Request::get('filename').'.js');
Notification::set('success', __('Script <i>:name</i> deleted', 'themes', array(':name' => File::name(Request::get('filename')))));
Request::redirect('index.php?id=themes');
break;