cvs: php-bugs-web /include layout.inc

From: Date: Fri, 01 Aug 2003 19:30:27 +0000
Subject: cvs: php-bugs-web /include layout.inc
Groups: php.mirrors 
Request: Send a blank email to php-mirrors+get-19730@lists.php.net to get a copy of this message
goba Fri Aug 1 15:30:27 2003 EDT Modified files: /php-bugs-web/include layout.inc Log: Make every dir semi-relative, hopefully this won't break any images... Index: php-bugs-web/include/layout.inc diff -u php-bugs-web/include/layout.inc:1.18 php-bugs-web/include/layout.inc:1.19 --- php-bugs-web/include/layout.inc:1.18 Thu Jul 3 02:58:10 2003 +++ php-bugs-web/include/layout.inc Fri Aug 1 15:30:26 2003 @@ -34,9 +34,12 @@ function make_image($file, $alt=false, $align=false, $extras=false, $dir=false, $border=0) { global $HTTP_SERVER_VARS; if (!$dir) { - $dir = 'gifs'; + $dir = '/gifs'; } - $path = $HTTP_SERVER_VARS['DOCUMENT_ROOT']."/$dir/$file"; + if (is_string($dir) && $dir{0} != "/") { + $dir = "/$dir"; + } + $path = $HTTP_SERVER_VARS['DOCUMENT_ROOT']."$dir/$file"; if ($size = @getimagesize($path)) { $image = sprintf('<img src="%s/%s" border="%d" %s alt="%s" %s%s>', $dir,

« previous php.mirrors (#19730) next »