Diff for framework/Horde/Horde/Registry.php between version 1.306 and 1.307

Location: [ Horde CVS ] / framework / Horde / Horde / Registry.php
Download diff as:

Log Message

1.307: No need for $theme_icons - just check if the theme has a graphics
directory for the given application (especially since we cache
registry data now). Also avoids BC breaks with application icons and
is just more flexible.
Unmodified Unmodified Added Added Modified Modified Removed Removed
Version 1.306 Version 1.307
Line 1 Line 1
<?php
/**
<?php
/**
 * $Horde: framework/Horde/Horde/Registry.php,v 1.305 2008/01/02 11:12:00 jan Exp $
 * $Horde: framework/Horde/Horde/Registry.php,v 1.306 2008/01/09 21:07:55 chuck Exp $
 *
* Copyright 1999-2008 The Horde Project (http://www.horde.org/)
*
 *
* Copyright 1999-2008 The Horde Project (http://www.horde.org/)
*
Line 1049 Line 1049
         * settings. */
if (isset($GLOBALS['prefs']) &&
($theme = $GLOBALS['prefs']->getValue('theme'))) {
         * settings. */
if (isset($GLOBALS['prefs']) &&
($theme = $GLOBALS['prefs']->getValue('theme'))) {
            if (!isset($this->_themeCache[$theme])) {
@include $this->get('themesfs', 'horde') . '/' . $theme . '/info.php';
$this->_themeCache[$theme] = isset($theme_icons) ? $theme_icons : array();
foreach (array_keys($this->_themeCache[$theme]) as $index) {
/* Make sure that theme directories exist for
* every application the theme claims to have
* icons for. */
$app = $this->_themeCache[$theme][$index];
if (!is_dir($this->get('themesfs', $app) . '/' . $theme)) {
unset($this->_themeCache[$theme][$index]);
}
}
            if (!isset($this->_themeCache[$theme][$app])) {
$this->_themeCache[$theme][$app] = is_dir($this->get('themesfs', $app) . '/' . $theme . '/graphics');










                $this->_cacheVars(array('_themeCache'));
}

                $this->_cacheVars(array('_themeCache'));
}

            if (in_array($app, $this->_themeCache[$theme])) {
            if ($this->_themeCache[$theme][$app]) {
                $this->_imgDir[$app] = $this->get('themesuri', $app) . '/' . $theme . '/graphics';
}
}
                $this->_imgDir[$app] = $this->get('themesuri', $app) . '/' . $theme . '/graphics';
}
}