From 394bc8575e862217d91247403bd563321d6b9ccf Mon Sep 17 00:00:00 2001 From: Regis Houssin Date: Mon, 13 Apr 2009 09:36:43 +0000 Subject: [PATCH] Fix: syntax --- htdocs/lib/functions.lib.php | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) diff --git a/htdocs/lib/functions.lib.php b/htdocs/lib/functions.lib.php index 4bf4c3fe55a..36b398fc5aa 100644 --- a/htdocs/lib/functions.lib.php +++ b/htdocs/lib/functions.lib.php @@ -2270,12 +2270,13 @@ function yn($yesno, $case=1, $color=0) */ function get_exdir($num,$level=3) { + $path = ''; $num = eregi_replace('[^0-9]','',$num); $num = substr("000".$num, -$level); - if ($level == 1) return substr($num,0,1).'/'; - if ($level == 2) return substr($num,1,1).'/'.substr($num,0,1).'/'; - if ($level == 3) return substr($num,2,1).'/'.substr($num,1,1).'/'.substr($num,0,1).'/'; - return ''; + if ($level == 1) $path = substr($num,0,1).'/'; + if ($level == 2) $path = substr($num,1,1).'/'.substr($num,0,1).'/'; + if ($level == 3) $path = substr($num,2,1).'/'.substr($num,1,1).'/'.substr($num,0,1).'/'; + return $path; } /**