[dev] Problem with NAG and Horde::addScriptFile()

Tyler Colbert tyler-hordeml at colberts.us
Wed Sep 3 14:18:15 PDT 2003


The nag tasklists.php file fails to include the javascript to manage the
Permissions button.  Seems that addScriptFile decides that the headers havent
been sent yet, so it queues up the script to be added, but nothing ever calls
Horde::includeScriptFiles();.

Ive attached a patch, but I dont think its the proper solution.  I just call
includeScriptFiles() a couple lines after the addScriptFile() call..

It seems like this problem could happen to any part of horde.  Perhaps the
intention was to call includeScriptFiles() in common-header.inc or something?

--
Tyler Colbert
-------------- next part --------------
Index: tasklists.php
===================================================================
RCS file: /repository/nag/tasklists.php,v
retrieving revision 1.17
diff -u -r1.17 tasklists.php
--- tasklists.php	1 Sep 2003 21:59:40 -0000	1.17
+++ tasklists.php	3 Sep 2003 07:48:41 -0000
@@ -147,6 +147,7 @@
 Horde::addScriptFile('open_share_edit_win.js', 'horde');
 require NAG_TEMPLATES . '/common-header.inc';
 Nag::menu();
+Horde::includeScriptFiles();
 require NAG_TEMPLATES . '/tasklists/javascript.inc';
 require NAG_TEMPLATES . '/tasklists/manage.inc';
 require NAG_TEMPLATES . '/common-footer.inc';


More information about the dev mailing list