https://www.mediawiki.org/wiki/Special:Code/MediaWiki/114561

Revision: 114561
Author:   bsitu
Date:     2012-03-28 17:41:00 +0000 (Wed, 28 Mar 2012)
Log Message:
-----------
remove an used function

Modified Paths:
--------------
    trunk/extensions/PageTriage/includes/ArticleMetadata.php

Modified: trunk/extensions/PageTriage/includes/ArticleMetadata.php
===================================================================
--- trunk/extensions/PageTriage/includes/ArticleMetadata.php    2012-03-28 
17:35:48 UTC (rev 114560)
+++ trunk/extensions/PageTriage/includes/ArticleMetadata.php    2012-03-28 
17:41:00 UTC (rev 114561)
@@ -233,72 +233,6 @@
        }
 
        /**
-        * Get a list of untriaged articles based on the search criteria
-        * @param $criteria array - list of tags for the filter
-        * @param $offset string
-        * @param $backwards bool - flag to check whether to get data backward
-        * 
-        * @Todo - Pass a range for timestamp to avoid full index scan
-        */
-       public static function getUnTriagedArticleByMetadata( $criteria = 
array(), $offset = '', $backwards = false ) {
-               global $wgPageTriagePageIdPerRequest;
-
-               $tags = self::getValidTags();
-
-               if ( count( $criteria ) > count( $tags ) ) {
-                       throw new MWArticleMetadataMetaDataOutofBoundException( 
'Invalid search criteria are provided' );
-               }
-
-               $dbr = wfGetDB( DB_SLAVE );
-
-               $table = array( 'pagetriage_page', 'page' );
-
-               $tagConds = '';
-               $tagCount = 0;
-               // Check for valid tags and construct tag query
-               foreach ( $criteria as $key => $val ) {
-                       if ( isset( $tags[$key] ) ) {
-                               if ( $tagConds ) {
-                                       $tagConds .= ' OR ';    
-                               }
-                               $tagConds .= " ( ptrpt_tag_id = " . $tags[$key] 
. " AND ptrpt_value = " . $dbr->addQuotes( $val ) . " ) ";
-                               $tagCount++;
-                       }
-               }
-
-               $conds = array( 'ptrp_page_id = page_id', 'ptrp_triaged' => '0' 
);
-               
-               if ( $offset ) {
-                       $arr = explode( '|', $offset, 2 );
-                       $ts = $dbr->addQuotes( $dbr->timestamp( $arr[0] ) );
-                       $id = isset( $arr[1] ) ? intval( $arr[1] ) : 0;
-                       $op = $backwards ? '<' : '>';
-                       $conds[] = "ptrp_timestamp $op $ts OR (ptrp_timestamp = 
$ts AND ptrp_id $op= $id)";
-               }
-
-               $desc = $backwards ? 'DESC' : '';
-               $opts = array( 'LIMIT' => $wgPageTriagePageIdPerRequest + 1, 
"ORDER BY ptrp_timestamp $desc ptrp_id $desc" );
-
-               if ( $tagCount ) {
-                       $conds[] = '(' . $tagConds . ')';
-                       $conds[] = 'ptrpt_page_id = ptrp_page_id';
-                       $opts['GROUP BY'] = 'ptrpt_page_id';
-                       $opts['HAVING'] = 'COUNT(ptrpt_tag_id) = ' . $tagCount;
-                       $table[] = 'pagetriage_page_tags';
-               }
-
-               $res = $dbr->select(
-                               $table,
-                               array( 'ptrp_page_id' ),
-                               $conds,
-                               __METHOD__,
-                               $opts
-               );
-
-               return iterator_to_array( $res );
-       }
-
-       /**
         * Compile article basic data like title, number of bytes
         * @param $metaData array
         */


_______________________________________________
MediaWiki-CVS mailing list
[email protected]
https://lists.wikimedia.org/mailman/listinfo/mediawiki-cvs

Reply via email to