Changeset 30 for branches/lang_editor
- Timestamp:
- 02/10/09 18:06:06 (3 years ago)
- Location:
- branches/lang_editor
- Files:
-
- 2 modified
-
admin/lang_editor.php (modified) (4 diffs)
-
include/functions.php (modified) (1 diff)
Legend:
- Unmodified
- Added
- Removed
-
branches/lang_editor/admin/lang_editor.php
r2 r30 23 23 ************************************************************************/ 24 24 25 26 25 if (!defined('FORUM_ROOT')) 27 26 define('FORUM_ROOT', '../../../'); … … 63 62 while ($f = $d->read()) 64 63 { 65 if (substr($f, 0, 1) != '.' && $file == null )64 if (substr($f, 0, 1) != '.' && $file == null && substr($f, strlen($f)-3) == 'php') 66 65 $file = $dir.'/'.$f; 67 66 } … … 137 136 $archive = FORUM_ROOT.'extensions/lang_editor/cache/'.$ext.'_'.$version.'.zip'; 138 137 138 if (file_exists($archive)) 139 @unlink($arcive); 140 139 141 $zip = new ZipArchive(); 140 142 if ($zip->open($archive, ZIPARCHIVE::CREATE) === TRUE) … … 346 348 while ($f = $d->read()) 347 349 { 348 if (substr($f, 0, 1) != '.' && (file_exists($dir.$f.'/lang/English') || file_exists($dir.$f.'/lang/English.php')))350 if (substr($f, 0, 1) != '.' && $f != 'index.html' /*&& (file_exists($dir.$f.'/lang/English') || file_exists($dir.$f.'/lang/English.php'))*/) 349 351 { 350 352 $name = ucfirst(str_replace('_', ' ', $f)); 353 354 $export = ' [ <a href="'.EXT_FILE.'?act=export&lang='.$lang.'&ext='.$f.'">Export</a> ]'; 351 355 // if translated lang exists 352 356 if (file_exists($dir.$f.'/lang/'.$lang) || file_exists($dir.$f.'/lang/'.$lang.'.php')) 353 echo '<li><a href="'.EXT_FILE.'?lang='.$lang.'&ext='.$f.'">'.$name.'</a> [ <a href="'.EXT_FILE.'?act=export&lang='.$lang.'&ext='.$f.'">Export</a> ]</li>';357 echo '<li><a href="'.EXT_FILE.'?lang='.$lang.'&ext='.$f.'">'.$name.'</a>'.$export.'</li>'; 354 358 else 355 echo '<li><a href="'.EXT_FILE.'?act=create&lang='.$lang.'&ext='.$f.'" style="color: red">'.$name.'</a> </li>';359 echo '<li><a href="'.EXT_FILE.'?act=create&lang='.$lang.'&ext='.$f.'" style="color: red">'.$name.'</a>'.$export.'</li>'; 356 360 } 357 361 } -
branches/lang_editor/include/functions.php
r2 r30 120 120 while ($file = $dir->read()) 121 121 { 122 if (substr($file, 0, 1) != '.' )122 if (substr($file, 0, 1) != '.' && !preg_match('#.diff$#', $file)) 123 123 { 124 124 if (is_dir($directory.'/'.$subdir.'/'.$file))