diff --git a/OTHER/kusaba_freshinstall.postgres.sql b/OTHER/kusaba_freshinstall.postgres.sql index c2d3ad0..003b1ef 100644 --- a/OTHER/kusaba_freshinstall.postgres.sql +++ b/OTHER/kusaba_freshinstall.postgres.sql @@ -193,8 +193,8 @@ CREATE TABLE PREFIX_front ( subject varchar(255) NOT NULL, message text NOT NULL, timestamp int NOT NULL default '0', - poster varchar(75) NOT NULL, - email varchar(255) NOT NULL, + poster varchar(75) NOT NULL default '', + email varchar(255) NOT NULL default '', PRIMARY KEY (id) ); diff --git a/inc/classes/bans.class.php b/inc/classes/bans.class.php index 4c5f97e..89a426a 100644 --- a/inc/classes/bans.class.php +++ b/inc/classes/bans.class.php @@ -91,7 +91,7 @@ class Bans { $ban_until = '0'; } - $tc_db->Execute("INSERT INTO `".KU_DBPREFIX."banlist` ( `ip` , `ipmd5` , `type` , `allowread` , `globalban` , `boards` , `by` , `at` , `until` , `reason`, `staffnote`, `appealat` ) VALUES ( ".$tc_db->qstr(md5_encrypt($ip, KU_RANDOMSEED))." , ".$tc_db->qstr(md5($ip))." , ".intval($type)." , ".intval($allowread)." , ".intval($globalban)." , ".$tc_db->qstr($boards)." , ".$tc_db->qstr($modname)."' , ".time()." , ".intval($ban_until)." , ".$tc_db->qstr($reason)." , ".$tc_db->qstr($staffnote).", ".intval($appealat)." ) "); + $tc_db->Execute("INSERT INTO `".KU_DBPREFIX."banlist` ( `ip` , `ipmd5` , `type` , `allowread` , `globalban` , `boards` , `by` , `at` , `until` , `reason`, `staffnote`, `appealat` ) VALUES ( ".$tc_db->qstr(md5_encrypt($ip, KU_RANDOMSEED))." , ".$tc_db->qstr(md5($ip))." , ".intval($type)." , ".intval($allowread)." , ".intval($globalban)." , ".$tc_db->qstr($boards)." , ".$tc_db->qstr($modname)." , ".time()." , ".intval($ban_until)." , ".$tc_db->qstr($reason)." , ".$tc_db->qstr($staffnote).", ".intval($appealat)." ) "); if (!$proxyban && $type == 1) { $this->UpdateHtaccess(); diff --git a/inc/classes/manage.class.php b/inc/classes/manage.class.php index d26fa48..c95d646 100644 --- a/inc/classes/manage.class.php +++ b/inc/classes/manage.class.php @@ -566,7 +566,7 @@ class Manage { if(isset($_GET['act'])) { if ($_GET['act'] == 'edit') { if (isset($_POST['faq'])) { - $tc_db->Execute("UPDATE `" . KU_DBPREFIX . "front` SET `subject` = " . $tc_db->qstr($_POST['heading']) . ", `message` = " . $tc_db->qstr($_POST['faq']) . ", `order` = " . $tc_db->qstr($_POST['order']) . " WHERE `id` = " . $tc_db->qstr($_GET['id']) . ""); + $tc_db->Execute("UPDATE `" . KU_DBPREFIX . "front` SET `subject` = " . $tc_db->qstr($_POST['heading']) . ", `message` = " . $tc_db->qstr($_POST['faq']) . ", `order` = " . intval($_POST['order']) . " WHERE `id` = " . $tc_db->qstr($_GET['id']) . ""); $tpl_page .= '

'. _gettext('FAQ entry edited') .'


'; management_addlogentry(_gettext('Edited a FAQ entry'), 9); } @@ -582,7 +582,7 @@ class Manage { if (isset($_POST['faq']) && isset($_POST['heading']) && isset($_POST['order'])) { if (!empty($_POST['faq']) || !empty($_POST['heading'])) { $tpl_page .= '
'; - $tc_db->Execute("INSERT HIGH_PRIORITY INTO `" . KU_DBPREFIX . "front` ( `page`, `subject` , `message` , `order` ) VALUES ( '1', " . $tc_db->qstr($_POST['heading']) . " , " . $tc_db->qstr($_POST['faq']) . " , " . $tc_db->qstr($_POST['order']) . " )"); + $tc_db->Execute("INSERT HIGH_PRIORITY INTO `" . KU_DBPREFIX . "front` ( `page`, `subject` , `message` , `order` ) VALUES ( '1', " . $tc_db->qstr($_POST['heading']) . " , " . intval($_POST['faq']) . " , " . intval($_POST['order']) . " )"); $tpl_page .= '

'. _gettext('FAQ entry successfully added.') . '

'; management_addlogentry(_gettext('Added a FAQ entry'), 9); $tpl_page .= '
'; @@ -627,7 +627,7 @@ class Manage { if(isset($_GET['act'])) { if ($_GET['act'] == 'edit') { if (isset($_POST['rules'])) { - $tc_db->Execute("UPDATE `" . KU_DBPREFIX . "front` SET `subject` = " . $tc_db->qstr($_POST['heading']) . ", `message` = " . $tc_db->qstr($_POST['rules']) . ", `order` = " . $tc_db->qstr($_POST['order']) . " WHERE `id` = " . $tc_db->qstr($_GET['id']) . ""); + $tc_db->Execute("UPDATE `" . KU_DBPREFIX . "front` SET `subject` = " . $tc_db->qstr($_POST['heading']) . ", `message` = " . $tc_db->qstr($_POST['rules']) . ", `order` = " . intval($_POST['order']) . " WHERE `id` = " . $tc_db->qstr($_GET['id']) . ""); $tpl_page .= '

'. _gettext('Rules entry edited') .'


'; management_addlogentry(_gettext('Edited a Rule entry'), 9); } @@ -643,7 +643,7 @@ class Manage { if (isset($_POST['rules']) && isset($_POST['heading']) && isset($_POST['order'])) { if (!empty($_POST['rules']) || !empty($_POST['heading'])) { $tpl_page .= '
'; - $tc_db->Execute("INSERT HIGH_PRIORITY INTO `" . KU_DBPREFIX . "front` ( `page`, `subject` , `message` , `order` ) VALUES ( '2', " . $tc_db->qstr($_POST['heading']) . " , " . $tc_db->qstr($_POST['rules']) . " , " . $tc_db->qstr($_POST['order']) . " )"); + $tc_db->Execute("INSERT HIGH_PRIORITY INTO `" . KU_DBPREFIX . "front` ( `page`, `subject` , `message` , `order` ) VALUES ( '2', " . $tc_db->qstr($_POST['heading']) . " , " . $tc_db->qstr($_POST['rules']) . " , " . intval($_POST['order']) . " )"); $tpl_page .= '

'. _gettext('Rules entry successfully added.') . '

'; management_addlogentry(_gettext('Added a Rule entry'), 9); $tpl_page .= '
';