示例#1
0
 protected function fetch_page(&$signal, &$params)
 {
     $page = NULL;
     $title = $signal->data_title($this->default_data_key);
     if (!is_null($title)) {
         $params['title'] = $title;
         if (empty($params['properties'])) {
             $task = new Task_FetchEditable($this->core);
             $page = $task->go($params);
         } else {
             $task = new Task_FetchTitle($this->core);
             $page = $task->go($params);
         }
     }
     if (!isset($page) || is_null($page)) {
         $pageid = $signal->data_pageid($this->default_data_key);
         if (!is_null($pageid)) {
             $params['pageid'] = $pageid;
             $task = new Task_FetchPageid($this->core);
             $page = $task->go($params);
         }
     }
     if (!isset($page) || is_null($page)) {
         $revid = $signal->data_revid($this->default_data_key);
         if (!is_null($revid)) {
             $params['revid'] = $revid;
             $task = new Task_FetchRevid($this->core);
             $page = $task->go($params);
         }
     }
     return $page;
 }
示例#2
0
 protected function fetch_page(&$signal, &$params)
 {
     $title = $signal->data_title($this->default_data_key);
     if (is_null($title)) {
         return false;
     }
     $params['title'] = $title;
     if (empty($params['properties'])) {
         $task = new Task_FetchEditable($this->core);
         $page = $task->go($params);
     } else {
         $task = new Task_FetchTitle($this->core);
         $page = $task->go($params);
     }
     return $page;
 }
示例#3
0
 public function fetch_editable($title, $revid = NULL, $section = NULL, $log_fetch = NULL)
 {
     $params = array('title' => $title, 'revid' => $revid, 'section' => $section, 'log_result' => $log_fetch);
     require_once dirname(__FILE__) . '/../../core/tasks/fetch_editable.php';
     $task = new Task_FetchEditable($this->core);
     return $task->go($params);
 }