Changeset 837
- Timestamp:
- 08/15/07 14:32:32 (11 months ago)
- Files:
Legend:
- Unmodified
- Added
- Removed
- Modified
- Copied
- Moved
trunk/examples/config/xml/pages/txt/main_index.xml
r705 r837 27 27 28 28 <!-- This is an include from a different file --> 29 <stub:include part="disclaimer" href=" parts.xml"/>29 <stub:include part="disclaimer" href="include/parts.xml"/> 30 30 </div> 31 31 trunk/src/main/php/net/stubbles/xml/stubXMLXIncludeStreamWrapper.php
r533 r837 98 98 public static function setCachePath($cachePath) 99 99 { 100 self::$cachePath = $cachePath ;101 if (file_exists($cachePath . '/xml') == false) {102 if (!@mkdir($cachePath . '/xml', 0700, true)) {103 throw new stubException("Can not create cache directory at " . $cachePath . '/xml.');100 self::$cachePath = $cachePath . '/xml/xinc'; 101 if (file_exists($cachePath) == false) { 102 if (!@mkdir($cachePath, 0700, true)) { 103 throw new stubException("Can not create cache directory " . $cachePath . '.'); 104 104 } 105 105 } … … 288 288 list($fileName, $part) = sscanf($path, 'xinc://%[^?]?part=%[^$]'); 289 289 $this->fileName = $fileName; 290 $this->part = $part; 291 $language = ''; 290 292 if (self::$xslProcessor->hasParameter('', 'lang') == true) { 291 $language = self::$xslProcessor->getParameter('', 'lang') . '_'; 292 } else { 293 $language = ''; 294 } 295 $this->cachedFileName = self::$cachePath . '/xml/' . $language . $fileName; 296 $this->part = $part; 293 $language = self::$xslProcessor->getParameter('', 'lang'); 294 } 295 296 $this->cachedFileName = self::$cachePath . '/' . $language . '/' . $fileName; 297 if (file_exists(dirname($this->cachedFileName)) === false) { 298 mkdir(dirname($this->cachedFileName), 0700, true); 299 } 297 300 } 298 301 }
