From 8c07d3bd1d97142d41c2b1f415bcb1c66904c502 Mon Sep 17 00:00:00 2001 From: ryan Date: Fri, 28 Oct 2005 08:43:23 +0000 Subject: [PATCH] Give a little love to the bookmarklet. git-svn-id: http://svn.automattic.com/wordpress/trunk@2972 1a063a9b-81f0-0310-95a4-ce76da25c4cd --- wp-admin/bookmarklet.php | 52 +++++++++++++++++++--------------------- 1 file changed, 24 insertions(+), 28 deletions(-) diff --git a/wp-admin/bookmarklet.php b/wp-admin/bookmarklet.php index 2562ae21e..195e35ccf 100644 --- a/wp-admin/bookmarklet.php +++ b/wp-admin/bookmarklet.php @@ -5,8 +5,7 @@ require_once('admin.php'); if ( ! current_user_can('edit_posts') ) die ("Cheatin' uh?"); -if ('b' == $a) { - +if ('b' == $a): ?> @@ -19,33 +18,32 @@ window.close() post_title = stripslashes($post_title); +else + $post->post_title = $popuptitle; + + +$content = wp_specialchars($_REQUEST['content']); +$popupurl = wp_specialchars($_REQUEST['popupurl']); if ( !empty($content) ) { - $content = wp_specialchars( stripslashes($_REQUEST['content']) ); + $post->post_content = wp_specialchars( stripslashes($_REQUEST['content']) ); } else { - $content = ''.$popuptitle.''."\n$text"; + $post->post_content = ''.$popuptitle.''."\n$text"; } - + /* /big funky fixes */ ?> @@ -103,6 +101,4 @@ window.close() - +