From c84876040a6669f5cb01c3772e861ba2084110f5 Mon Sep 17 00:00:00 2001 From: Erik Fonnesbeck Date: Tue, 1 Mar 2011 11:18:34 -0700 Subject: Use the call to basename to remove the extension rather than trim, since trim takes a list of characters, not the exact string to remove. Suggested by http://forum.pfsense.org/index.php/topic,32967.0.html --- usr/local/www/head.inc | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'usr') diff --git a/usr/local/www/head.inc b/usr/local/www/head.inc index e4a7a95..97c7111 100755 --- a/usr/local/www/head.inc +++ b/usr/local/www/head.inc @@ -62,7 +62,7 @@ $pagetitle = gentitle( $pgtitle ); * Coded by: Erik Kristensen */ - $dir = trim(basename($_SERVER["SCRIPT_FILENAME"]), '.php'); + $dir = trim(basename($_SERVER["SCRIPT_FILENAME"], '.php')); $path = "{$g['www_path']}/javascript/" . $dir . "/"; if (is_dir($path)) { if ($dh = opendir($path)) { -- cgit v1.1