* Fix object variable used for displaying "not-patrolled" CSS class on list
[lhc/web/wiklou.git] / includes / QueryPage.php
index 781a482..27c6927 100644 (file)
@@ -19,7 +19,7 @@ $wgQueryPages = array(
        array( 'DeadendPagesPage',              'Deadendpages'                  ),
        array( 'DisambiguationsPage',           'Disambiguations'               ),
        array( 'DoubleRedirectsPage',           'DoubleRedirects'               ),
-       array( 'ListredirectsPage',             'Listredirects' ),
+       array( 'ListredirectsPage',             'Listredirects'                                 ),
        array( 'LonelyPagesPage',               'Lonelypages'                   ),
        array( 'LongPagesPage',                 'Longpages'                     ),
        array( 'MostcategoriesPage',            'Mostcategories'                ),
@@ -27,17 +27,19 @@ $wgQueryPages = array(
        array( 'MostlinkedCategoriesPage',      'Mostlinkedcategories'          ),
        array( 'MostlinkedPage',                'Mostlinked'                    ),
        array( 'MostrevisionsPage',             'Mostrevisions'                 ),
+       array( 'FewestrevisionsPage',           'Fewestrevisions'               ),
        array( 'NewPagesPage',                  'Newpages'                      ),
        array( 'ShortPagesPage',                'Shortpages'                    ),
        array( 'UncategorizedCategoriesPage',   'Uncategorizedcategories'       ),
        array( 'UncategorizedPagesPage',        'Uncategorizedpages'            ),
-       array( 'UncategorizedImagesPage',       'Uncategorizedimages' ),
+       array( 'UncategorizedImagesPage',       'Uncategorizedimages'                   ),
        array( 'UnusedCategoriesPage',          'Unusedcategories'              ),
        array( 'UnusedimagesPage',              'Unusedimages'                  ),
        array( 'WantedCategoriesPage',          'Wantedcategories'              ),
        array( 'WantedPagesPage',               'Wantedpages'                   ),
        array( 'UnwatchedPagesPage',            'Unwatchedpages'                ),
-       array( 'UnusedtemplatesPage',           'Unusedtemplates' ),
+       array( 'UnusedtemplatesPage',           'Unusedtemplates'                               ),
+       array( 'WithoutInterwikiPage',                  'Withoutinterwiki'                              ),
 );
 wfRunHooks( 'wgQueryPages', array( &$wgQueryPages ) );
 
@@ -306,7 +308,7 @@ class QueryPage {
                                        $updated = $wgLang->timeAndDate( $tRow->qci_timestamp, true, true );
                                        $cacheNotice = wfMsg( 'perfcachedts', $updated );
                                        $wgOut->addMeta( 'Data-Cache-Time', $tRow->qci_timestamp );
-                                       $wgOut->addScript( '<script language="JavaScript">var dataCacheTime = \'' . $tRow->qci_timestamp . '\';</script>' );
+                                       $wgOut->addInlineScript( "var dataCacheTime = '{$tRow->qci_timestamp}';" );
                                } else {
                                        $cacheNotice = wfMsg( 'perfcached' );
                                }
@@ -391,7 +393,7 @@ class QueryPage {
                        for( $i = 0; $i < $num && $row = $dbr->fetchObject( $res ); $i++ ) {
                                $line = $this->formatResult( $skin, $row );
                                if( $line ) {
-                                       $attr = ( isset( $obj->usepatrol ) && $obj->usepatrol && $obj->patrolled == 0 )
+                                       $attr = ( isset( $row->usepatrol ) && $row->usepatrol && $row->patrolled == 0 )
                                                ? ' class="not-patrolled"'
                                                : '';
                                        $html[] = $this->listoutput
@@ -405,7 +407,7 @@ class QueryPage {
                                $row = null;
                                $line = $this->formatResult( $skin, $row );
                                if( $line ) {
-                                       $attr = ( isset( $obj->usepatrol ) && $obj->usepatrol && $obj->patrolled == 0 )
+                                       $attr = ( isset( $row->usepatrol ) && $row->usepatrol && $row->patrolled == 0 )
                                                ? ' class="not-patrolled"'
                                                : '';
                                        $html[] = $this->listoutput
@@ -523,19 +525,4 @@ class QueryPage {
        }
 }
 
-/**
- * This is a subclass for very simple queries that are just looking for page
- * titles that match some criteria. It formats each result item as a link to
- * that page.
- *
- */
-class PageQueryPage extends QueryPage {
-
-       function formatResult( $skin, $result ) {
-               global $wgContLang;
-               $nt = Title::makeTitle( $result->namespace, $result->title );
-               return $skin->makeKnownLinkObj( $nt, htmlspecialchars( $wgContLang->convert( $nt->getPrefixedText() ) ) );
-       }
-}
-
-?>
+?>
\ No newline at end of file