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
* @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;
+ }
}
/**