]> scripts.mit.edu Git - autoinstalls/wordpress.git/blobdiff - wp-admin/install.php
Wordpress 2.7.1
[autoinstalls/wordpress.git] / wp-admin / install.php
index 32ef35dc4fd362225d97a8898938a62bcdf81003..de5b970d6db1c0bca454116245986b3f178bf222 100644 (file)
@@ -1,14 +1,38 @@
 <?php
 <?php
+/**
+ * WordPress Installer
+ *
+ * @package WordPress
+ * @subpackage Administration
+ */
+
+/**
+ * We are installing WordPress.
+ *
+ * @since unknown
+ * @var bool
+ */
 define('WP_INSTALLING', true);
 
 define('WP_INSTALLING', true);
 
+/** Load WordPress Bootstrap */
 require_once('../wp-load.php');
 require_once('../wp-load.php');
+
+/** Load WordPress Administration Upgrade API */
 require_once('./includes/upgrade.php');
 
 if (isset($_GET['step']))
        $step = $_GET['step'];
 else
        $step = 0;
 require_once('./includes/upgrade.php');
 
 if (isset($_GET['step']))
        $step = $_GET['step'];
 else
        $step = 0;
-function display_header(){
+
+/**
+ * Display install header.
+ *
+ * @since unknown
+ * @package WordPress
+ * @subpackage Installer
+ */
+function display_header() {
 header( 'Content-Type: text/html; charset=utf-8' );
 ?>
 <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
 header( 'Content-Type: text/html; charset=utf-8' );
 ?>
 <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
@@ -65,9 +89,9 @@ switch($step) {
 
                display_header();
                // Fill in the data we gathered
 
                display_header();
                // Fill in the data we gathered
-               $weblog_title = stripslashes($_POST['weblog_title']);
-               $admin_email = stripslashes($_POST['admin_email']);
-               $public = (int) $_POST['blog_public'];
+               $weblog_title = isset($_POST['weblog_title']) ? stripslashes($_POST['weblog_title']) : '';
+               $admin_email = isset($_POST['admin_email']) ? stripslashes($_POST['admin_email']) : '';
+               $public = isset($_POST['blog_public']) ? (int) $_POST['blog_public'] : 0;
                // check e-mail address
                if (empty($admin_email)) {
                        // TODO: poka-yoke
                // check e-mail address
                if (empty($admin_email)) {
                        // TODO: poka-yoke