code beautifications

This commit is contained in:
2016-06-13 22:59:05 +02:00
parent 21af50aa6c
commit 4ce04ab6f9
12 changed files with 682 additions and 614 deletions

View File

@@ -1,9 +1,30 @@
<?php
/**
* download.php, zarafa contact to vcf im/exporter
*
* Author: Christoph Haas <christoph.h@sprinternet.at>
* Copyright (C) 2012-2016 Christoph Haas
*
* This library is free software; you can redistribute it and/or
* modify it under the terms of the GNU Lesser General Public
* License as published by the Free Software Foundation; either
* version 2.1 of the License, or (at your option) 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
* Lesser General Public License for more details.
*
* You should have received a copy of the GNU Lesser General Public
* License along with this library; if not, write to the Free Software
* Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
*
*/
class DownloadHandler
{
public static function doDownload() {
public static function doDownload()
{
if (isset($_GET["token"])) {
$token = $_GET["token"];
} else {
@@ -23,7 +44,7 @@ class DownloadHandler
$file = PLUGIN_CONTACTIMPORTER_TMP_UPLOAD . "vcf_" . $token . ".vcf";
if(!file_exists($file)) { // invalid token
if (!file_exists($file)) { // invalid token
return false;
}