]> source.dussan.org Git - nextcloud-server.git/commitdiff
Rename...
authorThomas Tanghus <thomas@tanghus.net>
Mon, 12 Mar 2012 15:47:29 +0000 (16:47 +0100)
committerThomas Tanghus <thomas@tanghus.net>
Mon, 12 Mar 2012 15:47:29 +0000 (16:47 +0100)
apps/contacts/ajax/categories/categoriesfor.php [new file with mode: 0644]
apps/contacts/ajax/categories/checksumfor.php [deleted file]
apps/contacts/js/contacts.js

diff --git a/apps/contacts/ajax/categories/categoriesfor.php b/apps/contacts/ajax/categories/categoriesfor.php
new file mode 100644 (file)
index 0000000..c02c379
--- /dev/null
@@ -0,0 +1,28 @@
+<?php
+/**
+ * Copyright (c) 2012 Thomas Tanghus <thomas@tanghus.net>
+ * This file is licensed under the Affero General Public License version 3 or
+ * later.
+ * See the COPYING-README file.
+ */
+
+require_once('../../../../lib/base.php');
+OC_JSON::checkLoggedIn();
+OC_JSON::checkAppEnabled('contacts');
+
+$id = isset($_GET['id'])?$_GET['id']:null;
+if(is_null($id)) {
+       OC_JSON::error(array('data' => array('message' => OC_Contacts_App::$l10n->t('No ID provided'))));
+       exit();
+}
+$vcard = OC_Contacts_App::getContactVCard( $id );
+foreach($vcard->children as $property){
+       //OC_Log::write('contacts','ajax/categories/checksumfor.php: '.$property->name, OC_Log::DEBUG);
+       if($property->name == 'CATEGORIES') {
+               $checksum = md5($property->serialize());
+               OC_JSON::success(array('data' => array('value'=>$property->value, 'checksum'=>$checksum)));
+               exit();
+       }
+}
+OC_JSON::error(array('data' => array('message' => OC_Contacts_App::$l10n->t('Error setting checksum.'))));
+?>
diff --git a/apps/contacts/ajax/categories/checksumfor.php b/apps/contacts/ajax/categories/checksumfor.php
deleted file mode 100644 (file)
index c02c379..0000000
+++ /dev/null
@@ -1,28 +0,0 @@
-<?php
-/**
- * Copyright (c) 2012 Thomas Tanghus <thomas@tanghus.net>
- * This file is licensed under the Affero General Public License version 3 or
- * later.
- * See the COPYING-README file.
- */
-
-require_once('../../../../lib/base.php');
-OC_JSON::checkLoggedIn();
-OC_JSON::checkAppEnabled('contacts');
-
-$id = isset($_GET['id'])?$_GET['id']:null;
-if(is_null($id)) {
-       OC_JSON::error(array('data' => array('message' => OC_Contacts_App::$l10n->t('No ID provided'))));
-       exit();
-}
-$vcard = OC_Contacts_App::getContactVCard( $id );
-foreach($vcard->children as $property){
-       //OC_Log::write('contacts','ajax/categories/checksumfor.php: '.$property->name, OC_Log::DEBUG);
-       if($property->name == 'CATEGORIES') {
-               $checksum = md5($property->serialize());
-               OC_JSON::success(array('data' => array('value'=>$property->value, 'checksum'=>$checksum)));
-               exit();
-       }
-}
-OC_JSON::error(array('data' => array('message' => OC_Contacts_App::$l10n->t('Error setting checksum.'))));
-?>
index e42ee298633585b3fd2f03ab4463374c7021c400..b9e3b9972806c223eef9d66ffefadcf820552d6c 100644 (file)
@@ -470,7 +470,7 @@ Contacts={
                        categoriesChanged:function(categories) { // Categories added/deleted.
                                console.log('categoriesChanged for ' + Contacts.UI.Card.id + ' : ' + categories);
                                var categorylist = $('#categories_value').find('input');
-                               $.getJSON(OC.filePath('contacts', 'ajax', 'categories/checksumfor.php'),{'id':Contacts.UI.Card.id},function(jsondata){
+                               $.getJSON(OC.filePath('contacts', 'ajax', 'categories/categoriesfor.php'),{'id':Contacts.UI.Card.id},function(jsondata){
                                        if(jsondata.status == 'success'){
                                                console.log('Setting checksum: ' + jsondata.data.checksum + ', value: ' + jsondata.data.value);
                                                $('#categories_value').data('checksum', jsondata.data.checksum);