return $this->mDBTime;
}
- public static function debugPrint($value, $name = 'unknown') {
- print "\n\n<pre><b>Debuging value '$location':</b>\n\n";
+ public static function debugPrint($value, $name = 'unknown', $backtrace = false) {
+ print "\n\n<pre><b>Debuging value '$name':</b>\n\n";
var_export($value);
+ if ($backtrace)
+ print "\n" . wfBacktrace();
print "\n</pre>\n";
}
private function run($resultPageSet = null) {
+ if ($this->getPageSet()->getGoodTitleCount() == 0)
+ return; // nothing to do
+
$this->addFields(array (
$this->prefix . '_from pl_from',
$this->prefix . '_namespace pl_namespace',
}
$lastId = $row->pl_from;
}
- $vals = $this->addRowInfo('pl', $row);
- if ($vals)
- $data[] = $vals;
+
+ $title = Title :: makeTitle($row->pl_namespace, $row->pl_title);
+ $vals = array();
+ ApiQueryBase :: addTitleInfo($vals, $title);
+ $data[] = $vals;
}
if($lastId != 0) {
$titles = array();
while ($row = $db->fetchObject($res)) {
- $titles[] = Title :: makeTitle($row->pl_namespace, $row->pl_title);
+ $title = Title :: makeTitle($row->pl_namespace, $row->pl_title);
+ if($title->userCanRead())
+ $titles[] = $title;
}
$resultPageSet->populateFromTitles($titles);
}