PHP Notice in 1.5.2 regarding $use_js

View: New views
3 Messages — Rating Filter:   Alert me  

PHP Notice in 1.5.2 regarding $use_js

by Paul Lesniewski :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

All,

  I am trying to remember about the $use_js variable that I think we
(mostly) purged from somewhere else a few months back.  It got left in
templates/default/addressbook_search_form.tpl and is causing a PHP
notice.  To see it, go to compose a message, click the address button
(you have to have the in-page address book functionality, not the
javascript popup), add an address and return to your compose page.
You'll see the notice at the bottom now:

Category:   PHP, Delayed
Message: Undefined variable: use_js
FILE: /var/www/html/sm_cvs_pure/squirrelmail/templates/default/addressbook_search_form.tpl
LINE: 69

  I know we had a discussion about $use_js a few months ago, and IIRC,
Jon was the one who fixed the problem.  I cannot remember if it is
safe to replace $use_js with our normal $javascript_on or not.  Can
someone remember better than me?  (IIRC, $use_js had some logic on top
of just $javascript_on.... maybe something to do with whether or not
the user had intended to use the JavaScript address popup, yeah that
must be it)

--
Paul Lesniewski
SquirrelMail Team
Please support Open Source Software by donating to SquirrelMail!
http://squirrelmail.org/donate_paul_lesniewski.php

------------------------------------------------------------------------------
Let Crystal Reports handle the reporting - Free Crystal Reports 2008 30-Day
trial. Simplify your report design, integration and deployment - and focus on
what you do best, core application coding. Discover what's new with
Crystal Reports now.  http://p.sf.net/sfu/bobj-july
-----
squirrelmail-devel mailing list
Posting guidelines: http://squirrelmail.org/postingguidelines
List address: squirrelmail-devel@...
List archives: http://news.gmane.org/gmane.mail.squirrelmail.devel
List info (subscribe/unsubscribe/change options): https://lists.sourceforge.net/lists/listinfo/squirrelmail-devel

Re: PHP Notice in 1.5.2 regarding $use_js

by Paul Lesniewski :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

On Sat, Sep 12, 2009 at 1:32 PM, Paul Lesniewski <paul@...> wrote:

> All,
>
>  I am trying to remember about the $use_js variable that I think we
> (mostly) purged from somewhere else a few months back.  It got left in
> templates/default/addressbook_search_form.tpl and is causing a PHP
> notice.  To see it, go to compose a message, click the address button
> (you have to have the in-page address book functionality, not the
> javascript popup), add an address and return to your compose page.
> You'll see the notice at the bottom now:
>
> Category:        PHP, Delayed
> Message:        Undefined variable: use_js
> FILE:   /var/www/html/sm_cvs_pure/squirrelmail/templates/default/addressbook_search_form.tpl
> LINE:   69
>
>  I know we had a discussion about $use_js a few months ago, and IIRC,
> Jon was the one who fixed the problem.  I cannot remember if it is
> safe to replace $use_js with our normal $javascript_on or not.  Can
> someone remember better than me?  (IIRC, $use_js had some logic on top
> of just $javascript_on.... maybe something to do with whether or not
> the user had intended to use the JavaScript address popup, yeah that
> must be it)

I think I got it.  Jon's commit was here:

http://squirrelmail.svn.sourceforge.net/viewvc/squirrelmail?view=rev&revision=13713

Please verify that my replacement of $use_js with the following is correct.

 if ($javascript_on && $compose_addr_pop)

My commit is here:

http://squirrelmail.svn.sourceforge.net/viewvc/squirrelmail?view=rev&revision=13843

--
Paul Lesniewski
SquirrelMail Team
Please support Open Source Software by donating to SquirrelMail!
http://squirrelmail.org/donate_paul_lesniewski.php

------------------------------------------------------------------------------
Let Crystal Reports handle the reporting - Free Crystal Reports 2008 30-Day
trial. Simplify your report design, integration and deployment - and focus on
what you do best, core application coding. Discover what's new with
Crystal Reports now.  http://p.sf.net/sfu/bobj-july
-----
squirrelmail-devel mailing list
Posting guidelines: http://squirrelmail.org/postingguidelines
List address: squirrelmail-devel@...
List archives: http://news.gmane.org/gmane.mail.squirrelmail.devel
List info (subscribe/unsubscribe/change options): https://lists.sourceforge.net/lists/listinfo/squirrelmail-devel

Re: PHP Notice in 1.5.2 regarding $use_js

by Jon Angliss :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

On Sat, 12 Sep 2009 13:52:05 -0700, Paul Lesniewski
<paul@...> wrote:

>On Sat, Sep 12, 2009 at 1:32 PM, Paul Lesniewski <paul@...> wrote:
>> All,
>>
>>  I am trying to remember about the $use_js variable that I think we
>> (mostly) purged from somewhere else a few months back.  It got left in
>> templates/default/addressbook_search_form.tpl and is causing a PHP
>> notice.  To see it, go to compose a message, click the address button
>> (you have to have the in-page address book functionality, not the
>> javascript popup), add an address and return to your compose page.
>> You'll see the notice at the bottom now:
>>
>> Category:        PHP, Delayed
>> Message:        Undefined variable: use_js
>> FILE:   /var/www/html/sm_cvs_pure/squirrelmail/templates/default/addressbook_search_form.tpl
>> LINE:   69
>>
>>  I know we had a discussion about $use_js a few months ago, and IIRC,
>> Jon was the one who fixed the problem.  I cannot remember if it is
>> safe to replace $use_js with our normal $javascript_on or not.  Can
>> someone remember better than me?  (IIRC, $use_js had some logic on top
>> of just $javascript_on.... maybe something to do with whether or not
>> the user had intended to use the JavaScript address popup, yeah that
>> must be it)
>
>I think I got it.  Jon's commit was here:
>
>http://squirrelmail.svn.sourceforge.net/viewvc/squirrelmail?view=rev&revision=13713
>
>Please verify that my replacement of $use_js with the following is correct.
>
> if ($javascript_on && $compose_addr_pop)

I believe that would be the correct handling.  If I remember correct,
you can even skip the javascript_on, but I'd  have to double check all
the template vars, and how they get passed in.
--
Jonathan Angliss
<jon@...>


------------------------------------------------------------------------------
Let Crystal Reports handle the reporting - Free Crystal Reports 2008 30-Day
trial. Simplify your report design, integration and deployment - and focus on
what you do best, core application coding. Discover what's new with
Crystal Reports now.  http://p.sf.net/sfu/bobj-july
-----
squirrelmail-devel mailing list
Posting guidelines: http://squirrelmail.org/postingguidelines
List address: squirrelmail-devel@...
List archives: http://news.gmane.org/gmane.mail.squirrelmail.devel
List info (subscribe/unsubscribe/change options): https://lists.sourceforge.net/lists/listinfo/squirrelmail-devel