Legend:
- Unmodified
- Added
- Removed
-
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
Note: See TracChangeset
for help on using the changeset viewer.