]> source.dussan.org Git - nextcloud-server.git/commitdiff
Contacts: removed unused method and ajax file.
authorThomas Tanghus <thomas@tanghus.net>
Sun, 29 Apr 2012 18:40:21 +0000 (20:40 +0200)
committerThomas Tanghus <thomas@tanghus.net>
Sun, 29 Apr 2012 20:12:27 +0000 (22:12 +0200)
apps/contacts/ajax/getdetails.php [deleted file]
apps/contacts/l10n/xgettextfiles
apps/contacts/lib/app.php

diff --git a/apps/contacts/ajax/getdetails.php b/apps/contacts/ajax/getdetails.php
deleted file mode 100644 (file)
index aac69f4..0000000
+++ /dev/null
@@ -1,34 +0,0 @@
-<?php
-/**
- * ownCloud - Addressbook
- *
- * @author Jakob Sack
- * @copyright 2011 Jakob Sack mail@jakobsack.de
- *
- * This library is free software; you can redistribute it and/or
- * modify it under the terms of the GNU AFFERO GENERAL PUBLIC LICENSE
- * License as published by the Free Software Foundation; either
- * version 3 of the License, or any later version.
- *
- * This library is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
- * GNU AFFERO GENERAL PUBLIC LICENSE for more details.
- *
- * You should have received a copy of the GNU Affero General Public
- * License along with this library.  If not, see <http://www.gnu.org/licenses/>.
- *
- */
-
-// Init owncloud
-
-// Check if we are a user
-OC_JSON::checkLoggedIn();
-OC_JSON::checkAppEnabled('contacts');
-
-$id = $_GET['id'];
-$new = isset($_GET['new']) ? true : false;
-$vcard = OC_Contacts_App::getContactVCard( $id );
-
-OC_Contacts_App::renderDetails($id, $vcard, $new);
index e2492431ff8de2d2b153b31af194965b1b816d5e..e291074fba90fe9672a4d2397772dad65fc08869 100644 (file)
@@ -5,7 +5,7 @@
 ../ajax/createaddressbook.php
 ../ajax/deletebook.php
 ../ajax/deleteproperty.php
-../ajax/getdetails.php
+../ajax/contactdetails.php
 ../ajax/saveproperty.php
 ../ajax/updateaddressbook.php
 ../lib/app.php
index 2c2cc331ed7bb8875f94be70abb1120291f2113f..ee8b0c550b3aef014cb9078e20aa779d00f70fa5 100644 (file)
@@ -15,39 +15,6 @@ class OC_Contacts_App {
        public static $l10n;
        public static $categories;
 
-       /**
-       * Render templates/part.details to json output
-       * @param int $id of contact
-       * @param Sabre_VObject_Component $vcard to render
-       */
-       public static function renderDetails($id, $vcard, $new=false) {
-               $property_types = self::getAddPropertyOptions();
-               $adr_types = self::getTypesOfProperty('ADR');
-               $phone_types = self::getTypesOfProperty('TEL');
-               $upload_max_filesize = OC_Helper::computerFileSize(ini_get('upload_max_filesize'));
-               $post_max_size = OC_Helper::computerFileSize(ini_get('post_max_size'));
-               $maxUploadFilesize = min($upload_max_filesize, $post_max_size);
-
-               $freeSpace=OC_Filesystem::free_space('/');
-               $freeSpace=max($freeSpace,0);
-               $maxUploadFilesize = min($maxUploadFilesize ,$freeSpace);
-
-               $details = OC_Contacts_VCard::structureContact($vcard);
-               $name = $details['FN'][0]['value'];
-               $t = $new ? 'part.contact' : 'part.details';
-               $tmpl = new OC_Template('contacts',$t);
-               $tmpl->assign('details',$details);
-               $tmpl->assign('id',$id);
-               $tmpl->assign( 'uploadMaxFilesize', $maxUploadFilesize);
-               $tmpl->assign( 'uploadMaxHumanFilesize', OC_Helper::humanFileSize($maxUploadFilesize));
-               $tmpl->assign('property_types',$property_types);
-               $tmpl->assign('adr_types',$adr_types);
-               $tmpl->assign('phone_types',$phone_types);
-               $page = $tmpl->fetchPage();
-
-               OC_JSON::success(array('data' => array( 'id' => $id, 'name' => $name, 'page' => $page )));
-       }
-
        public static function getAddressbook($id) {
                $addressbook = OC_Contacts_Addressbook::find( $id );
                if( $addressbook === false || $addressbook['userid'] != OC_User::getUser()) {