Changeset 2566:9bf417837888 for admin/plugin.php
- Timestamp:
- 11/17/13 20:25:53 (12 years ago)
- Branch:
- 2.6
- Children:
- 2567:6c11245cbf04, 2568:61c67a7d17fa
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
admin/plugin.php
r2166 r2566 35 35 # Loading plugin 36 36 $p_info = $core->plugins->getModules($p); 37 37 38 38 $p_url = 'plugin.php?p='.$p; 39 39 40 40 $p_title = 'no content - plugin'; 41 41 $p_head = ''; 42 42 $p_content = '<p>'.__('No content found on this plugin.').'</p>'; 43 43 44 44 ob_start(); 45 45 include $p_file; 46 46 $res = ob_get_contents(); 47 47 ob_end_clean(); 48 48 49 49 if (preg_match('|<head>(.*?)</head|ms',$res,$m)) { 50 50 if (preg_match('|<title>(.*?)</title>|ms',$m[1],$mt)) { 51 51 $p_title = $mt[1]; 52 52 } 53 53 54 54 if (preg_match_all('|(<script.*?>.*?</script>)|ms',$m[1],$ms)) { 55 55 foreach ($ms[1] as $v) { … … 57 57 } 58 58 } 59 59 60 60 if (preg_match_all('|(<style.*?>.*?</style>)|ms',$m[1],$ms)) { 61 61 foreach ($ms[1] as $v) { … … 63 63 } 64 64 } 65 65 66 66 if (preg_match_all('|(<link.*?/>)|ms',$m[1],$ms)) { 67 67 foreach ($ms[1] as $v) { … … 70 70 } 71 71 } 72 72 73 73 if (preg_match('|<body.*?>(.+)</body>|ms',$res,$m)) { 74 74 $p_content = $m[1]; 75 75 } 76 76 77 77 call_user_func($open_f,$p_title,$p_head); 78 78 echo $p_content; … … 88 88 )) 89 89 ); 90 90 91 91 echo '<p>'.__('The plugin you reached does not exist or does not have an admin page.').'</p>'; 92 92 93 93 call_user_func($close_f); 94 94 } 95 ?>
Note: See TracChangeset
for help on using the changeset viewer.