Merge "Revert "Adding sanity check to Title::isRedirect().""
[lhc/web/wiklou.git] / includes / job / JobQueue.php
index a3493b4..7b7ec0c 100644 (file)
@@ -195,6 +195,7 @@ abstract class Job {
                $title = Title::makeTitleSafe( $namespace, $dbkey );
 
                if ( is_null( $title ) ) {
+                       wfProfileOut( __METHOD__ );
                        return false;
                }
 
@@ -327,6 +328,7 @@ abstract class Job {
                global $wgJobTypesExcludedFromDefaultQueue;
                $conditions = array();
                if ( count( $wgJobTypesExcludedFromDefaultQueue ) > 0 ) {
+                       $dbr = wfGetDB( DB_SLAVE );
                        foreach ( $wgJobTypesExcludedFromDefaultQueue as $cmdType ) {
                                $conditions[] = "job_cmd != " . $dbr->addQuotes( $cmdType );
                        }