summaryrefslogtreecommitdiff
path: root/includes/templates
diff options
context:
space:
mode:
Diffstat (limited to 'includes/templates')
-rw-r--r--includes/templates/NoLocalSettings.php48
-rw-r--r--includes/templates/Userlogin.php24
2 files changed, 67 insertions, 5 deletions
diff --git a/includes/templates/NoLocalSettings.php b/includes/templates/NoLocalSettings.php
new file mode 100644
index 00000000..e71dd396
--- /dev/null
+++ b/includes/templates/NoLocalSettings.php
@@ -0,0 +1,48 @@
+<?php
+# Prevent XSS
+if ( isset( $wgVersion ) ) {
+ $wgVersion = htmlspecialchars( $wgVersion );
+} else {
+ $wgVersion = 'VERSION';
+}
+# Set the path in case we hit a page such as /index.php/Main_Page
+# Could use <base href> but then we have to worry about http[s]/port #/etc.
+$path = '';
+if( isset( $_SERVER['SCRIPT_NAME'] )) {
+ $path = htmlspecialchars( preg_replace('/index.php/', '', $_SERVER['SCRIPT_NAME']) );
+}
+?>
+<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
+<html xmlns='http://www.w3.org/1999/xhtml' xml:lang='en' lang='en'>
+ <head>
+ <title>MediaWiki <?php echo $wgVersion ?></title>
+ <meta http-equiv='Content-Type' content='text/html; charset=utf-8' />
+ <style type='text/css' media='screen, projection'>
+ html, body {
+ color: #000;
+ background-color: #fff;
+ font-family: sans-serif;
+ text-align: center;
+ }
+
+ h1 {
+ font-size: 150%;
+ }
+ </style>
+ </head>
+ <body>
+ <img src="<?php echo $path ?>skins/common/images/mediawiki.png" alt='The MediaWiki logo' />
+
+ <h1>MediaWiki <?php echo $wgVersion ?></h1>
+ <div class='error'>
+ <?php
+ if ( file_exists( 'config/LocalSettings.php' ) ) {
+ echo( 'To complete the installation, move <tt>config/LocalSettings.php</tt> to the parent directory.' );
+ } else {
+ echo( "Please <a href=\"${path}config/index.php\" title='setup'> set up the wiki</a> first." );
+ }
+ ?>
+
+ </div>
+ </body>
+</html>
diff --git a/includes/templates/Userlogin.php b/includes/templates/Userlogin.php
index 66368669..83ef4920 100644
--- a/includes/templates/Userlogin.php
+++ b/includes/templates/Userlogin.php
@@ -37,6 +37,7 @@ class UserloginTemplate extends QuickTemplate {
<td align='right'><label for='wpName1'><?php $this->msg('yourname') ?>:</label></td>
<td align='left'>
<input type='text' class='loginText' name="wpName" id="wpName1"
+ tabindex="1"
value="<?php $this->text('name') ?>" size='20' />
</td>
</tr>
@@ -44,6 +45,7 @@ class UserloginTemplate extends QuickTemplate {
<td align='right'><label for='wpPassword1'><?php $this->msg('yourpassword') ?>:</label></td>
<td align='left'>
<input type='password' class='loginPassword' name="wpPassword" id="wpPassword1"
+ tabindex="2"
value="<?php $this->text('password') ?>" size='20' />
</td>
</tr>
@@ -56,7 +58,8 @@ class UserloginTemplate extends QuickTemplate {
<tr>
<td align='right'><?php $this->msg( 'yourdomainname' ) ?>:</td>
<td align='left'>
- <select name="wpDomain" value="<?php $this->text( 'domain' ) ?>">
+ <select name="wpDomain" value="<?php $this->text( 'domain' ) ?>"
+ tabindex="3">
<?php echo $doms ?>
</select>
</td>
@@ -66,6 +69,7 @@ class UserloginTemplate extends QuickTemplate {
<td></td>
<td align='left'>
<input type='checkbox' name="wpRemember"
+ tabindex="4"
value="1" id="wpRemember"
<?php if( $this->data['remember'] ) { ?>checked="checked"<?php } ?>
/> <label for="wpRemember"><?php $this->msg('remembermypassword') ?></label>
@@ -74,7 +78,8 @@ class UserloginTemplate extends QuickTemplate {
<tr>
<td></td>
<td align='left' style="white-space:nowrap">
- <input type='submit' name="wpLoginattempt" id="wpLoginattempt" value="<?php $this->msg('login') ?>" />&nbsp;<?php if( $this->data['useemail'] ) { ?><input type='submit' name="wpMailmypassword" id="wpMailmypassword"
+ <input type='submit' name="wpLoginattempt" id="wpLoginattempt" tabindex="5" value="<?php $this->msg('login') ?>" />&nbsp;<?php if( $this->data['useemail'] ) { ?><input type='submit' name="wpMailmypassword" id="wpMailmypassword"
+ tabindex="6"
value="<?php $this->msg('mailmypassword') ?>" />
<?php } ?>
</td>
@@ -113,6 +118,7 @@ class UsercreateTemplate extends QuickTemplate {
<td align='right'><label for='wpName2'><?php $this->msg('yourname') ?>:</label></td>
<td align='left'>
<input type='text' class='loginText' name="wpName" id="wpName2"
+ tabindex="1"
value="<?php $this->text('name') ?>" size='20' />
</td>
</tr>
@@ -120,6 +126,7 @@ class UsercreateTemplate extends QuickTemplate {
<td align='right'><label for='wpPassword2'><?php $this->msg('yourpassword') ?>:</label></td>
<td align='left'>
<input type='password' class='loginPassword' name="wpPassword" id="wpPassword2"
+ tabindex="2"
value="<?php $this->text('password') ?>" size='20' />
</td>
</tr>
@@ -132,7 +139,8 @@ class UsercreateTemplate extends QuickTemplate {
<tr>
<td align='right'><?php $this->msg( 'yourdomainname' ) ?>:</td>
<td align='left'>
- <select name="wpDomain" value="<?php $this->text( 'domain' ) ?>">
+ <select name="wpDomain" value="<?php $this->text( 'domain' ) ?>"
+ tabindex="3">
<?php echo $doms ?>
</select>
</td>
@@ -142,24 +150,27 @@ class UsercreateTemplate extends QuickTemplate {
<td align='right'><label for='wpRetype'><?php $this->msg('yourpasswordagain') ?>:</label></td>
<td align='left'>
<input type='password' class='loginPassword' name="wpRetype" id="wpRetype"
+ tabindex="4"
value="<?php $this->text('retype') ?>"
size='20' />
</td>
</tr>
<tr>
<?php if( $this->data['useemail'] ) { ?>
- <td align='right'><label for='wpEmail'><?php $this->msg('youremail') ?>:</label></td>
+ <td align='right'><label for='wpEmail'><?php $this->msg('youremail') ?></label></td>
<td align='left'>
<input type='text' class='loginText' name="wpEmail" id="wpEmail"
+ tabindex="5"
value="<?php $this->text('email') ?>" size='20' />
</td>
<?php } ?>
<?php if( $this->data['userealname'] ) { ?>
</tr>
<tr>
- <td align='right'><label for='wpRealName'><?php $this->msg('yourrealname') ?>:</label></td>
+ <td align='right'><label for='wpRealName'><?php $this->msg('yourrealname') ?></label></td>
<td align='left'>
<input type='text' class='loginText' name="wpRealName" id="wpRealName"
+ tabindex="6"
value="<?php $this->text('realname') ?>" size='20' />
</td>
<?php } ?>
@@ -168,6 +179,7 @@ class UsercreateTemplate extends QuickTemplate {
<td></td>
<td align='left'>
<input type='checkbox' name="wpRemember"
+ tabindex="7"
value="1" id="wpRemember"
<?php if( $this->data['remember'] ) { ?>checked="checked"<?php } ?>
/> <label for="wpRemember"><?php $this->msg('remembermypassword') ?></label>
@@ -177,9 +189,11 @@ class UsercreateTemplate extends QuickTemplate {
<td></td>
<td align='left'>
<input type='submit' name="wpCreateaccount" id="wpCreateaccount"
+ tabindex="8"
value="<?php $this->msg('createaccount') ?>" />
<?php if( $this->data['createemail'] ) { ?>
<input type='submit' name="wpCreateaccountMail" id="wpCreateaccountMail"
+ tabindex="9"
value="<?php $this->msg('createaccountmail') ?>" />
<?php } ?>
</td>