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?
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.
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:
Code:
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:
Code:
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:
Code:
update post,warnings set warn_flag=1 where warned_post=postid;
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.
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?
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.