]> source.dussan.org Git - nextcloud-server.git/commitdiff
function isEnabled() added
authorThomas Mueller <thomas.mueller@tmit.eu>
Tue, 13 Nov 2012 19:59:47 +0000 (20:59 +0100)
committerThomas Mueller <thomas.mueller@tmit.eu>
Tue, 13 Nov 2012 19:59:47 +0000 (20:59 +0100)
lib/public/contacts.php

index cfa8d0ace47cf1f94825e9acc74f59b29e5a85b5..5762fd28e02d93c44fa5774962cf4d63c709bf33 100644 (file)
@@ -56,7 +56,7 @@ class Contacts
         * @param array $options - for future use. One should always have options!
         * @return array of contacts which are arrays of key-value-pairs
         */
-       static function search($pattern, $searchProperties = array(), $options = array()) {
+       public static function search($pattern, $searchProperties = array(), $options = array()) {
 
                // dummy results
                return array(
@@ -71,7 +71,7 @@ class Contacts
         * @param object $id the unique identifier to a contact
         * @return bool successful or not
         */
-       static function delete($id) {
+       public static function delete($id) {
                return false;
        }
 
@@ -82,7 +82,7 @@ class Contacts
         * @param array $properties this array if key-value-pairs defines a contact
         * @return array representing the contact just created or updated
         */
-       static function createOrUpdate($properties) {
+       public static function createOrUpdate($properties) {
 
                // dummy
                return array('id'    => 0, 'FN' => 'Thomas Müller', 'EMAIL' => 'a@b.c',
@@ -90,4 +90,14 @@ class Contacts
                             'ADR'   => ';;123 Main Street;Any Town;CA;91921-1234'
                );
        }
+
+       /**
+        * Check if contacts are available (e.g. contacts app enabled)
+        *
+        * @return bool true if enabled, false if not
+        */
+       public static function isEnabled() {
+               return false;
+       }
+
 }