Changeset 2815 for trunk/admin/include/functions_upgrade.php
- Timestamp:
- Nov 1, 2008, 10:19:20 PM (16 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/admin/include/functions_upgrade.php
r2516 r2815 95 95 } 96 96 97 // Deactivate all non-standard plugins 98 function deactivate_non_standard_plugins() 99 { 100 global $page; 101 102 $standard_plugins = array( 103 'add_index', 104 'admin_advices', 105 'admin_multi_view', 106 'c13y_upgrade', 107 'event_tracer', 108 'language_switch', 109 'LocalFilesEditor' 110 ); 111 112 $query = ' 113 SELECT id 114 FROM '.PREFIX_TABLE.'plugins 115 WHERE state = "active" 116 AND id NOT IN ("' . implode('","', $standard_plugins) . '") 117 ;'; 118 119 $result = pwg_query($query); 120 $plugins = array(); 121 while ($row = mysql_fetch_assoc($result)) 122 { 123 array_push($plugins, $row['id']); 124 } 125 126 if (!empty($plugins)) 127 { 128 $query = ' 129 UPDATE '.PREFIX_TABLE.'plugins 130 SET state="inactive" 131 WHERE id IN ("' . implode('","', $plugins) . '") 132 ;'; 133 mysql_query($query); 134 135 array_push( 136 $page['infos'], 137 'As a precaution, following plugins have been deactivated. You must check for plugins upgrade before reactiving them: 138 <pre>' . implode(', ', $plugins) . '</pre>' 139 ); 140 } 141 } 142 97 143 ?>
Note: See TracChangeset
for help on using the changeset viewer.