- Timestamp:
- 09/14/18 12:16:17 (7 years ago)
- Branch:
- default
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
plugins/maintenance/inc/class.dc.maintenance.php
r3731 r3874 20 20 public $p_url; 21 21 22 private $tasks = array();23 private $tabs = array();24 private $groups = array();22 private $tasks = []; 23 private $tabs = []; 24 private $groups = []; 25 25 private $logs = null; 26 26 … … 61 61 * @return <b>dcMaintenance</b> Self 62 62 */ 63 public function addTab($id, $name, $options = array())63 public function addTab($id, $name, $options = []) 64 64 { 65 65 $this->tabs[$id] = new dcMaintenanceDescriptor($id, $name, $options); … … 100 100 * @return <b>dcMaintenance</b> Self 101 101 */ 102 public function addGroup($id, $name, $options = array())102 public function addGroup($id, $name, $options = []) 103 103 { 104 104 $this->groups[$id] = new dcMaintenanceDescriptor($id, $name, $options); … … 205 205 ); 206 206 207 $logs = array();207 $logs = []; 208 208 while ($rs->fetch()) { 209 209 $logs[] = $rs->log_id; … … 231 231 { 232 232 // Retrieve logs from this task 233 $rs = $this->core->log->getLogs( array(233 $rs = $this->core->log->getLogs([ 234 234 'log_table' => 'maintenance', 235 235 'blog_id' => 'all' 236 ));237 238 $logs = array();236 ]); 237 238 $logs = []; 239 239 while ($rs->fetch()) { 240 240 $logs[] = $rs->log_id; … … 250 250 * Get logs 251 251 * 252 * Return array(253 * task id => array(252 * Return [ 253 * task id => [ 254 254 * timestamp of last execution, 255 255 * logged on current blog or not 256 * )257 * )256 * ] 257 * ] 258 258 * 259 259 * @return <b>array</b> List of logged tasks … … 262 262 { 263 263 if ($this->logs === null) { 264 $rs = $this->core->log->getLogs( array(264 $rs = $this->core->log->getLogs([ 265 265 'log_table' => 'maintenance', 266 266 'blog_id' => 'all' 267 ));268 269 $this->logs = array();267 ]); 268 269 $this->logs = []; 270 270 while ($rs->fetch()) { 271 $this->logs[$rs->log_msg] = array(271 $this->logs[$rs->log_msg] = [ 272 272 'ts' => strtotime($rs->log_dt), 273 273 'blog' => $rs->blog_id == $this->core->blog->id 274 );274 ]; 275 275 } 276 276 }
Note: See TracChangeset
for help on using the changeset viewer.