diff options
author | donncha <donncha@7be80a69-a1ef-0310-a953-fb0f7c49ff36> | 2005-11-08 12:13:51 +0000 |
---|---|---|
committer | donncha <donncha@7be80a69-a1ef-0310-a953-fb0f7c49ff36> | 2005-11-08 12:13:51 +0000 |
commit | 1022926b6cfce08b0323044edcb602e942fa80cd (patch) | |
tree | e92999e36b3f73386d44914b2bb56a15b3eda40b /wp-inst/wp-admin | |
parent | e57a203929408d17a888c9e26107a47c10f687a7 (diff) | |
download | wordpress-mu-1022926b6cfce08b0323044edcb602e942fa80cd.tar.gz wordpress-mu-1022926b6cfce08b0323044edcb602e942fa80cd.tar.xz wordpress-mu-1022926b6cfce08b0323044edcb602e942fa80cd.zip |
Updated caching on sitestats.
is_public -> public, make sure to run upgrade script once!
git-svn-id: http://svn.automattic.com/wordpress-mu/trunk@424 7be80a69-a1ef-0310-a953-fb0f7c49ff36
Diffstat (limited to 'wp-inst/wp-admin')
-rw-r--r-- | wp-inst/wp-admin/wpmu-blogs.php | 15 | ||||
-rw-r--r-- | wp-inst/wp-admin/wpmu-edit.php | 19 |
2 files changed, 10 insertions, 24 deletions
diff --git a/wp-inst/wp-admin/wpmu-blogs.php b/wp-inst/wp-admin/wpmu-blogs.php index 3c5a3f8..6f61463 100644 --- a/wp-inst/wp-admin/wpmu-blogs.php +++ b/wp-inst/wp-admin/wpmu-blogs.php @@ -23,9 +23,6 @@ switch( $_GET[ 'action' ] ) { FROM ".$wpdb->blogs." WHERE blog_id = '".$_GET[ 'id' ]."'"; $details = $wpdb->get_row( $query, ARRAY_A ); - $is_archived = get_settings( "is_archived" ); - if( $is_archived == '' ) - $is_archived = 'no'; print "<h2>Edit Blog</h2>"; ?> @@ -51,14 +48,14 @@ switch( $_GET[ 'action' ] ) { </tr> <tr valign="top"> <th scope="row">Public</th> - <td><input type='radio' name='blog[is_public]' value='yes'<?php if( $details[ 'is_public' ] == 'yes' ) echo " checked"?>> Yes - <input type='radio' name='blog[is_public]' value='no'<?php if( $details[ 'is_public' ] == 'no' ) echo " checked"?>> No + <td><input type='radio' name='blog[public]' value='yes'<?php if( $details[ 'public' ] == '1' ) echo " checked"?>> Yes + <input type='radio' name='blog[public]' value='no'<?php if( $details[ 'public' ] == '0' ) echo " checked"?>> No </td> </tr> <tr valign="top"> <th scope="row">Archived</th> - <td><input type='radio' name='option[is_archived]' value='yes'<?php if( $is_archived == 'yes' ) echo " checked"?>> Yes - <input type='radio' name='option[is_archived]' value='no'<?php if( $is_archived == 'no' ) echo " checked"?>> No + <td><input type='radio' name='option[archived]' value='yes'<?php if( $archived == '1' ) echo " checked"?>> Yes + <input type='radio' name='option[archived]' value='no'<?php if( $archived == '0' ) echo " checked"?>> No </td> </tr> <tr><td colspan='2'> @@ -325,7 +322,7 @@ if ($blog_list) { $bgcolor = ''; foreach ($blog_list as $blog) { $class = ('alternate' == $class) ? '' : 'alternate'; - if( get_blog_option( $blog[ 'blog_id' ], "is_archived" ) == 'yes' ) { + if( is_archived( $blog[ 'blog_id' ] ) == '1' ) { ?> <tr style='background: #fee' class='<?php echo $class; ?>'> <?php @@ -389,7 +386,7 @@ foreach($posts_columns as $column_name=>$column_display_name) { break; case 'control_deactivate': - if( get_blog_option( $blog[ 'blog_id' ], "is_archived" ) == 'yes' ) { + if( is_archived( $blog[ 'blog_id' ] ) == '1' ) { ?> <td valign='top'><?php echo "<a href='wpmu-edit.php?action=activateblog&id=".$blog[ 'blog_id' ]."' class='edit' onclick=\"return confirm('" . sprintf(__("You are about to activate this blog?\\n \'OK\' to activate, \'Cancel\' to stop.") ) . "')\">" . __('Activate') . "</a>"; ?></td> <?php diff --git a/wp-inst/wp-admin/wpmu-edit.php b/wp-inst/wp-admin/wpmu-edit.php index 91ae613..8b84764 100644 --- a/wp-inst/wp-admin/wpmu-edit.php +++ b/wp-inst/wp-admin/wpmu-edit.php @@ -133,8 +133,8 @@ switch( $_GET[ 'action' ] ) { path = '".$_POST[ 'blog' ][ 'path' ]."', registered = '".$_POST[ 'blog' ][ 'registered' ]."', last_updated = '".$_POST[ 'blog' ][ 'last_updated' ]."', - is_public = '".$_POST[ 'blog' ][ 'is_public' ]."' - WHERE blog_id = '".$id."'"; + public = '".$_POST[ 'blog' ][ 'public' ]."' + WHERE blog_id = '".$id."'"; $wpdb->query( $query ); } @@ -202,25 +202,14 @@ switch( $_GET[ 'action' ] ) { if( is_site_admin() == false ) { die( __('<p>You do not have permission to access this page.</p>') ); } - $is_archived = $wpdb->get_row( "SELECT option_value FROM {$wpmuBaseTablePrefix}{$_GET[ 'id' ]}_options WHERE option_name = 'is_archived'" ); - $is_archived = get_blog_option( $_GET[ 'id' ], "is_archived" ); - if( $is_archived ) { - update_blog_option( $_GET[ 'id' ], "is_archived", "no" ); - } else { - add_blog_option( $_GET[ 'id' ], "is_archived", "no" ); - } + update_archived( $_GET[ 'id' ], '0' ); header( "Location: wpmu-blogs.php?updated=true" ); break; case "deactivateblog": if( is_site_admin() == false ) { die( __('<p>You do not have permission to access this page.</p>') ); } - $is_archived = get_blog_option( $_GET[ 'id' ], "is_archived" ); - if( $is_archived ) { - update_blog_option( $_GET[ 'id' ], "is_archived", "yes" ); - } else { - add_blog_option( $_GET[ 'id' ], "is_archived", "yes" ); - } + update_archived( $_GET[ 'id' ], '1' ); header( "Location: wpmu-blogs.php?updated=true" ); break; case "updateuser": |