From: Brian Wolff Date: Wed, 11 Dec 2013 23:06:57 +0000 (-0700) Subject: Always give sane output for Title::getUserCaseDBkey() X-Git-Tag: 1.31.0-rc.0~17662^2 X-Git-Url: http://git.cyclocoop.org/%7B%24admin_url%7Dmembres/cotisations/gestion/rappel_supprimer.php?a=commitdiff_plain;h=1bddb65c2eae97988286d410bd081d8370a71f03;p=lhc%2Fweb%2Fwiklou.git Always give sane output for Title::getUserCaseDBkey() Sometimes (e.g. via Title::makeTitle), the usercase db key is not set. If that happens we should fallback to the normal db key. This fixes file redirects on repos where initialCapital is set to false. Change-Id: I38bc4ebeb41b06f5c718cf5f64da158e6c1a9f49 --- diff --git a/includes/Title.php b/includes/Title.php index a949ac301b..924027e537 100644 --- a/includes/Title.php +++ b/includes/Title.php @@ -769,7 +769,12 @@ class Title { * @return String DB key */ function getUserCaseDBKey() { - return $this->mUserCaseDBKey; + if ( !is_null( $this->mUserCaseDBKey ) ) { + return $this->mUserCaseDBKey; + } else { + // If created via makeTitle(), $this->mUserCaseDBKey is not set. + return $this->mDbkeyform; + } } /**