Пример #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
 public function fetch_revid($revid, $properties = NULL, $section = NULL, $log_fetch = NULL)
 {
     $params = array('revid' => $revid, 'properties' => $properties, 'revid' => $revid, 'section' => $section, 'log_result' => $log_fetch);
     require_once dirname(__FILE__) . '/../../core/tasks/fetch_revid.php';
     $task = new Task_FetchRevid($this->core);
     return $task->go($params);
 }