Changeset 2053
- Timestamp:
- 04/08/2009 09:21:07 PM (17 years ago)
- File:
-
- 1 edited
-
branches/0.9/bb-admin/admin-functions.php (modified) (1 diff)
Legend:
- Unmodified
- Added
- Removed
-
branches/0.9/bb-admin/admin-functions.php
r1842 r2053 848 848 ); 849 849 } 850 $plugin_code = implode('', file($plugin_file)); 850 851 // Pull only the first 8kiB of the file in. 852 $fp = fopen( $plugin_file, 'r' ); 853 $plugin_code = fread( $fp, 8192 ); 854 fclose($fp); 855 851 856 // Grab just the first commented area from the file 852 if ( !preg_match( '|/\*(.* )\*/|msU', $plugin_code, $plugin_block ) )857 if ( !preg_match( '|/\*(.*?Plugin Name:.*?)\*/|ims', $plugin_code, $plugin_block ) ) 853 858 return false; 854 859 $plugin_data = trim( $plugin_block[1] ); 855 if ( !preg_match("|Plugin Name:(.*)|i", $plugin_data, $plugin_name) ) 856 return false;860 861 preg_match("|Plugin Name:(.*)|i", $plugin_data, $plugin_name); 857 862 preg_match("|Plugin URI:(.*)|i", $plugin_data, $plugin_uri); 858 863 preg_match("|Description:(.*)|i", $plugin_data, $description);
Note: See TracChangeset
for help on using the changeset viewer.