Changeset 2044:4a3330bc8bd5 for plugins
- Timestamp:
- 09/23/13 20:34:42 (12 years ago)
- Branch:
- default
- Location:
- plugins
- Files:
-
- 2 added
- 20 edited
Legend:
- Unmodified
- Added
- Removed
-
plugins/buildtools/_admin.php
r1977 r2044 11 11 # -- END LICENSE BLOCK ----------------------------------------- 12 12 if (!defined('DC_CONTEXT_ADMIN')) { return; } 13 $core->addBehavior('dcMaintenance Register', array('dcBuildTools', 'maintenanceAdmin'));13 $core->addBehavior('dcMaintenanceInit', array('dcBuildTools', 'maintenanceAdmin')); 14 14 15 15 class dcBuildTools 16 16 { 17 public static function maintenanceAdmin($ core, $tasks, $groups, $tabs) {18 $ tasks[] = 'dcMaintenanceBuildtools';17 public static function maintenanceAdmin($maintenance) { 18 $maintenance->addTask('dcMaintenanceBuildtools'); 19 19 } 20 20 } -
plugins/buildtools/class.dc.maintenance.buildtools.php
r1978 r2044 4 4 class dcMaintenanceBuildtools extends dcMaintenanceTask 5 5 { 6 protected $group = 'other'; 6 protected $tab = 'dev'; 7 protected $group = 'l10n'; 7 8 8 9 protected function init() … … 11 12 $this->success = __('fake l10n file generated.'); 12 13 $this->error = __('Failed to generate fake l10n file.'); 14 $this->description = __('Generate a php file that contents strings to translate that are not be done with core tools.'); 13 15 } 14 16 -
plugins/importExport/_admin.php
r840 r2044 33 33 )); 34 34 } 35 ?> 35 36 $core->addBehavior('dcMaintenanceInit', 'ieMaintenanceInit'); 37 38 function ieMaintenanceInit($maintenance) 39 { 40 $maintenance 41 ->addTask('ieMaintenanceExportblog') 42 ->addTask('ieMaintenanceExportfull') 43 ; 44 } -
plugins/importExport/_prepend.php
r1955 r2044 45 45 $__autoload['ieMaintenanceExportblog'] = dirname(__FILE__).'/inc/lib.ie.maintenance.php'; 46 46 $__autoload['ieMaintenanceExportfull'] = dirname(__FILE__).'/inc/lib.ie.maintenance.php'; 47 48 $this->core->addBehavior('dcMaintenanceRegister', 'ieMaintenanceRegister');49 50 function ieMaintenanceRegister($core, $tasks, $groups, $tabs)51 {52 $tasks[] = 'ieMaintenanceExportblog';53 $tasks[] = 'ieMaintenanceExportfull';54 }55 ?> -
plugins/maintenance/_admin.php
r1989 r2044 22 22 23 23 // Admin behaviors 24 $core->addBehavior('dcMaintenance Register', array('dcMaintenanceAdmin', 'dcMaintenanceRegister'));24 $core->addBehavior('dcMaintenanceInit', array('dcMaintenanceAdmin', 'dcMaintenanceInit')); 25 25 $core->addBehavior('adminDashboardFavs', array('dcMaintenanceAdmin', 'adminDashboardFavs')); 26 26 $core->addBehavior('adminDashboardFavsIcon', array('dcMaintenanceAdmin', 'adminDashboardFavsIcon')); … … 28 28 $core->addBehavior('adminDashboardOptionsForm', array('dcMaintenanceAdmin', 'adminDashboardOptionsForm')); 29 29 $core->addBehavior('adminAfterDashboardOptionsUpdate', array('dcMaintenanceAdmin', 'adminAfterDashboardOptionsUpdate')); 30 $core->addBehavior('adminPageHelpBlock', array('dcMaintenanceAdmin', 'adminPageHelpBlock')); 30 31 31 32 /** … … 41 42 * Register default tasks. 42 43 * 43 * @param $core <b>dcCore</b> dcCore instance 44 * @param $tasks <b>arrayObject</b> Array of tasks to register 45 * @param $groups <b>arrayObject</b> Array of groups to register 46 * @param $tabs <b>arrayObject</b> Array of tabs to register 47 */ 48 public static function dcMaintenanceRegister($core, $tasks, $groups, $tabs) 49 { 50 $tabs['maintenance'] = __('Servicing'); 51 $tabs['backup'] = __('Backup'); 52 53 $groups['optimize'] = __('Optimize'); 54 $groups['index'] = __('Count and index'); 55 $groups['purge'] = __('Purge'); 56 $groups['other'] = __('Other'); 57 $groups['zipblog'] = __('Compressed file for current blog'); 58 $groups['zipfull'] = __('Compressed file for all blogs'); 59 60 $tasks[] = 'dcMaintenanceCache'; 61 $tasks[] = 'dcMaintenanceIndexposts'; 62 $tasks[] = 'dcMaintenanceIndexcomments'; 63 $tasks[] = 'dcMaintenanceCountcomments'; 64 $tasks[] = 'dcMaintenanceLogs'; 65 $tasks[] = 'dcMaintenanceVacuum'; 66 $tasks[] = 'dcMaintenanceZipmedia'; 67 $tasks[] = 'dcMaintenanceZiptheme'; 44 * @param $maintenance <b>dcMaintenance</b> dcMaintenance instance 45 */ 46 public static function dcMaintenanceInit($maintenance) 47 { 48 $maintenance 49 ->addTab('maintenance', __('Servicing'), array('summary' => __('Tools to maintain the performance of your blogs.'))) 50 ->addTab('backup', __('Backup'), array('summary' => __('Tools to back up your content.'))) 51 ->addTab('dev', __('Development'), array('summary' => __('Tools to assist in development of plugins, themes and core.'))) 52 53 ->addGroup('optimize', __('Optimize')) 54 ->addGroup('index', __('Count and index')) 55 ->addGroup('purge', __('Purge')) 56 ->addGroup('other', __('Other')) 57 ->addGroup('zipblog', __('Compressed file for current blog')) 58 ->addGroup('zipfull', __('Compressed file for all blogs')) 59 60 ->addGroup('l10n', __('Translations'), array('summary' => __('Maintain translations'))) 61 62 ->addTask('dcMaintenanceCache') 63 ->addTask('dcMaintenanceIndexposts') 64 ->addTask('dcMaintenanceIndexcomments') 65 ->addTask('dcMaintenanceCountcomments') 66 ->addTask('dcMaintenanceSynchpostsmeta') 67 ->addTask('dcMaintenanceLogs') 68 ->addTask('dcMaintenanceVacuum') 69 ->addTask('dcMaintenanceZipmedia') 70 ->addTask('dcMaintenanceZiptheme') 71 ; 68 72 } 69 73 … … 218 222 $core->auth->user_prefs->maintenance->put('dashboard_item', !empty($_POST['maintenance_dashboard_item']), 'boolean'); 219 223 } 224 225 226 /** 227 * Build a well sorted help for tasks. 228 * 229 * This method is not so good if used with lot of tranlsations 230 * as it grows memory usage and translations files size, 231 * it is better to use help ressource files 232 * but keep it for exemple of how to use behavior adminPageHelpBlock. 233 * Cheers, JC 234 * 235 * @param $block <b>arrayObject</b> Called helpblocks 236 */ 237 public static function adminPageHelpBlock($blocks) 238 { 239 $found = false; 240 foreach($blocks as $block) { 241 if ($block == 'maintenancetasks') { 242 $found = true; 243 break; 244 } 245 } 246 if (!$found) { 247 return null; 248 } 249 250 $maintenance = new dcMaintenance($GLOBALS['core']); 251 252 $res_tab = ''; 253 foreach($maintenance->getTabs() as $tab_obj) 254 { 255 $res_group = ''; 256 foreach($maintenance->getGroups() as $group_obj) 257 { 258 $res_task = ''; 259 foreach($maintenance->getTasks() as $t) 260 { 261 if ($t->group() != $group_obj->id() 262 || $t->tab() != $tab_obj->id()) { 263 continue; 264 } 265 if (($desc = $t->description()) != '') { 266 $res_task .= 267 '<dt>'.$t->task().'</dt>'. 268 '<dd>'.$desc.'</dd>'; 269 } 270 } 271 if (!empty($res_task)) { 272 $desc = $group_obj->description ? $group_obj->description : $group_obj->summary; 273 274 $res_group .= 275 '<h5>'.$group_obj->name().'</h5>'. 276 ($desc ? '<p>'.$desc.'</p>' : ''). 277 '<dl>'.$res_task.'</dl>'; 278 } 279 } 280 if (!empty($res_group)) { 281 $desc = $tab_obj->description ? $tab_obj->description : $tab_obj->summary; 282 283 $res_tab .= 284 '<h4>'.$tab_obj->name().'</h4>'. 285 ($desc ? '<p>'.$desc.'</p>' : ''). 286 $res_group; 287 } 288 } 289 if (!empty($res_tab)) { 290 $res = new ArrayObject(); 291 $res->content = $res_tab; 292 $blocks[] = $res; 293 } 294 } 220 295 } -
plugins/maintenance/_prepend.php
r1955 r2044 15 15 16 16 $__autoload['dcMaintenance'] = dirname(__FILE__).'/inc/class.dc.maintenance.php'; 17 $__autoload['dcMaintenanceDescriptor'] = dirname(__FILE__).'/inc/class.dc.maintenance.descriptor.php'; 17 18 $__autoload['dcMaintenanceTask'] = dirname(__FILE__).'/inc/class.dc.maintenance.task.php'; 18 19 $__autoload['dcMaintenanceRest'] = dirname(__FILE__).'/_services.php'; 20 19 21 20 22 $__autoload['dcMaintenanceCache'] = dirname(__FILE__).'/inc/tasks/class.dc.maintenance.cache.php'; … … 22 24 $__autoload['dcMaintenanceIndexcomments'] = dirname(__FILE__).'/inc/tasks/class.dc.maintenance.indexcomments.php'; 23 25 $__autoload['dcMaintenanceIndexposts'] = dirname(__FILE__).'/inc/tasks/class.dc.maintenance.indexposts.php'; 26 $__autoload['dcMaintenanceSynchpostsmeta'] = dirname(__FILE__).'/inc/tasks/class.dc.maintenance.synchpostsmeta.php'; 24 27 $__autoload['dcMaintenanceLogs'] = dirname(__FILE__).'/inc/tasks/class.dc.maintenance.logs.php'; 25 28 $__autoload['dcMaintenanceVacuum'] = dirname(__FILE__).'/inc/tasks/class.dc.maintenance.vacuum.php'; -
plugins/maintenance/inc/class.dc.maintenance.php
r1989 r2044 26 26 { 27 27 public $core; 28 public $p_url = 'plugin.php?p=maintenance'; 29 28 30 private $tasks = array(); 29 31 private $tabs = array(); … … 34 36 * Constructor. 35 37 * 36 * Here you register tasks and groups for tasks.37 *38 38 * @param core <b>dcCore</b> dcCore instance 39 39 */ … … 41 41 { 42 42 $this->core = $core; 43 44 $tasks = new ArrayObject();45 $tabs = new ArrayObject();46 $groups = new ArrayObject();47 43 $logs = $this->getLogs(); 48 49 # --BEHAVIOR-- dcMaintenanceRegister 50 $core->callBehavior('dcMaintenanceRegister', $core, $tasks, $groups, $tabs); 51 52 $this->init($tasks, $groups, $tabs); 53 } 54 55 /** 56 * Initialize list of groups and tasks. 57 * 58 * @param tasks <b>arrayObject</b> Array of task to register 59 * @param groups <b>arrayObject</b> Array of groups to add 60 * @param tabs <b>arrayObject</b> Array of tabs to add 61 */ 62 public function init($tasks, $groups, $tabs) 63 { 64 $this->tasks = $this->groups = array(); 65 66 foreach($tasks as $task) 67 { 68 if (!class_exists($task)) { 69 continue; 70 } 71 72 $r = new ReflectionClass($task); 73 $p = $r->getParentClass(); 74 75 if (!$p || $p->name != 'dcMaintenanceTask') { 76 continue; 77 } 78 79 if (($t = new $task($this, 'plugin.php?p=maintenance')) === null 80 || $t->perm() === null && !$this->core->auth->isSuperAdmin() 81 || !$this->core->auth->check($t->perm(), $this->core->blog->id)) { 82 continue; 83 } 84 85 $this->tasks[$task] = $t; 86 } 87 88 foreach($groups as $id => $name) 89 { 90 $this->groups[(string) $id] = (string) $name; 91 } 92 93 foreach($tabs as $id => $name) 94 { 95 $this->tabs[(string) $id] = (string) $name; 96 } 97 } 98 99 /** 100 * Get a tab name. 44 $this->init(); 45 } 46 47 /** 48 * Initialize list of tabs and groups and tasks. 49 * 50 * To register a tab or group or task, 51 * use behavior dcMaintenanceInit then a method of 52 * dcMaintenance like addTab('myTab', ...). 53 */ 54 protected function init() 55 { 56 # --BEHAVIOR-- dcMaintenanceInit 57 $this->core->callBehavior('dcMaintenanceInit', $this); 58 } 59 60 /// @name Tab methods 61 //@{ 62 /** 63 * Add a tab. 64 * 65 * @param id <b>string<b> Tab ID 66 * @param name <b>string<b> Tab name 67 * @param options <b>string<b> Options 68 * @return <b>dcMaintenance</b> Self 69 */ 70 public function addTab($id, $name, $options=array()) 71 { 72 $this->tabs[$id] = new dcMaintenanceDescriptor($id, $name, $options); 73 74 return $this; 75 } 76 77 /** 78 * Get a tab. 101 79 * 102 80 * @param id <b>string</b> Tab ID 103 * @return <b> mixed</b> tab name or null if not exists81 * @return <b>object</b> dcMaintenanceDescriptor of a tab 104 82 */ 105 83 public function getTab($id) … … 117 95 return $this->tabs; 118 96 } 119 120 /** 121 * Get a group name. 97 //@} 98 99 100 /// @name Group methods 101 //@{ 102 /** 103 * Add a group. 104 * 105 * @param id <b>string<b> Group ID 106 * @param name <b>string<b> Group name 107 * @param options <b>string<b> Options 108 * @return <b>dcMaintenance</b> Self 109 */ 110 public function addGroup($id, $name, $options=array()) 111 { 112 $this->groups[$id] = new dcMaintenanceDescriptor($id, $name, $options); 113 114 return $this; 115 } 116 117 /** 118 * Get a group. 122 119 * 123 120 * @param id <b>string</b> Group ID 124 * @return <b> mixed</b> Group name or null if not exists121 * @return <b>object</b> dcMaintenanceDescriptor of a group 125 122 */ 126 123 public function getGroup($id) … … 132 129 * Get groups. 133 130 * 134 * @return <b>array</b> Array of groups ID and name131 * @return <b>array</b> Array of groups ID and descriptor 135 132 */ 136 133 public function getGroups() 137 134 { 138 135 return $this->groups; 136 } 137 //@} 138 139 140 /// @name Task methods 141 //@{ 142 /** 143 * Add a task. 144 * 145 * @param task <b>mixed<b> Class name or object 146 * @return <b>boolean</b> True if it is added 147 * @return <b>dcMaintenance</b> Self 148 */ 149 public function addTask($task) 150 { 151 if (class_exists($task) && is_subclass_of($task, 'dcMaintenanceTask')) { 152 $this->tasks[$task] = new $task($this); 153 } 154 155 return $this; 139 156 } 140 157 … … 174 191 return $res; 175 192 } 176 193 //@} 194 195 196 /// @name Log methods 197 //@{ 177 198 /** 178 199 * Set log for a task. … … 268 289 return $this->logs; 269 290 } 291 //@} 270 292 } -
plugins/maintenance/inc/class.dc.maintenance.task.php
r1989 r2044 33 33 protected $id; 34 34 protected $name; 35 protected $description; 35 36 protected $tab = 'maintenance'; 36 37 protected $group = 'other'; … … 50 51 * @param p_url <b>string</b> Maintenance plugin url 51 52 */ 52 public function __construct($maintenance , $p_url)53 public function __construct($maintenance) 53 54 { 54 55 $this->maintenance = $maintenance; … … 61 62 } 62 63 63 $this->p_url = $ p_url;64 $this->p_url = $maintenance->p_url; 64 65 $this->id = get_class($this); 65 66 … … 191 192 192 193 /** 194 * Get task description. 195 * 196 * @return <b>string</b> Description 197 */ 198 public function description() 199 { 200 return $this->description; 201 } 202 203 /** 193 204 * Get task tab. 194 205 * … … 322 333 $this->maintenance->setLog($this->id); 323 334 } 335 336 public function help() 337 { 338 return null; 339 } 324 340 } -
plugins/maintenance/inc/tasks/class.dc.maintenance.cache.php
r1925 r2044 21 21 $this->success = __('Templates cache directory emptied.'); 22 22 $this->error = __('Failed to empty templates cache directory.'); 23 24 $this->description = __("It may be useful to empty this cache when modifying a theme's .html or .css files (or when updating a theme or plugin). Notice : with some hosters, the templates cache cannot be emptied with this plugin. You may then have to delete the directory <strong>/cbtpl/</strong> directly on the server with your FTP software."); 23 25 } 24 26 -
plugins/maintenance/inc/tasks/class.dc.maintenance.countcomments.php
r1984 r2044 21 21 $this->success = __('Comments and trackback counted.'); 22 22 $this->error = __('Failed to count comments and trackbacks.'); 23 24 $this->description = __('Count again comments and trackbacks allows to check their exact numbers. This operation can be useful when importing from another blog platform (or when migrating from dotclear 1 to dotclear 2).'); 23 25 } 24 26 -
plugins/maintenance/inc/tasks/class.dc.maintenance.indexcomments.php
r1989 r2044 27 27 $this->success = __('Comments index done.'); 28 28 $this->error = __('Failed to index comments.'); 29 30 $this->description = __('Index all comments and trackbacks in search engine index. This operation is necessary, after importing content in your blog, to use internal search engine, on public and private pages.'); 29 31 } 30 32 -
plugins/maintenance/inc/tasks/class.dc.maintenance.indexposts.php
r1989 r2044 27 27 $this->success = __('Entries index done.'); 28 28 $this->error = __('Failed to index entries.'); 29 30 $this->description = __('Index all entries in search engine index. This operation is necessary, after importing content in your blog, to use internal search engine, on public and private pages.'); 29 31 } 30 32 -
plugins/maintenance/inc/tasks/class.dc.maintenance.logs.php
r1925 r2044 21 21 $this->success = __('Logs deleted.'); 22 22 $this->error = __('Failed to delete logs.'); 23 24 $this->description = __('Logs record all activity and connection to your blog history. Unless you need to keep this history, consider deleting these logs from time to time.'); 23 25 } 24 26 -
plugins/maintenance/inc/tasks/class.dc.maintenance.vacuum.php
r1984 r2044 18 18 protected function init() 19 19 { 20 $this->name = __('Optimise database'); 20 21 $this->task = __('optimize tables'); 21 22 $this->success = __('Optimization successful.'); 22 23 $this->error = __('Failed to optimize tables.'); 24 25 $this->description = __("After numerous delete or update operations on Dotclear's database, it gets fragmented. Optimizing will allow to defragment it. It has no incidence on your data's integrity. It is recommended to optimize before any blog export."); 23 26 } 24 27 -
plugins/maintenance/inc/tasks/class.dc.maintenance.zipmedia.php
r1989 r2044 22 22 { 23 23 $this->task = __('Download media folder of current blog'); 24 25 $this->description = __('It may be useful to backup your media folder. This compress all content of media folder into a single zip file. Notice : with some hosters, the media folder cannot be compressed with this plugin if it is too big.'); 24 26 } 25 27 -
plugins/maintenance/inc/tasks/class.dc.maintenance.ziptheme.php
r1989 r2044 22 22 { 23 23 $this->task = __('Download active theme of current blog'); 24 25 $this->description = __('It may be useful to backup the active theme before any change or update. This compress theme folder into a single zip file.'); 24 26 } 25 27 -
plugins/maintenance/index.php
r2032 r2044 43 43 44 44 foreach($tasks as $t) { 45 if (!empty($_POST['settings_recall_ time']) && $_POST['settings_recall_time'] == 'seperate') {46 $ts = empty($_POST['settings_ts_'.$t->id()]) ? 0 : $_POST['settings_ts_'.$t->id()];45 if (!empty($_POST['settings_recall_all'])) { 46 $ts = $_POST['settings_recall_time']; 47 47 } 48 48 else { 49 $ts = $_POST['settings_recall_time'];49 $ts = empty($_POST['settings_ts_'.$t->id()]) ? 0 : $_POST['settings_ts_'.$t->id()]; 50 50 } 51 51 $core->blog->settings->maintenance->put( … … 99 99 100 100 $combo_ts = array( 101 __('Never') => 0, 101 102 __('Every week') => 604800, 102 103 __('Every two weeks') => 1209600, … … 105 106 ); 106 107 107 $full_combo_ts = array_merge(array(108 __('Use different periods for each task') => 'seperate'),109 $combo_ts110 );111 112 $task_combo_ts = array_merge(array(113 __('Never') => 0),114 $combo_ts115 );116 117 108 // Display page 118 109 … … 120 111 <title>'.__('Maintenance').'</title>'. 121 112 dcPage::jsPageTabs($tab). 122 dcPage::jsLoad('index.php?pf=maintenance/js/settings.js'); ;113 dcPage::jsLoad('index.php?pf=maintenance/js/settings.js'); 123 114 124 115 if ($task && $task->ajax()) { … … 142 133 array( 143 134 __('Plugins') => '', 144 '<a href="'.$p_url.'">'.__('Maintenance').'</a>' => '', 145 '<span class="page-title">'.html::escapeHTML($task->name()).'</span>' => '' 135 '<span class="page-title">'.__('Maintenance').'</span>' => '' 146 136 ) 147 137 ). … … 211 201 // Simple task (with only a button to start it) 212 202 213 foreach($maintenance->getTabs() as $tab_ id => $tab_name)203 foreach($maintenance->getTabs() as $tab_obj) 214 204 { 215 205 $res_group = ''; 216 foreach($maintenance->getGroups() as $group_ id => $group_name)206 foreach($maintenance->getGroups() as $group_obj) 217 207 { 218 208 $res_task = ''; 219 209 foreach($tasks as $t) 220 210 { 221 if ($t->group() != $group_id || $t->tab() != $tab_id) { 211 if ($t->group() != $group_obj->id() 212 || $t->tab() != $tab_obj->id()) { 222 213 continue; 223 214 } 224 215 225 $res_task .= 216 $res_task .= 226 217 '<p>'.form::radio(array('task', $t->id()), $t->id()).' '. 227 218 '<label class="classic" for="'.$t->id().'">'. … … 254 245 $res_group .= 255 246 '<div class="fieldset">'. 256 '<h4 id="'.$group_ id.'">'.$group_name.'</h4>'.247 '<h4 id="'.$group_obj->id().'">'.$group_obj->name().'</h4>'. 257 248 $res_task. 258 249 '</div>'; … … 262 253 if (!empty($res_group)) { 263 254 echo 264 '<div id="'.$tab_id.'" class="multi-part" title="'.$tab_name.'">'. 265 '<h3>'.$tab_name.'</h3>'. 255 '<div id="'.$tab_obj->id().'" class="multi-part" title="'.$tab_obj->name().'">'. 256 '<h3>'.$tab_obj->name().'</h3>'. 257 // ($tab_obj->option('summary') ? '<p>'.$tab_obj->option('summary').'</p>' : ''). 266 258 '<form action="'.$p_url.'" method="post">'. 267 259 $res_group. 268 260 '<p><input type="submit" value="'.__('Execute task').'" /> '. 269 form::hidden(array('tab'), $tab_ id).261 form::hidden(array('tab'), $tab_obj->id()). 270 262 $core->formNonce().'</p>'. 271 263 '<p class="form-note info">'.__('This may take a very long time.').'</p>'. … … 315 307 '<h4 class="pretty-title">'.__('Frequency').'</h4>'. 316 308 309 '<p>'.form::radio(array('settings_recall_type', 'settings_recall_all'), 'all').' '. 310 '<label class="classic" for="settings_recall_all">'. 311 __('Use one recall time for all tasks').'</label>'. 312 317 313 '<p><label for="settings_recall_time">'.__('Recall time for all tasks:').'</label>'. 318 form::combo('settings_recall_time', $ full_combo_ts, 'seperate', 'recall-for-all').314 form::combo('settings_recall_time', $combo_ts, 'seperate', 'recall-for-all'). 319 315 '</p>'. 320 316 321 '<h5 class="vertical-separator">'.__('Recall time per task:').'</h5>'; 317 '<p>'.form::radio(array('settings_recall_type', 'settings_recall_separate'), 'separate', 1).' '. 318 '<label class="classic" for="settings_recall_separate">'. 319 __('Use one recall time per task').'</label>'; 322 320 323 321 foreach($tasks as $t) … … 327 325 328 326 '<p><label for="settings_ts_'.$t->id().'">'.$t->task().'</label>'. 329 form::combo('settings_ts_'.$t->id(), $ task_combo_ts, $t->ts(), 'recall-per-task').327 form::combo('settings_ts_'.$t->id(), $combo_ts, $t->ts(), 'recall-per-task'). 330 328 '</p>'. 331 329 … … 342 340 } 343 341 344 dcPage::helpBlock('maintenance' );342 dcPage::helpBlock('maintenance', 'maintenancetasks'); 345 343 346 344 echo '</body></html>'; -
plugins/maintenance/js/settings.js
r1984 r2044 1 1 $(function(){ 2 3 $('.recall-for-all').change(function(){ 4 var v=$(this).val(); 5 if(v=='seperate'){ 2 $('.recall-for-all').attr('disabled','disabled'); 3 $('#settings_recall_all').change(function(){ 4 if($(this).attr('selected')!='selected'){ 5 $('.recall-per-task').attr('disabled','disabled'); 6 $('.recall-for-all').removeAttr('disabled'); 7 } 8 }); 9 $('#settings_recall_separate').change(function(){ 10 if($(this).attr('selected')!='selected'){ 6 11 $('.recall-per-task').removeAttr('disabled'); 7 }else{ 8 $('.recall-per-task').attr('disabled','disabled'); 12 $('.recall-for-all').attr('disabled','disabled'); 9 13 } 10 14 }); -
plugins/maintenance/locales/en/help/maintenance.html
r1802 r2044 6 6 <body> 7 7 8 <h4>Settings</h4> 9 8 10 <dl> 9 <dt>Optimize database room</dt> 10 <dd>After numerous delete or update operations on Dotclear's database, it gets fragmented. 11 Optimizing will allow to defragment it.<br /> 12 It has no incidence on your data's integrity.<br /> 13 It is recommended to optimize before any blog export.</dd> 11 <dt>Activation</dt> 12 <dd>If this options is active, on tabs of plugin maintenance, 13 when a task has expired or has been nerver executed, a alert message is show below this task.<br /> 14 Options to display maintenance related tasks on dashboard are available in user preferences.</dd> 14 15 15 <dt>Counters</dt> 16 <dd>Initializing comments and trackbacks counters allows to check their exact numbers. 17 This operation can be useful when importing from another blog platform 18 (or when migrating from dotclear 1 to dotclear 2).</dd> 19 20 <dt>Search engine index</dt> 21 <dd>These operations are necessary, after importing content in your blog, to use internal search engine, on public and private pages. 22 <ul> 23 <li><strong>Index all posts:</strong> allows to index all posts</li> 24 <li><strong>Index all comments:</strong> allows to index all comments and trackbacks</li> 25 </ul> 26 </dd> 27 28 <dt>Vacuum logs</dt> 29 <dd>Logs record all activity and connection to your blog history. Unless you need to keep this history, 30 consider deleting these logs from time to time.</dd> 31 32 <dt>Empty templates cache directory</dt> 33 <dd>It may be useful to empty this cache when modifying a theme's .html or .css files (or when updating 34 a theme or plugin).<br /> 35 Notice : with some hosters, the templates cache cannot be emptied with this plugin. 36 You may then have to delete the directory <strong>/cbtpl/</strong> directly on the server with your FTP software.</dd> 16 <dt>Frequency</dt> 17 <dd>It is possible to set same recall time for all tasks at one time. <br/> 18 Otherwise this setting can be done per task and so on for exemple deactivate some of them.</dd> 37 19 </dl> 38 20 </body> -
plugins/maintenance/locales/fr/help/maintenance.html
r1956 r2044 6 6 <body> 7 7 8 <h4> Entretien</h4>8 <h4>Paramètres</h4> 9 9 10 10 <dl> 11 <dt>Optimiser l'espace de la base de données</dt> 12 <dd>Au fur at à mesure des suppressions ou modifications dans vos billets, 13 les tables de la base de données se fragmentent. L'opération d'optimisation 14 permet de compacter celles-ci.<br /> 15 Cette opération n'a aucun impact sur l'intégrité de vos données.<br /> 16 Il est fortement conseillé d'optimiser la base de données avant tout export 17 de blog.</dd> 11 <dt>Activation</dt> 12 <dd>Si l'option est activé, dans les onglets du plugin maintenance, 13 lorsqu'une tâche est en retard ou n'a jamais été exécutée, un message s'affiche sous cette tâche.<br /> 14 Des options pour permettre l'affichage d'informations relatives à la maintenance sur le tableau de bord 15 sous disponible dans les préférences de l'utilisateur.</dd> 18 16 19 <dt>Compteurs</dt> 20 <dd>Réinitialiser les compteurs des commentaires et des rétroliens a pour effet 21 de donner le nombre exact de ceux-ci pour chaque billet. Cette opération peut se 22 révéler utile lors de l'import d'un blog d'une autre plateforme (ou d'une migration 23 de Dotclear 1 vers Dotclear 2).</dd> 24 25 <dt>Index du moteur de recherche</dt> 26 <dd>Ces opérations s'effectuent généralement suite à un import afin d'obtenir 27 des résultats lors des recherches, aussi bien depuis l'administration du blog 28 qu'en partie publique. 29 <ul> 30 <li><strong>Indexer tous les billets :</strong> permet d'indexer les billets.</li> 31 <li><strong>Indexer tous les commentaires :</strong> permet d'indexer les commentaires.</li> 32 </ul> 33 </dd> 34 35 <dt>Vider les journaux</dt> 36 <dd>Sauf si vous avez un besoin précis de conservation des activités de 37 connexion sur votre blog, pensez à vider régulièrement la table des journaux : 38 elle contient l'enregistrement de chaque connexion à l'administration et des 39 opérations qui s'y sont déroulées.</dd> 40 41 <dt>Vider le répertoire du cache des templates</dt> 42 <dd>La suppression du répertoire du cache des templates peut se révéler 43 nécessaire lors de modifications dans les fichiers .html ou .css d'un thème 44 (voire lors d'un changement de thème ou de mise à jour de plugin).<br /> 45 Attention : chez certains hébergeurs (Free par exemple), le cache du répertoire 46 des templates ne peut pas être vidé grâce à l'extension Maintenance, il faut 47 supprimer le répertoire <strong>cbtpl</strong> situé dans le répertoire cache 48 (dotclear/cache par défaut) avec un logiciel FTP.</dd> 17 <dt>Périodicité</dt> 18 <dd>Il est possible de règler le délai de rappel des tâche à exécuter à l'identique pour toutes les tâches. <br/> 19 Sinon ce réglage peut se faire tâche par tâche et ainsi permettre par exemple de n'en désactiver que certaines.</dd> 49 20 </dl> 50 21 </body>
Note: See TracChangeset
for help on using the changeset viewer.