summaryrefslogtreecommitdiff
path: root/lib/exe/js.php
diff options
context:
space:
mode:
authorchris <chris@jalakai.co.uk>2006-06-19 12:46:13 +0200
committerchris <chris@jalakai.co.uk>2006-06-19 12:46:13 +0200
commit3f4c2ce36d183b39e522ac3b17f9d7e8db19fb70 (patch)
treeef58268dd13a7defcd3e22870fdf6c8f432a6422 /lib/exe/js.php
parentda8154baf873777d30aa8cb74a5c1c61454fce2a (diff)
downloadrpg-3f4c2ce36d183b39e522ac3b17f9d7e8db19fb70.tar.gz
rpg-3f4c2ce36d183b39e522ac3b17f9d7e8db19fb70.tar.bz2
js.php fix
- correct begin/end comment, plugin filename wasn't being used - add file exists check, to avoid bloating js with comments for non-existent plugin js. Many (most?) plugins don't have javascript. darcs-hash:20060619104613-9b6ab-08a570cdbb0d6441f1caa71766d4c59c73828835.gz
Diffstat (limited to 'lib/exe/js.php')
-rw-r--r--lib/exe/js.php8
1 files changed, 5 insertions, 3 deletions
diff --git a/lib/exe/js.php b/lib/exe/js.php
index 75b9b1f1c..9854f1b45 100644
--- a/lib/exe/js.php
+++ b/lib/exe/js.php
@@ -130,9 +130,11 @@ function js_out(){
// load plugin scripts (suppress warnings for missing ones)
foreach($plugins as $plugin){
- echo "\n\n/* XXXXXXXXXX begin of $file XXXXXXXXXX */\n\n";
- @readfile($plugin);
- echo "\n\n/* XXXXXXXXXX end of $file XXXXXXXXXX */\n\n";
+ if (@file_exists($plugin)) {
+ echo "\n\n/* XXXXXXXXXX begin of $plugin XXXXXXXXXX */\n\n";
+ @readfile($plugin);
+ echo "\n\n/* XXXXXXXXXX end of $plugin XXXXXXXXXX */\n\n";
+ }
}
// load user script