From 13383a56fe2a0695d0a421dc7b3c1f9508c51961 Mon Sep 17 00:00:00 2001 From: atg Date: Wed, 24 Oct 2007 23:52:44 +0000 Subject: [PATCH] Fixed SQL issue git-svn-id: file:///home/shish/svn/shimmie2/trunk@569 7f39781d-f577-437e-ae19-be835c7a54ca --- contrib/report_image/main.php | 19 +++++++++---------- contrib/report_image/report_image.js | 2 +- contrib/report_image/theme.php | 2 +- 3 files changed, 11 insertions(+), 12 deletions(-) diff --git a/contrib/report_image/main.php b/contrib/report_image/main.php index 8b636525..577ddaa0 100755 --- a/contrib/report_image/main.php +++ b/contrib/report_image/main.php @@ -5,8 +5,8 @@ * Link: http://atravelinggeek.com/ * License: GPLv2 * Description: Report images as dupes/illegal/etc - * Version 0.1 - * October 23, 2007 + * Version 0.2a - See change log below + * October 24, 2007 */ class RemoveReportedImageEvent extends Event { @@ -37,7 +37,7 @@ class ReportImage extends Extension { if(is_a($event, 'InitExtEvent')) { global $config; - if($config->get_int("ext_ReportImage_version") < 2) { + if($config->get_int("ext_ReportImage_version") < 1) { $this->install(); } } @@ -103,19 +103,13 @@ class ReportImage extends Extension { $database->Execute("CREATE TABLE ReportImage ( id int(11) NOT NULL auto_increment, image_id int(11) default NULL, - reporter_name int(11) default NULL, + reporter_name varchar(32) default NULL, reason_type varchar(255) default NULL, reason varchar(255) default NULL, PRIMARY KEY (id) )"); $config->set_int("ext_ReportImage_version", 1); } - if($config->get_int("ext_ReportImage_version") < 2) { - $database->Execute("ALTER TABLE `reportimage` - CHANGE `reporter_id` `reporter_name` VARCHAR( 32 ) NULL DEFAULT NULL - "); - $config->set_int("ext_ReportImage_version", 2); - } } @@ -148,4 +142,9 @@ class ReportImage extends Extension { } add_event_listener(new ReportImage(), 29); // Not sure what I'm in before. + +// ===== Changelog ===== +// * Version 0.2a - 10/24/07 - Fixed some SQL issues. I will make sure to test before commiting :) +// * Version 0.2 - 10/24/07 - First public release. + ?> \ No newline at end of file diff --git a/contrib/report_image/report_image.js b/contrib/report_image/report_image.js index 7b8ab6a1..9b431a3c 100755 --- a/contrib/report_image/report_image.js +++ b/contrib/report_image/report_image.js @@ -4,7 +4,7 @@ * Link: http://atravelinggeek.com/ * License: GPLv2 * Description: Report images as dupes/illegal/etc - * Version 0.2 + * Version 0.2a - See changelog in main.php * October 24, 2007 */ diff --git a/contrib/report_image/theme.php b/contrib/report_image/theme.php index 68a22457..2b87f3a3 100755 --- a/contrib/report_image/theme.php +++ b/contrib/report_image/theme.php @@ -6,7 +6,7 @@ * Link: http://atravelinggeek.com/ * License: GPLv2 * Description: Report images as dupes/illegal/etc - * Version 0.2 + * Version 0.2a - See changelog in main.php * October 24, 2007 */