Ejemplo n.º 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;
 }
Ejemplo n.º 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;
 }
Ejemplo n.º 3
0
 public function fetch_title($title, $properties = NULL, $revid = NULL, $section = NULL, $log_fetch = NULL)
 {
     $params = array('title' => $title, 'properties' => $properties, 'revid' => $revid, 'section' => $section, 'log_result' => $log_fetch);
     require_once dirname(__FILE__) . '/../../core/tasks/fetch_title.php';
     $task = new Task_FetchTitle($this->core);
     return $task->go($params);
 }