http://www.mediawiki.org/wiki/Special:Code/MediaWiki/90575

Revision: 90575
Author:   nikerabbit
Date:     2011-06-22 08:32:12 +0000 (Wed, 22 Jun 2011)
Log Message:
-----------
Simplify getMarkedRevs

Modified Paths:
--------------
    trunk/extensions/Translate/tag/TranslatablePage.php

Modified: trunk/extensions/Translate/tag/TranslatablePage.php
===================================================================
--- trunk/extensions/Translate/tag/TranslatablePage.php 2011-06-22 08:30:13 UTC 
(rev 90574)
+++ trunk/extensions/Translate/tag/TranslatablePage.php 2011-06-22 08:32:12 UTC 
(rev 90575)
@@ -530,17 +530,13 @@
                return $translate->getFullURL( $params );
        }
 
-       public function getMarkedRevs( $tag ) {
+       public function getMarkedRevs() {
                $db = wfGetDB( DB_SLAVE );
 
-               // Can this be done in one query?
-               $id = $db->selectField( 'revtag_type', 'rtt_id',
-                       array( 'rtt_name' => $tag ), __METHOD__ );
-
                $fields = array( 'rt_revision', 'rt_value' );
                $conds = array(
                        'rt_page' => $this->getTitle()->getArticleId(),
-                       'rt_type' => $id,
+                       'rt_type' => $this->getTagId( 'tp:mark' ),
                );
                $options = array( 'ORDER BY' => 'rt_revision DESC' );
 
@@ -599,7 +595,7 @@
                        return null;
                }
 
-               $markedRevs = $this->getMarkedRevs( 'tp:mark' );
+               $markedRevs = $this->getMarkedRevs();
 
                $temp = array();
                foreach ( $titles as $t ) {


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

Reply via email to