com web/php: Use root-relative URLs for cached JS and CSS entries: include/footer.inc include/header.inc

From: Date: Mon, 15 Oct 2018 16:03:32 +0000
Subject: com web/php: Use root-relative URLs for cached JS and CSS entries: include/footer.inc include/header.inc
Groups: php.webmaster 
Request: Send a blank email to php-webmaster+get-27326@lists.php.net to get a copy of this message
Commit: 25b86272621ba77405fa13b59bd78179efcc5fd5 Author: Yordan Gigov <jgigov@abv.bg> Wed, 3 Oct 2018 13:22:51 +0300 Committer: Sara Golemon <pollita@php.net> Mon, 15 Oct 2018 12:03:32 -0400 Parents: 6437711ab54cf444332681e58da3ed9cdedbdd59 Branches: master Link: http://git.php.net/?p=web/php.git;a=commitdiff;h=25b86272621ba77405fa13b59bd78179efcc5fd5 Log: Use root-relative URLs for cached JS and CSS entries Changed paths: M include/footer.inc M include/header.inc Diff: diff --git a/include/footer.inc b/include/footer.inc index 046379b..2f52f6c 100644 --- a/include/footer.inc +++ b/include/footer.inc @@ -88,7 +88,7 @@ $jsfiles = array("ext/modernizr..js", "ext/hogan-2.0.0.min.js", "ext/typeahead.min.js", "ext/mousetrap.min.js", "search.js", "common.js"); foreach ($jsfiles as $filename) { $path = dirname(dirname(__FILE__)).'/js/'.$filename; - echo '<script type="text/javascript" src="' . $MYSITE . 'cached.php?t=' . @filemtime($path) . '&amp;f=/js/' . $filename . '"></script>'."\n"; + echo '<script type="text/javascript" src="/cached.php?t=' . @filemtime($path) . '&amp;f=/js/' . $filename . '"></script>'."\n"; } ?> diff --git a/include/header.inc b/include/header.inc index d03d2bb..be80c80 100644 --- a/include/header.inc +++ b/include/header.inc @@ -80,7 +80,7 @@ if (!isset($config["languages"])) { <?php endforeach ?> <?php foreach($CSS as $filename => $modified): ?> -<link rel="stylesheet" type="text/css" href="<?php echo $MYSITE ?>cached.php?t=<?php echo $modified?>&amp;f=<?php echo $filename?>" media="screen"> +<link rel="stylesheet" type="text/css" href="/cached.php?t=<?php echo $modified?>&amp;f=<?php echo $filename?>" media="screen"> <?php endforeach ?> <!--[if lte IE 7]>

« previous php.webmaster (#27326) next »