diff --git a/apps/bookmarks/ajax/delBookmark.php b/apps/bookmarks/ajax/delBookmark.php index a47bd2b9ea4..99a618a7d14 100644 --- a/apps/bookmarks/ajax/delBookmark.php +++ b/apps/bookmarks/ajax/delBookmark.php @@ -35,18 +35,33 @@ if( !OC_User::isLoggedIn()){ exit(); } -$query = OC_DB::prepare(" - DELETE FROM *PREFIX*bookmarks - WHERE url LIKE ? - AND user_id = ? - "); - $params=array( urldecode($_GET["url"]), OC_User::getUser() ); -$result = $query->execute($params); +$query = OC_DB::prepare(" + SELECT id FROM *PREFIX*bookmarks + WHERE url LIKE ? + AND user_id = ? + "); + +$id = $query->execute($params)->fetchOne(); + +$query = OC_DB::prepare(" + DELETE FROM *PREFIX*bookmarks + WHERE id = $id + "); + +$result = $query->execute(); + + +$query = OC_DB::prepare(" + DELETE FROM *PREFIX*bookmarks_tags + WHERE bookmark_id = $id + "); + +$result = $query->execute(); // var_dump($params); echo json_encode( array( "status" => "success", "data" => array())); diff --git a/apps/contacts/templates/part.details.php b/apps/contacts/templates/part.details.php index 5048349abc5..81b32f2ff56 100644 --- a/apps/contacts/templates/part.details.php +++ b/apps/contacts/templates/part.details.php @@ -30,6 +30,6 @@
- - + <?php echo $l->t('Delete');?> + <?php echo $l->t('Download');?>
diff --git a/apps/files_sharing/get.php b/apps/files_sharing/get.php index e50a319ace4..a1b6c316cd5 100644 --- a/apps/files_sharing/get.php +++ b/apps/files_sharing/get.php @@ -67,7 +67,7 @@ if ($source !== false) { header("Expires: 0"); header("Cache-Control: must-revalidate, post-check=0, pre-check=0"); header("Pragma: public"); - header("Content-Disposition: filename='".basename($source)."'"); + header("Content-Disposition: filename=".basename($source)); header("Content-Type: " . $mimetype); header("Content-Length: " . OC_Filesystem::filesize($source)); //download the file @@ -80,4 +80,4 @@ if ($source !== false) { $tmpl->printPage(); die(); } -?> \ No newline at end of file +?> diff --git a/apps/files_sharing/js/share.js b/apps/files_sharing/js/share.js index 1fae8cbdc95..1bd1ac1075b 100644 --- a/apps/files_sharing/js/share.js +++ b/apps/files_sharing/js/share.js @@ -117,7 +117,7 @@ $(document).ready(function() { cache: false, data: data, success: function() { - var option = ""; + var option = ''; $(user).remove(); $(option).appendTo('#share_with'); $('#share_with').trigger('liszt:updated'); @@ -128,7 +128,7 @@ $(document).ready(function() { $('#makelink').live('change', function() { if (this.checked) { var source = $('#dropdown').data('file'); - var uid_shared_with = "public"; + var uid_shared_with = 'public'; var permissions = 0; var data = 'sources='+encodeURIComponent(source)+'&uid_shared_with='+encodeURIComponent(uid_shared_with)+'&permissions='+encodeURIComponent(permissions); $.ajax({ @@ -144,7 +144,7 @@ $(document).ready(function() { }); } else { var source = $('#dropdown').data('file'); - var uid_shared_with = "public"; + var uid_shared_with = 'public'; var data = 'source='+encodeURIComponent(source)+'&uid_shared_with='+encodeURIComponent(uid_shared_with); $.ajax({ type: 'GET', @@ -165,19 +165,19 @@ $(document).ready(function() { }); function createDropdown(filename, files) { - var html = "