Changeset 36600
- Timestamp:
- 02/20/2016 09:02:33 PM (9 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/tools/i18n/add-textdomain.php
r36599 r36600 94 94 $included_files = get_included_files(); 95 95 if ($included_files[0] == __FILE__) { 96 $adddomain = new AddTextdomain ;96 $adddomain = new AddTextdomain(); 97 97 98 98 if (!isset($argv[1]) || !isset($argv[2])) { … … 107 107 } 108 108 109 $adddomain->process_file($argv[1], $argv[2], $inplace); 109 if ( is_dir( $argv[2] ) ) { 110 $directory = new RecursiveDirectoryIterator( $argv[2], RecursiveDirectoryIterator::SKIP_DOTS ); 111 $files = new RecursiveIteratorIterator( $directory ); 112 foreach ( $files as $file ) { 113 if ( 'php' === $file->getExtension() ) { 114 $adddomain->process_file( $argv[1], $file->getPathname(), $inplace ); 115 } 116 } 117 } else { 118 $adddomain->process_file( $argv[1], $argv[2], $inplace ); 119 } 110 120 } 111 112 ?>
Note: See TracChangeset
for help on using the changeset viewer.