Changeset 29779 for trunk/admin/include/plugins.class.php
- Timestamp:
- Sep 25, 2014, 11:25:24 AM (10 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/admin/include/plugins.class.php
r29778 r29779 153 153 case 'update': 154 154 $previous_version = $this->fs_plugins[$plugin_id]['version']; 155 $ upgrade_status= $this->extract_plugin_files('upgrade', $options['revision'], $plugin_id);156 157 if ($ upgrade_status=== 'ok')155 $errors[0] = $this->extract_plugin_files('upgrade', $options['revision'], $plugin_id); 156 157 if ($errors[0] === 'ok') 158 158 { 159 159 $this->get_fs_plugin($plugin_id); // refresh plugins list 160 $new_version = $this->fs_plugins[$plugin_id]['version']; 160 161 161 162 $plugin_maintain = self::build_maintain_class($plugin_id); 162 $plugin_maintain->update($previous_version, $this->fs_plugins[$plugin_id]['version']); 163 } 164 165 return $upgrade_status; 163 $plugin_maintain->update($previous_version, $new_version, $errors); 164 165 if ($new_version != 'auto') 166 { 167 $query = ' 168 UPDATE '. PLUGINS_TABLE .' 169 SET version=\''. $new_version .'\' 170 WHERE id=\''. $plugin_id .'\' 171 ;'; 172 pwg_query($query); 173 } 174 } 175 166 176 break; 167 177 … … 187 197 $query = ' 188 198 UPDATE '. PLUGINS_TABLE .' 189 SET state=\'active\', 190 version=\''. $this->fs_plugins[$plugin_id]['version'] .'\' 199 SET state=\'active\' 191 200 WHERE id=\''. $plugin_id .'\' 192 201 ;';
Note: See TracChangeset
for help on using the changeset viewer.