Gossamer Forum
Home : Products : Gossamer Links : Version 1.x :

1.1b2: add.cgi bug?

Quote Reply
1.1b2: add.cgi bug?
ok.. i was adding something to nph-build.cgi (just an easy detailed pages for certain category mod).. i decided to use a array for the categories that were to be detailed..

so i was thinking the way i always think to do it.. but i saw in add.cgi it being used like this

Code:
if (@Links::db_referers ... blah)
blah..
foreach (@Links::db_referers) {

so i was like.. OK.. alex did it.. i guess i'll do it Smile

but then it didn't even go through the loop.. i was sure i had a value in there..

so i changed it to look like

@{$LINKS{db_referers}}

then it started to work..

just wondering.. is that a bug?

jerry
Quote Reply
Re: 1.1b2: add.cgi bug? In reply to
yep... i just tested it out.. and it didn't work with Alex's code..

but when i switch both of them to

Code:
@{$LINKS{db_referers}}

it worked..

so it looked like

Code:
if (@{$LINKS{db_referers}} and $ENV{'HTTP_REFERER'}) {
$found = 0;
foreach (@{$LINKS{db_referers}}) {

did you guys notice.. when someone tries to auto submit.. it will just give you the error form.. and you can just press submit and it will submit Smile it's almost like a "confirm" page..

as a matter of fact.. i'm gonna make a confirm page using the error subroutine to save myself space Smile

jerry
Quote Reply
Re: 1.1b2: add.cgi bug? In reply to
and Alex

i'm adding yahoo style aliases to my directory and i'm looking for the max speed here for nph-build.cgi..

i was using a query that had WHERE Name REGEXP "[^@]+\$" in the get category list (which works fine in build_stats) but in build_category_pages.. i changed you $CATDB->query into a prepare -> execute -> fetch and i ended up with a 2 second slower build Smile [on average].. that means your DBSQL is VERY fast Smile

is there a way to say Name NOT END WITH @ using your sub query in DBSQL.pm?

thanks!

jerry
Quote Reply
Re: 1.1b2: add.cgi bug? In reply to
Hi!

Yes, that's a bug, left over from before all the config options were putinto %LINKS. I've fixed it up! Also, switching from site_html_add_failure to site_html_error is a good idea (although most auto submits never see the confirm page).

As for the negative search, unfortunately there isn't any way to easily do this in DBSQL.pm. It only does term = 'value' or term LIKE '%value%' depending on the value of ww.

Cheers,

Alex



Quote Reply
Re: 1.1b2: add.cgi bug? In reply to
Alex,

When you say "this is fixed" does that mean you've patched the distribution, so that future downloads have all the fixes?

Can you put up a "patches" file with the changed files so we can just update those?

I think it will make it a lot easier for everyone to remain at the same 'update level' if you can.

Quote Reply
Re: 1.1b2: add.cgi bug? In reply to
yea.. like i said you should jot down everything you change.. i don't care how you jot them down.. but at least keep a file with the ORIGINAL number line of the start of the area changed so we can go into the original beta 1.1b2 and then look in 1.1 and get the new codes based on the number lines..

jerry
Quote Reply
Re: 1.1b2: add.cgi bug? In reply to
Hello Jerry!

Quote:
yea.. like i said you should jot down everything you change..

You may want to look in there!


gossamer-threads.com/scripts/forum/resources/Forum9/HTML/000127.html


[This message has been edited by rajani (edited November 11, 1999).]