18 $this->_sLang = $sLang;
19 $this->_sSkin = preg_replace (
'#_\w{2}$#',
'',
$sSkin);
24 $this->_iVisualProcessing = $i;
40 if (isset(
$gConf[
'dir'][
'cache'])) {
41 $d = dir(
$gConf[
'dir'][
'cache']);
43 while (FALSE !== ($entry = $d->read())) {
44 if ($entry ==
'.' || $entry ==
'..') {
48 @unlink (
$gConf[
'dir'][
'cache'] . $entry);
59 if (!$this->
_fullCopy ($gConf[
'dir'][
'layouts'] .
'base',
$gConf[
'dir'][
'layouts'] .
'base_' . $this->_sLang))
64 if (!$this->
_fullCopy ($sDirSkin, $sDirSkin .
'_' . $this->_sLang))
68 $sDirClasses = preg_replace (
'#classes/\w{2}/$#',
'classes/',
$gConf[
'dir'][
'classes']);
69 if (!$this->
_fullCopy ($sDirClasses, $sDirClasses . $this->_sLang,
false))
73 $sDirJs = preg_replace (
'#js/\w{2}/$#',
'js/',
$gConf[
'dir'][
'js']);
74 if (!$this->
_fullCopy ($sDirJs, $sDirJs . $this->_sLang,
false))
84 $sExt = substr($sFilePath, -4);
86 if (
'.xsl' ==
$sExt ||
'.php' ==
$sExt ||
'.js' == substr($sFilePath, -3)) {
94 if (
'loader.php' == substr($sFilePath, -10)) {
95 $s = str_replace (
"'..'",
"'../..'",
$s);
100 if ($this->_iVisualProcessing)
112 'base_' . $this->_sLang .
'/',
113 $this->_sSkin .
'_' . $this->_sLang .
'/'
125 $s = preg_replace_callback (
'#\[L\[(.*?)\]\]#', array($this,
'_langReplaceHandler'),
$s);
128 function _fullCopy ($source, $target, $recursively =
true)
130 if (is_dir($source)) {
131 @mkdir($target, 0777);
132 @chmod($target, 0777);
136 while (FALSE !== ($entry = $d->read())) {
137 if ($entry ==
'.' || $entry ==
'..') {
141 $Entry = $source .
'/' . $entry;
142 if (is_dir($Entry)) {
144 if (!$this->
_fullCopy($Entry, $target .
'/' . $entry))
148 if (!
copy($Entry, $target .
'/' . $entry))
150 @chmod($target .
'/' . $entry, 0666);
157 if (!
copy($source, $target))
159 @chmod($target, 0666);
168 return file_get_contents ($sFilePath);
173 $f = fopen ($sFilePath,
'w');
174 if (!
$f)
return false;