V 3.5 RC 1

This commit is contained in:
Romain Neutron
2011-12-05 00:23:28 +01:00
parent 6f1ee368aa
commit 4c5b7eb658
5563 changed files with 466984 additions and 985416 deletions

View File

@@ -3,7 +3,7 @@
* Utility functions for generating group URIs in HTML files
*
* Before including this file, /min/lib must be in your include_path.
*
*
* @package Minify
*/
@@ -18,7 +18,7 @@ require_once 'Minify/Build.php';
* <script type="text/javascript" src="<?php echo Minify_groupUri('js'); ?>"></script>
* </code>
*
* If you do not want ampersands as HTML entities, set Minify_Build::$ampersand = "&"
* If you do not want ampersands as HTML entities, set Minify_Build::$ampersand = "&"
* before using this function.
*
* @param string $group a key from groupsConfig.php
@@ -26,12 +26,13 @@ require_once 'Minify/Build.php';
* directives in .htaccess are functional. This will remove the "?" from URIs, making them
* more cacheable by proxies.
* @return string
*/
*/
function Minify_groupUri($group, $forceAmpersand = false)
{
$path = $forceAmpersand
? "/g={$group}"
: "/?g={$group}";
return _Minify_getBuild($group)->uri(
'/' . basename(dirname(__FILE__)) . $path
,$forceAmpersand
@@ -42,10 +43,10 @@ function Minify_groupUri($group, $forceAmpersand = false)
/**
* Get the last modification time of the source js/css files used by Minify to
* build the page.
*
* If you're caching the output of Minify_groupUri(), you'll want to rebuild
*
* If you're caching the output of Minify_groupUri(), you'll want to rebuild
* the cache if it's older than this timestamp.
*
*
* <code>
* // simplistic HTML cache system
* $file = '/path/to/cache/file';
@@ -61,13 +62,14 @@ function Minify_groupUri($group, $forceAmpersand = false)
*
* @param array $groups an array of keys from groupsConfig.php
* @return int Unix timestamp of the latest modification
*/
*/
function Minify_groupsMtime($groups)
{
$max = 0;
foreach ((array)$groups as $group) {
$max = max($max, _Minify_getBuild($group)->lastModified);
}
return $max;
}
@@ -86,5 +88,6 @@ function _Minify_getBuild($group)
if (! isset($builds[$group])) {
$builds[$group] = new Minify_Build($gc[$group]);
}
return $builds[$group];
}