fix: #42 SMS5 DB에 G5_TABLE_PREFIX 적용
- 기존 sms5_* 테이블 존재 시 dbupgrade에서 테이블명 변경
This commit is contained in:
@ -5,6 +5,16 @@ include_once(G5_ADMIN_PATH.'/admin.lib.php');
|
||||
include_once(G5_SMS5_PATH.'/sms5.lib.php');
|
||||
|
||||
if (!strstr($_SERVER['SCRIPT_NAME'], 'install.php')) {
|
||||
// SMS5 테이블 G5_TABLE_PREFIX 적용
|
||||
if($g5['sms5_prefix'] != 'sms5_' && sql_num_rows(sql_query("show tables like 'sms5_config'")))
|
||||
{
|
||||
echo '<script>
|
||||
alert("기존 SMS5 테이블을 sms5 prefix 기준으로 변경합니다.\n(DB 업그레이드에서 자동 적용됩니다.)");
|
||||
location.href = "'.G5_ADMIN_URL.'/dbupgrade.php";
|
||||
</script>';
|
||||
exit;
|
||||
}
|
||||
|
||||
if(!sql_num_rows(sql_query(" show tables like '{$g5['sms5_config_table']}' ")))
|
||||
goto_url('install.php');
|
||||
|
||||
|
||||
Reference in New Issue
Block a user