Changeset 2566:9bf417837888 for plugins/maintenance
- Timestamp:
- 11/17/13 20:25:53 (12 years ago)
- Branch:
- 2.6
- Children:
- 2567:6c11245cbf04, 2568:61c67a7d17fa
- Location:
- plugins/maintenance
- Files:
-
- 7 edited
-
_admin.php (modified) (7 diffs)
-
inc/class.dc.maintenance.descriptor.php (modified) (1 diff)
-
inc/class.dc.maintenance.php (modified) (1 diff)
-
inc/class.dc.maintenance.task.php (modified) (4 diffs)
-
inc/tasks/class.dc.maintenance.indexcomments.php (modified) (1 diff)
-
index.php (modified) (15 diffs)
-
js/dc.maintenance.js (modified) (1 diff)
Legend:
- Unmodified
- Added
- Removed
-
plugins/maintenance/_admin.php
r2394 r2566 105 105 * Favorites hack. 106 106 * 107 * This updates maintenance fav icon text 107 * This updates maintenance fav icon text 108 108 * if there are tasks required maintenance. 109 109 * … … 160 160 } 161 161 162 $lines[] = 162 $lines[] = 163 163 '<li title="'.($ts === null ? 164 164 __('This task has never been executed.') … … 188 188 * User preferences form. 189 189 * 190 * This add options for superadmin user 190 * This add options for superadmin user 191 191 * to show or not expired taks. 192 192 * … … 233 233 * Build a well sorted help for tasks. 234 234 * 235 * This method is not so good if used with lot of tranlsations 236 * as it grows memory usage and translations files size, 237 * it is better to use help ressource files 235 * This method is not so good if used with lot of tranlsations 236 * as it grows memory usage and translations files size, 237 * it is better to use help ressource files 238 238 * but keep it for exemple of how to use behavior adminPageHelpBlock. 239 239 * Cheers, JC … … 265 265 foreach($maintenance->getTasks() as $t) 266 266 { 267 if ($t->group() != $group_obj->id() 267 if ($t->group() != $group_obj->id() 268 268 || $t->tab() != $tab_obj->id()) { 269 269 continue; 270 270 } 271 271 if (($desc = $t->description()) != '') { 272 $res_task .= 272 $res_task .= 273 273 '<dt>'.$t->task().'</dt>'. 274 274 '<dd>'.$desc.'</dd>'; … … 278 278 $desc = $group_obj->description ? $group_obj->description : $group_obj->summary; 279 279 280 $res_group .= 280 $res_group .= 281 281 '<h5>'.$group_obj->name().'</h5>'. 282 282 ($desc ? '<p>'.$desc.'</p>' : ''). … … 287 287 $desc = $tab_obj->description ? $tab_obj->description : $tab_obj->summary; 288 288 289 $res_tab .= 289 $res_tab .= 290 290 '<h4>'.$tab_obj->name().'</h4>'. 291 291 ($desc ? '<p>'.$desc.'</p>' : ''). -
plugins/maintenance/inc/class.dc.maintenance.descriptor.php
r2044 r2566 17 17 @brief Simple descriptor for tabs, groups and more 18 18 19 At this time this class is used in same way an arrayObject 19 At this time this class is used in same way an arrayObject 20 20 but in futur it could be completed with advance methods. 21 21 */ -
plugins/maintenance/inc/class.dc.maintenance.php
r2044 r2566 48 48 * Initialize list of tabs and groups and tasks. 49 49 * 50 * To register a tab or group or task, 50 * To register a tab or group or task, 51 51 * use behavior dcMaintenanceInit then a method of 52 52 * dcMaintenance like addTab('myTab', ...). -
plugins/maintenance/inc/class.dc.maintenance.task.php
r2491 r2566 98 98 * Get task permission. 99 99 * 100 * Return user permission required to run this task 100 * Return user permission required to run this task 101 101 * or null for super admin. 102 102 * … … 215 215 * Get task group. 216 216 * 217 * If task required a full tab, 217 * If task required a full tab, 218 218 * this must be returned null. 219 * 219 * 220 220 * @return <b>mixed</b> Task group ID or null 221 221 */ … … 228 228 * Use ajax 229 229 * 230 * Is task use maintenance ajax script 230 * Is task use maintenance ajax script 231 231 * for steps process. 232 232 * … … 326 326 * Log task execution. 327 327 * 328 * Sometimes we need to log task execution 328 * Sometimes we need to log task execution 329 329 * direct from task itself. 330 330 * -
plugins/maintenance/inc/tasks/class.dc.maintenance.indexcomments.php
r2044 r2566 34 34 { 35 35 $this->code = $this->core->indexAllComments($this->code, $this->limit); 36 36 37 37 return $this->code ? $this->code : true; 38 38 } -
plugins/maintenance/index.php
r2491 r2566 65 65 try { 66 66 $core->blog->settings->maintenance->put( 67 'plugin_message', 68 !empty($_POST['settings_plugin_message']), 69 'boolean', 70 'Display alert message of late tasks on plugin page', 71 true, 67 'plugin_message', 68 !empty($_POST['settings_plugin_message']), 69 'boolean', 70 'Display alert message of late tasks on plugin page', 71 true, 72 72 true 73 73 ); … … 85 85 } 86 86 $core->blog->settings->maintenance->put( 87 'ts_'.$t->id(), 88 abs((integer) $ts), 89 'integer', 90 sprintf('Recall time for task %s', $t->id()), 91 true, 87 'ts_'.$t->id(), 88 abs((integer) $ts), 89 'integer', 90 sprintf('Recall time for task %s', $t->id()), 91 true, 92 92 $t->blog() 93 93 ); … … 120 120 121 121 if ($task && $task->ajax()) { 122 echo 122 echo 123 123 '<script type="text/javascript">'."\n". 124 124 "//<