Changeset 1731 for trunk/admin/include
- Timestamp:
- Jan 18, 2007, 3:09:31 AM (17 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/admin/include/functions_plugins.inc.php
r1705 r1731 71 71 /** 72 72 * Retrieves an url for a plugin page. 73 * @param string plugin_id 74 * @param string page - the php script file name (without .php extension) 73 * @param string file - php script full name 75 74 */ 76 function get_admin_plugin_menu_link($ plugin_id, $page)75 function get_admin_plugin_menu_link($file) 77 76 { 78 $url = get_root_url().'admin.php?page=plugin&section=' 79 .urlencode($plugin_id .'~'. $page); 77 global $page; 78 $real_file = realpath($file); 79 $url = get_root_url().'admin.php?page=plugin'; 80 if (false!==$real_file) 81 { 82 $real_plugin_path = realpath(PHPWG_PLUGINS_PATH); 83 $file = substr($real_file, strlen($real_plugin_path)+1); 84 $file = str_replace('\\', '/', $file);//Windows 85 $url .= '&section='.urlencode($file); 86 } 87 else if (isset($page['errors'])) 88 { 89 array_push($page['errors'], 'PLUGIN ERROR: "'.$file.'" is not a valid file'); 90 } 80 91 return $url; 81 92 }
Note: See TracChangeset
for help on using the changeset viewer.