| 86 | | print "<h1>Server Summary</h1>"; |
|---|
| 87 | | print "<p>If you post a message to the MU support forum at <a target='_blank' href='http://mu.wordpress.org/forums/'>http://mu.wordpress.org/forums/</a> then copy and paste the following information into your message:</p>"; |
|---|
| 88 | | |
|---|
| 89 | | print "<blockquote style='background: #eee; border: 1px solid #333; padding: 5px;'>"; |
|---|
| 90 | | print "<br /><strong>ERROR: $err</strong></br >"; |
|---|
| 91 | | clearstatcache(); |
|---|
| 92 | | $files = array( "htaccess.dist", ".htaccess" ); |
|---|
| 93 | | while( list( $key, $val ) = each( $files ) ) { |
|---|
| 94 | | $stats = @stat( $val ); |
|---|
| 95 | | if( $stats ) { |
|---|
| 96 | | print "<h2>$val</h2>"; |
|---|
| 97 | | print " uid/gid: " . $stats[ 'uid' ] . "/" . $stats[ 'gid' ] . "<br />\n"; |
|---|
| 98 | | print " size: " . $stats[ 'size' ] . "<br />"; |
|---|
| 99 | | print " perms: " . substr( sprintf('%o', fileperms( $val ) ), -4 ) . "<br />"; |
|---|
| 100 | | print " readable: "; |
|---|
| 101 | | print is_readable( $val ) == true ? "yes" : "no"; |
|---|
| 102 | | print "<br />"; |
|---|
| 103 | | print " writeable: "; |
|---|
| 104 | | print is_writeable( $val ) == true ? "yes" : "no"; |
|---|
| 105 | | print "<br />"; |
|---|
| 106 | | |
|---|
| 107 | | } elseif( file_exists( $val ) == false ) { |
|---|
| 108 | | print "<h2>$val</h2>"; |
|---|
| 109 | | print " FILE NOT FOUND: $val<br>"; |
|---|
| 110 | | } |
|---|
| 111 | | } |
|---|
| 112 | | print "</blockquote>"; |
|---|
| 113 | | |
|---|
| 114 | | } |
|---|
| 115 | | |
|---|
| 116 | | function do_htaccess( $oldfilename, $newfilename, $base, $url ) |
|---|
| 117 | | { |
|---|
| 118 | | // remove ending slash from $base and $url |
|---|
| 119 | | $htaccess = ''; |
|---|
| 120 | | if( substr($base, -1 ) == '/') { |
|---|
| 121 | | $base = substr($base, 0, -1); |
|---|
| 122 | | } |
|---|
| 123 | | |
|---|
| 124 | | if( substr($url, -1 ) == '/') { |
|---|
| 125 | | $url = substr($url, 0, -1); |
|---|
| 126 | | } |
|---|
| 127 | | $err = ''; |
|---|
| 128 | | if( is_file( $oldfilename ) ) { |
|---|
| 129 | | $fp = @fopen( $oldfilename, "r" ); |
|---|
| 130 | | if( $fp ) { |
|---|
| 131 | | while( !feof( $fp ) ) |
|---|
| 132 | | { |
|---|
| 133 | | $htaccess .= fgets( $fp, 4096 ); |
|---|
| 134 | | } |
|---|
| 135 | | fclose( $fp ); |
|---|
| 136 | | $htaccess = str_replace( "BASE", $base, $htaccess ); |
|---|
| 137 | | if( touch( $newfilename ) ) { |
|---|
| 138 | | $fp = fopen( $newfilename, "w" ); |
|---|
| 139 | | if( $fp ) { |
|---|
| 140 | | fwrite( $fp, $htaccess ); |
|---|
| 141 | | fclose( $fp ); |
|---|
| 142 | | } else { |
|---|
| 143 | | $err = "could not open $newfilename for writing"; |
|---|
| 144 | | } |
|---|
| 145 | | } else { |
|---|
| 146 | | $err = "could not open $newfilename for writing"; |
|---|
| 147 | | } |
|---|
| 148 | | } else { |
|---|
| 149 | | $err = "could not open $oldfilename for reading"; |
|---|
| 150 | | } |
|---|
| 151 | | } else { |
|---|
| 152 | | $err = "$oldfilename not found"; |
|---|
| 153 | | } |
|---|
| 154 | | |
|---|
| 155 | | if( $err != '' ) { |
|---|
| 156 | | print "<h1>Warning!</h1>"; |
|---|
| 157 | | print "<p><strong>There was a problem creating the .htaccess file.</strong> </p>"; |
|---|
| 158 | | print "<p style='color: #900'>Error: "; |
|---|
| 159 | | if( $err == "could not open $newfilename for writing" ) { |
|---|
| 160 | | print "Could Not Write To $newfilename."; |
|---|
| 161 | | } elseif( $err == "could not open $oldfilename for reading" ) { |
|---|
| 162 | | print "I could not read from $oldfilename. "; |
|---|
| 163 | | } elseif( $err == "$oldfilename not found" ) { |
|---|
| 164 | | print "The file, $oldfilename, is missing."; |
|---|
| 165 | | } |
|---|
| 166 | | print "</p>"; |
|---|
| 167 | | filestats( $err ); |
|---|
| 168 | | |
|---|
| 169 | | print "<p>Please ensure that the webserver can write to this directory.</p>"; |
|---|
| 170 | | print "<p>If you use Cpanel then read <a href='http://mu.wordpress.org/forums/topic/99'>this post</a>. Cpanel creates files that I need to overwrite and you have to fix that.</p>"; |
|---|
| 171 | | print "<p>If all else fails then you'll have to create it by hand:"; |
|---|
| 172 | | print "<ul><li> Download htaccess.dist to your computer and open it in your favourite text editor.</li> |
|---|
| | 86 | print "<h1>Server Summary</h1>"; |
|---|
| | 87 | print "<p>If you post a message to the MU support forum at <a target='_blank' href='http://mu.wordpress.org/forums/'>http://mu.wordpress.org/forums/</a> then copy and paste the following information into your message:</p>"; |
|---|
| | 88 | |
|---|
| | 89 | print "<blockquote style='background: #eee; border: 1px solid #333; padding: 5px;'>"; |
|---|
| | 90 | print "<br /><strong>ERROR: $err</strong></br >"; |
|---|
| | 91 | clearstatcache(); |
|---|
| | 92 | $files = array( "htaccess.dist", ".htaccess" ); |
|---|
| | 93 | while( list( $key, $val ) = each( $files ) ) { |
|---|
| | 94 | $stats = @stat( $val ); |
|---|
| | 95 | if( $stats ) { |
|---|
| | 96 | print "<h2>$val</h2>"; |
|---|
| | 97 | print " uid/gid: " . $stats[ 'uid' ] . "/" . $stats[ 'gid' ] . "<br />\n"; |
|---|
| | 98 | print " size: " . $stats[ 'size' ] . "<br />"; |
|---|
| | 99 | print " perms: " . substr( sprintf('%o', fileperms( $val ) ), -4 ) . "<br />"; |
|---|
| | 100 | print " readable: "; |
|---|
| | 101 | print is_readable( $val ) == true ? "yes" : "no"; |
|---|
| | 102 | print "<br />"; |
|---|
| | 103 | print " writeable: "; |
|---|
| | 104 | print is_writeable( $val ) == true ? "yes" : "no"; |
|---|
| | 105 | print "<br />"; |
|---|
| | 106 | } elseif( file_exists( $val ) == false ) { |
|---|
| | 107 | print "<h2>$val</h2>"; |
|---|
| | 108 | print " FILE NOT FOUND: $val<br>"; |
|---|
| | 109 | } |
|---|
| | 110 | } |
|---|
| | 111 | print "</blockquote>"; |
|---|
| | 112 | } |
|---|
| | 113 | |
|---|
| | 114 | function do_htaccess( $oldfilename, $newfilename, $base, $url ) { |
|---|
| | 115 | // remove ending slash from $base and $url |
|---|
| | 116 | $htaccess = ''; |
|---|
| | 117 | if( substr($base, -1 ) == '/') { |
|---|
| | 118 | $base = substr($base, 0, -1); |
|---|
| | 119 | } |
|---|
| | 120 | |
|---|
| | 121 | if( substr($url, -1 ) == '/') { |
|---|
| | 122 | $url = substr($url, 0, -1); |
|---|
| | 123 | } |
|---|
| | 124 | $err = ''; |
|---|
| | 125 | if( is_file( $oldfilename ) ) { |
|---|
| | 126 | $fp = @fopen( $oldfilename, "r" ); |
|---|
| | 127 | if( $fp ) { |
|---|
| | 128 | while( !feof( $fp ) ) |
|---|
| | 129 | { |
|---|
| | 130 | $htaccess .= fgets( $fp, 4096 ); |
|---|
| | 131 | } |
|---|
| | 132 | fclose( $fp ); |
|---|
| | 133 | $htaccess = str_replace( "BASE", $base, $htaccess ); |
|---|
| | 134 | if( touch( $newfilename ) ) { |
|---|
| | 135 | $fp = fopen( $newfilename, "w" ); |
|---|
| | 136 | if( $fp ) { |
|---|
| | 137 | fwrite( $fp, $htaccess ); |
|---|
| | 138 | fclose( $fp ); |
|---|
| | 139 | } else { |
|---|
| | 140 | $err = "could not open $newfilename for writing"; |
|---|
| | 141 | } |
|---|
| | 142 | } else { |
|---|
| | 143 | $err = "could not open $newfilename for writing"; |
|---|
| | 144 | } |
|---|
| | 145 | } else { |
|---|
| | 146 | $err = "could not open $oldfilename for reading"; |
|---|
| | 147 | } |
|---|
| | 148 | } else { |
|---|
| | 149 | $err = "$oldfilename not found"; |
|---|
| | 150 | } |
|---|
| | 151 | |
|---|
| | 152 | if( $err != '' ) { |
|---|
| | 153 | print "<h1>Warning!</h1>"; |
|---|
| | 154 | print "<p><strong>There was a problem creating the .htaccess file.</strong> </p>"; |
|---|
| | 155 | print "<p style='color: #900'>Error: "; |
|---|
| | 156 | if( $err == "could not open $newfilename for writing" ) { |
|---|
| | 157 | print "Could Not Write To $newfilename."; |
|---|
| | 158 | } elseif( $err == "could not open $oldfilename for reading" ) { |
|---|
| | 159 | print "I could not read from $oldfilename. "; |
|---|
| | 160 | } elseif( $err == "$oldfilename not found" ) { |
|---|
| | 161 | print "The file, $oldfilename, is missing."; |
|---|
| | 162 | } |
|---|
| | 163 | print "</p>"; |
|---|
| | 164 | filestats( $err ); |
|---|
| | 165 | |
|---|
| | 166 | print "<p>Please ensure that the webserver can write to this directory.</p>"; |
|---|
| | 167 | print "<p>If you use Cpanel then read <a href='http://mu.wordpress.org/forums/topic/99'>this post</a>. Cpanel creates files that I need to overwrite and you have to fix that.</p>"; |
|---|
| | 168 | print "<p>If all else fails then you'll have to create it by hand:"; |
|---|
| | 169 | print "<ul><li> Download htaccess.dist to your computer and open it in your favourite text editor.</li> |
|---|
| 180 | | $ret = true; |
|---|
| 181 | | $ret = check_writeable_dir( dirname(__FILE__), $ret ); |
|---|
| 182 | | $ret = check_writeable_dir( dirname(__FILE__) . "/wp-content/", $ret ); |
|---|
| 183 | | |
|---|
| 184 | | if( $ret == false ) |
|---|
| 185 | | { |
|---|
| 186 | | print "<h2>Warning!</h2>"; |
|---|
| 187 | | print "<div style='border: 1px solid #ccc'>"; |
|---|
| 188 | | print "<p style='font-weight: bold; padding-left: 10px'>One or more of the above directories must be made writeable by the webserver.<br>"; |
|---|
| 189 | | print "Please <code>chmod 777 <q>directory-name</q></code> or <code>chown</code> that directory to the user the web server runs as (usually nobody, apache, or www-data)<br>"; |
|---|
| 190 | | print "Refresh this page when you're done!<br></p>"; |
|---|
| 191 | | print "</div>"; |
|---|
| 192 | | } |
|---|
| 193 | | if( file_exists( "./.htaccess" ) && is_writeable( "./.htaccess" ) == false ) { |
|---|
| 194 | | $ret = false; |
|---|
| 195 | | print "<h2>Warning! .htaccess already exists.</h2>"; |
|---|
| 196 | | print "<div style='border: 1px solid #ccc'>"; |
|---|
| 197 | | print "<p style='font-weight: bold; padding-left: 10px'>A file with the name '.htaccess' already exists in this directory and I cannot write to it. Please ftp to the server and delete this file from this directory!<br />"; |
|---|
| 198 | | print "Offending file: " . realpath( '.htaccess' ) . "</p>"; |
|---|
| 199 | | print "</div>"; |
|---|
| 200 | | } |
|---|
| 201 | | |
|---|
| 202 | | |
|---|
| 203 | | return $ret; |
|---|
| | 177 | $ret = true; |
|---|
| | 178 | $ret = check_writeable_dir( dirname(__FILE__), $ret ); |
|---|
| | 179 | $ret = check_writeable_dir( dirname(__FILE__) . "/wp-content/", $ret ); |
|---|
| | 180 | |
|---|
| | 181 | if( $ret == false ) { |
|---|
| | 182 | print "<h2>Warning!</h2>"; |
|---|
| | 183 | print "<div style='border: 1px solid #ccc'>"; |
|---|
| | 184 | print "<p style='font-weight: bold; padding-left: 10px'>One or more of the above directories must be made writeable by the webserver.<br>"; |
|---|
| | 185 | print "Please <code>chmod 777 <q>directory-name</q></code> or <code>chown</code> that directory to the user the web server runs as (usually nobody, apache, or www-data)<br>"; |
|---|
| | 186 | print "Refresh this page when you're done!<br></p>"; |
|---|
| | 187 | print "</div>"; |
|---|
| | 188 | } |
|---|
| | 189 | if( file_exists( "./.htaccess" ) && is_writeable( "./.htaccess" ) == false ) { |
|---|
| | 190 | $ret = false; |
|---|
| | 191 | print "<h2>Warning! .htaccess already exists.</h2>"; |
|---|
| | 192 | print "<div style='border: 1px solid #ccc'>"; |
|---|
| | 193 | print "<p style='font-weight: bold; padding-left: 10px'>A file with the name '.htaccess' already exists in this directory and I cannot write to it. Please ftp to the server and delete this file from this directory!<br />"; |
|---|
| | 194 | print "Offending file: " . realpath( '.htaccess' ) . "</p>"; |
|---|
| | 195 | print "</div>"; |
|---|
| | 196 | } |
|---|
| | 197 | return $ret; |
|---|
| 293 | | $dbname = $_POST['dbname']; |
|---|
| 294 | | $uname = $_POST['uname']; |
|---|
| 295 | | $passwrd = $_POST['pwd']; |
|---|
| 296 | | $dbhost = $_POST['dbhost']; |
|---|
| 297 | | $vhost = $_POST['vhost' ]; |
|---|
| 298 | | $prefix = 'wp_'; |
|---|
| 299 | | $base = stripslashes( dirname( $_SERVER["SCRIPT_NAME"] ) ); |
|---|
| 300 | | if( $base != "/") { |
|---|
| 301 | | $base .= "/"; |
|---|
| 302 | | } |
|---|
| 303 | | |
|---|
| 304 | | // Test the db connection. |
|---|
| 305 | | define('DB_NAME', $dbname); |
|---|
| 306 | | define('DB_USER', $uname); |
|---|
| 307 | | define('DB_PASSWORD', $passwrd); |
|---|
| 308 | | define('DB_HOST', $dbhost); |
|---|
| 309 | | |
|---|
| 310 | | if (!file_exists('wp-config-sample.php')) |
|---|
| 311 | | die('Sorry, I need a wp-config-sample.php file to work from. Please re-upload this file from your WordPress installation.'); |
|---|
| 312 | | |
|---|
| 313 | | $configFile = file('wp-config-sample.php'); |
|---|
| 314 | | // We'll fail here if the values are no good. |
|---|
| 315 | | require_once('wp-includes/wp-db.php'); |
|---|
| 316 | | printheader(); |
|---|
| 317 | | |
|---|
| 318 | | print "Creating Database Config File: "; |
|---|
| 319 | | |
|---|
| 320 | | $handle = fopen('wp-config.php', 'w'); |
|---|
| 321 | | |
|---|
| 322 | | foreach ($configFile as $line_num => $line) { |
|---|
| 323 | | switch (trim( substr($line,0,16) )) { |
|---|
| 324 | | case "define('DB_NAME'": |
|---|
| 325 | | fwrite($handle, str_replace("wordpress", $dbname, $line)); |
|---|
| 326 | | break; |
|---|
| 327 | | case "define('DB_USER'": |
|---|
| 328 | | fwrite($handle, str_replace("'username'", "'$uname'", $line)); |
|---|
| 329 | | break; |
|---|
| 330 | | case "define('DB_PASSW": |
|---|
| 331 | | fwrite($handle, str_replace("'password'", "'$passwrd'", $line)); |
|---|
| 332 | | break; |
|---|
| 333 | | case "define('DB_HOST'": |
|---|
| 334 | | fwrite($handle, str_replace("localhost", $dbhost, $line)); |
|---|
| 335 | | break; |
|---|
| 336 | | case "define('VHOST',": |
|---|
| 337 | | fwrite($handle, str_replace("VHOSTSETTING", $vhost, $line)); |
|---|
| 338 | | break; |
|---|
| 339 | | case '$table_prefix =': |
|---|
| 340 | | fwrite($handle, str_replace('wp_', $prefix, $line)); |
|---|
| 341 | | break; |
|---|
| 342 | | case '$base = \'BASE\';': |
|---|
| 343 | | fwrite($handle, str_replace('BASE', $base, $line)); |
|---|
| 344 | | break; |
|---|
| 345 | | default: |
|---|
| 346 | | fwrite($handle, $line); |
|---|
| 347 | | break; |
|---|
| 348 | | } |
|---|
| 349 | | } |
|---|
| 350 | | fclose($handle); |
|---|
| 351 | | chmod('wp-config.php', 0644); |
|---|
| 352 | | print "<b style='color: #00aa00; font-weight: bold'>DONE</b><br />"; |
|---|
| | 285 | $dbname = $_POST['dbname']; |
|---|
| | 286 | $uname = $_POST['uname']; |
|---|
| | 287 | $passwrd = $_POST['pwd']; |
|---|
| | 288 | $dbhost = $_POST['dbhost']; |
|---|
| | 289 | $vhost = $_POST['vhost' ]; |
|---|
| | 290 | $prefix = 'wp_'; |
|---|
| | 291 | $base = stripslashes( dirname( $_SERVER["SCRIPT_NAME"] ) ); |
|---|
| | 292 | if( $base != "/") |
|---|
| | 293 | $base .= "/"; |
|---|
| | 294 | |
|---|
| | 295 | // Test the db connection. |
|---|
| | 296 | define('DB_NAME', $dbname); |
|---|
| | 297 | define('DB_USER', $uname); |
|---|
| | 298 | define('DB_PASSWORD', $passwrd); |
|---|
| | 299 | define('DB_HOST', $dbhost); |
|---|
| | 300 | |
|---|
| | 301 | if (!file_exists('wp-config-sample.php')) |
|---|
| | 302 | die('Sorry, I need a wp-config-sample.php file to work from. Please re-upload this file from your WordPress installation.'); |
|---|
| | 303 | |
|---|
| | 304 | $configFile = file('wp-config-sample.php'); |
|---|
| | 305 | // We'll fail here if the values are no good. |
|---|
| | 306 | require_once('wp-includes/wp-db.php'); |
|---|
| | 307 | printheader(); |
|---|
| | 308 | |
|---|
| | 309 | print "Creating Database Config File: "; |
|---|
| | 310 | |
|---|
| | 311 | $handle = fopen('wp-config.php', 'w'); |
|---|
| | 312 | |
|---|
| | 313 | foreach ($configFile as $line_num => $line) { |
|---|
| | 314 | switch (trim( substr($line,0,16) )) { |
|---|
| | 315 | case "define('DB_NAME'": |
|---|
| | 316 | fwrite($handle, str_replace("wordpress", $dbname, $line)); |
|---|
| | 317 | break; |
|---|
| | 318 | case "define('DB_USER'": |
|---|
| | 319 | fwrite($handle, str_replace("'username'", "'$uname'", $line)); |
|---|
| | 320 | break; |
|---|
| | 321 | case "define('DB_PASSW": |
|---|
| | 322 | fwrite($handle, str_replace("'password'", "'$passwrd'", $line)); |
|---|
| | 323 | break; |
|---|
| | 324 | case "define('DB_HOST'": |
|---|
| | 325 | fwrite($handle, str_replace("localhost", $dbhost, $line)); |
|---|
| | 326 | break; |
|---|
| | 327 | case "define('VHOST',": |
|---|
| | 328 | fwrite($handle, str_replace("VHOSTSETTING", $vhost, $line)); |
|---|
| | 329 | break; |
|---|
| | 330 | case '$table_prefix =': |
|---|
| | 331 | fwrite($handle, str_replace('wp_', $prefix, $line)); |
|---|
| | 332 | break; |
|---|
| | 333 | case '$base = \'BASE\';': |
|---|
| | 334 | fwrite($handle, str_replace('BASE', $base, $line)); |
|---|
| | 335 | break; |
|---|
| | 336 | default: |
|---|
| | 337 | fwrite($handle, $line); |
|---|
| | 338 | break; |
|---|
| | 339 | } |
|---|
| | 340 | } |
|---|
| | 341 | fclose($handle); |
|---|
| | 342 | chmod('wp-config.php', 0644); |
|---|
| | 343 | print "<b style='color: #00aa00; font-weight: bold'>DONE</b><br />"; |
|---|
| | 344 | define( 'VHOST', $vhost ); |
|---|
| 377 | | $email = $wpdb->escape( $_POST[ 'email' ] ); |
|---|
| 378 | | $weblog_title = $wpdb->escape( $_POST[ 'weblog_title' ] ); |
|---|
| 379 | | |
|---|
| 380 | | // set up site tables |
|---|
| 381 | | $wpdb->query( "INSERT INTO ".$wpdb->sitemeta." (meta_id, site_id, meta_key, meta_value) VALUES (NULL, 1, 'admin_email', '".$email."')" ); |
|---|
| 382 | | $wpdb->query( "INSERT INTO ".$wpdb->sitemeta." (meta_id, site_id, meta_key, meta_value) VALUES (NULL, 1, 'admin_user_id', '1')" ); |
|---|
| 383 | | $wpdb->query( "INSERT INTO ".$wpdb->site." ( id, domain, path ) VALUES ( NULL, '$domain', '$base' )" ); |
|---|
| 384 | | $wpdb->query( "INSERT INTO " . $wpdb->sitecategories . " VALUES (1, 'Uncategorized', 'uncategorized', NOW())" ); |
|---|
| 385 | | $wpdb->query( "INSERT INTO " . $wpdb->sitecategories . " VALUES (2, 'Blogroll', 'blogroll', NOW())" ); |
|---|
| 386 | | $wpdb->query( "INSERT INTO ".$wpdb->sitemeta." (meta_id, site_id, meta_key, meta_value) VALUES (NULL, 1, 'upload_filetypes', 'jpg jpeg png gif mp3 mov avi wmv midi mid pdf' )" ); |
|---|
| 387 | | $wpdb->query( "INSERT INTO ".$wpdb->sitemeta." (meta_id, site_id, meta_key, meta_value) VALUES (NULL, 1, 'blog_upload_space', '10' )" ); |
|---|
| 388 | | $wpdb->query( "INSERT INTO ".$wpdb->sitemeta." (meta_id, site_id, meta_key, meta_value) VALUES (NULL, 1, 'fileupload_maxk', '1500' )" ); |
|---|
| 389 | | $wpdb->query( "INSERT INTO ".$wpdb->sitemeta." (meta_id, site_id, meta_key, meta_value) VALUES (NULL, 1, 'site_admins', '" . serialize( array( 'admin' ) ) . "' )" ); |
|---|
| 390 | | $wpdb->query( "INSERT INTO ".$wpdb->sitemeta." (meta_id, site_id, meta_key, meta_value) VALUES (NULL, 1, 'allowed_themes', '" . serialize( array( 'WordPress Classic', 'WordPress Default' ) ) . "' )" ); |
|---|
| 391 | | $wpdb->query( "INSERT INTO ".$wpdb->sitemeta." (meta_id, site_id, meta_key, meta_value) VALUES (NULL, 1, 'illegal_names', '" . serialize( array( "www", "web", "root", "admin", "main", "invite", "administrator" ) ) . "' )" ); |
|---|
| 392 | | $wpdb->query( "INSERT INTO ".$wpdb->sitemeta." (meta_id, site_id, meta_key, meta_value) VALUES (NULL, 1, 'welcome_email', 'Dear User, |
|---|
| | 369 | $email = $wpdb->escape( $_POST[ 'email' ] ); |
|---|
| | 370 | $weblog_title = $wpdb->escape( $_POST[ 'weblog_title' ] ); |
|---|
| | 371 | |
|---|
| | 372 | // set up site tables |
|---|
| | 373 | $wpdb->query( "INSERT INTO ".$wpdb->sitemeta." (meta_id, site_id, meta_key, meta_value) VALUES (NULL, 1, 'admin_email', '".$email."')" ); |
|---|
| | 374 | $wpdb->query( "INSERT INTO ".$wpdb->sitemeta." (meta_id, site_id, meta_key, meta_value) VALUES (NULL, 1, 'admin_user_id', '1')" ); |
|---|
| | 375 | $wpdb->query( "INSERT INTO ".$wpdb->site." ( id, domain, path ) VALUES ( NULL, '$domain', '$base' )" ); |
|---|
| | 376 | $wpdb->query( "INSERT INTO " . $wpdb->sitecategories . " VALUES (1, 'Uncategorized', 'uncategorized', NOW())" ); |
|---|
| | 377 | $wpdb->query( "INSERT INTO " . $wpdb->sitecategories . " VALUES (2, 'Blogroll', 'blogroll', NOW())" ); |
|---|
| | 378 | $wpdb->query( "INSERT INTO ".$wpdb->sitemeta." (meta_id, site_id, meta_key, meta_value) VALUES (NULL, 1, 'upload_filetypes', 'jpg jpeg png gif mp3 mov avi wmv midi mid pdf' )" ); |
|---|
| | 379 | $wpdb->query( "INSERT INTO ".$wpdb->sitemeta." (meta_id, site_id, meta_key, meta_value) VALUES (NULL, 1, 'blog_upload_space', '10' )" ); |
|---|
| | 380 | $wpdb->query( "INSERT INTO ".$wpdb->sitemeta." (meta_id, site_id, meta_key, meta_value) VALUES (NULL, 1, 'fileupload_maxk', '1500' )" ); |
|---|
| | 381 | $wpdb->query( "INSERT INTO ".$wpdb->sitemeta." (meta_id, site_id, meta_key, meta_value) VALUES (NULL, 1, 'site_admins', '" . serialize( array( 'admin' ) ) . "' )" ); |
|---|
| | 382 | $wpdb->query( "INSERT INTO ".$wpdb->sitemeta." (meta_id, site_id, meta_key, meta_value) VALUES (NULL, 1, 'allowed_themes', '" . serialize( array( 'WordPress Classic', 'WordPress Default' ) ) . "' )" ); |
|---|
| | 383 | $wpdb->query( "INSERT INTO ".$wpdb->sitemeta." (meta_id, site_id, meta_key, meta_value) VALUES (NULL, 1, 'illegal_names', '" . serialize( array( "www", "web", "root", "admin", "main", "invite", "administrator" ) ) . "' )" ); |
|---|
| | 384 | $wpdb->query( "INSERT INTO ".$wpdb->sitemeta." (meta_id, site_id, meta_key, meta_value) VALUES (NULL, 1, 'welcome_email', 'Dear User, |
|---|