diff options
author | Frank Karlitschek <frank@owncloud.org> | 2012-05-02 00:50:26 +0200 |
---|---|---|
committer | Frank Karlitschek <frank@owncloud.org> | 2012-05-02 00:50:26 +0200 |
commit | 2fe646dcec08b36179aa2b6ebca447a20e409b03 (patch) | |
tree | e5b909e88d9271e3301c9db3fea8771d059a914d /apps/contacts | |
parent | c94f39b488f9ae6bd24cbdbb5cfa877e29f199e3 (diff) | |
download | nextcloud-server-2fe646dcec08b36179aa2b6ebca447a20e409b03.tar.gz nextcloud-server-2fe646dcec08b36179aa2b6ebca447a20e409b03.zip |
ported the oc_app calls
Diffstat (limited to 'apps/contacts')
-rwxr-xr-x | apps/contacts/ajax/uploadimport.php | 2 | ||||
-rwxr-xr-x | apps/contacts/appinfo/app.php | 6 | ||||
-rwxr-xr-x | apps/contacts/import.php | 2 | ||||
-rwxr-xr-x | apps/contacts/index.php | 2 | ||||
-rwxr-xr-x | apps/contacts/lib/app.php | 2 | ||||
-rwxr-xr-x | apps/contacts/lib/search.php | 2 | ||||
-rwxr-xr-x | apps/contacts/lib/vcard.php | 4 |
7 files changed, 10 insertions, 10 deletions
diff --git a/apps/contacts/ajax/uploadimport.php b/apps/contacts/ajax/uploadimport.php index e2bc6d7290b..51ae949b680 100755 --- a/apps/contacts/ajax/uploadimport.php +++ b/apps/contacts/ajax/uploadimport.php @@ -34,7 +34,7 @@ function debug($msg) { OCP\Util::writeLog('contacts','ajax/uploadimport.php: '.$msg, OCP\Util::DEBUG); } -$view = OC_App::getStorage('contacts'); +$view = OCP\App::getStorage('contacts'); $tmpfile = md5(rand()); // If it is a Drag'n'Drop transfer it's handled here. diff --git a/apps/contacts/appinfo/app.php b/apps/contacts/appinfo/app.php index 87c36959743..4808ea5fa83 100755 --- a/apps/contacts/appinfo/app.php +++ b/apps/contacts/appinfo/app.php @@ -9,12 +9,12 @@ OC_HOOK::connect('OC_User', 'post_deleteUser', 'OC_Contacts_Hooks', 'deleteUser' OC_HOOK::connect('OC_Calendar', 'getEvents', 'OC_Contacts_Hooks', 'getBirthdayEvents'); OC_HOOK::connect('OC_Calendar', 'getSources', 'OC_Contacts_Hooks', 'getCalenderSources'); -OC_App::register( array( +OCP\App::register( array( 'order' => 10, 'id' => 'contacts', 'name' => 'Contacts' )); -OC_App::addNavigationEntry( array( +OCP\App::addNavigationEntry( array( 'id' => 'contacts_index', 'order' => 10, 'href' => OCP\Util::linkTo( 'contacts', 'index.php' ), @@ -22,6 +22,6 @@ OC_App::addNavigationEntry( array( 'name' => OC_L10N::get('contact')->t('Contacts') )); -OC_APP::registerPersonal('contacts','settings'); +OCP\App::registerPersonal('contacts','settings'); OCP\Util::addscript('contacts', 'loader'); OC_Search::registerProvider('OC_Search_Provider_Contacts'); diff --git a/apps/contacts/import.php b/apps/contacts/import.php index 95f17a8896f..9355f8b9f70 100755 --- a/apps/contacts/import.php +++ b/apps/contacts/import.php @@ -19,7 +19,7 @@ if(is_writable('import_tmp/')){ } $view = $file = null; if(isset($_POST['fstype']) && $_POST['fstype'] == 'OC_FilesystemView') { - $view = OC_App::getStorage('contacts'); + $view = OCP\App::getStorage('contacts'); $file = $view->file_get_contents('/' . $_POST['file']); } else { $file = OC_Filesystem::file_get_contents($_POST['path'] . '/' . $_POST['file']); diff --git a/apps/contacts/index.php b/apps/contacts/index.php index c018fca764a..8e3c2faf012 100755 --- a/apps/contacts/index.php +++ b/apps/contacts/index.php @@ -19,7 +19,7 @@ $contacts = OC_Contacts_VCard::all($ids); $addressbooks = OC_Contacts_Addressbook::active(OCP\USER::getUser()); // Load the files we need -OC_App::setActiveNavigationEntry( 'contacts_index' ); +OCP\App::setActiveNavigationEntry( 'contacts_index' ); // Load a specific user? $id = isset( $_GET['id'] ) ? $_GET['id'] : null; diff --git a/apps/contacts/lib/app.php b/apps/contacts/lib/app.php index 4e840026ce3..636b9a84b9d 100755 --- a/apps/contacts/lib/app.php +++ b/apps/contacts/lib/app.php @@ -53,7 +53,7 @@ class OC_Contacts_App { $vcard = OC_VObject::parse($card['carddata']); // Try to fix cards with missing 'N' field from pre ownCloud 4. Hot damn, this is ugly... if(!is_null($vcard) && !$vcard->__isset('N')) { - $appinfo = OC_App::getAppInfo('contacts'); + $appinfo = OCP\App::getAppInfo('contacts'); if($appinfo['version'] >= 5) { OCP\Util::writeLog('contacts','OC_Contacts_App::getContactVCard. Deprecated check for missing N field', OCP\Util::DEBUG); } diff --git a/apps/contacts/lib/search.php b/apps/contacts/lib/search.php index e2aae58189b..144138a7c2c 100755 --- a/apps/contacts/lib/search.php +++ b/apps/contacts/lib/search.php @@ -2,7 +2,7 @@ class OC_Search_Provider_Contacts extends OC_Search_Provider{ function search($query){ $addressbooks = OC_Contacts_Addressbook::all(OCP\USER::getUser(), 1); -// if(count($calendars)==0 || !OC_App::isEnabled('contacts')){ +// if(count($calendars)==0 || !OCP\App::isEnabled('contacts')){ // //return false; // } // NOTE: Does the following do anything diff --git a/apps/contacts/lib/vcard.php b/apps/contacts/lib/vcard.php index 45ce1ac3a2c..00c008657b7 100755 --- a/apps/contacts/lib/vcard.php +++ b/apps/contacts/lib/vcard.php @@ -245,8 +245,8 @@ class OC_Contacts_VCard{ // Add product ID is missing. $prodid = trim($vcard->getAsString('PRODID')); if(!$prodid) { - $appinfo = OC_App::getAppInfo('contacts'); - $appversion = OC_App::getAppVersion('contacts'); + $appinfo = OCP\App::getAppInfo('contacts'); + $appversion = OCP\App::getAppVersion('contacts'); $prodid = '-//ownCloud//NONSGML '.$appinfo['name'].' '.$appversion.'//EN'; $vcard->setString('PRODID', $prodid); } |