1
0
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:
Frank Karlitschek 2012-05-03 12:23:29 +02:00
parent c1cf03ff65
commit 330e1f5a85
5 changed files with 13 additions and 13 deletions

6
ajax/addBookmark.php Normal file → Executable file
View 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));

View File

@ -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()));

View File

@ -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' ){

View File

@ -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
View 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));