X-Git-Url: https://git.p6c8.net/jirafeau_project.git/blobdiff_plain/4c5e2caa3a0fedd86292b213c3bb3aa8c812d8c2..9eeea0ae72c379673e9fbdcafb2404e583b4489d:/admin.php

diff --git a/admin.php b/admin.php
index 837686e..2cad589 100644
--- a/admin.php
+++ b/admin.php
@@ -123,13 +123,13 @@ if (!isset ($_SESSION['admin_auth']) || $_SESSION['admin_auth'] != true)
 /* Remove errors. */
 @error_reporting(0);
 
-/* Admin interface. */
-require (JIRAFEAU_ROOT . 'lib/template/header.php');
-?><h2><?php echo t('Admin interface'); ?></h2><?php
-
-/* Show admin interface. */
+/* Show admin interface if not downloading a file. */
+if (!(isset ($_POST['action']) && strcmp ($_POST['action'], 'download') == 0))
 {
-        ?><div id = "install">
+        require (JIRAFEAU_ROOT . 'lib/template/header.php');
+        ?><h2><?php echo t('Admin interface'); ?></h2><?php
+
+        ?><div id = "admin">
         <fieldset><legend><?php echo t('Actions');?></legend>
         <table>
         <form action = "<?php echo basename(__FILE__); ?>" method = "post">
@@ -148,7 +148,7 @@ require (JIRAFEAU_ROOT . 'lib/template/header.php');
         <tr>
             <input type = "hidden" name = "action" value = "clean_async"/>
             <td class = "info">
-                <?php echo t('Clean old unfinished transferts'); ?>
+                <?php echo t('Clean old unfinished transfers'); ?>
             </td>
             <td></td>
             <td>
@@ -277,6 +277,7 @@ if (isset ($_POST['action']))
                 $l['file_name'] . '"');
         if (file_exists(VAR_FILES . $p . $l['md5']))
             readfile (VAR_FILES . $p . $l['md5']);
+        exit;
     }
 }