From ee81e7ed66a7cca7f39448382b88ae04158516a4 Mon Sep 17 00:00:00 2001 From: Bart Visscher Date: Fri, 30 Sep 2011 23:05:10 +0200 Subject: [PATCH] Check if the application is actually enabled --- addBm.php | 1 + ajax/addBookmark.php | 1 + ajax/delBookmark.php | 1 + ajax/editBookmark.php | 1 + ajax/getMeta.php | 1 + ajax/recordClick.php | 1 + ajax/updateList.php | 1 + index.php | 1 + 8 files changed, 8 insertions(+) diff --git a/addBm.php b/addBm.php index b62fcdfb..a2a39134 100644 --- a/addBm.php +++ b/addBm.php @@ -25,6 +25,7 @@ require_once('../../lib/base.php'); // Check if we are a user OC_Util::checkLoggedIn(); +OC_Util::checkAppEnabled('bookmarks'); require_once('bookmarksHelper.php'); diff --git a/ajax/addBookmark.php b/ajax/addBookmark.php index 9b0beb38..0dc83d90 100644 --- a/ajax/addBookmark.php +++ b/ajax/addBookmark.php @@ -28,6 +28,7 @@ require_once('../../../lib/base.php'); // Check if we are a user OC_JSON::checkLoggedIn(); +OC_JSON::checkAppEnabled('bookmarks'); $CONFIG_DBTYPE = OC_Config::getValue( "dbtype", "sqlite" ); if( $CONFIG_DBTYPE == 'sqlite' or $CONFIG_DBTYPE == 'sqlite3' ){ diff --git a/ajax/delBookmark.php b/ajax/delBookmark.php index afe60f7d..4aef86e7 100644 --- a/ajax/delBookmark.php +++ b/ajax/delBookmark.php @@ -28,6 +28,7 @@ require_once('../../../lib/base.php'); // Check if we are a user OC_JSON::checkLoggedIn(); +OC_JSON::checkAppEnabled('bookmarks'); $params=array( htmlspecialchars_decode($_GET["url"]), diff --git a/ajax/editBookmark.php b/ajax/editBookmark.php index 5125f9ce..b427a175 100644 --- a/ajax/editBookmark.php +++ b/ajax/editBookmark.php @@ -28,6 +28,7 @@ require_once('../../../lib/base.php'); // Check if we are a user OC_JSON::checkLoggedIn(); +OC_JSON::checkAppEnabled('bookmarks'); $CONFIG_DBTYPE = OC_Config::getValue( "dbtype", "sqlite" ); if( $CONFIG_DBTYPE == 'sqlite' or $CONFIG_DBTYPE == 'sqlite3' ){ diff --git a/ajax/getMeta.php b/ajax/getMeta.php index 4583ef20..ca797315 100644 --- a/ajax/getMeta.php +++ b/ajax/getMeta.php @@ -28,6 +28,7 @@ require_once('../../../lib/base.php'); // Check if we are a user OC_JSON::checkLoggedIn(); +OC_JSON::checkAppEnabled('bookmarks'); // $metadata = array(); diff --git a/ajax/recordClick.php b/ajax/recordClick.php index f5f7c20c..e6fdfe04 100644 --- a/ajax/recordClick.php +++ b/ajax/recordClick.php @@ -28,6 +28,7 @@ require_once('../../../lib/base.php'); // Check if we are a user OC_JSON::checkLoggedIn(); +OC_JSON::checkAppEnabled('bookmarks'); $query = OC_DB::prepare(" UPDATE *PREFIX*bookmarks diff --git a/ajax/updateList.php b/ajax/updateList.php index de3480d6..8e9bda0b 100644 --- a/ajax/updateList.php +++ b/ajax/updateList.php @@ -28,6 +28,7 @@ require_once('../../../lib/base.php'); // Check if we are a user OC_JSON::checkLoggedIn(); +OC_JSON::checkAppEnabled('bookmarks'); $params=array(OC_User::getUser()); $CONFIG_DBTYPE = OC_Config::getValue( 'dbtype', 'sqlite' ); diff --git a/index.php b/index.php index 45c9a52f..50fea3fd 100644 --- a/index.php +++ b/index.php @@ -25,6 +25,7 @@ require_once('../../lib/base.php'); // Check if we are a user OC_Util::checkLoggedIn(); +OC_Util::checkAppEnabled('bookmarks'); OC_App::setActiveNavigationEntry( 'bookmarks_index' );