From 5cd89d8bccbacc964b5bd61ad49275c12565d9d8 Mon Sep 17 00:00:00 2001
From: joyqi <magike.net@gmail.com>
Date: Mon, 14 Oct 2013 15:32:46 +0800
Subject: [PATCH] fix upload

---
 admin/file-upload-js.php | 2 +-
 var/Widget/Upload.php    | 2 ++
 2 files changed, 3 insertions(+), 1 deletion(-)

diff --git a/admin/file-upload-js.php b/admin/file-upload-js.php
index 57185e88..daa6f2df 100644
--- a/admin/file-upload-js.php
+++ b/admin/file-upload-js.php
@@ -38,7 +38,7 @@ $(document).ready(function() {
                 .html('<input type="hidden" name="attachment[]" value="' + data.cid + '" />'
                     + '<a class="file" target="_blank" href="<?php $options->adminUrl('media.php'); ?>?cid=' 
                     + data.cid + '">' + data.title + '</a> ' + data.bits
-                    + ' <a class="insert" href="#">' + <?php _e('插入'); ?> + '</a>'
+                    + ' <a class="insert" href="#"><?php _e('插入'); ?></a>'
                     + ' <a class="delete" href="#">&times;</a>')
                 .effect('highlight', '#AACB36', 1000);
             
diff --git a/var/Widget/Upload.php b/var/Widget/Upload.php
index d2d1cb39..db6d2cf5 100644
--- a/var/Widget/Upload.php
+++ b/var/Widget/Upload.php
@@ -318,6 +318,7 @@ class Widget_Upload extends Widget_Abstract_Contents implements Widget_Interface
                         'url'       =>  $this->attachment->url,
                         'permalink' =>  $this->permalink
                     )) . ');</script>';
+                    return;
                 }
             }
         }
@@ -377,6 +378,7 @@ class Widget_Upload extends Widget_Abstract_Contents implements Widget_Interface
                         'url'       =>  $this->attachment->url,
                         'permalink' =>  $this->permalink
                     )) . ');</script>';
+                    return;
                 }
             }
         }