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:
parent
4ae12c4dab
commit
5866296bce
@ -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()){
|
||||||
|
@ -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 ){
|
||||||
|
@ -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()){
|
||||||
|
@ -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 ){
|
||||||
|
@ -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 ){
|
||||||
|
@ -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 );
|
||||||
|
@ -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 ){
|
||||||
|
@ -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');
|
||||||
|
@ -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 ){
|
||||||
|
@ -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 ){
|
||||||
|
@ -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();
|
||||||
|
@ -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());
|
||||||
|
Loading…
x
Reference in New Issue
Block a user