diff options
Diffstat (limited to 'apps/contacts')
-rwxr-xr-x | apps/contacts/ajax/categories/delete.php | 2 | ||||
-rwxr-xr-x | apps/contacts/ajax/categories/rescan.php | 2 | ||||
-rwxr-xr-x[-rw-r--r--] | apps/contacts/ajax/contacts.php | 2 | ||||
-rwxr-xr-x | apps/contacts/ajax/createaddressbook.php | 2 | ||||
-rwxr-xr-x | apps/contacts/ajax/editname.php | 2 | ||||
-rwxr-xr-x | apps/contacts/import.php | 2 | ||||
-rwxr-xr-x[-rw-r--r--] | apps/contacts/index.php | 4 | ||||
-rwxr-xr-x | apps/contacts/lib/addressbook.php | 4 | ||||
-rwxr-xr-x | apps/contacts/lib/app.php | 6 | ||||
-rwxr-xr-x[-rw-r--r--] | apps/contacts/lib/hooks.php | 2 | ||||
-rwxr-xr-x[-rw-r--r--] | apps/contacts/lib/search.php | 2 | ||||
-rwxr-xr-x[-rw-r--r--] | apps/contacts/templates/index.php | 2 | ||||
-rwxr-xr-x[-rw-r--r--] | apps/contacts/templates/part.chooseaddressbook.php | 2 | ||||
-rwxr-xr-x[-rw-r--r--] | apps/contacts/templates/part.chooseaddressbook.rowfields.php | 2 | ||||
-rwxr-xr-x[-rw-r--r--] | apps/contacts/templates/part.import.php | 2 | ||||
-rwxr-xr-x[-rw-r--r--] | apps/contacts/templates/part.importaddressbook.php | 2 | ||||
-rwxr-xr-x[-rw-r--r--] | apps/contacts/templates/settings.php | 2 |
17 files changed, 21 insertions, 21 deletions
diff --git a/apps/contacts/ajax/categories/delete.php b/apps/contacts/ajax/categories/delete.php index f4e7ba76aa9..d1099da044a 100755 --- a/apps/contacts/ajax/categories/delete.php +++ b/apps/contacts/ajax/categories/delete.php @@ -31,7 +31,7 @@ if(is_null($categories)) { debug(print_r($categories, true)); -$addressbooks = OC_Contacts_Addressbook::all(OC_User::getUser()); +$addressbooks = OC_Contacts_Addressbook::all(OCP\USER::getUser()); if(count($addressbooks) == 0) { bailOut(OC_Contacts_App::$l10n->t('No address books found.')); } diff --git a/apps/contacts/ajax/categories/rescan.php b/apps/contacts/ajax/categories/rescan.php index 97fd1b22fea..37a19fbce4a 100755 --- a/apps/contacts/ajax/categories/rescan.php +++ b/apps/contacts/ajax/categories/rescan.php @@ -23,7 +23,7 @@ function debug($msg) { OCP\Util::writeLog('contacts','ajax/categories/rescan.php: '.$msg, OCP\Util::DEBUG); } -$addressbooks = OC_Contacts_Addressbook::all(OC_User::getUser()); +$addressbooks = OC_Contacts_Addressbook::all(OCP\USER::getUser()); if(count($addressbooks) == 0) { bailOut(OC_Contacts_App::$l10n->t('No address books found.')); } diff --git a/apps/contacts/ajax/contacts.php b/apps/contacts/ajax/contacts.php index 3e75e4c80e3..f0e7dde088c 100644..100755 --- a/apps/contacts/ajax/contacts.php +++ b/apps/contacts/ajax/contacts.php @@ -10,7 +10,7 @@ OC_JSON::checkLoggedIn(); OC_JSON::checkAppEnabled('contacts'); -$ids = OC_Contacts_Addressbook::activeIds(OC_User::getUser()); +$ids = OC_Contacts_Addressbook::activeIds(OCP\USER::getUser()); $contacts = OC_Contacts_VCard::all($ids); $tmpl = new OC_TEMPLATE("contacts", "part.contacts"); $tmpl->assign('contacts', $contacts); diff --git a/apps/contacts/ajax/createaddressbook.php b/apps/contacts/ajax/createaddressbook.php index 6c9976f6fa3..3a331131a15 100755 --- a/apps/contacts/ajax/createaddressbook.php +++ b/apps/contacts/ajax/createaddressbook.php @@ -12,7 +12,7 @@ OC_JSON::checkLoggedIn(); OC_JSON::checkAppEnabled('contacts'); -$userid = OC_User::getUser(); +$userid = OCP\USER::getUser(); $name = trim(strip_tags($_POST['name'])); if(!$name) { OC_JSON::error(array('data' => array('message' => OC_Contacts_App::$l10n->t('Cannot add addressbook with an empty name.')))); diff --git a/apps/contacts/ajax/editname.php b/apps/contacts/ajax/editname.php index 0baa9403524..9ff85dd8586 100755 --- a/apps/contacts/ajax/editname.php +++ b/apps/contacts/ajax/editname.php @@ -33,7 +33,7 @@ if($id) { $tmpl->assign('name',$name); $tmpl->assign('id',$id); } else { - $addressbooks = OC_Contacts_Addressbook::active(OC_User::getUser()); + $addressbooks = OC_Contacts_Addressbook::active(OCP\USER::getUser()); $tmpl->assign('addressbooks', $addressbooks); } $tmpl->printpage(); diff --git a/apps/contacts/import.php b/apps/contacts/import.php index 8fb1c055e0f..95f17a8896f 100755 --- a/apps/contacts/import.php +++ b/apps/contacts/import.php @@ -30,7 +30,7 @@ if(!$file) { } error_log('File: '.$file); if(isset($_POST['method']) && $_POST['method'] == 'new'){ - $id = OC_Contacts_Addressbook::add(OC_User::getUser(), $_POST['addressbookname']); + $id = OC_Contacts_Addressbook::add(OCP\USER::getUser(), $_POST['addressbookname']); OC_Contacts_Addressbook::setActive($id, 1); }else{ $id = $_POST['id']; diff --git a/apps/contacts/index.php b/apps/contacts/index.php index 0abec096e7f..70daf4abe99 100644..100755 --- a/apps/contacts/index.php +++ b/apps/contacts/index.php @@ -13,10 +13,10 @@ OC_Util::checkLoggedIn(); OC_Util::checkAppEnabled('contacts'); // Get active address books. This creates a default one if none exists. -$ids = OC_Contacts_Addressbook::activeIds(OC_User::getUser()); +$ids = OC_Contacts_Addressbook::activeIds(OCP\USER::getUser()); $contacts = OC_Contacts_VCard::all($ids); -$addressbooks = OC_Contacts_Addressbook::active(OC_User::getUser()); +$addressbooks = OC_Contacts_Addressbook::active(OCP\USER::getUser()); // Load the files we need OC_App::setActiveNavigationEntry( 'contacts_index' ); diff --git a/apps/contacts/lib/addressbook.php b/apps/contacts/lib/addressbook.php index bf1cb9323db..6aed9590447 100755 --- a/apps/contacts/lib/addressbook.php +++ b/apps/contacts/lib/addressbook.php @@ -166,7 +166,7 @@ class OC_Contacts_Addressbook{ */ public static function activeIds($uid = null){ if(is_null($uid)){ - $uid = OC_User::getUser(); + $uid = OCP\USER::getUser(); } $prefbooks = OC_Preferences::getValue($uid,'contacts','openaddressbooks',null); if(!$prefbooks){ @@ -235,7 +235,7 @@ class OC_Contacts_Addressbook{ $openaddressbooks = self::cleanArray($openaddressbooks, false); sort($openaddressbooks, SORT_NUMERIC); // FIXME: I alway end up with a ';' prepending when imploding the array..? - OC_Preferences::setValue(OC_User::getUser(),'contacts','openaddressbooks',implode(';', $openaddressbooks)); + OC_Preferences::setValue(OCP\USER::getUser(),'contacts','openaddressbooks',implode(';', $openaddressbooks)); return true; } diff --git a/apps/contacts/lib/app.php b/apps/contacts/lib/app.php index 26ea6d06092..4e840026ce3 100755 --- a/apps/contacts/lib/app.php +++ b/apps/contacts/lib/app.php @@ -17,13 +17,13 @@ class OC_Contacts_App { public static function getAddressbook($id) { $addressbook = OC_Contacts_Addressbook::find( $id ); - if( $addressbook === false || $addressbook['userid'] != OC_User::getUser()) { + if( $addressbook === false || $addressbook['userid'] != OCP\USER::getUser()) { if ($addressbook === false) { OCP\Util::writeLog('contacts', 'Addressbook not found: '. $id, OCP\Util::ERROR); OC_JSON::error(array('data' => array( 'message' => self::$l10n->t('Addressbook not found.')))); } else { - OCP\Util::writeLog('contacts', 'Addressbook('.$id.') is not from '.OC_User::getUser(), OCP\Util::ERROR); + OCP\Util::writeLog('contacts', 'Addressbook('.$id.') is not from '.OCP\USER::getUser(), OCP\Util::ERROR); OC_JSON::error(array('data' => array( 'message' => self::$l10n->t('This is not your addressbook.')))); } exit(); @@ -145,7 +145,7 @@ class OC_Contacts_App { */ public static function scanCategories($vccontacts = null) { if (is_null($vccontacts)) { - $vcaddressbooks = OC_Contacts_Addressbook::all(OC_User::getUser()); + $vcaddressbooks = OC_Contacts_Addressbook::all(OCP\USER::getUser()); if(count($vcaddressbooks) > 0) { $vcaddressbookids = array(); foreach($vcaddressbooks as $vcaddressbook) { diff --git a/apps/contacts/lib/hooks.php b/apps/contacts/lib/hooks.php index b858c4a5a48..9939075a460 100644..100755 --- a/apps/contacts/lib/hooks.php +++ b/apps/contacts/lib/hooks.php @@ -41,7 +41,7 @@ class OC_Contacts_Hooks{ static public function getCalenderSources($parameters) { $base_url = OC_Helper::linkTo('calendar', 'ajax/events.php').'?calendar_id='; - foreach(OC_Contacts_Addressbook::all(OC_User::getUser()) as $addressbook) { + foreach(OC_Contacts_Addressbook::all(OCP\USER::getUser()) as $addressbook) { $parameters['sources'][] = array( 'url' => $base_url.'birthday_'. $addressbook['id'], diff --git a/apps/contacts/lib/search.php b/apps/contacts/lib/search.php index 31d8542091e..a53556d8bd8 100644..100755 --- a/apps/contacts/lib/search.php +++ b/apps/contacts/lib/search.php @@ -1,7 +1,7 @@ <?php class OC_Search_Provider_Contacts extends OC_Search_Provider{ function search($query){ - $addressbooks = OC_Contacts_Addressbook::all(OC_User::getUser(), 1); + $addressbooks = OC_Contacts_Addressbook::all(OCP\USER::getUser(), 1); // if(count($calendars)==0 || !OC_App::isEnabled('contacts')){ // //return false; // } diff --git a/apps/contacts/templates/index.php b/apps/contacts/templates/index.php index d7aabbe76a5..b78818c5032 100644..100755 --- a/apps/contacts/templates/index.php +++ b/apps/contacts/templates/index.php @@ -1,7 +1,7 @@ <script type='text/javascript'> var totalurl = '<?php echo OC_Helper::linkToAbsolute('contacts', 'carddav.php'); ?>/addressbooks'; var categories = <?php echo json_encode($_['categories']); ?>; - var lang = '<?php echo OC_Preferences::getValue(OC_User::getUser(), 'core', 'lang', 'en'); ?>'; + var lang = '<?php echo OC_Preferences::getValue(OCP\USER::getUser(), 'core', 'lang', 'en'); ?>'; </script> <!-- div id="controls"> <form> diff --git a/apps/contacts/templates/part.chooseaddressbook.php b/apps/contacts/templates/part.chooseaddressbook.php index adfc8c15161..3b92d1a0c78 100644..100755 --- a/apps/contacts/templates/part.chooseaddressbook.php +++ b/apps/contacts/templates/part.chooseaddressbook.php @@ -1,7 +1,7 @@ <div id="chooseaddressbook_dialog" title="<?php echo $l->t("Configure Address Books"); ?>"> <table width="100%" style="border: 0;"> <?php -$option_addressbooks = OC_Contacts_Addressbook::all(OC_User::getUser()); +$option_addressbooks = OC_Contacts_Addressbook::all(OCP\USER::getUser()); for($i = 0; $i < count($option_addressbooks); $i++){ echo "<tr>"; $tmpl = new OC_Template('contacts', 'part.chooseaddressbook.rowfields'); diff --git a/apps/contacts/templates/part.chooseaddressbook.rowfields.php b/apps/contacts/templates/part.chooseaddressbook.rowfields.php index 20b67a4161e..50bd192e4d6 100644..100755 --- a/apps/contacts/templates/part.chooseaddressbook.rowfields.php +++ b/apps/contacts/templates/part.chooseaddressbook.rowfields.php @@ -2,4 +2,4 @@ // FIXME: Make this readable. echo "<td width=\"20px\"><input id=\"active_" . $_['addressbook']["id"] . "\" type=\"checkbox\" onClick=\"Contacts.UI.Addressbooks.activation(this, " . $_['addressbook']["id"] . ")\"" . (OC_Contacts_Addressbook::isActive($_['addressbook']["id"]) ? ' checked="checked"' : '') . "></td>"; echo "<td><label for=\"active_" . $_['addressbook']["id"] . "\">" . htmlspecialchars($_['addressbook']["displayname"]) . "</label></td>"; - echo "<td width=\"20px\"><a href=\"#\" onclick=\"Contacts.UI.showCardDAVUrl('" . OC_User::getUser() . "', '" . rawurlencode($_['addressbook']["uri"]) . "');\" title=\"" . $l->t("CardDav Link") . "\" class=\"action\"><img class=\"svg action\" src=\"../../core/img/actions/public.svg\"></a></td><td width=\"20px\"><a href=\"export.php?bookid=" . $_['addressbook']["id"] . "\" title=\"" . $l->t("Download") . "\" class=\"action\"><img class=\"svg action\" src=\"../../core/img/actions/download.svg\"></a></td><td width=\"20px\"><a href=\"#\" title=\"" . $l->t("Edit") . "\" class=\"action\" onclick=\"Contacts.UI.Addressbooks.editAddressbook(this, " . $_['addressbook']["id"] . ");\"><img class=\"svg action\" src=\"../../core/img/actions/rename.svg\"></a></td><td width=\"20px\"><a href=\"#\" onclick=\"Contacts.UI.Addressbooks.deleteAddressbook(this, '" . $_['addressbook']["id"] . "');\" title=\"" . $l->t("Delete") . "\" class=\"action\"><img class=\"svg action\" src=\"../../core/img/actions/delete.svg\"></a></td>"; + echo "<td width=\"20px\"><a href=\"#\" onclick=\"Contacts.UI.showCardDAVUrl('" . OCP\USER::getUser() . "', '" . rawurlencode($_['addressbook']["uri"]) . "');\" title=\"" . $l->t("CardDav Link") . "\" class=\"action\"><img class=\"svg action\" src=\"../../core/img/actions/public.svg\"></a></td><td width=\"20px\"><a href=\"export.php?bookid=" . $_['addressbook']["id"] . "\" title=\"" . $l->t("Download") . "\" class=\"action\"><img class=\"svg action\" src=\"../../core/img/actions/download.svg\"></a></td><td width=\"20px\"><a href=\"#\" title=\"" . $l->t("Edit") . "\" class=\"action\" onclick=\"Contacts.UI.Addressbooks.editAddressbook(this, " . $_['addressbook']["id"] . ");\"><img class=\"svg action\" src=\"../../core/img/actions/rename.svg\"></a></td><td width=\"20px\"><a href=\"#\" onclick=\"Contacts.UI.Addressbooks.deleteAddressbook(this, '" . $_['addressbook']["id"] . "');\" title=\"" . $l->t("Delete") . "\" class=\"action\"><img class=\"svg action\" src=\"../../core/img/actions/delete.svg\"></a></td>"; diff --git a/apps/contacts/templates/part.import.php b/apps/contacts/templates/part.import.php index 570eda9b07d..a2f8aefa6f4 100644..100755 --- a/apps/contacts/templates/part.import.php +++ b/apps/contacts/templates/part.import.php @@ -6,7 +6,7 @@ <p style="text-align:center;"><b><?php echo $l->t('Please choose the addressbook'); ?></b> <select style="width:100%;" id="contacts" name="contacts"> <?php -$contacts_options = OC_Contacts_Addressbook::all(OC_User::getUser()); +$contacts_options = OC_Contacts_Addressbook::all(OCP\USER::getUser()); $contacts_options[] = array('id'=>'newaddressbook', 'displayname'=>$l->t('create a new addressbook')); echo html_select_options($contacts_options, $contacts_options[0]['id'], array('value'=>'id', 'label'=>'displayname')); ?> diff --git a/apps/contacts/templates/part.importaddressbook.php b/apps/contacts/templates/part.importaddressbook.php index 2db23368866..45e7366f71c 100644..100755 --- a/apps/contacts/templates/part.importaddressbook.php +++ b/apps/contacts/templates/part.importaddressbook.php @@ -13,7 +13,7 @@ <td> <select id="book" name="book" class="float"> <?php - $contacts_options = OC_Contacts_Addressbook::all(OC_User::getUser()); + $contacts_options = OC_Contacts_Addressbook::all(OCP\USER::getUser()); echo html_select_options($contacts_options, $contacts_options[0]['id'], array('value'=>'id', 'label'=>'displayname')); ?> </select> diff --git a/apps/contacts/templates/settings.php b/apps/contacts/templates/settings.php index 8a24a91e952..0445f8ae49a 100644..100755 --- a/apps/contacts/templates/settings.php +++ b/apps/contacts/templates/settings.php @@ -6,7 +6,7 @@ <dt><?php echo $l->t('Primary address (Kontact et al)'); ?></dt> <dd><code><?php echo OC_Helper::linkToAbsolute('contacts', 'carddav.php'); ?>/</code></dd> <dt><?php echo $l->t('iOS/OS X'); ?></dt> - <dd><code><?php echo OC_Helper::linkToAbsolute('contacts', 'carddav.php'); ?>/principals/<?php echo OC_User::getUser(); ?></code>/</dd> + <dd><code><?php echo OC_Helper::linkToAbsolute('contacts', 'carddav.php'); ?>/principals/<?php echo OCP\USER::getUser(); ?></code>/</dd> </dl> Powered by <a href="http://geonames.org/" target="_blank">geonames.org webservice</a> </fieldset> |