From ec4f173a61b1ef998b63995c3fee8773c3e393b2 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Philip=20H=C3=A4usler?= Date: Mon, 9 Dec 2013 17:52:43 +0100 Subject: [PATCH] admin import uses now msg functions --- includes/pages/admin_import.php | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) diff --git a/includes/pages/admin_import.php b/includes/pages/admin_import.php index 80c2be25..1238076e 100644 --- a/includes/pages/admin_import.php +++ b/includes/pages/admin_import.php @@ -30,7 +30,7 @@ function admin_import() { fclose($test_handle); unlink('../import/tmp'); } else { - $msg = error("Webserver has no write-permission on import directory.", true); + error("Webserver has no write-permission on import directory."); } if (isset ($_REQUEST['submit'])) { @@ -40,7 +40,7 @@ function admin_import() { if (!$fp) { $ok = false; - $msg = error("File 'https://$PentabarfXMLhost/$PentabarfXMLpath" . $_REQUEST["url"] . "' not readable!" . "[$errstr ($errno)]", true); + error("File 'https://$PentabarfXMLhost/$PentabarfXMLpath" . $_REQUEST["url"] . "' not readable!" . "[$errstr ($errno)]"); } else { $fileOut = fopen($import_file, "w"); $head = 'GET /' . $PentabarfXMLpath . $_REQUEST["url"] . ' HTTP/1.1' . "\r\n" . @@ -86,7 +86,7 @@ function admin_import() { } fclose($fileOut); fclose($fp); - $msg .= success("Es wurden $Zeilen Zeilen eingelesen.", true); + success("Es wurden $Zeilen Zeilen eingelesen."); } } elseif (isset ($_FILES['xcal_file']) && ($_FILES['xcal_file']['error'] == 0)) { @@ -94,16 +94,16 @@ function admin_import() { libxml_use_internal_errors(true); if (simplexml_load_file($import_file) === false) { $ok = false; - $msg = error("No valid xml/xcal file provided.", true); + error("No valid xml/xcal file provided."); unlink($import_file); } } else { $ok = false; - $msg = error("File upload went wrong.", true); + error("File upload went wrong."); } } else { $ok = false; - $msg = error("Please provide some data.", true); + error("Please provide some data."); } } @@ -112,7 +112,7 @@ function admin_import() { else $html .= template_render('../templates/admin_import_input.html', array ( 'link' => page_link_to('admin_import'), - 'msg' => $msg, + 'msg' => msg(), 'url' => "https://$PentabarfXMLhost/$PentabarfXMLpath" )); break;