6.0.0-beta1
7/9/25

[#124] bug in javascript call when filtering based on keyword
Summary bug in javascript call when filtering based on keyword
Queue Midas
Queue Version HEAD
Type Bug
State Resolved
Priority 2. Medium
Owners mdjukic (at)
Requester email (at) teletechnics (dot) com
Created 04/26/2004 (7744 days ago)
Due
Updated 05/02/2004 (7738 days ago)
Assigned 04/28/2004 (7742 days ago)
Resolved 05/02/2004 (7738 days ago)
Github Issue Link
Github Pull Request
Milestone
Patch No

History
05/02/2004 10:47:35 PM mdjukic Comment #5
State ⇒ Resolved
Reply to this comment
Fixed the type and keyword filtering, as well as a bunch of other 
small typos, errors and miscalculations, which all put together meant 
erratic results.
04/28/2004 01:38:13 PM mdjukic Comment #4
State ⇒ Assigned
Reply to this comment
Ok, reopening this.
04/27/2004 11:51:09 AM email (at) teletechnics (dot) com Comment #3 Reply to this comment
Now some random behaviour



ie. calling

http://site.com/midas/ad.php?d=js



the output may be



document.write('');

**note empty quotes

or

document.write('[IMAGE]');

** ie correct

or

Notice: Undefined offset: 3 in 
/usr/local/etc/httpd/vhosts/horde-cvs/midas/lib/Campaigns.php on line 
102

document.write('[IMAGE]');



setting a k=KEYWORD

does not actually restrict selection to the ones with a (the) KEYWORD 
set, but seems show any ad available.
04/26/2004 10:23:26 PM mdjukic Comment #2
State ⇒ Resolved
Reply to this comment
Fixed in CVS.
04/26/2004 07:37:15 PM Chuck Hagenbuch State ⇒ Assigned
Priority ⇒ 2. Medium
Assigned to mdjukic
 
04/26/2004 07:34:28 PM email (at) teletechnics (dot) com Comment #1
State ⇒ Unconfirmed
Priority ⇒ 2. Medium
Type ⇒ Bug
Queue ⇒ Midas
Reply to this comment
When trying to call an ad with a javascript call to..

http://i-pt.securesites.com/midas/ad.php?d=js&k=KEYWORD



returns errors:

Notice: Undefined variable: keyword in 
/usr/local/etc/httpd/vhosts/horde-cvs/midas/lib/Campaigns.php on line 
115



Fatal error: Call to a member function on a non-object in 
/usr/local/etc/httpd/vhosts/horde-cvs/midas/lib/Campaigns.php on line 
118





Error 1 is fixed by changing

             /* Split up all the keywords into an array consisting only of

              * unique keywords. */

-            $target_words = array_unique(preg_split('|\s+|', $keyword));

+            $target_words = array_unique(preg_split('|\s+|', $target_words));

         }



         $avail_words = $this->_campaigns->getKeywords('active');





Error 2

I have tried to follow the code and cannot find anything. So was 
hoping if someone else could cast an eye on this.



Thanks,

tim.

Saved Queries