Merge "Fix accidential variable overriding in manualWordsTable"
[lhc/web/wiklou.git] / includes / jobqueue / utils / BacklinkJobUtils.php
index 7fb020b..7f50055 100644 (file)
@@ -116,7 +116,7 @@ class BacklinkJobUtils {
                        foreach ( array_chunk( $titles, $cSize ) as $titleBatch ) {
                                $pages = [];
                                foreach ( $titleBatch as $tl ) {
-                                       $pages[$tl->getArticleId()] = [ $tl->getNamespace(), $tl->getDBKey() ];
+                                       $pages[$tl->getArticleID()] = [ $tl->getNamespace(), $tl->getDBkey() ];
                                }
                                $jobs[] = new $class(
                                        $title, // maintain parent job title
@@ -137,6 +137,10 @@ class BacklinkJobUtils {
                                                'batchSize' => $realBSize,
                                                'subranges' => array_slice( $ranges, 1 )
                                        ],
+                                       // Track how many times the base job divided for debugging
+                                       'division'      => isset( $params['division'] )
+                                               ? ( $params['division'] + 1 )
+                                               : 1
                                ] + $extraParams
                        );
                }