Changeset 3145

Show
Ignore:
Timestamp:
06/06/07 06:52:28 (1 month ago)
Author:
demian
Message:

add ability to call sgl blocks from remote site

Files:

Legend:

Unmodified
Added
Removed
Modified
Copied
Moved
  • branches/0.6-bugfix/lib/SGL.php

    r3086 r3145  
    6161    { 
    6262        $aLangs = $GLOBALS['_SGL']['LANGUAGE']; 
    63         $sessLang = $_SESSION['aPrefs']['language']; 
     63        $sessLang = isset($_SESSION['aPrefs']['language']) 
     64            ? $_SESSION['aPrefs']['language'] 
     65            : 'en-iso-8859-15'; 
    6466        return $aLangs[$sessLang][2]; 
    6567    } 
  • branches/0.6-bugfix/lib/SGL/BlockLoader.php

    r2914 r3145  
    115115        $this->output = &$output; 
    116116        $cache = & SGL_Cache::singleton(); 
     117        $currLang = (isset($output->currLang)) 
     118            ? $output->currLang 
     119            : ''; 
     120        $charset = (isset($output->charset)) 
     121            ? $output->charset 
     122            : ''; 
    117123        $cacheId = $this->_currentSectionId . $this->_rid 
    118             . $output->currLang . $output->charset; 
     124            . $currLang . $charset; 
    119125        if ($data = $cache->get($cacheId, 'blocks')) { 
    120126            $this->aBlocks = unserialize($data);