Changeset 941:6f519f7bf9fc for admin
- Timestamp:
- 10/30/12 13:51:52 (13 years ago)
- Branch:
- default
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
admin/update.php
r769 r941 42 42 $step = in_array($step,array('check','download','backup','unzip')) ? $step : ''; 43 43 44 $default_tab = !empty($_GET['tab']) ? html::escapeHTML($_GET['tab']) : 'update'; 45 if (!empty($_POST['backup_file'])) { 46 $default_tab = 'files'; 47 } 48 44 49 $archives = array(); 45 50 foreach (files::scanDir(DC_BACKUP_PATH) as $v) { … … 48 53 } 49 54 } 55 if (!empty($archives)) { 56 $archives = array_reverse($archives); 57 } else { 58 $default_tab = 'update'; 59 } 50 60 51 61 # Revert or delete backup file … … 61 71 throw new Exception(sprintf(__('Unable to delete file %s'),html::escapeHTML($b_file))); 62 72 } 63 http::redirect($p_url );73 http::redirect($p_url.'?tab=files'); 64 74 } 65 75 … … 69 79 $zip->unzipAll(DC_BACKUP_PATH.'/'); 70 80 @unlink(DC_BACKUP_PATH.'/'.$b_file); 71 http::redirect($p_url );81 http::redirect($p_url.'?tab=files'); 72 82 } 73 83 } … … 157 167 /* DISPLAY Main page 158 168 -------------------------------------------------------- */ 159 dcPage::open(__('Dotclear update')); 169 dcPage::open(__('Dotclear update'), 170 (!$step ? dcPage::jsPageTabs($default_tab) : '') 171 ); 160 172 161 173 if (!$core->error->flag()) { … … 165 177 if (!$step) 166 178 { 179 echo '<div class="multi-part" id="update" title="'.__('Dotclear update').'">'; 167 180 if (empty($new_v)) 168 181 { … … 183 196 '</form>'; 184 197 } 198 echo '</div>'; 185 199 186 200 if (!empty($archives)) 187 201 { 202 echo '<div class="multi-part" id="files" title="'.__('Manage backup files').'">'; 203 188 204 echo 189 205 '<h3>'.__('Update backup files').'</h3>'. … … 208 224 $core->formNonce().'</p>'. 209 225 '</form>'; 226 227 echo '</div>'; 210 228 } 211 229 }
Note: See TracChangeset
for help on using the changeset viewer.