Changeset 340
- Timestamp:
- 03/06/07 17:02:05 (1 year ago)
- Files:
-
- trunk/docroot/xml.php (modified) (1 diff)
- trunk/src/main/php/net/stubbles/websites/xml/stubXMLPagePostInterceptor.php (modified) (4 diffs)
Legend:
- Unmodified
- Added
- Removed
- Modified
- Copied
- Moved
trunk/docroot/xml.php
r339 r340 50 50 $postInterceptor = new stubXMLPagePostInterceptor(); 51 51 $response = $processor->process()->getResponse(); 52 $postInterceptor->setSession($session); 52 53 $postInterceptor->setResponse($response); 53 54 $postInterceptor->postProcess(); trunk/src/main/php/net/stubbles/websites/xml/stubXMLPagePostInterceptor.php
r302 r340 8 8 */ 9 9 stubClassLoader::load('net.stubbles.ipo.interceptors.stubPostInterceptor', 10 'net.stubbles.ipo.response.stubResponse', 11 'net.stubbles.ipo.session.stubSession', 12 'net.stubbles.util.stubRegistry', 10 13 'net.stubbles.xml.xsl.stubXSLProcessor', 11 14 'net.stubbles.xml.xsl.util.stubXSLImageDimensions', … … 27 30 { 28 31 /** 32 * access to session 33 * 34 * @var stubSession 35 */ 36 protected $session; 37 /** 29 38 * response data 30 39 * … … 41 50 stubXMLXIncludeStreamWrapper::setIncludePath(stubConfig::getConfigPath() . '/xml/pages/txt'); 42 51 stubXMLXIncludeStreamWrapper::setCachePath(stubConfig::getCachePath()); 52 } 53 54 /** 55 * set the session object 56 * 57 * @param stubSession $session 58 */ 59 public function setSession(stubSession $session) 60 { 61 $this->session = $session; 43 62 } 44 63 … … 66 85 $page = $this->response->getPage(); 67 86 $xslProcessor->setParameter('', 'page', $page->getProperty('name')); 87 if ($this->session->hasValue('net.stubbles.language') == true) { 88 $language = $this->session->getValue('net.stubbles.language'); 89 } elseif ($page->hasProperty('language') == true) { 90 $language = $page->getProperty('language'); 91 } elseif (stubRegistry::hasConfig('net.stubbles.language') == true) { 92 $language = stubRegistry::getConfig('net.stubbles.language'); 93 } else { 94 $language = 'en_EN'; 95 } 96 $xslProcessor->setParameter('', 'lang', $language); 68 97 // use same xsl processor for the xincludes 69 98 stubXMLXIncludeStreamWrapper::setXSLProcessor($xslProcessor);
