+ foreach( $this->mPendingRedirectIDs as $rdfrom => $from ) {
+ if( !isset( $redirectTitles[$rdfrom] ) ) {
+ continue;
+ }
+ $to = $redirectTitles[$rdfrom];
+ if ( $to && !isset( $this->mAllPages[$to->getNamespace()][$to->getText()] ) ) {
+ $lb->addObj( $to );
+ }
+ $this->mRedirectTitles[$from->getPrefixedText()] = $to;
+ }
+ return $lb;
+ }
+
+ /**
+ * Get the targets of redirects from the database
+ *
+ * Also creates entries in the redirect table for redirects that don't
+ * have one.
+ *
+ * @param $redirectIDs array The array of pageids to resolve
+ * @param $profileDB string if profileDBIn should called
+ * @return array id => redirect target as title
+ * @since 1.21
+ */
+ public function resolveIdsToRedirectTargets( $redirectIDs, $profileDB = '' ) {
+ if( !$redirectIDs ) {
+ return array();
+ }
+