/** * Checks if $title is a redirect page. * * @param $title * @param $pagetable Name of MW's 'page' table (for efficiency) * @param & $db reference for database (for efficiency) */ private static function isRedirect(Title $title, $pagetable, &$db) { return $db->selectRow($pagetable, 'page_is_redirect', array('page_title' => $title->getDBkey(), 'page_namespace' => $title->getNamespace(), 'page_is_redirect' => 1)) !== false; }