From b6d042a0ccb3b3d8c7bd36a0b38483f15fe940c9 Mon Sep 17 00:00:00 2001 From: Romain d'Alverny Date: Wed, 5 Sep 2012 18:19:22 +0000 Subject: fix check of $typelink, relative to upload dir; explicit Web app own path. --- test_index.php | 15 ++++++--------- 1 file changed, 6 insertions(+), 9 deletions(-) (limited to 'test_index.php') diff --git a/test_index.php b/test_index.php index 55ee644..f96f3ed 100644 --- a/test_index.php +++ b/test_index.php @@ -201,7 +201,6 @@ $tmpl = << 0) { - echo getcwd(); foreach ($pkgs as $key => $p) { if (trim($p['package']) == '') { continue; @@ -220,16 +219,14 @@ if ($total > 0) { $typelink = ''; if ($p['type'] == 'failure') { - $typelink = '/uploads/' . $p['type'] . '/' . $p['path']; + $typelink = '/uploads/' . $p['type'] . '/' . $p['path']; } elseif ($p['type'] == 'rejected') { - $typelink = '/uploads/' . $p['type'] . '/' . $p['path'] . '.youri'; + $typelink = '/uploads/' . $p['type'] . '/' . $p['path'] . '.youri'; } else { - $typelink = '/uploads/done/' . $p['path']; - echo ".$typelink", ' = ', print_r(is_dir(".$typelink"), true), '
'; - - if (!is_dir(".$typelink")) { - $typelink = ''; - } + $typelink = '/uploads/done/' . $p['path']; + if (!is_dir(realpath($upload_dir . '/..' . $typelink))) { + $typelink = ''; + } } $typestr = $p['type']; if ($p['status']['build']) { -- cgit v1.2.1