mirror of
https://github.com/owncloud/bookmarks.git
synced 2025-01-18 14:52:10 +01:00
ported oc_json
This commit is contained in:
parent
c1cf03ff65
commit
330e1f5a85
6
ajax/addBookmark.php
Normal file → Executable file
6
ajax/addBookmark.php
Normal file → Executable file
@ -27,9 +27,9 @@ $RUNTIME_NOSETUPFS=true;
|
||||
|
||||
|
||||
// Check if we are a user
|
||||
OC_JSON::checkLoggedIn();
|
||||
OC_JSON::checkAppEnabled('bookmarks');
|
||||
OCP\JSON::checkLoggedIn();
|
||||
OCP\JSON::checkAppEnabled('bookmarks');
|
||||
|
||||
require_once(OC::$APPSROOT . '/apps/bookmarks/bookmarksHelper.php');
|
||||
$id = addBookmark($_GET['url'], $_GET['title'], $_GET['tags']);
|
||||
OC_JSON::success(array('data' => $id));
|
||||
OCP\JSON::success(array('data' => $id));
|
@ -27,8 +27,8 @@ $RUNTIME_NOSETUPFS=true;
|
||||
|
||||
|
||||
// Check if we are a user
|
||||
OC_JSON::checkLoggedIn();
|
||||
OC_JSON::checkAppEnabled('bookmarks');
|
||||
OCP\JSON::checkLoggedIn();
|
||||
OCP\JSON::checkAppEnabled('bookmarks');
|
||||
|
||||
$params=array(
|
||||
htmlspecialchars_decode($_GET["url"]),
|
||||
@ -59,4 +59,4 @@ $query = OC_DB::prepare("
|
||||
$result = $query->execute();
|
||||
// var_dump($params);
|
||||
|
||||
OC_JSON::success(array('data' => array()));
|
||||
OCP\JSON::success(array('data' => array()));
|
||||
|
@ -27,8 +27,8 @@ $RUNTIME_NOSETUPFS=true;
|
||||
|
||||
|
||||
// Check if we are a user
|
||||
OC_JSON::checkLoggedIn();
|
||||
OC_JSON::checkAppEnabled('bookmarks');
|
||||
OCP\JSON::checkLoggedIn();
|
||||
OCP\JSON::checkAppEnabled('bookmarks');
|
||||
|
||||
$CONFIG_DBTYPE = OCP\Config::getSystemValue( "dbtype", "sqlite" );
|
||||
if( $CONFIG_DBTYPE == 'sqlite' or $CONFIG_DBTYPE == 'sqlite3' ){
|
||||
|
@ -27,8 +27,8 @@ $RUNTIME_NOSETUPFS=true;
|
||||
|
||||
|
||||
// Check if we are a user
|
||||
OC_JSON::checkLoggedIn();
|
||||
OC_JSON::checkAppEnabled('bookmarks');
|
||||
OCP\JSON::checkLoggedIn();
|
||||
OCP\JSON::checkAppEnabled('bookmarks');
|
||||
|
||||
$query = OC_DB::prepare("
|
||||
UPDATE *PREFIX*bookmarks
|
||||
|
6
ajax/updateList.php
Normal file → Executable file
6
ajax/updateList.php
Normal file → Executable file
@ -28,8 +28,8 @@ $RUNTIME_NOSETUPFS=true;
|
||||
|
||||
|
||||
// Check if we are a user
|
||||
OC_JSON::checkLoggedIn();
|
||||
OC_JSON::checkAppEnabled('bookmarks');
|
||||
OCP\JSON::checkLoggedIn();
|
||||
OCP\JSON::checkAppEnabled('bookmarks');
|
||||
|
||||
|
||||
//Filter for tag?
|
||||
@ -47,4 +47,4 @@ if($sort == 'bookmarks_sorting_clicks') {
|
||||
|
||||
$bookmarks = OC_Bookmarks_Bookmarks::findBookmarks($offset, $sqlSortColumn, $filterTag, true);
|
||||
|
||||
OC_JSON::success(array('data' => $bookmarks));
|
||||
OCP\JSON::success(array('data' => $bookmarks));
|
||||
|
Loading…
x
Reference in New Issue
Block a user