Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- --- /var/applications/wordpress/0.70/plugins/moderate-new-blogs/ds_wp3_moderate_new_blogs.php 2011-03-07 15:05:18.000000000 -0500
- +++ /var/applications/wordpress/production/plugins/moderate-new-blogs/ds_wp3_moderate_new_blogs.php 2011-06-21 11:08:51.000000000 -0400
- @@ -1,5 +1,10 @@
- <?php
- /*
- +
- +Plugin no longer works as downloaded. Editing by irifkin@brandeis.edu.
- +Changed URL paths to new network ones.
- +Changed URL paths to include nonce.
- +
- Plugin Name: Moderate New Blogs
- Plugin URI: http://dsader.snowotherway.org/wordpress-plugins/moderate-new-blogs/
- Description: New blogs await a final click from a Super Admin to activate. Keep blog registration enabled and open, keep Super Admin email notices enabled, and this keeps new blogs queued in SuperAdmin-->Sites "Awaiting Moderation". WP3.x only
- @@ -36,11 +41,11 @@
- // blogs awaiting activation
- $blogs = $wpdb->get_results( $wpdb->prepare("SELECT blog_id, domain, path FROM $wpdb->blogs WHERE site_id = %d AND deleted = '2' ", $wpdb->siteid ) , ARRAY_A );
- if( is_array( $blogs ) ) {
- - echo '<div id="update-nag">The following blogs are "Awaiting Moderation" at <a href="'.admin_url().'ms-sites.php">Site Admin->Blogs</a> (or click to activate): ';
- + echo '<div id="update-nag">The following blogs are "Awaiting Moderation" at <a href="'.admin_url().'sites.php">Site Admin->Blogs</a> (or click to activate): ';
- $list = array();
- foreach( $blogs as $details ) {
- $blogname = get_blog_option( $details[ 'blog_id' ], 'blogname' );
- - $list[] = '<a class="delete" href="ms-edit.php?action=confirm&action2=activateblog&ref='. urlencode( $_SERVER['REQUEST_URI'] ) .'&id='. $details['blog_id'] .'&msg='. urlencode( sprintf( __( "You are about to activate the blog %s" ), $blogname ) ) .'">'. $blogname .'</a>';
- + $list[] = '<a class="delete" href="edit.php?action=confirm&action2=activateblog&ref='. urlencode( $_SERVER['REQUEST_URI'] ) .'&id='. $details['blog_id'] .'&msg='. urlencode( sprintf( __( "You are about to activate the blog %s" ), $blogname ) ) .'&_wpnonce='. wp_create_nonce('confirm') .'">'. $blogname .'</a>';
- }
- if (count($list))
- echo implode(' | ', $list);
- @@ -49,12 +54,12 @@
- // blogs waiting to be deleted
- $blogs = $wpdb->get_results( $wpdb->prepare("SELECT blog_id, domain, path FROM $wpdb->blogs WHERE site_id = %d AND deleted = '1' ", $wpdb->siteid ) , ARRAY_A );
- if( is_array( $blogs ) ) {
- - echo '<div id="update-nag">The following blogs are "Awaiting Deletion" at <a href="'.admin_url().'ms-sites.php">Site Admin->Blogs</a> (or click to delete): ';
- + echo '<div id="update-nag">The following blogs are "Awaiting Deletion" at <a href="'.admin_url().'network/sites.php">Site Admin->Blogs</a> (or click to delete): ';
- $list = array();
- foreach( $blogs as $details ) {
- $blogname = get_blog_option( $details[ 'blog_id' ], 'blogname' );
- - $list[] = '<a class="delete" href="ms-edit.php?action=confirm&action2=deleteblog&id=' . $details['blog_id'] . '&msg=' . urlencode( sprintf( __( "You are about to delete the blog %s" ), $blogname ) ) . '">' . $blogname . '</a>';
- + $list[] = '<a class="delete" href="edit.php?action=confirm&action2=deleteblog&id=' . $details['blog_id'] . '&msg=' . urlencode( sprintf( __( "You are about to delete the blog %s" ), $blogname ) ) .'&_wpnonce='. wp_create_nonce('confirm') . '">' . $blogname . '</a>';
- }
- if (count($list))
- echo implode(' | ', $list);
- @@ -78,7 +83,7 @@
- function wpmu_blogs_actions() {
- global $blog, $blogname;
- if ( get_blog_status( $blog['blog_id'], "deleted" ) == '2' ) {
- - ?><span class="delete"><a href="ms-edit.php?action=confirm&action2=activateblog&ref=<?php echo urlencode( $_SERVER['REQUEST_URI'] ) ?>&id=<?php echo $blog['blog_id'] ?>&msg=<?php echo urlencode( sprintf( __( "You are about to activate the blog %s" ), $blogname ) ) ?>"><?php _e("Awaiting Moderation") ?></a></span>
- + ?><span class="delete"><a href="edit.php?action=confirm&action2=activateblog&ref=<?php echo urlencode( $_SERVER['REQUEST_URI'] ) ?>&id=<?php echo $blog['blog_id'] ?>&msg=<?php echo urlencode( sprintf( __( "You are about to activate the blog %s" ), $blogname ) ) .'&_wpnonce='. wp_create_nonce('confirm') ?>"><?php _e("Awaiting Moderation") ?></a></span>
- <?php
- }
- }
- @@ -91,7 +96,7 @@
- <table class="form-table">
- <tr valign="top">
- <th scope="row">' . __('Moderation Enabled') . '</th>
- - <td><input type="checkbox" name="ds_moderate_blog_signup" value="2" ' . $checked . ' /><br /><small>' . __('New sites await a final click from a Super Admin to <a href="/wp-admin/ms-sites.php">Activate</a>') . '</small>
- + <td><input type="checkbox" name="ds_moderate_blog_signup" value="2" ' . $checked . ' /><br /><small>' . __('New sites await a final click from a Super Admin to <a href="/wp-admin/network/sites.php">Activate</a>') . '</small>
- </td>
- </tr>
- </table>
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement