Avoid loading themes from non directories, . and ..
This commit is contained in:

committed by
Marc Delisle

parent
7ed2f6f362
commit
15f887a979
@@ -231,6 +231,10 @@ class PMA_Theme_Manager
|
|||||||
if ($handleThemes = opendir($this->getThemesPath())) {
|
if ($handleThemes = opendir($this->getThemesPath())) {
|
||||||
// check for themes directory
|
// check for themes directory
|
||||||
while (false !== ($PMA_Theme = readdir($handleThemes))) {
|
while (false !== ($PMA_Theme = readdir($handleThemes))) {
|
||||||
|
// Skip non dirs, . and ..
|
||||||
|
if ($PMA_Theme == '.' || $PMA_Theme == '..' || ! is_dir($this->getThemesPath() . '/' . $PMA_Theme)) {
|
||||||
|
continue;
|
||||||
|
}
|
||||||
if (array_key_exists($PMA_Theme, $this->themes)) {
|
if (array_key_exists($PMA_Theme, $this->themes)) {
|
||||||
// this does nothing!
|
// this does nothing!
|
||||||
//$this->themes[$PMA_Theme] = $this->themes[$PMA_Theme];
|
//$this->themes[$PMA_Theme] = $this->themes[$PMA_Theme];
|
||||||
|
Reference in New Issue
Block a user