From: Aaron Schulz Date: Wed, 21 Mar 2007 18:29:31 +0000 (+0000) Subject: *Show page_len and sort on that index (descending). This should improve the signal... X-Git-Tag: 1.31.0-rc.0~53654 X-Git-Url: https://git.cyclocoop.org//%22?a=commitdiff_plain;h=19961087082b2587f9edc87616133fad53e1e717;p=lhc%2Fweb%2Fwiklou.git *Show page_len and sort on that index (descending). This should improve the signal:noise ratio on large wikis. --- diff --git a/includes/SpecialProtectedpages.php b/includes/SpecialProtectedpages.php index 5057c49ef2..cf72799599 100644 --- a/includes/SpecialProtectedpages.php +++ b/includes/SpecialProtectedpages.php @@ -64,7 +64,7 @@ class ProtectedPagesForm { $description_items[] = $protType; - $expiry_description = ''; + $expiry_description = ''; $stxt = ''; if ( $row->pr_expiry != 'infinity' && strlen($row->pr_expiry) ) { $expiry = Block::decodeExpiry( $row->pr_expiry ); @@ -73,10 +73,16 @@ class ProtectedPagesForm { $description_items[] = $expiry_description; } - + + if (!is_null($size = $row->page_len)) { + if ($size == 0) + $stxt = ' ' . wfMsgHtml('historyempty') . ''; + else + $stxt = ' ' . wfMsgHtml('historysize', $wgLang->formatNum( $size ) ) . ''; + } wfProfileOut( __METHOD__ ); - return '
  • ' . wfSpecialList( $link, implode( $description_items, ', ' ) ) . "
  • \n"; + return '
  • ' . wfSpecialList( $link . $stxt, implode( $description_items, ', ' ) ) . "
  • \n"; } /** @@ -214,14 +220,14 @@ class ProtectedPagesPager extends ReverseChronologicalPager { $conds[] = 'page_namespace=' . $this->mDb->addQuotes( $this->namespace ); return array( 'tables' => array( 'page_restrictions', 'page' ), - 'fields' => 'max(pr_id) AS pr_id,page_namespace,page_title,pr_type,pr_level,pr_expiry', + 'fields' => 'max(pr_id) AS pr_id,page_namespace,page_title,page_len,pr_type,pr_level,pr_expiry', 'conds' => $conds, 'options' => array( 'GROUP BY' => 'page_namespace,page_title,pr_level,pr_expiry' ), ); } function getIndexField() { - return 'pr_id'; + return 'page_len'; } }