diff --git a/include/class_IconTheme.inc b/include/class_IconTheme.inc index c4a90f9aa57e7263800d5f6ecdf311cf033cf097..5b956c5e5bb7e346a21918d13a2f33ebf142b963 100644 --- a/include/class_IconTheme.inc +++ b/include/class_IconTheme.inc @@ -50,9 +50,9 @@ class IconThemeDir * Defaults to 2 if not present. */ private $Threshold = 2; - function __construct($infos) + function __construct ($infos) { - $this->Size = $infos['Size']; + $this->Size = $infos['Size']; $this->MinSize = $infos['Size']; $this->MaxSize = $infos['Size']; foreach (['Type', 'MaxSize', 'MinSize', 'Threshold'] as $key) { @@ -67,7 +67,7 @@ class IconThemeDir } } - function MatchesSize($size) + function MatchesSize ($size) { switch ($this->Type) { case 'Fixed': @@ -79,7 +79,7 @@ class IconThemeDir } } - function SizeDistance($size) + function SizeDistance ($size) { switch ($this->Type) { case 'Fixed': @@ -108,10 +108,10 @@ class IconTheme private $path; private $parent; - function __construct($folder, $default_parent) + function __construct ($folder, $default_parent) { $this->path = $folder; - $datas = @parse_ini_file($folder . '/index.theme', TRUE, INI_SCANNER_RAW); + $datas = @parse_ini_file($folder . '/index.theme', TRUE, INI_SCANNER_RAW); if ($datas === FALSE) { throw new ThemeFileParsingException('Error while parsing theme file'); } @@ -131,13 +131,13 @@ class IconTheme } } - function FindIcon($context, $icon, $size) + function FindIcon ($context, $icon, $size) { $context = strtolower($context); return $this->FindIconHelper($context, $icon, $size); } - function FindIconHelper($context, $icon, $size) + function FindIconHelper ($context, $icon, $size) { $filename = $this->LookupIcon($context, $icon, $size); if ($filename != NULL) { @@ -163,7 +163,7 @@ class IconTheme return NULL; } - function LookupIcon($context, $iconname, $size) + function LookupIcon ($context, $iconname, $size) { if (!isset($this->subdirs[$context])) { return NULL; @@ -187,7 +187,7 @@ class IconTheme $filename = $this->path . '/' . $path . '/' . $iconname . '.' . $extension; if (file_exists($filename)) { $closest_filename = $filename; - $minimal_size = $sizedistance; + $minimal_size = $sizedistance; } } } @@ -207,7 +207,7 @@ class IconTheme /* We store themes in the session. To do otherwise, override these methods. */ static public $session_var = 'IconThemes'; - static public function loadThemes($path) + static public function loadThemes ($path) { $themes = []; if ($dir = opendir("$path")) { @@ -228,7 +228,7 @@ class IconTheme $_SESSION[static::$session_var] = $themes; } - static public function findThemeIcon($theme, $context, $icon, $size) + static public function findThemeIcon ($theme, $context, $icon, $size) { // We have to sanitize the $icon received from $_GET['icon']. Fixing vulnerability : CWE-35 @@ -246,7 +246,7 @@ class IconTheme return $_SESSION[static::$session_var][static::$default_theme]->FindIcon($context, $icon, $size); } - public function findTheme($theme) + public function findTheme ($theme) { if (isset($_SESSION[static::$session_var][$theme])) { return $_SESSION[static::$session_var][$theme];