root > WikiSense-trunk > web > OrphanTalk.php

OrphanTalk.php

application/x-php, 1352 bytes (load raw)
<?php

define( 'WS_WEB', true );
require_once('common/WebInit.php');
require_once('WikiQuery.php');


    $format= @$_REQUEST['format'];
    if (!$format) $format= 'html';

    $sql'select x1.page_namespace, x1.page_title, 
                   if ( x1.page_is_redirect, "redirect",
                        if ( x1.page_title like "%/%", "archive", NULL ) ) as hint
            from page x1
            left join page x2 on x2.page_title = x1.page_title and x2.page_namespace = x1.page_namespace - 1
            where x2.page_id IS NULL and x1.page_namespace MOD 2 = 1 and x1.page_namespace != '
.NS_USER_TALK.'
            '
;
   
    $wq= new WikiQuery('OrphanTalk', $sql);
   
   
    $wq->fields['hint']= array(
      'label' => 'Hint',
    );
   
    $wq->fields['page_title']= array(
      'label' => 'Page',
      'sort' => true,
      'pattern' => 'return $this->makeLink( $row["page_title"], $row["page_namespace"], true, NULL, NULL, "redirect=no" );',
      'html' => true,
      'attributes' => 'style="white-space:nowrap;"',
    );
       
    $wq->fields['page_namespace']= array(
      'label' => 'Namespace',
      'hidden' => true,
      'sort' => true,
    );
   
$wq->helpPageName= 'Tools';
$wq->credits= 'inspired by Danny B';

$wiki= $wq->getWiki();
if ($wiki) $wiki->initTranslations();

$wq->printPage();
$wq->close();
?>