summaryrefslogtreecommitdiffstats
path: root/wp-admin/wpmu-upgrade-site.php
diff options
context:
space:
mode:
authordonncha <donncha@7be80a69-a1ef-0310-a953-fb0f7c49ff36>2007-10-17 17:10:45 +0000
committerdonncha <donncha@7be80a69-a1ef-0310-a953-fb0f7c49ff36>2007-10-17 17:10:45 +0000
commitd2bd94baf9b13c930cd07119c5875750f7bd3a2b (patch)
treeaf0f9b594df80d30dd24054084e756992f54c690 /wp-admin/wpmu-upgrade-site.php
parentb414235e0076d3325c4e7cb916f2a210f5389e9f (diff)
downloadwordpress-mu-d2bd94baf9b13c930cd07119c5875750f7bd3a2b.tar.gz
wordpress-mu-d2bd94baf9b13c930cd07119c5875750f7bd3a2b.tar.xz
wordpress-mu-d2bd94baf9b13c930cd07119c5875750f7bd3a2b.zip
Facelift for wpmu-* courtesy of momo360modena, fixes #446
git-svn-id: http://svn.automattic.com/wordpress-mu/trunk@1092 7be80a69-a1ef-0310-a953-fb0f7c49ff36
Diffstat (limited to 'wp-admin/wpmu-upgrade-site.php')
-rw-r--r--wp-admin/wpmu-upgrade-site.php69
1 files changed, 33 insertions, 36 deletions
diff --git a/wp-admin/wpmu-upgrade-site.php b/wp-admin/wpmu-upgrade-site.php
index 67707f2..114d76c 100644
--- a/wp-admin/wpmu-upgrade-site.php
+++ b/wp-admin/wpmu-upgrade-site.php
@@ -2,33 +2,32 @@
require_once('admin.php');
$http_fopen = ini_get("allow_url_fopen");
-if(!$http_fopen) require_once('../wp-includes/class-snoopy.php');
+if( !$http_fopen ) {
+ require_once('../wp-includes/class-snoopy.php');
+}
-$title = __('WPMU Admin');
+$title = __('WordPress MU &rsaquo; Admin &rsaquo; Upgrade Site');
$parent_file = 'wpmu-admin.php';
require_once('admin-header.php');
+
if( is_site_admin() == false ) {
- die( __('<p>You do not have permission to access this page.</p>') );
-}
-if (isset($_GET['updated'])) {
- ?><div id="message" class="updated fade"><p><?php _e('Options saved.') ?></p></div><?php
+ wp_die( __('<p>You do not have permission to access this page.</p>') );
}
-print '<div class="wrap">';
-switch( $_GET[ 'action' ] ) {
+
+echo '<div class="wrap">';
+echo '<h2>'.__('Upgrade Site').'</h2>';
+switch( $_GET['action'] ) {
case "upgrade":
- if( isset( $_GET[ 'n' ] ) == false ) {
- $n = 0;
- } else {
- $n = intval( $_GET[ 'n' ] );
- }
- $blogs = $wpdb->get_results( "SELECT * FROM $wpdb->blogs WHERE site_id = '$wpdb->siteid' AND spam = '0' AND deleted = '0' AND archived = '0' ORDER BY registered DESC LIMIT $n, 5", ARRAY_A );
+ $n = ( isset($_GET['n']) ) ? intval($_GET['n']) : 0;
+
+ $blogs = $wpdb->get_results( "SELECT * FROM {$wpdb->blogs} WHERE site_id = '{$wpdb->siteid}' AND spam = '0' AND deleted = '0' AND archived = '0' ORDER BY registered DESC LIMIT {$n}, 5", ARRAY_A );
if( is_array( $blogs ) ) {
- print "<ul>";
- foreach( $blogs as $details ) {
- if( $details[ 'spam' ] == 0 && $details[ 'deleted' ] == 0 && $details[ 'archived' ] == 0 ) {
- $siteurl = $wpdb->get_var( "SELECT option_value from {$wpmuBaseTablePrefix}{$details[ 'blog_id' ]}_options WHERE option_name = 'siteurl'" );
- print "<li>$siteurl</li>";
- if($http_fopen) {
+ echo "<ul>";
+ foreach( (array) $blogs as $details ) {
+ if( $details['spam'] == 0 && $details['deleted'] == 0 && $details['archived'] == 0 ) {
+ $siteurl = $wpdb->get_var("SELECT option_value from {$wpmuBaseTablePrefix}{$details['blog_id']}_options WHERE option_name = 'siteurl'");
+ echo "<li>$siteurl</li>";
+ if( $http_fopen ) {
$fp = fopen( $siteurl . "wp-admin/upgrade.php?step=1", "r" );
if( $fp ) {
while( feof( $fp ) == false ) {
@@ -42,32 +41,30 @@ switch( $_GET[ 'action' ] ) {
}
}
}
- print "</ul>";
+ echo "</ul>";
?>
- <p><?php _e("If your browser doesn't start loading the next page automatically click this link:"); ?> <a href="?action=upgrade&n=<?php echo ($n + 5) ?>"><?php _e("Next Blogs"); ?></a> </p>
- <script language='javascript'>
- <!--
-
- function nextpage() {
- location.href="wpmu-upgrade-site.php?action=upgrade&n=<?php echo ($n + 5) ?>";
- }
- setTimeout( "nextpage()", 250 );
-
- //-->
+ <p><?php _e("If your browser doesn't start loading the next page automatically click this link:"); ?> <a href="wpmu-upgrade-site.php?action=upgrade&amp;n=<?php echo ($n + 5) ?>"><?php _e("Next Blogs"); ?></a></p>
+ <script type='text/javascript'>
+ <!--
+ function nextpage() {
+ location.href = "wpmu-upgrade-site.php?action=upgrade&n=<?php echo ($n + 5) ?>";
+ }
+ setTimeout( "nextpage()", 250 );
+ //-->
</script>
<?php
} else {
- _e("All Done!");
+ echo '<p>'.__('All Done!').'</p>';
}
break;
- default:
- ?>
+
+ default: ?>
<p><?php _e("You can upgrade all the blogs on your site through this page. It works by calling the upgrade script of each blog automatically. Hit the link below to upgrade."); ?></p>
<p><a href="wpmu-upgrade-site.php?action=upgrade"><?php _e("Upgrade Site"); ?></a></p>
<?php
break;
-
}
?>
</div>
-<?php include('admin-footer.php'); ?>
+
+<?php include('admin-footer.php'); ?> \ No newline at end of file