~ubuntu-branches/ubuntu/lucid/wordpress/lucid-security

« back to all changes in this revision

Viewing changes to wp-admin/install.php

  • Committer: Bazaar Package Importer
  • Author(s): Pedro Fragoso
  • Date: 2009-02-17 01:15:21 UTC
  • mfrom: (11.1.5 sid)
  • Revision ID: james.westby@ubuntu.com-20090217011521-5bpmct5wtqrpu8u3
Tags: 2.7.1-2ubuntu1
* Merge from Debian unstable (LP: #327674), Ubuntu remaining changes:
  - debian/apache.conf:
    + Changed to use /var/www instead of /srv/www for virtual webroot.
  - debian/setup-mysql:
    + Changed to use /var/www instead of /srv/www.
  - debian/patches/010_remove_update_notice.patch:
    + Remove Wordpress upgrade notify in admin dashboard

Show diffs side-by-side

added added

removed removed

Lines of Context:
1
1
<?php
 
2
/**
 
3
 * WordPress Installer
 
4
 *
 
5
 * @package WordPress
 
6
 * @subpackage Administration
 
7
 */
 
8
 
 
9
/**
 
10
 * We are installing WordPress.
 
11
 *
 
12
 * @since unknown
 
13
 * @var bool
 
14
 */
2
15
define('WP_INSTALLING', true);
3
 
if (!file_exists('../wp-config.php')) {
4
 
  require_once('../wp-includes/compat.php');
5
 
  require_once('../wp-includes/functions.php');
6
 
  wp_die("There doesn't seem to be a <code>wp-config.php</code> file. I need this before we can get started. Need more help? <a href='http://codex.wordpress.org/Editing_wp-config.php'>We got it</a>. You can create a <code>wp-config.php</code> file through a web interface, but this doesn't work for all server setups. The safest way is to manually create the file.</p><p><a href='setup-config.php' class='button'>Create a Configuration File</a>", "WordPress &rsaquo; Error");
7
 
}
8
 
 
9
 
require_once('../wp-config.php');
 
16
 
 
17
/** Load WordPress Bootstrap */
 
18
require_once('../wp-load.php');
 
19
 
 
20
/** Load WordPress Administration Upgrade API */
10
21
require_once('./includes/upgrade.php');
11
22
 
12
23
if (isset($_GET['step']))
13
24
        $step = $_GET['step'];
14
25
else
15
26
        $step = 0;
16
 
function display_header(){
 
27
 
 
28
/**
 
29
 * Display install header.
 
30
 *
 
31
 * @since unknown
 
32
 * @package WordPress
 
33
 * @subpackage Installer
 
34
 */
 
35
function display_header() {
17
36
header( 'Content-Type: text/html; charset=utf-8' );
18
37
?>
19
38
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
21
40
<head>
22
41
        <meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
23
42
        <title><?php _e('WordPress &rsaquo; Installation'); ?></title>
24
 
        <?php wp_admin_css( 'css/install' ); ?>
 
43
        <?php wp_admin_css( 'install', true ); ?>
25
44
</head>
26
45
<body>
27
46
<h1 id="logo"><img alt="WordPress" src="images/wordpress-logo.png" /></h1>
59
78
                        <td colspan="2"><label><input type="checkbox" name="blog_public" value="1" checked="checked" /> <?php _e('Allow my blog to appear in search engines like Google and Technorati.'); ?></label></td>
60
79
                </tr>
61
80
        </table>
62
 
        <input type="submit" name="Submit" value="<?php _e('Install WordPress'); ?>" class="button" />
 
81
        <p class="step"><input type="submit" name="Submit" value="<?php _e('Install WordPress'); ?>" class="button" /></p>
63
82
</form>
64
83
 
65
84
<?php
70
89
 
71
90
                display_header();
72
91
                // Fill in the data we gathered
73
 
                $weblog_title = stripslashes($_POST['weblog_title']);
74
 
                $admin_email = stripslashes($_POST['admin_email']);
75
 
                $public = (int) $_POST['blog_public'];
 
92
                $weblog_title = isset($_POST['weblog_title']) ? stripslashes($_POST['weblog_title']) : '';
 
93
                $admin_email = isset($_POST['admin_email']) ? stripslashes($_POST['admin_email']) : '';
 
94
                $public = isset($_POST['blog_public']) ? (int) $_POST['blog_public'] : 0;
76
95
                // check e-mail address
77
96
                if (empty($admin_email)) {
78
97
                        // TODO: poka-yoke
103
122
        </tr>
104
123
</table>
105
124
 
106
 
<p><a href="../wp-login.php" class="button"><?php _e('Log In'); ?></a>
 
125
<p class="step"><a href="../wp-login.php" class="button"><?php _e('Log In'); ?></a></p>
107
126
 
108
127
<?php
109
128
                break;