PDA

View Full Version : Bug in upgrade from Zero Tolerance's Warning hack v1.5


kmike
04-22-2005, 03:32 AM
Script "upgrade_warn.php" doesn't add required `warn_alertcomment` field to warning_types table when upgrading from Zero Tolerance's hack.

sv1cec
04-22-2005, 04:52 AM
You are right, and this is not the only one that isn't there.

I thought that by now, nobody would be upgrading from ZT's hack to mine, so I haven't updated that script for a long time. Do you have warnings in ZT's hack that you want to maintain?

Rgds

kmike
04-22-2005, 05:23 AM
303 warnings here, of course I'd like them to be maintained.
Also, I noticed that "View Warned Users" is empty.

sv1cec
04-22-2005, 05:53 AM
OK, download the latest zip and get the upgrade_warn.php from that one, to your web server. Run it and try again. Let me know if you have any more issues.

Also, there are some changes in the instructions, so go through them carefully.

Rgds

Heo13
04-26-2005, 07:20 AM
I want to update from ZT's 1.5 hack. Is the upgrade script up-to-date?

sv1cec
04-26-2005, 08:14 AM
As far as I can tell, it should do the upgrade for you.

Rgds

kmike
04-28-2005, 10:30 AM
Another bug, don't know if it's related to upgrade from ZT's 1.5 version.
When trying to remove non-post-related warning, I got this:

Database error in vBulletin 3.0.7:

Invalid SQL: update user set warning_level='0', warnings=, warning_bans= where userid='55037'
mysql error: You have an error in your SQL syntax. Check the manual that corresponds to your MySQL server version for the right syntax to use near ' warning_bans= where userid='55037'' at line 1

mysql error number: 1064

Date: Thursday 28th of April 2005 06:24:57 AM
Script: http://xxxxxxx.com/forums/admincp/admin_warn.php
Referer: http://xxxxxxx.com/forums/admincp/admin_warn.php?act=remove&id=775&userid=2&uname=test&wname=Non-sponsor%20ad%20in%20avatar%20or%20user%20title&postid=0&ban=N&orderstring=

Also, can't remove some permanent non-post-related warnings I've issued while testing 3.4.6. I guess it's because of alert error fixed in 3.4.7?
I'm already a bit sorry I've upgraded from ZT's hack, the amount of bugs is simply too high. My fault actually - had to test it better beforehand...

-------------------------------------
EDIT:
Ok, scrap the above post, it appears this hack uses $vboptions[bburl] extensively, which pointed to the wrong URL because of some options cleanup.

-------------------------------------------------------------------------------------------
Two real ones, again related to upgrade from ZT's hack:

1. Upgrade script doesn't initialize "warnings" and "warning_bans" fields in the user table. They are always zero for legacy warnings. Upgrade script should do something like:
select warned_user,count(*) from warnings group by warned_user
and update at least "warnings" field in the loop.

2. 'warn_post" field in the post table isn't initialized by upgrade script either.
This SQL takes care of it:

update post,warnings set warn_flag=1 where warned_post=postid;

sv1cec
04-28-2005, 12:36 PM
There is a special script which is supposed to update your post table, for those posts which have been warned. Did you run it? update_warn_sign.php or something.

kmike
04-28-2005, 01:08 PM
No I didn't, it wasn't mentioned in WarningSystemInstallationInstructions.txt.
In fact, my query is even better than looping through all warnings in that script :)

What about "warnings" field in user table? Is it covered by some script, too?

sv1cec
04-28-2005, 08:14 PM
What about the warnings field? You mean if it will get updated with the number of warnings each user has? No, it is not.

Please understand that the upgrade from ZT's hack was included just because the basic code was taken from that hack. I do not plan to maintain that script any further.

Rgds