$this->addWhereFld($this->bl_ns, $this->rootTitle->getNamespace());
$this->addWhereFld('page_namespace', $this->params['namespace']);
if(!is_null($this->contID))
- $this->addWhere("pl_from>={$this->contID}");
+ $this->addWhere("{$this->bl_from}>={$this->contID}");
if($this->params['filterredir'] == 'redirects')
$this->addWhereFld('page_is_redirect', 1);
if($this->params['filterredir'] == 'nonredirects')
$this->addWhere($titleWhere);
$this->addWhereFld('page_namespace', $this->params['namespace']);
if(!is_null($this->redirID))
- $this->addWhere("pl_from>={$this->redirID}");
+ {
+ $first = $this->redirTitles[0];
+ $title = $db->strencode($first->getDBKey());
+ $ns = $first->getNamespace();
+ $from = $this->redirID;
+ if($this->hasNS)
+ $this->addWhere("{$this->bl_ns} > $ns OR ".
+ "({$this->bl_ns} = $ns AND ".
+ "({$this->bl_title} > '$title' OR ".
+ "({$this->bl_title} = '$title' AND ".
+ "{$this->bl_from} >= $from)))");
+ else
+ $this->addWhere("{$this->bl_title} > '$title' OR ".
+ "({$this->bl_title} = '$title' AND ".
+ "{$this->bl_from} >= $from)");
+
+ }
if($this->params['filterredir'] == 'redirects')
$this->addWhereFld('page_is_redirect', 1);
if($this->params['filterredir'] == 'nonredirects')