diff --git a/wp-admin/edit-form-advanced.php b/wp-admin/edit-form-advanced.php index 69e1b31e8..782a6dfcd 100644 --- a/wp-admin/edit-form-advanced.php +++ b/wp-admin/edit-form-advanced.php @@ -214,7 +214,7 @@ else ' . __('This feature requires iframe support.') . ''; diff --git a/wp-admin/edit-page-form.php b/wp-admin/edit-page-form.php index 462397d9d..6179eb84c 100644 --- a/wp-admin/edit-page-form.php +++ b/wp-admin/edit-page-form.php @@ -148,10 +148,12 @@ edCanvas = document.getElementById('content');

' . __('This feature requires iframe support.') . ''; ?> -
diff --git a/wp-admin/image-uploading.php b/wp-admin/image-uploading.php index 817e1ea2f..e69de29bb 100644 --- a/wp-admin/image-uploading.php +++ b/wp-admin/image-uploading.php @@ -1,624 +0,0 @@ - 4 / 3 ) - return array(128, (int) ($height / $width * 128)); - else - return array((int) ($width / $height * 96), 96); -} - -switch($action) { -case 'delete': - -wp_delete_object($object); - -header("Location: ".basename(__FILE__)."?post=$post&all=$all&action=view&start=$start"); -die; - -case 'save': - -$overrides = array('action'=>'save'); - -$file = wp_handle_upload($_FILES['image'], $overrides); - -if ( isset($file['error']) ) - die($file['error'] . 'Back to Image Uploading'); - -$url = $file['url']; -$file = $file['file']; -$filename = basename($file); - -// Construct the object array -$object = array( - 'post_title' => $imgtitle ? $imgtitle : $filename, - 'post_content' => $descr, - 'post_status' => 'object', - 'post_parent' => $post, - 'post_type' => $_FILES['image']['type'], - 'guid' => $url - ); - -// Save the data -$id = wp_attach_object($object, $post); - -// Generate the object's postmeta. -$imagesize = getimagesize($file); -$imagedata['width'] = $imagesize['0']; -$imagedata['height'] = $imagesize['1']; -list($uwidth, $uheight) = get_udims($imagedata['width'], $imagedata['height']); -$imagedata['hwstring_small'] = "height='$uheight' width='$uwidth'"; -$imagedata['file'] = $file; -$imagedata['thumb'] = "thumb-$filename"; - -add_post_meta($id, 'imagedata', $imagedata); - -if ( $imagedata['width'] * $imagedata['height'] < 3 * 1024 * 1024 ) { - if ( $imagedata['width'] > 128 && $imagedata['width'] >= $imagedata['height'] * 4 / 3 ) - $error = wp_create_thumbnail($file['file'], 128); - elseif ( $imagedata['height'] > 96 ) - $error = wp_create_thumbnail($file, 96); -} - -header("Location: ".basename(__FILE__)."?post=$post&all=$all&action=view&last=true"); -die; - -case 'upload': - -$current_1 = ' class="current"'; -$back = $next = false; -break; - -case 'view': - -// How many images do we show? How many do we query? -$num = 5; -$double = $num * 2; - -if ( $post && empty($all) ) { - $and_post = "AND post_parent = '$post'"; - $current_2 = ' class="current"'; -} else { - $current_3 = ' class="current"'; -} - -if ( $last ) - $start = $wpdb->get_var("SELECT count(ID) FROM $wpdb->posts WHERE post_status = 'object' AND left(post_type, 5) = 'image' $and_post") - $num; -else - $start = (int) $start; - -if ( $start < 0 ) - $start = 0; - -if ( '' == $sort ) - $sort = "ID"; - -$images = $wpdb->get_results("SELECT ID, post_date, post_title, guid FROM $wpdb->posts WHERE post_status = 'object' AND left(post_type, 5) = 'image' $and_post ORDER BY $sort LIMIT $start, $double", ARRAY_A); - -if ( count($images) > $num ) { - $next = $start + count($images) - $num; -} else { - $next = false; -} - -if ( $start > 0 ) { - $back = $start - $num; - if ( $back < 1 ) - $back = '0'; -} else { - $back = false; -} - -$i = 0; -$uwidth_sum = 0; -$images_html = ''; -$images_style = ''; -$images_script = ''; -if ( count($images) > 0 ) { - $images = array_slice( $images, 0, $num ); - $__delete = __('DELETE'); - $__subpost_on = __('SUBPOST ON'); - $__subpost_off = __('SUBPOST OFF'); - $__thumbnail_on = __('THUMBNAIL ON'); - $__thumbnail_off = __('THUMBNAIL OFF'); - $__no_thumbnail = __('THUMBNAIL'); - $__close = __('CLOSE'); - $__confirmdelete = __('Delete this photo from the server?'); - $__nothumb = __('There is no thumbnail associated with this photo.'); - $images_script .= "subposton = '$__subpost_on';\nsubpostoff = '$__subpost_off';\n"; - $images_script .= "thumbnailon = '$__thumbnail_on';\nthumbnailoff = '$__thumbnail_off';\n"; - foreach ( $images as $key => $image ) { - $meta = get_post_meta($image['ID'], 'imagedata', true); - if (!is_array($meta)) { - wp_delete_object($image['ID']); - continue; - } - $image = array_merge($image, $meta); - if ( ($image['width'] > 128 || $image['height'] > 96) && !empty($image['thumb']) && file_exists(dirname($image['file']).'/'.$image['thumb']) ) { - $src = str_replace(basename($image['guid']), '', $image['guid']) . $image['thumb']; - $images_script .= "src".$i."a = '$src';\nsrc".$i."b = '".$image['guid']."';\n"; - $thumb = 'true'; - $thumbtext = $__thumbnail_on; - } else { - $src = $image['guid']; - $thumb = 'false'; - $thumbtext = $__no_thumbnail; - } - list($image['uwidth'], $image['uheight']) = get_udims($image['width'], $image['height']); - $height_width = 'height="'.$image['uheight'].'" width="'.$image['uwidth'].'"'; - $uwidth_sum += 128; - $xpadding = (128 - $image['uwidth']) / 2; - $ypadding = (96 - $image['uheight']) / 2; - $object = $image['ID']; - $images_style .= "#target$i img { padding: {$ypadding}px {$xpadding}px; }\n"; - $href = get_subpost_link($object); - $images_script .= "href".$i."a = '$href';\nhref".$i."b = '{$image['guid']}';\n"; - $images_html .= << - - - {$image[ - -
-HERE; - $i++; - } -} - -$images_width = $uwidth_sum + ( count($images) * 5 ) + 30; - -break; - -case 'flickr': - -require_once ABSPATH . WPINC . '/class-snoopy.php'; - -function flickr_api_call($method, $params = '') { - $api_key = '7cd7b7dea9c9d3069caf99d12471008e'; // An API key reserved for WordPress - $searchurl = 'http://www.flickr.com/services/rest/?method=' . $method . '&api_key=' . $api_key . '&' . $params; - $client = new Snoopy(); - $client->agent = 'WordPress/Flickr Browser'; - $client->read_timeout = 2; - $client->use_gzip = true; - @$client->fetch($searchurl); - return $client->results; -} - -// How many images do we show? How many do we query? -$num = 5; -$double = $num * 2; - -$flickr_user_id = get_user_option('flickr_userid'); -if($flickr_user_id == '') { - $flickr_username = get_user_option('flickr_username'); - $user_xml = flickr_api_call('flickr.people.findByUsername', "username={$flickr_username}"); - if(preg_match('/nsid="(.*?)">/', $user_xml, $matches)) { - $flickr_user_id = $matches[1]; - } - else die("Failed to find Flickr ID for '$flickr_username'"); // Oh, dear - no Flickr user_id! - - // Store the found Flickr user_id in usermeta... - // Don't forget on the options page to update the user_id along with the username! - update_user_option($current_user->id, 'flickr_userid', $flickr_user_id, true); -} - -// Fetch photo list from Flickr -$ustart = $start + 1; -//$photos_xml = flickr_api_call('flickr.photos.search', array('per_page' => $num, 'user_id' => $flickr_user_id)); -if($flickrtag == '') { - $all = '0'; - $photos_xml = flickr_api_call('flickr.people.getPublicPhotos', "per_page={$num}&user_id={$flickr_user_id}&page={$ustart}"); -} -else { - $photos_xml = flickr_api_call('flickr.photos.search', "per_page={$num}&user_id={$flickr_user_id}&page={$ustart}&tags={$flickrtag}"); - $all = '0&flickrtag=' . $flickrtag; -} -//echo "
" . htmlentities($photos_xml) . "
"; // Displays the XML returned by Flickr for the photo list - -//Get Page Count -preg_match('/ 0) $back = $start - 1; else $back = false; -if($last != '') { - $photos_xml = flickr_api_call('flickr.people.getPublicPhotos', "per_page={$num}&user_id={$flickr_user_id}&page={$page_count}"); - $back = $page_count -1; - $next = false; -} - -//Get Photos -preg_match_all('//', $photos_xml, $matches, PREG_SET_ORDER); -foreach($matches as $match) { - $img['post_title'] = $match[4]; - - $sizes_xml = flickr_api_call('flickr.photos.getSizes', "photo_id={$match[1]}"); - preg_match_all('//', $sizes_xml, $sizes, PREG_SET_ORDER); - - $max_size = ''; - foreach($sizes as $size) { - $img_size[$size[1]]['width'] = $size[2]; - $img_size[$size[1]]['height'] = $size[3]; - $img_size[$size[1]]['url'] = $size[4]; - if($max_size == '' || $img_size[$size[1]]['width'] > $img_size[$max_size]['width']) { - $max_size = $size[1]; - } - } - - $images[] = array( - 'post_title' => $match[4], - 'thumbnail' => $img_size['Thumbnail']['url'], - 'full' => $img_size[$max_size]['url'], - 'href' => "http://flickr.com/photos/{$flickr_user_id}/{$match[1]}/", - 'width' => $img_size['Thumbnail']['width'], - 'height' => $img_size['Thumbnail']['height'], - 'size_info' => $img_size, - ); -} - -$current_flickr = ' class="current"'; - -$__use_size = __('Use %s'); -$__close = __('CLOSE'); - -$images_script .= "var flickr_src = new Array();\n"; - -$i=0; -foreach($images as $image) { - list($uwidth, $uheight) = get_udims($image['width'], $image['height']); - $xpadding = (128 - $uwidth) / 2; - $ypadding = (96 - $uheight) / 2; - $height_width = 'height="'.$uheight.'" width="'.$uwidth.'"'; - $images_style .= "#target$i img { padding: {$ypadding}px {$xpadding}px; }\n"; - $images_html .= " -
- - - \"{$image['post_title']}\" - -
- "; - $i++; -} - -$images_width = ( count($images) * 133 ) + 5; - -break; - -default: -die('This script was not meant to be called directly.'); -} - -?> - - - - - - - - - - - - -
-
- -
-
- -
Duplicated filenames will be numbered (photo.jpg, photo1.jpg, etc.)
-
- - - - - - -
- - -
-
- - - - - - diff --git a/wp-admin/profile.php b/wp-admin/profile.php index 862161887..183908335 100644 --- a/wp-admin/profile.php +++ b/wp-admin/profile.php @@ -33,9 +33,6 @@ $bookmarklet_height= 440;

-

-

@@ -56,9 +53,6 @@ $bookmarklet_height= 440; first_name ) && !empty( $profiledata->last_name ) ) : ?> -middle_name ) ) : ?> - -

