Exemple #1
0
 public function set_param($name, $value)
 {
     // 'users' and 'ip' should not be used together
     if ($name == "ip" && isset($this->params['users'])) {
         return false;
     }
     if ($name == "users" && isset($this->params['ip'])) {
         return false;
     }
     return parent::set_param($name, $value);
 }
 public function set_param($name, $value)
 {
     if ($name == 'title') {
         $parts = $this->info->title_parts($value);
         if (empty($parts['namespace']) || $this->info->namespace_id($parts['namespace']) != 14) {
             $value = $this->info->namespace_name(14) . ':' . $parts['name'];
         }
     }
     if (isset($this->params['sort']) && $this->params['sort'] == "timestamp" && ($name == "startsortkey" || $name == "endsortkey" || $name == "sortkeyprefix" || $name == "startsortkeyprefix" || $name == "endsortkeyprefix")) {
         return false;
     }
     if ((!isset($this->params['sort']) || $this->params['sort'] != "timestamp") && ($name == "start" || $name == "end")) {
         return false;
     }
     if ($name == "sort" && $value == "sortkey" && (isset($this->params['start']) || isset($this->params['end']))) {
         return false;
     }
     if ($name == "sort" && $value == "timestamp" && (isset($this->params['startsortkey']) || isset($this->params['endsortkey']) || isset($this->params['sortkeyprefix']) || isset($this->params['startsortkeyprefix']) || isset($this->params['endsortkeyprefix']))) {
         return false;
     }
     return parent::set_param($name, $value);
 }
Exemple #3
0
 function __construct($hooks, $info, $settings, $is_generator, $modulename)
 {
     $this->modulename = $modulename;
     parent::__construct($hooks, $info, $settings, $is_generator);
 }