]> git.p6c8.net - jirafeau_project.git/blobdiff - admin.php
Translated using Weblate (Turkish)
[jirafeau_project.git] / admin.php
index d3a069cc74e221ec6b0e067fe7032555cf7bcc8b..4a3d25fa6605c9bb4b08f17c002cc4ea743be75a 100644 (file)
--- a/admin.php
+++ b/admin.php
@@ -65,8 +65,7 @@ if (php_sapi_name() == "cli") {
       }
       /* Test web password authentification. */
       else if (!empty($cfg['admin_password']) && isset($_POST['admin_password'])) {
       }
       /* Test web password authentification. */
       else if (!empty($cfg['admin_password']) && isset($_POST['admin_password'])) {
-          if ($cfg['admin_password'] === $_POST['admin_password'] ||
-              $cfg['admin_password'] === hash('sha256', $_POST['admin_password'])) {
+          if ($cfg['admin_password'] === hash('sha256', $_POST['admin_password'])) {
               jirafeau_admin_session_start();
           } else {
               require(JIRAFEAU_ROOT . 'lib/template/header.php');
               jirafeau_admin_session_start();
           } else {
               require(JIRAFEAU_ROOT . 'lib/template/header.php');
@@ -85,13 +84,14 @@ if (php_sapi_name() == "cli") {
                   <td class = "label"><label for = "enter_password">
                   <?php echo t('ADMIN_PSW') . ':'; ?></label>
                   </td>
                   <td class = "label"><label for = "enter_password">
                   <?php echo t('ADMIN_PSW') . ':'; ?></label>
                   </td>
+              </tr>
+              <tr>
                   <td class = "field"><input type = "password"
                   name = "admin_password" id = "admin_password"
                   size = "40" />
                   </td>
               </tr>
               <tr class = "nav">
                   <td class = "field"><input type = "password"
                   name = "admin_password" id = "admin_password"
                   size = "40" />
                   </td>
               </tr>
               <tr class = "nav">
-                  <td></td>
                   <td class = "nav next">
                   <input type = "submit" name = "key" value =
                   "<?php echo t('LOGIN'); ?>" />
                   <td class = "nav next">
                   <input type = "submit" name = "key" value =
                   "<?php echo t('LOGIN'); ?>" />
@@ -255,7 +255,12 @@ if (php_sapi_name() == "cli") {
           header('Content-Disposition: attachment; filename="' .
                   $l['file_name'] . '"');
           if (file_exists(VAR_FILES . $p . $l['md5'])) {
           header('Content-Disposition: attachment; filename="' .
                   $l['file_name'] . '"');
           if (file_exists(VAR_FILES . $p . $l['md5'])) {
-              readfile(VAR_FILES . $p . $l['md5']);
+              $r = fopen(VAR_FILES . $p . $l['md5'], 'r');
+              while (!feof($r)) {
+                  print fread($r, 1024);
+                  ob_flush();
+              }
+              fclose($r);
           }
           exit;
       }
           }
           exit;
       }

patrick-canterino.de