mirror of
https://github.com/alextselegidis/easyappointments.git
synced 2024-11-08 17:12:25 +03:00
The Config::DEBUG flag toggles the min files (#502).
This commit is contained in:
parent
d45abbfeab
commit
fc6921103e
1 changed files with 10 additions and 0 deletions
|
@ -28,5 +28,15 @@ function asset_url($uri = '', $protocol = NULL)
|
|||
|
||||
$cache_busting_token = ! Config::DEBUG_MODE ? '?' . $ci->config->item('cache_busting_token') : '';
|
||||
|
||||
if (strpos(basename($uri), '.js') !== FALSE && strpos(basename($uri), '.min.js') === FALSE && ! Config::DEBUG_MODE)
|
||||
{
|
||||
$uri = str_replace('.js', '.min.js', $uri);
|
||||
}
|
||||
|
||||
if (strpos(basename($uri), '.css') !== FALSE && strpos(basename($uri), '.min.css') === FALSE && ! Config::DEBUG_MODE)
|
||||
{
|
||||
$uri = str_replace('.css', '.min.css', $uri);
|
||||
}
|
||||
|
||||
return base_url($uri . $cache_busting_token, $protocol);
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue