// Little fix on employee tab

git-svn-id: http://dev.prestashop.com/svn/v1/branches/1.5.x@11913 b9a71923-0436-4b27-9f14-aed3839534dd
This commit is contained in:
rGaillard
2011-12-29 17:37:03 +00:00
parent 7064c1d387
commit 2a6a8ae7d1
+11 -6
View File
@@ -93,6 +93,11 @@ class AdminEmployeesControllerCore extends AdminController
) )
); );
$path = _PS_ADMIN_DIR_.'/themes/';
foreach (scandir($path) as $theme)
if (file_exists($path.$theme.'/css/admin.css'))
$this->themes[] = $theme;
parent::__construct(); parent::__construct();
} }
@@ -118,12 +123,6 @@ class AdminEmployeesControllerCore extends AdminController
return parent::renderForm(); return parent::renderForm();
} }
$path = _PS_ADMIN_DIR_.'/themes/';
foreach (scandir($path) as $theme)
if (file_exists($path.$theme.'/css/admin.css'))
$this->themes[] = $theme;
$this->fields_form = array( $this->fields_form = array(
'legend' => array( 'legend' => array(
'title' => $this->l('Employees'), 'title' => $this->l('Employees'),
@@ -347,6 +346,12 @@ class AdminEmployeesControllerCore extends AdminController
} }
} }
if (!in_array(Tools::getValue('bo_theme'), $this->themes))
{
$this->_errors[] = Tools::displayError('Invalid theme.');
return false;
}
$assos = self::getAssoShop($this->table); $assos = self::getAssoShop($this->table);
if (count($assos[0]) == 0 && $this->table = 'employee') if (count($assos[0]) == 0 && $this->table = 'employee')