mirror of
https://github.com/owncloudarchive/contacts.git
synced 2025-02-07 01:54:16 +01:00
Contacts: Fixed paths in import.
This commit is contained in:
parent
e289af9cc8
commit
e914a14f1d
@ -6,7 +6,6 @@
|
|||||||
* See the COPYING-README file.
|
* See the COPYING-README file.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
require_once('../../../lib/base.php');
|
|
||||||
OCP\JSON::checkLoggedIn();
|
OCP\JSON::checkLoggedIn();
|
||||||
OCP\App::checkAppEnabled('contacts');
|
OCP\App::checkAppEnabled('contacts');
|
||||||
$upload_max_filesize = OCP\Util::computerFileSize(ini_get('upload_max_filesize'));
|
$upload_max_filesize = OCP\Util::computerFileSize(ini_get('upload_max_filesize'));
|
||||||
|
@ -19,8 +19,6 @@
|
|||||||
* License along with this library. If not, see <http://www.gnu.org/licenses/>.
|
* License along with this library. If not, see <http://www.gnu.org/licenses/>.
|
||||||
*
|
*
|
||||||
*/
|
*/
|
||||||
// Init owncloud
|
|
||||||
require_once('../../../lib/base.php');
|
|
||||||
|
|
||||||
// Check if we are a user
|
// Check if we are a user
|
||||||
OCP\JSON::checkLoggedIn();
|
OCP\JSON::checkLoggedIn();
|
||||||
|
@ -28,7 +28,7 @@ if(!$file) {
|
|||||||
OCP\JSON::error(array('message' => 'Import file was empty.'));
|
OCP\JSON::error(array('message' => 'Import file was empty.'));
|
||||||
exit();
|
exit();
|
||||||
}
|
}
|
||||||
error_log('File: '.$file);
|
|
||||||
if(isset($_POST['method']) && $_POST['method'] == 'new'){
|
if(isset($_POST['method']) && $_POST['method'] == 'new'){
|
||||||
$id = OC_Contacts_Addressbook::add(OCP\USER::getUser(), $_POST['addressbookname']);
|
$id = OC_Contacts_Addressbook::add(OCP\USER::getUser(), $_POST['addressbookname']);
|
||||||
OC_Contacts_Addressbook::setActive($id, 1);
|
OC_Contacts_Addressbook::setActive($id, 1);
|
||||||
|
Loading…
x
Reference in New Issue
Block a user