Merge branch 'master' of github.com:gnuboard/g5
This commit is contained in:
@ -15,6 +15,10 @@ if (file_exists($dbconfig_file)) {
|
||||
die(install_json_msg('프로그램이 이미 설치되어 있습니다.'));
|
||||
}
|
||||
|
||||
if (preg_match("/[^0-9a-z_]+/i", $_POST['table_prefix']) ) {
|
||||
die(install_json_msg('TABLE명 접두사는 영문자, 숫자, _ 만 입력하세요.'));
|
||||
}
|
||||
|
||||
$mysql_host = safe_install_string_check($_POST['mysql_host'], 'json');
|
||||
$mysql_user = safe_install_string_check($_POST['mysql_user'], 'json');
|
||||
$mysql_pass = safe_install_string_check($_POST['mysql_pass'], 'json');
|
||||
|
||||
@ -61,7 +61,7 @@ $ajax_token = md5($tmp_str.$_SERVER['REMOTE_ADDR'].$_SERVER['DOCUMENT_ROOT']);
|
||||
<th scope="row"><label for="table_prefix">TABLE명 접두사</label></th>
|
||||
<td>
|
||||
<input name="table_prefix" type="text" value="g5_" id="table_prefix">
|
||||
<span>가능한 변경하지 마십시오.</span>
|
||||
<span>TABLE명 접두사는 영문자, 숫자, _ 만 입력 가능합니다.</span>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
|
||||
@ -38,6 +38,10 @@ if (isset($_POST['g5_install']))
|
||||
$g5_shop_prefix = $_POST['g5_shop_prefix'];
|
||||
$g5_shop_install= $_POST['g5_shop_install'];
|
||||
|
||||
if (preg_match("/[^0-9a-z_]+/i", $table_prefix) ) {
|
||||
die('<div class="ins_inner"><p>TABLE명 접두사는 영문자, 숫자, _ 만 입력하세요.</p><div class="inner_btn"><a href="./install_config.php">뒤로가기</a></div></div>');
|
||||
}
|
||||
|
||||
if (preg_match("/[^0-9a-z_]+/i", $admin_id)) {
|
||||
die('<div class="ins_inner"><p>관리자 아이디는 영문자, 숫자, _ 만 입력하세요.</p><div class="inner_btn"><a href="./install_config.php">뒤로가기</a></div></div>');
|
||||
}
|
||||
@ -539,10 +543,10 @@ $f = @fopen($file, 'a');
|
||||
|
||||
fwrite($f, "<?php\n");
|
||||
fwrite($f, "if (!defined('_GNUBOARD_')) exit;\n");
|
||||
fwrite($f, "define('G5_MYSQL_HOST', '{$mysql_host}');\n");
|
||||
fwrite($f, "define('G5_MYSQL_USER', '{$mysql_user}');\n");
|
||||
fwrite($f, "define('G5_MYSQL_PASSWORD', '{$mysql_pass}');\n");
|
||||
fwrite($f, "define('G5_MYSQL_DB', '{$mysql_db}');\n");
|
||||
fwrite($f, "define('G5_MYSQL_HOST', '".addcslashes($mysql_host, "\\'")."');\n");
|
||||
fwrite($f, "define('G5_MYSQL_USER', '".addcslashes($mysql_user, "\\'")."');\n");
|
||||
fwrite($f, "define('G5_MYSQL_PASSWORD', '".addcslashes($mysql_pass, "\\'")."');\n");
|
||||
fwrite($f, "define('G5_MYSQL_DB', '".addcslashes($mysql_db, "\\'")."');\n");
|
||||
fwrite($f, "define('G5_MYSQL_SET_MODE', {$mysql_set_mode});\n\n");
|
||||
fwrite($f, "define('G5_TABLE_PREFIX', '{$table_prefix}');\n\n");
|
||||
fwrite($f, "\$g5['write_prefix'] = G5_TABLE_PREFIX.'write_'; // 게시판 테이블명 접두사\n\n");
|
||||
|
||||
Reference in New Issue
Block a user