Skip to content
Permalink
Browse files

Made it so you can call require_js after header printed (bug 8823)

  • Loading branch information...
sam_marshall
sam_marshall committed Mar 9, 2007
1 parent 521296f commit 0e9d0c0b854d06b70564c3729f5eec4ea7fb722d
Showing with 8 additions and 0 deletions.
  1. +8 −0 lib/ajax/ajaxlib.php
@@ -35,6 +35,14 @@ function require_js($lib='') {
$libpath = ajax_get_lib($lib);
if (array_search($libpath, $loadlibs) === false) {
$loadlibs[] = $libpath;
// If this is called after header, then we print it right away
// as otherwise nothing will ever happen!
if (defined('HEADER_PRINTED')) {
$realloadlibs=$loadlibs;
$loadlibs=array($libpath);
print require_js();
$loadlibs=$realloadlibs;
}
}
}
} else {

0 comments on commit 0e9d0c0

Please sign in to comment.
You can’t perform that action at this time.