Rename WikiMap DB domain ID methods to reduce confusion with web domains
[lhc/web/wiklou.git] / includes / jobqueue / JobQueue.php
index 7d34f32..0ca272c 100644 (file)
@@ -323,7 +323,7 @@ abstract class JobQueue {
        final public function batchPush( array $jobs, $flags = 0 ) {
                $this->assertNotReadOnly();
 
-               if ( !count( $jobs ) ) {
+               if ( $jobs === [] ) {
                        return; // nothing to do
                }
 
@@ -366,7 +366,7 @@ abstract class JobQueue {
                global $wgJobClasses;
 
                $this->assertNotReadOnly();
-               if ( !WikiMap::isCurrentWikiDomain( $this->domain ) ) {
+               if ( !WikiMap::isCurrentWikiDbDomain( $this->domain ) ) {
                        throw new MWException(
                                "Cannot pop '{$this->type}' job off foreign '{$this->domain}' wiki queue." );
                } elseif ( !isset( $wgJobClasses[$this->type] ) ) {
@@ -531,7 +531,7 @@ abstract class JobQueue {
         * @return string
         */
        protected function getRootJobCacheKey( $signature ) {
-               $this->dupCache->makeGlobalKey(
+               return $this->dupCache->makeGlobalKey(
                        'jobqueue',
                        $this->domain,
                        $this->type,