Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- public static function add_js_file($file, $index = -1) {
- if (!file_exists(FS_ROOT.$file)) {
- Throw new Exception('Tried to add Javascript file that doesn\'t exist');
- }
- if ($index != -1) {
- for ($x = count(self::$js_includes); $x > $index + 1; $x --) {
- self::$js_includes[$x] = self::$js_includes[$x - 1];
- }
- self::$js_includes[$index] = $file;
- } else {
- self::$js_includes[] = $file;
- }
- global $_FirePHP; $_FirePHP->info('jiffy', 'JS File Added');
- }
Add Comment
Please, Sign In to add comment