Created
December 1, 2011 21:03
-
-
Save alfrekjv/1419846 to your computer and use it in GitHub Desktop.
helper for the slAssetPlugin
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
function sl_use_javascript($js) | |
{ | |
$config = sfConfig::get('app_sl_asset_javascript'); | |
$env = sfConfig::get('sf_environment'); | |
if ($env == 'prod') | |
{ | |
if (isset($config[$j]['version']) && $config[$js]['version'] > 0) | |
{ | |
use_javascript($js.'.'.$config[$js]['version'].'.min.js'); | |
} | |
else | |
{ | |
use_javascript($js.'.min.js'); | |
} | |
} | |
else | |
{ | |
use_javascript($js.'.js'); | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment