コード例 #1
0
ファイル: undo.php プロジェクト: tomzx/wikimedia-apibot
 protected function process_data(&$signal)
 {
     $result = parent::process_data($signal);
     $params = $this->get_task_params();
     $params['title'] = $signal->data_title($this->default_data_key);
     if (is_null($params['title'])) {
         return false;
     }
     require_once dirname(__FILE__) . '/../../../../core/tasks//undo.php';
     $task = new Task_Undo($this->core);
     $result = $task->go($params);
     $this->set_jobdata($result, array('title' => $params['title']));
     return $result;
 }
コード例 #2
0
ファイル: bridge.php プロジェクト: tomzx/wikimedia-apibot
 public function undo($title, $summary, $undo_revid = NULL, $to_revid = NULL, $is_minor = NULL, $is_bot = NULL, $watch = NULL)
 {
     $params = array('title' => $title, 'summary' => $summary, 'undo' => $undo_revid, 'undoafter' => $to_revid, 'bot' => $is_bot, 'minor' => $is_minor, 'watch' => $watch);
     require_once dirname(__FILE__) . '/../../core/tasks/undo.php';
     $task = new Task_Undo($this->core);
     return $task->go($params);
 }