1
0
mirror of https://github.com/owncloudarchive/contacts.git synced 2025-01-30 19:52:17 +01:00

Check if the application is actually enabled

This commit is contained in:
Bart Visscher 2011-09-30 23:05:10 +02:00
parent 4ae12c4dab
commit 5866296bce
13 changed files with 13 additions and 0 deletions

View File

@ -28,6 +28,7 @@ $l10n = new OC_L10N('contacts');
// Check if we are a user // Check if we are a user
OC_JSON::checkLoggedIn(); OC_JSON::checkLoggedIn();
OC_JSON::checkAppEnabled('contacts');
$addressbook = OC_Contacts_Addressbook::find( $aid ); $addressbook = OC_Contacts_Addressbook::find( $aid );
if( $addressbook === false || $addressbook['userid'] != OC_USER::getUser()){ if( $addressbook === false || $addressbook['userid'] != OC_USER::getUser()){

View File

@ -28,6 +28,7 @@ $l10n = new OC_L10N('contacts');
// Check if we are a user // Check if we are a user
OC_JSON::checkLoggedIn(); OC_JSON::checkLoggedIn();
OC_JSON::checkAppEnabled('contacts');
$card = OC_Contacts_VCard::find( $id ); $card = OC_Contacts_VCard::find( $id );
if( $card === false ){ if( $card === false ){

View File

@ -29,6 +29,7 @@ $l10n = new OC_L10N('contacts');
// Check if we are a user // Check if we are a user
OC_JSON::checkLoggedIn(); OC_JSON::checkLoggedIn();
OC_JSON::checkAppEnabled('contacts');
$addressbook = OC_Contacts_Addressbook::find( $id ); $addressbook = OC_Contacts_Addressbook::find( $id );
if( $addressbook === false || $addressbook['userid'] != OC_USER::getUser()){ if( $addressbook === false || $addressbook['userid'] != OC_USER::getUser()){

View File

@ -29,6 +29,7 @@ $l10n = new OC_L10N('contacts');
// Check if we are a user // Check if we are a user
OC_JSON::checkLoggedIn(); OC_JSON::checkLoggedIn();
OC_JSON::checkAppEnabled('contacts');
$card = OC_Contacts_VCard::find( $id ); $card = OC_Contacts_VCard::find( $id );
if( $card === false ){ if( $card === false ){

View File

@ -31,6 +31,7 @@ $l10n = new OC_L10N('contacts');
// Check if we are a user // Check if we are a user
OC_JSON::checkLoggedIn(); OC_JSON::checkLoggedIn();
OC_JSON::checkAppEnabled('contacts');
$card = OC_Contacts_VCard::find( $id ); $card = OC_Contacts_VCard::find( $id );
if( $card === false ){ if( $card === false ){

View File

@ -29,6 +29,7 @@ $l10n = new OC_L10N('contacts');
// Check if we are a user // Check if we are a user
OC_JSON::checkLoggedIn(); OC_JSON::checkLoggedIn();
OC_JSON::checkAppEnabled('contacts');
$card = OC_Contacts_VCard::find( $id ); $card = OC_Contacts_VCard::find( $id );

View File

@ -29,6 +29,7 @@ $l10n = new OC_L10N('contacts');
// Check if we are a user // Check if we are a user
OC_JSON::checkLoggedIn(); OC_JSON::checkLoggedIn();
OC_JSON::checkAppEnabled('contacts');
$card = OC_Contacts_VCard::find( $id ); $card = OC_Contacts_VCard::find( $id );
if( $card === false ){ if( $card === false ){

View File

@ -27,6 +27,7 @@ $l10n = new OC_L10N('contacts');
// Check if we are a user // Check if we are a user
OC_JSON::checkLoggedIn(); OC_JSON::checkLoggedIn();
OC_JSON::checkAppEnabled('contacts');
$addressbooks = OC_Contacts_Addressbook::all(OC_USER::getUser()); $addressbooks = OC_Contacts_Addressbook::all(OC_USER::getUser());
$tmpl = new OC_Template('contacts','part.addcardform'); $tmpl = new OC_Template('contacts','part.addcardform');

View File

@ -28,6 +28,7 @@ $l10n = new OC_L10N('contacts');
// Check if we are a user // Check if we are a user
OC_JSON::checkLoggedIn(); OC_JSON::checkLoggedIn();
OC_JSON::checkAppEnabled('contacts');
$card = OC_Contacts_VCard::find( $id ); $card = OC_Contacts_VCard::find( $id );
if( $card === false ){ if( $card === false ){

View File

@ -29,6 +29,7 @@ $l10n = new OC_L10N('contacts');
// Check if we are a user // Check if we are a user
OC_JSON::checkLoggedIn(); OC_JSON::checkLoggedIn();
OC_JSON::checkAppEnabled('contacts');
$card = OC_Contacts_VCard::find( $id ); $card = OC_Contacts_VCard::find( $id );
if( $card === false ){ if( $card === false ){

View File

@ -24,6 +24,7 @@
$RUNTIME_NOSETUPFS = true; $RUNTIME_NOSETUPFS = true;
require_once('../../lib/base.php'); require_once('../../lib/base.php');
OC_Util::checkAppEnabled('contacts');
// Backends // Backends
$authBackend = new OC_Connector_Sabre_Auth(); $authBackend = new OC_Connector_Sabre_Auth();

View File

@ -29,6 +29,7 @@ require_once('../../lib/base.php');
// Check if we are a user // Check if we are a user
OC_Util::checkLoggedIn(); OC_Util::checkLoggedIn();
OC_Util::checkAppEnabled('contacts');
// Check if the user has an addressbook // Check if the user has an addressbook
$addressbooks = OC_Contacts_Addressbook::all(OC_User::getUser()); $addressbooks = OC_Contacts_Addressbook::all(OC_User::getUser());

View File

@ -22,6 +22,7 @@
// Init owncloud // Init owncloud
require_once('../../lib/base.php'); require_once('../../lib/base.php');
OC_Util::checkAppEnabled('contacts');
$id = $_GET['id']; $id = $_GET['id'];