- Timestamp:
- Apr 4, 2011, 12:28:50 AM (13 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
extensions/autoupdate/trunk/include/autoupdate.class.php
r9740 r10028 9 9 var $themes; 10 10 var $languages; 11 var $missing = array(); 12 var $default_plugins = array(); 13 var $default_themes = array(); 14 var $default_languages = array(); 11 15 12 16 function autoupdate() 13 17 { 14 18 $this->types = array('plugins', 'themes', 'languages'); 19 $this->default_themes = array('clear', 'dark', 'Sylvia'); 20 $this->default_plugins = array('admin_multi_view', 'c13y_upgrade', 'language_switch', 'LocalFilesEditor'); 15 21 16 22 foreach ($this->types as $type) … … 34 40 } 35 41 36 function get_server_extensions( )42 function get_server_extensions($version=PHPWG_VERSION) 37 43 { 38 44 global $user; … … 43 49 44 50 // Retrieve PEM versions 45 $version = PHPWG_VERSION;46 51 $versions_to_check = array(); 47 52 $url = PEM_URL . '/api/get_version_list.php'; … … 108 113 $server = 'server_'.$ext_to_check[$ext['extension_id']]; 109 114 $this->$ext_to_check[$ext['extension_id']]->$server += array($ext['extension_id'] => $ext); 110 } 111 } 115 unset($ext_to_check[$ext['extension_id']]); 116 } 117 } 118 $this->check_missing_extensions($ext_to_check); 112 119 return true; 113 120 } … … 183 190 } 184 191 192 function check_missing_extensions($missing) 193 { 194 foreach ($missing as $id => $type) 195 { 196 $fs = 'fs_'.$type; 197 $default = 'default_'.$type; 198 foreach ($this->$type->$fs as $ext_id => $ext) 199 { 200 if (isset($ext['extension']) and $id == $ext['extension'] and !in_array($ext_id, $this->$default)) 201 { 202 $this->missing[$type][] = $ext; 203 break; 204 } 205 } 206 } 207 } 208 185 209 function version_compare($a, $b, $type) 186 210 {
Note: See TracChangeset
for help on using the changeset viewer.