Index: trunk/phase3/includes/specials/SpecialRandompage.php |
— | — | @@ -94,10 +94,17 @@ |
95 | 95 | AND page_is_redirect = $redirect |
96 | 96 | AND page_random >= $randstr |
97 | 97 | $extra |
| 98 | + AND (".$this->addExtraSQL().") |
98 | 99 | ORDER BY page_random"; |
99 | 100 | |
100 | 101 | $sql = $dbr->limitResult( $sql, 1, 0 ); |
101 | 102 | $res = $dbr->query( $sql, __METHOD__ ); |
102 | 103 | return $dbr->fetchObject( $res ); |
103 | 104 | } |
| 105 | + |
| 106 | + // an alternative to $wgExtraRandompageSQL so extensions |
| 107 | + // can add their own SQL by overriding this function |
| 108 | + public function addExtraSQL() { |
| 109 | + return ''; |
| 110 | + } |
104 | 111 | } |