<commit_before><?php
/**
 * Invokes complex logic to publish a module asset file
 *
 * Syntax:
 * {assetFile absoluteUrl="..."}
 * {assetFile relativeUrl="..."}
 */

require_once dirname(__FILE__).'/determineUrl.php';

function smarty_function_assetFile($params,&$smarty) {
    if(!empty($params['relativeUrl'])) {
        $relativeUrl = $params['relativeUrl'];
        $controller = $smarty->tpl_vars['this']->value;
        if(isset($controller->module) && empty($params['nomodule'])) {
            echo $controller->module->publishCssFile($relativeUrl,$media);
        }
        else {
            echo Yii::app()->publishCssFile($relativeUrl,$media);
        }
    }
    else {
        echo $params['absoluteUrl'];
    }

    echo $url;
} // function smarty_function_assetFile($params,&$smarty)<commit_msg>C+P error from my perambulations about assetmanager.<commit_after><?php
/**
 * Invokes complex logic to publish a module asset file
 *
 * Syntax:
 * {assetFile absoluteUrl="..."}
 * {assetFile relativeUrl="..."}
 */

require_once dirname(__FILE__).'/determineUrl.php';

function smarty_function_assetFile($params,&$smarty) {
    if(!empty($params['relativeUrl'])) {
        $relativeUrl = $params['relativeUrl'];
        $controller = $smarty->tpl_vars['this']->value;
        if(isset($controller->module) && empty($params['nomodule'])) {
            echo $controller->module->publishAssetFile($relativeUrl);
        }
        else {
            echo Yii::app()->publishAssetFile($relativeUrl);
        }
    }
    else {
        echo $params['absoluteUrl'];
    }

    echo $url;
} // function smarty_function_assetFile($params,&$smarty)
{'fraction_non_alphanumeric': 0.16979987871437235, 'fraction_numerical': 0.0, 'mean_word_length': 3.3421052631578947, 'pattern_counts': {'":': 0, '<': 5, '<?xml version=': 0, '>': 15, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '2321315', 'n_tokens_mistral': 488, 'n_tokens_neox': 486, 'n_words': 81}