From f6d65e533c62f6deb21342d4901ece24497b433e Mon Sep 17 00:00:00 2001 From: Pierre Schmitz Date: Thu, 4 Jun 2015 07:31:04 +0200 Subject: Update to MediaWiki 1.25.1 --- includes/templates/NoLocalSettings.mustache | 39 ++++++++++++ includes/templates/NoLocalSettings.php | 97 ----------------------------- includes/templates/Usercreate.php | 25 +++++--- includes/templates/Userlogin.php | 75 ++++++++++++++-------- 4 files changed, 104 insertions(+), 132 deletions(-) create mode 100644 includes/templates/NoLocalSettings.mustache delete mode 100644 includes/templates/NoLocalSettings.php (limited to 'includes/templates') diff --git a/includes/templates/NoLocalSettings.mustache b/includes/templates/NoLocalSettings.mustache new file mode 100644 index 00000000..54579491 --- /dev/null +++ b/includes/templates/NoLocalSettings.mustache @@ -0,0 +1,39 @@ + + + + + MediaWiki {{wgVersion}} + + + + The MediaWiki logo + +

MediaWiki {{wgVersion}}

+
+ {{#localSettingsExists}} +

LocalSettings.php not readable.

+

Please correct file permissions and try again.

+ {{/localSettingsExists}} + {{^localSettingsExists}} +

LocalSettings.php not found.

+ {{#installerStarted}} +

Please complete the installation and download LocalSettings.php.

+ {{/installerStarted}} + {{^installerStarted}} +

Please set up the wiki first.

+ {{/installerStarted}} + {{/localSettingsExists}} +
+ + \ No newline at end of file diff --git a/includes/templates/NoLocalSettings.php b/includes/templates/NoLocalSettings.php deleted file mode 100644 index 5b88dfd1..00000000 --- a/includes/templates/NoLocalSettings.php +++ /dev/null @@ -1,97 +0,0 @@ - - - - - - MediaWiki <?php echo htmlspecialchars( $wgVersion ) ?> - - - - The MediaWiki logo - -

MediaWiki

-
- -

LocalSettings.php not found.

-

- complete the installation and download LocalSettings.php."; - } else { - echo "Please set up the wiki first."; - } - ?> -

- -

LocalSettings.php not readable.

-

Please correct file permissions and try again.

- - -
- - diff --git a/includes/templates/Usercreate.php b/includes/templates/Usercreate.php index 01da0bd7..f09b6bba 100644 --- a/includes/templates/Usercreate.php +++ b/includes/templates/Usercreate.php @@ -53,7 +53,7 @@ class UsercreateTemplate extends BaseTemplate {
- html( 'header' ); /* extensions such as ConfirmEdit add form HTML here */ ?> + html( 'header' ); ?>
- > -
msgHtml( $inputItem['msg'] ); ?> + > +
haveData( 'extrafields' ) ) { + echo $this->data['extrafields']; + } + // skip one index. $tabIndex++; ?>
getMsg( $this->data['loggedin'] ? 'createacct-another-submit' : 'createacct-submit' ), - 'submit', array( - 'class' => "mw-ui-button mw-ui-big mw-ui-block mw-ui-constructive", 'id' => 'wpCreateaccount', + 'name' => 'wpCreateaccount', 'tabindex' => $tabIndex++ + ), + array( + 'mw-ui-block', + 'mw-ui-constructive', ) ); ?> diff --git a/includes/templates/Userlogin.php b/includes/templates/Userlogin.php index 8bba4265..345bb71b 100644 --- a/includes/templates/Userlogin.php +++ b/includes/templates/Userlogin.php @@ -70,12 +70,10 @@ class UserloginTemplate extends BaseTemplate { ?> data['name'], 'text', array( 'class' => 'loginText mw-ui-input', 'id' => 'wpName1', 'tabindex' => '1', - 'size' => '20', // 'required' is blacklisted for now in Html.php due to browser issues. // Keeping here in case that changes. 'required' => true, @@ -90,14 +88,6 @@ class UserloginTemplate extends BaseTemplate { 'loginPassword mw-ui-input', 'id' => 'wpPassword1', 'tabindex' => '2', - 'size' => '20', // Set focus to this field if username is filled in. 'autofocus' => (bool)$this->data['name'], 'placeholder' => $this->getMsg( 'userlogin-yourpassword-ph' )->text() @@ -148,15 +137,19 @@ class UserloginTemplate extends BaseTemplate {
getMsg( 'pt-login-button' )->text(), 'submit', array( + $attrs = array( 'id' => 'wpLoginAttempt', + 'name' => 'wpLoginAttempt', 'tabindex' => '6', - 'class' => 'mw-ui-button mw-ui-big mw-ui-block mw-ui-constructive' - ) ); + ); + $modifiers = array( + 'mw-ui-constructive', + ); + echo Html::submitButton( $this->getMsg( 'pt-login-button' )->text(), $attrs, $modifiers ); ?>
-
+ + haveData( 'createOrLoginHref' ) ) { ?> - data['loggedin'] ) { ?> -
- msg( 'userlogin-createanother' ); ?> + if ( $this->data['useemail'] && $this->data['canreset'] && $this->data['resetlink'] === true ) { + echo Html::rawElement( + 'div', + array( + 'class' => 'mw-ui-vform-field mw-form-related-link-container', + ), + Linker::link( + SpecialPage::getTitleFor( 'PasswordReset' ), + $this->getMsg( 'userlogin-resetpassword-link' )->escaped() + ) + ); + } + + if ( $this->haveData( 'createOrLoginHref' ) ) { + if ( $this->data['loggedin'] ) { ?> + -
- msg( 'userlogin-noaccount' ); ?>msg( 'userlogin-joinproject' ); ?> + - - - haveData( 'uselang' ) ) { ?> - haveData( 'token' ) ) { ?> - data['cansecurelogin'] ) {?> + haveData( 'uselang' ) ) { + $fields .= Html::hidden( 'uselang', $this->data['uselang'] ); + } + if ( $this->haveData( 'token' ) ) { + $fields .= Html::hidden( 'wpLoginToken', $this->data['token'] ); + } + if ( $this->data['cansecurelogin'] ) { + $fields .= Html::hidden( 'wpForceHttps', $this->data['stickhttps'] ); + } + if ( $this->data['cansecurelogin'] && $this->haveData( 'fromhttp' ) ) { + $fields .= Html::hidden( 'wpFromhttp', $this->data['fromhttp'] ); + } + echo $fields; + + ?>
-- cgit v1.2.3-54-g00ecf