Changeset 1989:b234959829da for plugins/maintenance/inc
- Timestamp:
- 09/22/13 02:49:48 (12 years ago)
- Branch:
- default
- Location:
- plugins/maintenance/inc
- Files:
-
- 6 edited
Legend:
- Unmodified
- Added
- Removed
-
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';
Note: See TracChangeset
for help on using the changeset viewer.