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

Revision: 114760
Author:   reedy
Date:     2012-04-06 03:00:39 +0000 (Fri, 06 Apr 2012)
Log Message:
-----------
Use buildLike

Modified Paths:
--------------
    trunk/extensions/Randomrootpage/Randomrootpage_body.php

Modified: trunk/extensions/Randomrootpage/Randomrootpage_body.php
===================================================================
--- trunk/extensions/Randomrootpage/Randomrootpage_body.php     2012-04-06 
02:56:45 UTC (rev 114759)
+++ trunk/extensions/Randomrootpage/Randomrootpage_body.php     2012-04-06 
03:00:39 UTC (rev 114760)
@@ -5,7 +5,8 @@
 
        public function __construct() {
                parent::__construct( 'Randomrootpage' );
-               $this->extra[] = "page_title NOT LIKE '%/%'";
+               $dbr = wfGetDB( DB_SLAVE );
+               $this->extra[] = 'page_title NOT ' . $dbr->buildLike( 
$dbr->anyString(), '/', $dbr->anyString() );
        }
 
        // Don't select redirects


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

Reply via email to