Skip to content

Commit

Permalink
tweaks
Browse files Browse the repository at this point in the history
  • Loading branch information
slusarz committed Oct 9, 2013
1 parent 9b80259 commit 4380c4d
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 8 deletions.
8 changes: 3 additions & 5 deletions framework/Core/lib/Horde/Core/Factory/ThemesCache.php
Expand Up @@ -49,11 +49,9 @@ public function create($app, $theme)
$sig = implode('|', array($app, $theme));

if (!isset($this->_instances[$sig])) {
if (!empty($GLOBALS['conf']['cachethemes'])) {
$cache = $this->_injector->getInstance('Horde_Cache');
} else {
$cache = null;
}
$cache = empty($GLOBALS['conf']['cachethemes'])
? null
: $this->_injector->getInstance('Horde_Cache');

if (!$cache || ($cache instanceof Horde_Cache_Null)) {
$instance = new Horde_Themes_Cache($app, $theme);
Expand Down
11 changes: 8 additions & 3 deletions framework/Core/lib/Horde/Themes/Cache.php
Expand Up @@ -253,14 +253,19 @@ public function getAll($item, $mask = 0)
*/
public function getCacheId()
{
global $conf, $registry;

if (!isset($this->_cacheid)) {
$check = isset($GLOBALS['conf']['cachethemesparams']['check']) ? $GLOBALS['conf']['cachethemesparams']['check'] : null;
$check = isset($conf['cachethemesparams']['check'])
? $conf['cachethemesparams']['check']
: null;

switch ($check) {
case 'appversion':
default:
$id = array($GLOBALS['registry']->getVersion($this->_app));
$id = array($registry->getVersion($this->_app));
if ($this->_app != 'horde') {
$id[] = $GLOBALS['registry']->getVersion('horde');
$id[] = $registry->getVersion('horde');
}
$this->_cacheid = 'v:' . implode('|', $id);
break;
Expand Down

0 comments on commit 4380c4d

Please sign in to comment.