Updated cache file to depend on js group
This commit is contained in:
parent
e10af876b1
commit
1e61405909
7
js.php
7
js.php
@ -1,7 +1,6 @@
|
|||||||
<?php
|
<?php
|
||||||
//Change as needed
|
//Change as needed
|
||||||
$base_path = $_SERVER['DOCUMENT_ROOT'];
|
$base_path = $_SERVER['DOCUMENT_ROOT'];
|
||||||
$cache_file = $base_path.'/cache/cache.js';
|
|
||||||
|
|
||||||
require('./config/jshrink.php');
|
require('./config/jshrink.php');
|
||||||
|
|
||||||
@ -34,6 +33,8 @@ $modified = array();
|
|||||||
|
|
||||||
if(isset($groups[$_GET['g']]))
|
if(isset($groups[$_GET['g']]))
|
||||||
{
|
{
|
||||||
|
$cache_file = $base_path.'/cache/'.$_GET['g'];
|
||||||
|
|
||||||
foreach($groups[$_GET['g']] as $file)
|
foreach($groups[$_GET['g']] as $file)
|
||||||
{
|
{
|
||||||
$new_file = realpath($base_path.$file);
|
$new_file = realpath($base_path.$file);
|
||||||
@ -41,6 +42,10 @@ if(isset($groups[$_GET['g']]))
|
|||||||
$modified[] = filemtime($new_file);
|
$modified[] = filemtime($new_file);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
else //Nothing to display? Just exit
|
||||||
|
{
|
||||||
|
die("You must specify a group that exists");
|
||||||
|
}
|
||||||
|
|
||||||
//Add this page too
|
//Add this page too
|
||||||
$modified[] = filemtime($base_path."js.php");
|
$modified[] = filemtime($base_path."js.php");
|
||||||
|
Loading…
Reference in New Issue
Block a user