Commit: 25b86272621ba77405fa13b59bd78179efcc5fd5 Author: Yordan Gigov <jgi...@abv.bg> Wed, 3 Oct 2018 13:22:51 +0300 Committer: Sara Golemon <poll...@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) . '&f=/js/' . $filename . '"></script>'."\n"; + echo '<script type="text/javascript" src="/cached.php?t=' . @filemtime($path) . '&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?>&f=<?php echo $filename?>" media="screen"> +<link rel="stylesheet" type="text/css" href="/cached.php?t=<?php echo $modified?>&f=<?php echo $filename?>" media="screen"> <?php endforeach ?> <!--[if lte IE 7]> -- PHP Webmaster List Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php