Fixed some typos and other things that completely break bans and FAQ/Rules editing on PostgreSQL (and possibly SQLite)

git-svn-id: http://kusabax.cultnet.net/svn/repo/stable@198 73d99b7e-4f53-4972-b7b7-2ecd3c4d89ee
This commit is contained in:
Sazpaimon committed 2009-07-12 12:00:19 +00:00
1 parent b49defe6b2
commit 5b243dda8b
3 files changed
+7 -7

No files matched your search

+2 -2
View File
@@ -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)
);
+1 -1
View File
@@ -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();
+4 -4
View File
@@ -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 .= '<hr /><h3>'. _gettext('FAQ entry edited') .'</h3><hr />';
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 .= '<hr />';
$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 .= '<h3>'. _gettext('FAQ entry successfully added.') . '</h3>';
management_addlogentry(_gettext('Added a FAQ entry'), 9);
$tpl_page .= '<hr />';
@@ -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 .= '<hr /><h3>'. _gettext('Rules entry edited') .'</h3><hr />';
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 .= '<hr />';
$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 .= '<h3>'. _gettext('Rules entry successfully added.') . '</h3>';
management_addlogentry(_gettext('Added a Rule entry'), 9);
$tpl_page .= '<hr />';