diff -urN wordpress-mu-1.3/wp-admin/options-writing.php wordpress-mu-1.3.2/wp-admin/options-writing.php
--- wordpress-mu-1.3/wp-admin/options-writing.php 2007-10-12 18:21:15.000000000 +0200
+++ wordpress-mu-1.3.2/wp-admin/options-writing.php 2008-01-23 02:31:58.000000000 +0100
@@ -10,7 +10,8 @@
diff -urN wordpress-mu-1.3/wp-admin/setup-config.php wordpress-mu-1.3.2/wp-admin/setup-config.php
--- wordpress-mu-1.3/wp-admin/setup-config.php 2007-10-30 17:49:38.000000000 +0100
+++ wordpress-mu-1.3.2/wp-admin/setup-config.php 2008-01-02 17:00:05.000000000 +0100
@@ -4,6 +4,7 @@
require_once('../wp-includes/compat.php');
require_once('../wp-includes/functions.php');
+require_once('../wp-includes/classes.php');
if (!file_exists('../wp-config-sample.php'))
wp_die('Sorry, I need a wp-config-sample.php file to work from. Please re-upload this file from your WordPress installation.');
@@ -162,6 +163,9 @@
// We'll fail here if the values are no good.
require_once('../wp-includes/wp-db.php');
+ if ( !empty($wpdb->error) )
+ wp_die($wpdb->error->get_error_message());
+
$handle = fopen('../wp-config.php', 'w');
foreach ($configFile as $line_num => $line) {
diff -urN wordpress-mu-1.3/wp-admin/upload-functions.php wordpress-mu-1.3.2/wp-admin/upload-functions.php
--- wordpress-mu-1.3/wp-admin/upload-functions.php 2007-08-06 11:35:24.000000000 +0200
+++ wordpress-mu-1.3.2/wp-admin/upload-functions.php 1970-01-01 01:00:00.000000000 +0100
@@ -1,360 +0,0 @@
-post_content ));
-
- $class = 'text';
- $innerHTML = get_attachment_innerHTML( $id, false, $dims );
- if ( $image_src = get_attachment_icon_src() ) {
- $image_rel = wp_make_link_relative($image_src);
- $innerHTML = ' ' . str_replace($image_src, $image_rel, $innerHTML);
- $class = 'image';
- }
-
- $src_base = wp_get_attachment_url();
- $src = wp_make_link_relative( $src_base );
- $src_base = str_replace($src, '', $src_base);
-
- $r = '';
-
- if ( $href )
- $r .= "
\n";
- if ( $href || $image_src )
- $r .= "\t\t\t$innerHTML";
- if ( $href )
- $r .= "\n";
- $r .= "\n\t\t
\n\t\t\t
\n";
- $r .= "\t\t\t\t\n";
- $r .= "\t\t\t\t\n";
-
- if ( !$thumb_base = wp_get_attachment_thumb_url() )
- $thumb_base = wp_mime_type_icon();
- if ( $thumb_base ) {
- $thumb_rel = wp_make_link_relative( $thumb_base );
- $thumb_base = str_replace( $thumb_rel, '', $thumb_base );
- $r .= "\t\t\t\t\n";
- $r .= "\t\t\t\t\n";
- }
-
- $r .= "\t\t\t\t\n";
-
- if ( isset($width) ) {
- $r .= "\t\t\t\t\n";
- $r .= "\t\t\t\t\n";
- }
- $r .= "\t\t\t\t\n";
- $r .= "\t\t\t\t\n";
- $r .= "\t\t\t\t\n";
- $r .= "\t\t\t
\n\t\t
\n";
- return $r;
-}
-
-function wp_upload_view() {
- global $style, $post_id, $style;
- $id = get_the_ID();
- $attachment_data = wp_get_attachment_metadata( $id );
-?>
-
-
-
";
- the_title();
- if ( !isset($attachment_data['width']) && 'inline' != $style )
- echo '';
- ?>
-
' . __('view') . '';
- echo ' | ';
- echo '' . __('edit') . '';
- echo ' | ';
- echo '' . __('cancel') . '';
- echo ' ]'; ?>
-
-
-
-";
- echo wp_upload_display( array(171, 128) );
- if ( isset($attachment_data['width']) && 'inline' != $style )
- echo ''; ?>
-
-
-
-
\n";
-}
-
-function wp_upload_form() {
- $id = get_the_ID();
- global $post_id, $tab, $style;
- $enctype = $id ? '' : ' enctype="multipart/form-data"';
- $post_id = (int) $post_id;
-?>
-
-"
- . __('Browse Files') . ''
- );
-
- $overrides = array('action'=>'upload');
-
- $file = wp_handle_upload($_FILES['image'], $overrides);
-
- if ( isset($file['error']) )
- wp_die($file['error'] . "
" . __('Back to Image Uploading') . ''
- );
-
- $url = $file['url'];
- $type = $file['type'];
- $file = $file['file'];
- $filename = basename($file);
-
- // Construct the attachment array
- $attachment = array(
- 'post_title' => $post_title ? $post_title : $filename,
- 'post_content' => $post_content,
- 'post_type' => 'attachment',
- 'post_parent' => $post_id,
- 'post_mime_type' => $type,
- 'guid' => $url
- );
-
- // Save the data
- $id = wp_insert_attachment($attachment, $file, $post_id);
-
- wp_update_attachment_metadata( $id, wp_generate_attachment_metadata( $id, $file ) );
-
- wp_redirect( get_option('siteurl') . "/wp-admin/upload.php?style=$style&tab=browse&action=view&ID=$id&post_id=$post_id");
- die;
- break;
-
- case 'save' :
- global $from_tab, $post_id, $style;
- if ( !$from_tab )
- $from_tab = 'upload';
- check_admin_referer( 'inlineuploading' );
-
- wp_update_post($_POST);
- wp_redirect( get_option('siteurl') . "/wp-admin/upload.php?style=$style&tab=$from_tab&post_id=$post_id");
- die;
- break;
-
- case 'delete' :
- global $ID, $post_id, $from_tab, $style;
- if ( !$from_tab )
- $from_tab = 'upload';
-
- check_admin_referer( 'inlineuploading' );
-
- if ( !current_user_can('edit_post', (int) $ID) )
- wp_die( __('You are not allowed to delete this attachment.')
- . "
"
- . __('Go back') . ''
- );
-
- wp_delete_attachment($ID);
-
- wp_redirect( get_option('siteurl') . "/wp-admin/upload.php?style=$style&tab=$from_tab&post_id=$post_id" );
- die;
- break;
-
- endswitch;
-}
-
-add_action( 'upload_files_upload', 'wp_upload_tab_upload_action' );
-
-function wp_upload_grab_attachments( $obj ) {
- $obj->is_attachment = true;
-}
-
-function wp_upload_posts_where( $where ) {
- global $post_id;
- return $where . " AND post_parent = '" . (int) $post_id . "'";
-}
-
-function wp_upload_tab_browse() {
- global $wpdb, $action, $paged;
- $old_vars = compact( 'paged' );
-
- switch ( $action ) :
- case 'edit' :
- case 'view' :
- global $ID;
- $attachments = query_posts("attachment_id=$ID");
- if ( have_posts() ) : while ( have_posts() ) : the_post();
- 'edit' == $action ? wp_upload_form() : wp_upload_view();
- endwhile; endif;
- break;
- default :
- global $tab, $post_id, $style;
- add_action( 'pre_get_posts', 'wp_upload_grab_attachments' );
- if ( 'browse' == $tab && $post_id )
- add_filter( 'posts_where', 'wp_upload_posts_where' );
- $attachments = query_posts("what_to_show=posts&posts_per_page=10&paged=$paged");
- $count_query = "SELECT COUNT(*) FROM $wpdb->posts WHERE post_type = 'attachment'";
- if ( $post_id )
- $count_query .= " AND post_parent = '$post_id'";
- $total = $wpdb->get_var($count_query);
-
- echo "
\n";
- if ( have_posts() ) : while ( have_posts() ) : the_post();
- $href = wp_specialchars( add_query_arg( array(
- 'action' => 'inline' == $style ? 'view' : 'edit',
- 'ID' => get_the_ID())
- ), 1 );
-
- echo "\t- \n";
- echo wp_upload_display( array(128,128), $href );
- echo "\t
\n";
- endwhile;
- else :
- echo "\t- " . __('There are no attachments to show.') . "
\n";
- endif;
- echo "
\n\n";
-
- echo "
\n";
- break;
- endswitch;
-
- extract($old_vars);
-}
-
-
-function wp_upload_tab_browse_action() {
- global $style;
- if ( 'inline' == $style )
- wp_enqueue_script('upload');
-}
-
-add_action( 'upload_files_browse', 'wp_upload_tab_browse_action' );
-add_action( 'upload_files_browse-all', 'wp_upload_tab_browse_action' );
-
-function wp_upload_admin_head() {
- global $wp_locale;
- echo "
\n";
- if ( 'rtl' == $wp_locale->text_direction )
- echo "
\n";
- if ( 'inline' == @$_GET['style'] ) {
- echo "";
- }
-}
-
-?>
diff -urN wordpress-mu-1.3/wp-admin/users.php wordpress-mu-1.3.2/wp-admin/users.php
--- wordpress-mu-1.3/wp-admin/users.php 2007-10-30 17:49:38.000000000 +0100
+++ wordpress-mu-1.3.2/wp-admin/users.php 2008-01-02 18:49:22.000000000 +0100
@@ -255,7 +255,7 @@
check_admin_referer('remove-users');
if ( empty($_POST['users']) ) {
- header('Location: users.php');
+ wp_redirect('users.php');
}
if ( !current_user_can('edit_users') )
@@ -272,7 +272,7 @@
remove_user_from_blog($id);
}
- header('Location: users.php?update=' . $update);
+ wp_redirect('users.php?update=' . $update);
break;
@@ -281,7 +281,7 @@
check_admin_referer('bulk-users');
if (empty($_POST['users'])) {
- header('Location: users.php');
+ wp_redirect('users.php');
}
if ( !current_user_can('edit_users') )
@@ -356,14 +356,14 @@
do_action( "added_existing_user", $user_id );
$location = 'users.php?update=add';
}
- header("Location: $location");
+ wp_redirect("$location");
die();
} else {
- header('Location: users.php?update=notfound' );
+ wp_redirect('users.php?update=notfound' );
die();
}
}
- header('Location: users.php');
+ wp_redirect('users.php');
die();
break;
default:
diff -urN wordpress-mu-1.3/wp-admin/widgets.php wordpress-mu-1.3.2/wp-admin/widgets.php
--- wordpress-mu-1.3/wp-admin/widgets.php 2007-10-12 18:21:15.000000000 +0200
+++ wordpress-mu-1.3.2/wp-admin/widgets.php 2008-01-02 18:06:33.000000000 +0100
@@ -44,7 +44,6 @@
$widget ) : ?>
jQuery('#popper').click(function() {popControl('#control');});
jQuery('#closer').click(function() {unpopControl('#control');});
- jQuery('#control').Draggable({handle: '.controlhandle', zIndex: 1000});
if ( true && window.opera )
jQuery('#control').css('border','1px solid #bbb');
diff -urN wordpress-mu-1.3/wp-admin/wpmu-blogs.php wordpress-mu-1.3.2/wp-admin/wpmu-blogs.php
--- wordpress-mu-1.3/wp-admin/wpmu-blogs.php 2007-10-26 18:50:19.000000000 +0200
+++ wordpress-mu-1.3.2/wp-admin/wpmu-blogs.php 2008-01-23 19:17:00.000000000 +0100
@@ -5,7 +5,6 @@
$parent_file = 'wpmu-admin.php';
wp_enqueue_script( 'listman' );
require_once('admin-header.php');
-
if( is_site_admin() == false ) {
wp_die( __('
You do not have permission to access this page.
') );
}
@@ -80,12 +79,13 @@