Changeset 608
- Timestamp:
- 04/27/09 21:48:15 (3 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/apps/drupal/wysiwyg/editors/wymeditor.inc
r607 r608 35 35 'settings callback' => 'wysiwyg_wymeditor_settings', 36 36 'versions' => array( 37 '0.5 ' => array(37 '0.5-b3' => array( 38 38 'js files' => array('wymeditor.js') 39 39 ), … … 53 53 */ 54 54 function wysiwyg_wymeditor_version($editor) { 55 $library = $editor['library path'] . '/jquery.wymeditor.js'; 56 if (!file_exists($library)) { 57 return; 55 $script = wysiwyg_get_path('wymeditor/wymeditor') . '/jquery.wymeditor.js'; 56 $script = fopen($script, 'r'); 57 fgets($script); 58 $line = fgets($script); 59 if (preg_match('@version\s([0-9a-z\.\-]+)$@', $line, $version)) { 60 fclose($script); 61 return $version[1]; 58 62 } 59 $library = fopen($library, 'r');60 $max_lines = 200;61 while ($max_lines && $line = fgets($library)) {62 if (strpos($line, 'VERSION :') !== FALSE) {63 if (preg_match('@VERSION\s*:\s*"([0-9\.]+)@', $line, $version)) {64 fclose($library);65 return $version[1];66 }67 }68 $max_lines--;69 }70 fclose($library);71 63 } 72 64
Note: See TracChangeset
for help on using the changeset viewer.