@@ -73,10 +67,6 @@ $bookmarklet_height= 440;

-

-

diff --git a/wp-admin/wp-admin.css b/wp-admin/wp-admin.css index ff184e7f4..7bf1f8503 100644 --- a/wp-admin/wp-admin.css +++ b/wp-admin/wp-admin.css @@ -156,7 +156,7 @@ textarea, input, select { padding: 3px; } -#imageup { +#uploading { border-style: none; padding: 0px; margin-bottom: 16px; diff --git a/wp-includes/registration-functions.php b/wp-includes/registration-functions.php index 982f818d8..a632fd849 100644 --- a/wp-includes/registration-functions.php +++ b/wp-includes/registration-functions.php @@ -53,15 +53,12 @@ function wp_insert_user($userdata) { clean_user_cache($user_login); update_usermeta( $user_id, 'first_name', $first_name); - update_usermeta( $user_id, 'middle_name', $middle_name); update_usermeta( $user_id, 'last_name', $last_name); update_usermeta( $user_id, 'nickname', $nickname ); update_usermeta( $user_id, 'description', $description ); update_usermeta( $user_id, 'jabber', $jabber ); update_usermeta( $user_id, 'aim', $aim ); update_usermeta( $user_id, 'yim', $yim ); - update_usermeta( $user_id, 'flickr_username', $flickr_username ); - if ( !$update ) { $user = new WP_User($user_id); @@ -92,7 +89,7 @@ function wp_update_user($userdata) { $plaintext_pass = $userdata['user_pass']; $userdata['user_pass'] = md5($userdata['user_pass']); } - + // Merge old and new fields with new fields overwriting old ones. $userdata = array_merge($user, $userdata); $user_id = wp_insert_user($userdata); @@ -125,4 +122,4 @@ function create_user( $username, $password, $email ) { } -?> \ No newline at end of file +?>