$forceNameTitleIndex = false;
if ( $params['prexpiry'] == 'indefinite' ) {
- $this->addWhere( "pr_expiry = 'infinity' OR pr_expiry IS NULL" );
+ $this->addWhere( "pr_expiry = {$db->addQuotes( $db->getInfinity() )} OR pr_expiry IS NULL" );
} elseif ( $params['prexpiry'] == 'definite' ) {
- $this->addWhere( "pr_expiry != 'infinity'" );
+ $this->addWhere( "pr_expiry != {$db->addQuotes( $db->getInfinity() )}" );
}
} elseif ( isset( $params['prlevel'] ) ) {
}
if( $this->indefonly ) {
- $conds[] = "pr_expiry = 'infinity' OR pr_expiry IS NULL";
+ $db = wfGetDB( DB_SLAVE );
+ $conds[] = "pr_expiry = {$db->addQuotes( $db->getInfinity() )} OR pr_expiry IS NULL";
}
if( $this->cascadeonly ) {
$conds[] = "pr_cascade = '1'";