Changeset 1959:2c77682177b4 for plugins/maintenance
- Timestamp:
- 09/19/13 23:18:37 (12 years ago)
- Branch:
- default
- Location:
- plugins/maintenance
- Files:
-
- 6 edited
Legend:
- Unmodified
- Added
- Removed
-
plugins/maintenance/_services.php
r1925 r1959 46 46 $task->code((integer) $post['code']); 47 47 if (($code = $task->execute()) === true) { 48 $maintenance->setLog($task->id()); 48 49 $code = 0; 49 50 } -
plugins/maintenance/inc/class.dc.maintenance.task.php
r1955 r1959 25 25 protected $code; 26 26 protected $ts = 604800; // one week 27 protected $ajax = false; 27 28 28 29 protected $id; … … 139 140 140 141 /** 142 * Use ajax 143 * 144 * Is task use maintenance ajax script 145 * for steps process. 146 * 147 * @return <b>boolean</b> Use ajax 148 */ 149 public function ajax() 150 { 151 return (boolean) $this->ajax; 152 } 153 154 /** 141 155 * Get task message. 142 156 * -
plugins/maintenance/inc/tasks/class.dc.maintenance.indexcomments.php
r1925 r1959 14 14 class dcMaintenanceIndexcomments extends dcMaintenanceTask 15 15 { 16 protected $ajax = true; 16 17 protected $group = 'index'; 17 18 protected $limit = 500; -
plugins/maintenance/inc/tasks/class.dc.maintenance.indexposts.php
r1925 r1959 14 14 class dcMaintenanceIndexposts extends dcMaintenanceTask 15 15 { 16 protected $ajax = true; 16 17 protected $group = 'index'; 17 18 protected $limit = 500; -
plugins/maintenance/index.php
r1955 r1959 70 70 dcPage::jsPageTabs($tab); 71 71 72 if ( 0){//$task) {72 if ($task && $task->ajax()) { 73 73 echo 74 74 '<script type="text/javascript">'."\n". 75 "//<![CDATA \n".75 "//<![CDATA[\n". 76 76 dcPage::jsVar('dotclear.msg.wait', __('Please wait...')). 77 77 "//]]>\n". … … 87 87 // Success message 88 88 89 if ($task && !empty($_GET['done'])) { 90 dcPage::success($task->success()); 91 } 89 $msg = $task && !empty($_GET['done']) ? dcPage::success($task->success(),true,true,false) : ''; 92 90 93 91 if ($task && ($res = $task->step()) !== null) { … … 102 100 ) 103 101 ); 102 103 echo $msg; 104 104 105 105 // Intermediate task (task required several steps) … … 135 135 ); 136 136 137 echo $msg; 138 137 139 // Simple task (with only a button to start it) 138 140 -
plugins/maintenance/js/dc.maintenance.js
r1925 r1959 35 35 dcMaintenanceStep(box,code); 36 36 } else { 37 $(' .step-msg',box).addClass('success');37 $('#content h2').after($('<div/>').addClass('success').append($('.step-msg',box))); 38 38 $('.step-wait',box).remove(); 39 39 $('.step-back',box).show();
Note: See TracChangeset
for help on using the changeset viewer.