<?php
define( 'WS_WEB', true );
require_once("WSInit.php");
require_once("WikiQuery.php");
$sql= "SELECT a.page_namespace as page_namespace, a.page_title as page_title,
b.page_namespace as disambig_namespace, b.page_title as disambig_title
FROM pagelinks as x
JOIN page as b ON x.pl_from = b.page_id
JOIN pagelinks as l ON l.pl_namespace = b.page_namespace AND l.pl_title = b.page_title
JOIN page as a ON a.page_id = l.pl_from
WHERE x.pl_namespace = 10 AND (x.pl_title = 'Begriffsklaerung' OR x.pl_title = 'Begriffsklärung')
";
$wq= new WikiQuery('Links to Disambiguations', $sql, 'de.wikipedia.org');
$wq->fields['page_title']= array(
'label' => 'Page',
'html' => true,
'pattern' => 'return $this->makeLink($row["page_title"], $row["page_namespace"]);',
);
$wq->fields['disambig_title']= array(
'label' => 'Link',
'html' => true,
'pattern' => 'return $this->makeLink($row["disambig_title"], $row["disambig_namespace"]);',
);
$wq->printPage();
?>DisambigLinks.php
application/x-php, 986 bytes (load raw)

