subscribing a search without value

Bug #342973 reported by Xavier Brochard
4
Affects Status Importance Assigned to Milestone
Woda
Fix Released
Low
Malcolm Fitzgerald
4.610
Fix Released
Low
Malcolm Fitzgerald

Bug Description

in search results (cgiSearch), icon for subscribing a search ("I want to subscribe to searches like this.")
may call AgentAddForm without value for $Formdata parameter - try with What's new (cgiNewForm) for instance.

$Formdata is set in sub saveFormToolbar (but it returns another icon)
and the first line of cgiSearch, call sub saveFormToolbar
It was called 2 times before because cgiSearch reset toolbar:
# undef @Toolbar; # zakaj? subforma?
# do saveFormToolbar(); # search filed gets spoiled!

Woda 4.603, Perl 5.8 and Perl 5.10

Related branches

Xavier Brochard (xavier)
Changed in woda:
importance: Undecided → Low
Revision history for this message
Malcolm Fitzgerald (malcolm-notyourhomework) wrote :

This can be fixed with this code:

At the very end of cgiSearch look for "I want to subscribe to searches like this."

Add the two lines beginning with $Formdata. The block should look like this:

    if (&wbAllowed($Group,'AgentAddForm') && ! $agentFile) {

        $text = "I want to subscribe to searches like this."; #UK
        $Formdata = &hashExport(*CGI);
        $Formdata = &htEscape($x);

        push (@Toolbar,<<EOM);
<a href="$SCRIPT/AgentAddForm?FORM=AgentAddForm&amp;formdata=$Formdata" $TargetParent>
<img $ICONPAR src="$ICONURL/angie.gif" alt="$text" title="$text"></a>
EOM
    }

Revision history for this message
Xavier Brochard (xavier) wrote : Re: [Bug 342973] Re: subscribing a search without value

Thanks
I was just playing with the bug system :-)

now your next mission is: ;-)
change the statut and assignation of the bug
commit your fix and link it to the bug

Then when we release the new woda version, it will produce a changelog with a
link to this bug.

Le mardi 17 mars 2009 07:36:01 Malcolm Fitzgerald, vous avez écrit :
> This can be fixed with this code:
>
> At the very end of cgiSearch look for "I want to subscribe to searches
> like this."
>
> Add the two lines beginning with $Formdata. The block should look like
> this:
>
>
> if (&wbAllowed($Group,'AgentAddForm') && ! $agentFile) {
>
> $text = "I want to subscribe to searches like this."; #UK
> $Formdata = &hashExport(*CGI);
> $Formdata = &htEscape($x);
>
> push (@Toolbar,<<EOM);
> <a href="$SCRIPT/AgentAddForm?FORM=AgentAddForm&amp;formdata=$Formdata"
> $TargetParent> <img $ICONPAR src="$ICONURL/angie.gif" alt="$text"
> title="$text"></a> EOM
> }

--
Xavier
<email address hidden>
09 54 06 16 26

Changed in woda:
assignee: nobody → malcolm-notyourhomework
status: New → Confirmed
status: Confirmed → Fix Committed
Revision history for this message
Malcolm Fitzgerald (malcolm-notyourhomework) wrote :

mission accomplished!

Xavier Brochard (xavier)
Changed in woda:
milestone: none → merge-mf-and-xavier
Xavier Brochard (xavier)
Changed in woda:
status: Fix Committed → Fix Released
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.