Beispiel #1
0
 protected function process_data(&$signal)
 {
     $result = parent::process_data($signal);
     $params = $this->get_params();
     $params['title'] = $signal->data_title($this->default_data_key);
     if (is_null($params['title'])) {
         return false;
     }
     require_once dirname(__FILE__) . '/../../../../core/tasks//protect.php';
     $task = new Task_Protect($this->core);
     $result = $task->go($params);
     $this->set_jobdata($result, array('title' => $params['title']));
     return $result;
 }
Beispiel #2
0
 public function protect($title, $reason, $protections, $expiry = NULL, $cascade = false)
 {
     $params = array('title' => $title, 'reason' => $reason, 'protections' => $protections, 'expiry' => $expiry, 'cascade' => $cascade);
     require_once dirname(__FILE__) . '/../../core/tasks/protect.php';
     $task = new Task_Protect($this->core);
     return $task->go($params);
 }