* Fixed PHP warnings when updating a broken MySQL database.
* (bug 26023) Corrected deleteBacth.php's documentation
* (bug 25451) Improved datetime representation in 32 bit php >= 5.2.
+* Show "skin does not exist error" only when the skin is inputted in the wrong
+ case.
=== API changes in 1.17 ===
* (bug 22738) Allow filtering by action type on query=logevent.
return $this->deletedSinceEdit;
}
+ /**
+ * Checks whether the user entered a skin name in uppercase,
+ * e.g. "User:Example/Monobook.css" instead of "monobook.css"
+ */
+ protected function isWrongCaseCssJsPage() {
+ if( $this->mTitle->isCssJsSubpage() ) {
+ $name = $this->mTitle->getSkinFromCssJsSubpage();
+ $skins = array_merge(
+ array_keys( Skin::getSkinNames() ),
+ array( 'common' )
+ );
+ return !in_array( $name, $skins )
+ && in_array( strtolower( $name ), $skins );
+ } else {
+ return false;
+ }
+ }
+
function submit() {
$this->edit();
}
$this->isCssJsSubpage = $this->mTitle->isCssJsSubpage();
$this->isCssSubpage = $this->mTitle->isCssSubpage();
$this->isJsSubpage = $this->mTitle->isJsSubpage();
- $this->isValidCssJsSubpage = $this->mTitle->isValidCssJsSubpage();
+ $this->isWrongCaseCssJsPage = $this->isWrongCaseCssJsPage();
# Show applicable editing introductions
if ( $this->formtype == 'initial' || $this->firsttime )
} else {
if ( $this->isCssJsSubpage ) {
# Check the skin exists
- if ( !$this->isValidCssJsSubpage ) {
+ if ( $this->isWrongCaseCssJsPage ) {
$wgOut->wrapWikiMsg( "<div class='error' id='mw-userinvalidcssjstitle'>\n$1\n</div>", array( 'userinvalidcssjstitle', $wgTitle->getSkinFromCssJsSubpage() ) );
}
if ( $this->formtype !== 'preview' ) {
/**
* Is this a *valid* .css or .js subpage of a user page?
- * Check that the corresponding skin exists
*
* @return \type{\bool}
+ * @deprecated
*/
public function isValidCssJsSubpage() {
- if ( $this->isCssJsSubpage() ) {
- $name = $this->getSkinFromCssJsSubpage();
- if ( $name == 'common' ) {
- return true;
- }
- $skinNames = Skin::getSkinNames();
- return array_key_exists( $name, $skinNames );
- } else {
- return false;
- }
+ return $this->isCssJsSubpage();
}
/**