Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Improper handling of css/javascript files in loadCssJs() #1

Open
mklepaczewski opened this issue Feb 16, 2012 · 0 comments
Open

Improper handling of css/javascript files in loadCssJs() #1

mklepaczewski opened this issue Feb 16, 2012 · 0 comments

Comments

@mklepaczewski
Copy link

Hi,

Ajax class does not load javascript/css files. The problem lies in loadCssJs() method around:
foreach ($files['css'] as $file)
if ($file['include']) {
ob_start();
include($file['src']);

and similar loop for jscript. CJLoader returns array key $file['string'] instead of $file['src'].

Second bug, in case of js files:
foreach ($files['jscript'] as $file)
should be
foreach ($files['js'] as $file)
as CJLoader returns 'js' key, not 'jscript'.

There's also one more (potential?) bug:
$RI_CJLoader->set(array('ajax' => true, 'load_global' => false, 'load_print' => false));
generates warrning as set takes two parameters. As far as I can tell it should be changed to:
$RI_CJLoader->set('ajax', true);
$RI_CJLoader->set('load_global', false);
$RI_CJLoader->set('load_print', false);

Regards,
data-digger

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant