* Fix object variable used for displaying "not-patrolled" CSS class on list
[lhc/web/wiklou.git] / includes / QueryPage.php
index 409a9c4..27c6927 100644 (file)
@@ -27,6 +27,7 @@ $wgQueryPages = array(
        array( 'MostlinkedCategoriesPage',      'Mostlinkedcategories'          ),
        array( 'MostlinkedPage',                'Mostlinked'                    ),
        array( 'MostrevisionsPage',             'Mostrevisions'                 ),
+       array( 'FewestrevisionsPage',           'Fewestrevisions'               ),
        array( 'NewPagesPage',                  'Newpages'                      ),
        array( 'ShortPagesPage',                'Shortpages'                    ),
        array( 'UncategorizedCategoriesPage',   'Uncategorizedcategories'       ),
@@ -307,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' );
                                }
@@ -392,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
@@ -406,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