From 19e97bac5d640fcbe876167b8981fe54b111e434 Mon Sep 17 00:00:00 2001 From: gnuboard Date: Tue, 25 Jun 2013 17:56:40 +0900 Subject: [PATCH 1/4] =?UTF-8?q?=EB=AA=A9=EB=A1=9D=EC=97=90=EC=84=9C=20?= =?UTF-8?q?=ED=8C=8C=EC=9D=BC=20=EC=82=AC=EC=9A=A9=20=EC=98=B5=EC=85=98=20?= =?UTF-8?q?=EC=B6=94=EA=B0=80=20-=20=EB=AA=A9=EB=A1=9D=EC=97=90=EC=84=9C?= =?UTF-8?q?=20=ED=8C=8C=EC=9D=BC=EC=9D=84=20=EB=A7=A4=EB=B2=88=20=EC=9D=BD?= =?UTF-8?q?=EC=96=B4=EC=98=A4=EC=A7=80=20=EC=95=8A=EC=9C=BC=EB=AF=80?= =?UTF-8?q?=EB=A1=9C=20=EC=86=8D=EB=8F=84=EA=B0=80=20=EC=A2=80=EB=8D=94=20?= =?UTF-8?q?=EB=B9=A8=EB=9D=BC=EC=A7=90?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- adm/board_form.php | 43 +++++++++++++++++++++++++++++++-------- adm/board_form_update.php | 3 +++ bbs/view.php | 2 +- bbs/write_update.php | 4 ++++ lib/common.lib.php | 10 ++++++--- 5 files changed, 49 insertions(+), 13 deletions(-) diff --git a/adm/board_form.php b/adm/board_form.php index 147aea0ff..f7cd0c245 100644 --- a/adm/board_form.php +++ b/adm/board_form.php @@ -22,35 +22,35 @@ if (!isset($board['bo_device'])) { } if (!isset($board['bo_show_menu'])) { - sql_query(" ALTER TABLE `{$g4['board_table']}` ADD `bo_show_menu` TINYINT NOT NULL DEFAULT '0' AFTER `bo_order_search`, ADD `bo_order` INT NOT NULL DEFAULT '0' AFTER `bo_show_menu` ", false); + sql_query(" ALTER TABLE `{$g4['board_table']}` ADD `bo_show_menu` TINYINT NOT NULL DEFAULT '0' AFTER `bo_order_search`, ADD `bo_order` INT NOT NULL DEFAULT '0' AFTER `bo_show_menu` ", false); } if (!isset($board['bo_mobile_skin'])) { - sql_query(" ALTER TABLE `{$g4['board_table']}` ADD `bo_mobile_skin` VARCHAR(255) NOT NULL DEFAULT '' AFTER `bo_skin` ", false); + sql_query(" ALTER TABLE `{$g4['board_table']}` ADD `bo_mobile_skin` VARCHAR(255) NOT NULL DEFAULT '' AFTER `bo_skin` ", false); } if (!isset($board['bo_gallery_width'])) { - sql_query(" ALTER TABLE `{$g4['board_table']}` ADD `bo_gallery_width` INT NOT NULL AFTER `bo_gallery_cols`, ADD `bo_gallery_height` INT NOT NULL DEFAULT '0' AFTER `bo_gallery_width`, ADD `bo_mobile_gallery_cols` INT NOT NULL DEFAULT '0' AFTER `bo_gallery_height`, ADD `bo_mobile_gallery_width` INT NOT NULL DEFAULT '0' AFTER `bo_mobile_gallery_cols`, ADD `bo_mobile_gallery_height` INT NOT NULL DEFAULT '0' AFTER `bo_mobile_gallery_width` ", false); + sql_query(" ALTER TABLE `{$g4['board_table']}` ADD `bo_gallery_width` INT NOT NULL AFTER `bo_gallery_cols`, ADD `bo_gallery_height` INT NOT NULL DEFAULT '0' AFTER `bo_gallery_width`, ADD `bo_mobile_gallery_cols` INT NOT NULL DEFAULT '0' AFTER `bo_gallery_height`, ADD `bo_mobile_gallery_width` INT NOT NULL DEFAULT '0' AFTER `bo_mobile_gallery_cols`, ADD `bo_mobile_gallery_height` INT NOT NULL DEFAULT '0' AFTER `bo_mobile_gallery_width` ", false); } if (!isset($board['bo_mobile_subject_len'])) { - sql_query(" ALTER TABLE `{$g4['board_table']}` ADD `bo_mobile_subject_len` INT(11) NOT NULL DEFAULT '0' AFTER `bo_subject_len` ", false); + sql_query(" ALTER TABLE `{$g4['board_table']}` ADD `bo_mobile_subject_len` INT(11) NOT NULL DEFAULT '0' AFTER `bo_subject_len` ", false); } if (!isset($board['bo_mobile_page_rows'])) { - sql_query(" ALTER TABLE `{$g4['board_table']}` ADD `bo_mobile_page_rows` INT(11) NOT NULL DEFAULT '0' AFTER `bo_page_rows` ", false); + sql_query(" ALTER TABLE `{$g4['board_table']}` ADD `bo_mobile_page_rows` INT(11) NOT NULL DEFAULT '0' AFTER `bo_page_rows` ", false); } if (!isset($board['bo_mobile_content_head'])) { - sql_query(" ALTER TABLE `{$g4['board_table']}` ADD `bo_mobile_content_head` TEXT NOT NULL AFTER `bo_content_head`, ADD `bo_mobile_content_tail` TEXT NOT NULL AFTER `bo_content_tail`", false); + sql_query(" ALTER TABLE `{$g4['board_table']}` ADD `bo_mobile_content_head` TEXT NOT NULL AFTER `bo_content_head`, ADD `bo_mobile_content_tail` TEXT NOT NULL AFTER `bo_content_tail`", false); } if (!isset($board['bo_use_cert'])) { - sql_query(" ALTER TABLE `{$g4['board_table']}` ADD `bo_use_cert` ENUM('','cert','adult') NOT NULL DEFAULT '' AFTER `bo_use_email` ", false); + sql_query(" ALTER TABLE `{$g4['board_table']}` ADD `bo_use_cert` ENUM('','cert','adult') NOT NULL DEFAULT '' AFTER `bo_use_email` ", false); } if (!isset($board['bo_use_sns'])) { - sql_query(" ALTER TABLE `{$g4['board_table']}` ADD `bo_use_sns` TINYINT NOT NULL DEFAULT '0' AFTER `bo_use_cert` ", false); + sql_query(" ALTER TABLE `{$g4['board_table']}` ADD `bo_use_sns` TINYINT NOT NULL DEFAULT '0' AFTER `bo_use_cert` ", false); $result = sql_query(" select bo_table from `{$g4['board_table']}` "); for ($i=0; $row=sql_fetch_array($result); $i++) { @@ -63,6 +63,16 @@ if (!isset($board['bo_use_sns'])) { sql_query(" ALTER TABLE `{$g4['board_table']}` CHANGE `bo_use_cert` `bo_use_cert` ENUM('','cert','adult') NOT NULL DEFAULT '' ", false); +if (!isset($board['bo_use_list_file'])) { + sql_query(" ALTER TABLE `{$g4['board_table']}` ADD `bo_use_list_file` TINYINT NOT NULL DEFAULT '0' AFTER `bo_use_list_view` ", false); + + $result = sql_query(" select bo_table from `{$g4['board_table']}` "); + for ($i=0; $row=sql_fetch_array($result); $i++) { + sql_query(" ALTER TABLE `{$g4['write_prefix']}{$row['bo_table']}` + ADD `wr_file` TINYINT NOT NULL DEFAULT '0' AFTER `wr_datetime` ", false); + } +} + $required = ""; $readonly = ""; if ($w == '') { @@ -526,8 +536,9 @@ $pg_anchor = '