Changeset 1989:b234959829da
- Timestamp:
- 09/22/13 02:49:48 (12 years ago)
- Branch:
- default
- Files:
-
- 12 edited
Legend:
- Unmodified
- Added
- Removed
-
locales/en/plugins.po
r1984 r1989 1003 1003 msgstr "" 1004 1004 1005 msgid "Display count of expiredtasks on maintenance dashboard icon"1006 msgstr "" 1007 1008 msgid "Display list of expiredtasks on dashboard items"1005 msgid "Display count of late tasks on maintenance dashboard icon" 1006 msgstr "" 1007 1008 msgid "Display list of late tasks on dashboard items" 1009 1009 msgstr "" 1010 1010 … … 1036 1036 msgstr "" 1037 1037 1038 msgid "Index all comments "1038 msgid "Index all comments for search engine" 1039 1039 msgstr "" 1040 1040 … … 1052 1052 msgstr "" 1053 1053 1054 msgid "Index all posts"1054 msgid "Index all entries for search engine" 1055 1055 msgstr "" 1056 1056 … … 1106 1106 msgstr "" 1107 1107 1108 msgid "You have not sufficient permissions to view this page" 1109 msgstr "" 1110 1108 1111 msgid "Settings successfully updated" 1109 1112 msgstr "" … … 1121 1124 msgstr "" 1122 1125 1123 msgid "Display alert messages on expiredtasks"1126 msgid "Display alert messages on late tasks" 1124 1127 msgstr "" 1125 1128 … … 1130 1133 msgstr "" 1131 1134 1132 msgid "You can place list of expiredtasks on your %s."1135 msgid "You can place list of late tasks on your %s." 1133 1136 msgstr "" 1134 1137 -
locales/fr/plugins.po
r1984 r1989 1219 1219 msgstr "Gérer les tâches" 1220 1220 1221 msgid "Display count of expiredtasks on maintenance dashboard icon"1222 msgstr "Afficher le nombre de tâches e xpiréessur l'icône maintenance du tableau de bord"1223 1224 msgid "Display list of expiredtasks on dashboard items"1225 msgstr "Afficher la liste des tâches e xpiréesdans les éléments du tableau de bord"1221 msgid "Display count of late tasks on maintenance dashboard icon" 1222 msgstr "Afficher le nombre de tâches en retard sur l'icône maintenance du tableau de bord" 1223 1224 msgid "Display list of late tasks on dashboard items" 1225 msgstr "Afficher la liste des tâches en retard dans les éléments du tableau de bord" 1226 1226 1227 1227 msgid "Failed to execute task." … … 1252 1252 msgstr "Index du moteur de recherche" 1253 1253 1254 msgid "Index all comments "1255 msgstr "Index ation de tous les commentaires"1254 msgid "Index all comments for search engine" 1255 msgstr "Indexer tous les commentaires pour le moteur de recherche" 1256 1256 1257 1257 msgid "Next" … … 1267 1267 msgstr "Impossible d'indexer les commentaires." 1268 1268 1269 msgid "Index all posts"1270 msgstr "Index ation de tous les billets"1269 msgid "Index all entries for search engine" 1270 msgstr "Indexer tous les billets pour le moteur de recherche" 1271 1271 1272 1272 msgid "Indexing entry %d to %d." … … 1321 1321 msgstr "Jamais" 1322 1322 1323 msgid "You have not sufficient permissions to view this page" 1324 msgstr "Vous n'avez pas les autorisations suffisantes pour accéder à cette page" 1325 1323 1326 msgid "Settings successfully updated" 1324 1327 msgstr "Paramètres mis à jour avec succès" 1325 1328 1326 1329 msgid "You should execute it now." 1327 msgstr "Vous devriez l'exécuter à nouveau."1330 msgstr "Vous devriez l'exécuter dès maintenant." 1328 1331 1329 1332 msgid "Execute task" … … 1336 1339 msgstr "Paramètres" 1337 1340 1338 msgid "Display alert messages on expiredtasks"1339 msgstr "Afficher les messages d'alert sur les tâches expirées."1341 msgid "Display alert messages on late tasks" 1342 msgstr "Afficher les messages d'alerte sur les tâches en retard." 1340 1343 1341 1344 msgid "Recall time for all tasks:" … … 1345 1348 msgstr "Délai de rappel par tâche :" 1346 1349 1347 msgid "You can place list of expiredtasks on your %s."1348 msgstr "Vous pouvez placer la liste des tâches e xpiréessur votre %s."1350 msgid "You can place list of late tasks on your %s." 1351 msgstr "Vous pouvez placer la liste des tâches en retard sur votre %s." 1349 1352 1350 1353 #, php-format -
plugins/importExport/inc/lib.ie.maintenance.php
r1959 r1989 14 14 class ieMaintenanceExportblog extends dcMaintenanceTask 15 15 { 16 protected $perm = 'admin'; 16 17 protected $tab = 'backup'; 17 18 protected $group = 'zipblog'; -
plugins/maintenance/_admin.php
r1984 r1989 18 18 'index.php?pf=maintenance/icon.png', 19 19 preg_match('/plugin.php\?p=maintenance(&.*)?$/', $_SERVER['REQUEST_URI']), 20 $core->auth-> isSuperAdmin()20 $core->auth->check('admin', $core->blog->id) 21 21 ); 22 22 … … 192 192 '<p><label for="maintenance_dashboard_icon" class="classic">'. 193 193 form::checkbox('maintenance_dashboard_icon', 1, $core->auth->user_prefs->maintenance->dashboard_icon). 194 __('Display count of expiredtasks on maintenance dashboard icon').'</label></p>'.194 __('Display count of late tasks on maintenance dashboard icon').'</label></p>'. 195 195 196 196 '<p><label for="maintenance_dashboard_item" class="classic">'. 197 197 form::checkbox('maintenance_dashboard_item', 1, $core->auth->user_prefs->maintenance->dashboard_item). 198 __('Display list of expiredtasks on dashboard items').'</label></p>'.198 __('Display list of late tasks on dashboard items').'</label></p>'. 199 199 200 200 '</div>'; -
plugins/maintenance/_define.php
r1925 r1989 16 16 /* Description*/ "Maintain your installation", 17 17 /* Author */ "Olivier Meunier & Association Dotclear", 18 /* Version */ '1.3' 18 /* Version */ '1.3.1', 19 /* Permission */ 'admin' 19 20 ); -
plugins/maintenance/inc/class.dc.maintenance.php
r1984 r1989 77 77 } 78 78 79 $this->tasks[$task] = new $task($this, 'plugin.php?p=maintenance'); 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; 80 86 } 81 87 -
plugins/maintenance/inc/class.dc.maintenance.task.php
r1984 r1989 29 29 protected $ajax = false; 30 30 protected $blog = false; 31 protected $perm = null; 31 32 32 33 protected $id; … … 55 56 $this->init(); 56 57 58 if ($this->perm() === null && !$this->core->auth->isSuperAdmin() 59 || !$this->core->auth->check($this->perm(), $this->core->blog->id)) { 60 return null; 61 } 62 57 63 $this->p_url = $p_url; 58 64 $this->id = get_class($this); … … 72 78 73 79 $this->ts = abs((integer) $ts); 80 81 return true; 74 82 } 75 83 … … 83 91 { 84 92 return null; 93 } 94 95 /** 96 * Get task permission. 97 * 98 * Return user permission required to run this task 99 * or null for super admin. 100 * 101 * @return <b>mixed</b> Permission. 102 */ 103 public function perm() 104 { 105 return $this->perm; 106 } 107 108 /** 109 * Get task scope. 110 *. 111 * Is task limited to current blog. 112 * 113 * @return <b>boolean</b> Limit to blog 114 */ 115 public function blog() 116 { 117 return $this->blog; 85 118 } 86 119 -
plugins/maintenance/inc/tasks/class.dc.maintenance.indexcomments.php
r1984 r1989 22 22 { 23 23 $this->name = __('Search engine index'); 24 $this->task = __('Index all comments ');24 $this->task = __('Index all comments for search engine'); 25 25 $this->step_task = __('Next'); 26 26 $this->step = __('Indexing comment %d to %d.'); -
plugins/maintenance/inc/tasks/class.dc.maintenance.indexposts.php
r1984 r1989 22 22 { 23 23 $this->name = __('Search engine index'); 24 $this->task = __('Index all posts');24 $this->task = __('Index all entries for search engine'); 25 25 $this->step_task = __('Next'); 26 26 $this->step = __('Indexing entry %d to %d.'); -
plugins/maintenance/inc/tasks/class.dc.maintenance.zipmedia.php
r1984 r1989 14 14 class dcMaintenanceZipmedia extends dcMaintenanceTask 15 15 { 16 protected $perm = 'admin'; 16 17 protected $blog = true; 17 18 protected $tab = 'backup'; -
plugins/maintenance/inc/tasks/class.dc.maintenance.ziptheme.php
r1984 r1989 14 14 class dcMaintenanceZiptheme extends dcMaintenanceTask 15 15 { 16 protected $perm = 'admin'; 16 17 protected $blog = true; 17 18 protected $tab = 'backup'; -
plugins/maintenance/index.php
r1985 r1989 12 12 if (!defined('DC_CONTEXT_ADMIN')) { return; } 13 13 14 dcPage::checkSuper(); 15 16 // main class 14 // Set env 15 16 $core->blog->settings->addNamespace('maintenance'); 17 17 18 18 $maintenance = new dcMaintenance($core); 19 $core->blog->settings->addNamespace('maintenance'); 20 21 // Set var 19 $tasks = $maintenance->getTasks(); 22 20 23 21 $msg = ''; … … 28 26 29 27 $code = empty($_POST['code']) ? null : (integer) $_POST['code']; 30 $tab = empty($_REQUEST['tab']) ? ' maintenance' : $_REQUEST['tab'];28 $tab = empty($_REQUEST['tab']) ? '' : $_REQUEST['tab']; 31 29 32 30 // Save settings … … 39 37 !empty($_POST['settings_plugin_message']), 40 38 'boolean', 41 'Display alert message of expiredtasks on plugin page',39 'Display alert message of late tasks on plugin page', 42 40 true, 43 41 true 44 42 ); 45 43 46 foreach($ maintenance->getTasks()as $t) {44 foreach($tasks as $t) { 47 45 if (!empty($_POST['settings_recall_time']) && $_POST['settings_recall_time'] == 'seperate') { 48 46 $ts = empty($_POST['settings_ts_'.$t->id()]) ? 0 : $_POST['settings_ts_'.$t->id()]; … … 57 55 sprintf('Recall time for task %s', $t->id()), 58 56 true, 59 true57 $t->blog() 60 58 ); 61 59 } … … 138 136 </head> 139 137 <body>'; 138 139 // Check if there is somthing to display according to user permissions 140 if (empty($tasks)) { 141 echo dcPage::breadcrumb( 142 array( 143 __('Plugins') => '', 144 '<a href="'.$p_url.'">'.__('Maintenance').'</a>' => '', 145 '<span class="page-title">'.html::escapeHTML($task->name()).'</span>' => '' 146 ) 147 ). 148 '<p class="warn">'.__('You have not sufficient permissions to view this page.').'</p>'. 149 '</body></html>'; 150 151 return null; 152 } 140 153 141 154 // Success message … … 201 214 { 202 215 $res_group = ''; 203 foreach($maintenance->getGroups( $core) as $group_id => $group_name)216 foreach($maintenance->getGroups() as $group_id => $group_name) 204 217 { 205 218 $res_task = ''; 206 foreach($ maintenance->getTasks($core)as $t)219 foreach($tasks as $t) 207 220 { 208 221 if ($t->group() != $group_id || $t->tab() != $tab_id) { … … 256 269 form::hidden(array('tab'), $tab_id). 257 270 $core->formNonce().'</p>'. 258 '<p class="form-note info">'.__('This may take a very long time.').' .</p>'.271 '<p class="form-note info">'.__('This may take a very long time.').'</p>'. 259 272 '</form>'. 260 273 '</div>'; … … 264 277 // Advanced tasks (that required a tab) 265 278 266 foreach($ maintenance->getTasks($core)as $t)279 foreach($tasks as $t) 267 280 { 268 281 if ($t->group() !== null) { … … 292 305 '<p><label for="settings_plugin_message" class="classic">'. 293 306 form::checkbox('settings_plugin_message', 1, $core->blog->settings->maintenance->plugin_message). 294 __('Display alert messages on expiredtasks').'</label></p>'.307 __('Display alert messages on late tasks').'</label></p>'. 295 308 296 309 '<p><label for="settings_recall_time">'.__('Recall time for all tasks:').'</label>'. … … 300 313 '<p>'.__('Recall time per task:').'</p>'; 301 314 302 foreach($ maintenance->getTasks($core)as $t)315 foreach($tasks as $t) 303 316 { 304 317 echo … … 319 332 '</form>'. 320 333 '<p class="info">'.sprintf( 321 __('You can place list of expiredtasks on your %s.'),334 __('You can place list of late tasks on your %s.'), 322 335 '<a href="preferences.php#user-favorites">'.__('Dashboard').'</a>' 323 336 ).'</a></p>'.
Note: See TracChangeset
for help on using the changeset viewer.