diff --git a/wp-admin/comment.php b/wp-admin/comment.php index c9eea19116..512e2ee1de 100644 --- a/wp-admin/comment.php +++ b/wp-admin/comment.php @@ -26,7 +26,8 @@ if ( isset( $_POST['deletecomment'] ) ) switch($action) { case 'editcomment': $title = __('Edit Comment'); - $editing = true; + if ( user_can_richedit() ) + wp_enqueue_script( 'wp_tiny_mce' ); require_once ('admin-header.php'); $comment = (int) $_GET['comment']; diff --git a/wp-admin/dbx-admin-key-js.php b/wp-admin/dbx-admin-key-js.php index de7cf9d6a5..bca04cec80 100644 --- a/wp-admin/dbx-admin-key-js.php +++ b/wp-admin/dbx-admin-key-js.php @@ -11,10 +11,12 @@ switch ( $_GET['pagenow'] ) : case 'page-new.php' : $man = 'pagemeta'; break; - case 'link-add.php' : case 'link.php' : $man = 'linkmeta'; break; + default: + exit; + break; endswitch; ?> addLoadEvent( function() {var manager = new dbxManager('');} ); diff --git a/wp-admin/link-add.php b/wp-admin/link-add.php index eaeb3b9348..71ce29429b 100644 --- a/wp-admin/link-add.php +++ b/wp-admin/link-add.php @@ -25,8 +25,9 @@ for ($i=0; $i diff --git a/wp-admin/link.php b/wp-admin/link.php index 3192ea80d2..6e3056d798 100644 --- a/wp-admin/link.php +++ b/wp-admin/link.php @@ -102,8 +102,9 @@ switch ($action) { break; case 'edit' : - wp_enqueue_script( 'xfn' ); - $editing = true; + wp_enqueue_script( array('xfn', 'dbx-admin-key?pagenow=link.php') ); + if ( current_user_can( 'manage_categories' ) ) + wp_enqueue_script( 'ajaxcat' ); $parent_file = 'link-manager.php'; $submenu_file = 'link-manager.php'; $title = __('Edit Bookmark');