diff options
author | Lukas Reschke <lukas@statuscode.ch> | 2012-06-10 23:38:26 +0200 |
---|---|---|
committer | Lukas Reschke <lukas@statuscode.ch> | 2012-06-10 23:38:26 +0200 |
commit | 9f276729c2a44151c29754e816fb002502222b1d (patch) | |
tree | 3654659364a537eb418d45d15cd40e0433bf533f /apps/bookmarks/ajax | |
parent | 380aab470ff375a8f898b3b9b8375236130209d0 (diff) | |
download | nextcloud-server-9f276729c2a44151c29754e816fb002502222b1d.tar.gz nextcloud-server-9f276729c2a44151c29754e816fb002502222b1d.zip |
Using POST instead of GET.
Diffstat (limited to 'apps/bookmarks/ajax')
-rw-r--r-- | apps/bookmarks/ajax/addBookmark.php | 2 | ||||
-rw-r--r-- | apps/bookmarks/ajax/delBookmark.php | 2 | ||||
-rw-r--r-- | apps/bookmarks/ajax/editBookmark.php | 8 | ||||
-rw-r--r-- | apps/bookmarks/ajax/recordClick.php | 2 | ||||
-rw-r--r-- | apps/bookmarks/ajax/updateList.php | 6 |
5 files changed, 10 insertions, 10 deletions
diff --git a/apps/bookmarks/ajax/addBookmark.php b/apps/bookmarks/ajax/addBookmark.php index 9241dc8ddf6..a2eb506f85e 100644 --- a/apps/bookmarks/ajax/addBookmark.php +++ b/apps/bookmarks/ajax/addBookmark.php @@ -31,5 +31,5 @@ OCP\JSON::checkLoggedIn(); OCP\JSON::checkAppEnabled('bookmarks'); require_once(OC::$APPSROOT . '/apps/bookmarks/bookmarksHelper.php'); -$id = addBookmark($_GET['url'], $_GET['title'], $_GET['tags']); +$id = addBookmark($_POST['url'], $_POST['title'], $_POST['tags']); OCP\JSON::success(array('data' => $id));
\ No newline at end of file diff --git a/apps/bookmarks/ajax/delBookmark.php b/apps/bookmarks/ajax/delBookmark.php index 0b5689811ae..5a067701c9f 100644 --- a/apps/bookmarks/ajax/delBookmark.php +++ b/apps/bookmarks/ajax/delBookmark.php @@ -30,7 +30,7 @@ $RUNTIME_NOSETUPFS=true; OCP\JSON::checkLoggedIn(); OCP\JSON::checkAppEnabled('bookmarks'); -$id = $_GET['id']; +$id = $_POST['id']; if (!OC_Bookmarks_Bookmarks::deleteUrl($id)){ OC_JSON::error(); exit(); diff --git a/apps/bookmarks/ajax/editBookmark.php b/apps/bookmarks/ajax/editBookmark.php index db349af35c1..fcec2e1cedb 100644 --- a/apps/bookmarks/ajax/editBookmark.php +++ b/apps/bookmarks/ajax/editBookmark.php @@ -39,7 +39,7 @@ if( $CONFIG_DBTYPE == 'sqlite' or $CONFIG_DBTYPE == 'sqlite3' ){ $_ut = "UNIX_TIMESTAMP()"; } -$bookmark_id = (int)$_GET["id"]; +$bookmark_id = (int)$_POST["id"]; $query = OCP\DB::prepare(" UPDATE *PREFIX*bookmarks @@ -48,8 +48,8 @@ $query = OCP\DB::prepare(" "); $params=array( - htmlspecialchars_decode($_GET["url"]), - htmlspecialchars_decode($_GET["title"]), + htmlspecialchars_decode($_POST["url"]), + htmlspecialchars_decode($_POST["title"]), ); $query->execute($params); @@ -67,7 +67,7 @@ $query = OCP\DB::prepare(" VALUES (?, ?) "); -$tags = explode(' ', urldecode($_GET["tags"])); +$tags = explode(' ', urldecode($_POST["tags"])); foreach ($tags as $tag) { if(empty($tag)) { //avoid saving blankspaces diff --git a/apps/bookmarks/ajax/recordClick.php b/apps/bookmarks/ajax/recordClick.php index 2bd91f232a4..1eee1718d13 100644 --- a/apps/bookmarks/ajax/recordClick.php +++ b/apps/bookmarks/ajax/recordClick.php @@ -37,7 +37,7 @@ $query = OCP\DB::prepare(" AND url LIKE ? "); -$params=array(OCP\USER::getUser(), htmlspecialchars_decode($_GET["url"])); +$params=array(OCP\USER::getUser(), htmlspecialchars_decode($_POST["url"])); $bookmarks = $query->execute($params); header( "HTTP/1.1 204 No Content" ); diff --git a/apps/bookmarks/ajax/updateList.php b/apps/bookmarks/ajax/updateList.php index c919a5fc439..4de2475d067 100644 --- a/apps/bookmarks/ajax/updateList.php +++ b/apps/bookmarks/ajax/updateList.php @@ -33,11 +33,11 @@ OCP\JSON::checkAppEnabled('bookmarks'); //Filter for tag? -$filterTag = isset($_GET['tag']) ? htmlspecialchars_decode($_GET['tag']) : false; +$filterTag = isset($_POST['tag']) ? htmlspecialchars_decode($_POST['tag']) : false; -$offset = isset($_GET['page']) ? intval($_GET['page']) * 10 : 0; +$offset = isset($_POST['page']) ? intval($_POST['page']) * 10 : 0; -$sort = isset($_GET['sort']) ? ($_GET['sort']) : 'bookmarks_sorting_recent'; +$sort = isset($_POST['sort']) ? ($_POST['sort']) : 'bookmarks_sorting_recent'; if($sort == 'bookmarks_sorting_clicks') { $sqlSortColumn = 'clickcount'; } else { |