Changeset 10131 for branches/2.2/admin/plugins_list.php
- Timestamp:
- Apr 7, 2011, 11:47:01 AM (13 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
branches/2.2/admin/plugins_list.php
r10007 r10131 68 68 69 69 $plugins->sort_fs_plugins('name'); 70 $plugins->get_merged_extensions(); 71 $plugins->get_incompatible_plugins(); 72 $merged_plugins = false; 70 73 71 74 foreach($plugins->fs_plugins as $plugin_id => $fs_plugin) 72 75 { 76 if (isset($_SESSION['incompatible_plugins'][$plugin_id]) 77 and $fs_plugin['version'] != $_SESSION['incompatible_plugins'][$plugin_id]) 78 { 79 // Incompatible plugins must be reinitilized 80 $plugins->get_incompatible_plugins(true); 81 } 82 73 83 $tpl_plugin = array( 74 84 'NAME' => $fs_plugin['name'], … … 78 88 'AUTHOR' => $fs_plugin['author'], 79 89 'AUTHOR_URL' => @$fs_plugin['author uri'], 80 'U_ACTION' => sprintf($action_url, $plugin_id) 90 'U_ACTION' => sprintf($action_url, $plugin_id), 91 'INCOMPATIBLE' => isset($_SESSION['incompatible_plugins'][$plugin_id]), 81 92 ); 82 93 … … 90 101 } 91 102 103 if (isset($fs_plugin['extension']) and in_array($fs_plugin['extension'], $_SESSION['merged_extensions'])) 104 { 105 switch($tpl_plugin['STATE']) 106 { 107 case 'active': $plugins->perform_action('deactivate', $plugin_id); 108 case 'inactive': $plugins->perform_action('uninstall', $plugin_id); 109 } 110 $tpl_plugin['STATE'] = 'merged'; 111 $tpl_plugin['DESC'] = l10n('THIS PLUGIN IS NOW PART OF PIWIGO CORE! DELETE IT NOW.'); 112 $merged_plugins = true; 113 } 114 92 115 $template->append('plugins', $tpl_plugin); 116 } 117 118 $template->append('plugin_states', 'active'); 119 $template->append('plugin_states', 'inactive'); 120 $template->append('plugin_states', 'uninstalled'); 121 122 if ($merged_plugins) 123 { 124 $template->append('plugin_states', 'merged'); 93 125 } 94 126 … … 98 130 ); 99 131 100 foreach($missing_plugin_ids as $plugin_id)101 {102 $template->append(103 'plugins',104 array(105 'NAME' => $plugin_id,106 'VERSION' => $plugins->db_plugins_by_id[$plugin_id]['version'],107 'DESC' => "ERROR: THIS PLUGIN IS MISSING BUT IT IS INSTALLED! UNINSTALL IT NOW !",108 'U_ACTION' => sprintf($action_url, $plugin_id),109 'STATE' => 'missing',110 )111 );112 }113 114 $template->append('plugin_states', 'active');115 $template->append('plugin_states', 'inactive');116 $template->append('plugin_states', 'uninstalled');117 118 132 if (count($missing_plugin_ids) > 0) 119 133 { 134 foreach($missing_plugin_ids as $plugin_id) 135 { 136 $template->append( 137 'plugins', 138 array( 139 'NAME' => $plugin_id, 140 'VERSION' => $plugins->db_plugins_by_id[$plugin_id]['version'], 141 'DESC' => l10n('ERROR: THIS PLUGIN IS MISSING BUT IT IS INSTALLED! UNINSTALL IT NOW.'), 142 'U_ACTION' => sprintf($action_url, $plugin_id), 143 'STATE' => 'missing', 144 ) 145 ); 146 } 120 147 $template->append('plugin_states', 'missing'); 121 148 }
Note: See TracChangeset
for help on using the changeset viewer.