Changeset 1037:20df3c7bdb5c
- Timestamp:
- 11/26/12 13:39:46 (13 years ago)
- Branch:
- default
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
plugins/themeEditor/class.themeEditor.php
r1036 r1037 243 243 foreach ($langs as $k => $v) { 244 244 if ($this->parent_theme) { 245 $this->po = array_merge($this->po,$this->getFilesInDir($this->parent_theme.'/locales/'.$v,'po',$v.'/' ));246 } 247 $this->po = array_merge($this->po,$this->getFilesInDir($this->user_theme.'/locales/'.$v,'po',$v.'/' ));248 } 249 } 250 251 protected function getFilesInDir($dir,$ext=null,$prefix='' )245 $this->po = array_merge($this->po,$this->getFilesInDir($this->parent_theme.'/locales/'.$v,'po',$v.'/','main.po')); 246 } 247 $this->po = array_merge($this->po,$this->getFilesInDir($this->user_theme.'/locales/'.$v,'po',$v.'/','main.po')); 248 } 249 } 250 251 protected function getFilesInDir($dir,$ext=null,$prefix='',$model=null) 252 252 { 253 253 $dir = path::real($dir); … … 261 261 { 262 262 if (is_file($dir.'/'.$f) && !preg_match('/^\./',$f) && (!$ext || preg_match('/\.'.preg_quote($ext).'$/i',$f))) { 263 $res[$prefix.$f] = $dir.'/'.$f; 263 if (!$model || preg_match('/^'.preg_quote($model).'$/i', $f)) { 264 $res[$prefix.$f] = $dir.'/'.$f; 265 } 264 266 } 265 267 }
Note: See TracChangeset
for help on using the changeset viewer.