_CAPTCHA_, _EDITOR_ 선언하지 않아도 오류나지 않도록 수정

캡챠와 에디터를 plugin 디렉토리에서 extend 디렉토리로 변경
This commit is contained in:
gnuboard
2013-01-13 16:50:01 +09:00
parent 508d060219
commit e8ec16adb9
305 changed files with 193 additions and 264 deletions

View File

@ -1,5 +1,4 @@
<?
define('_CAPTCHA_', true);
include_once('./_common.php');
if (!$board['bo_table']) {

View File

@ -1,5 +1,5 @@
<?
define('_CAPTCHA_', 1);
define('_CAPTCHA_', true);
include_once('./_common.php');
include_once($g4['path'].'/lib/register.lib.php');

View File

@ -1,5 +1,4 @@
<?
define('_CAPTCHA_', true);
include_once('./_common.php');
set_session('ss_bo_table', $bo_table);
@ -11,7 +10,7 @@ if (!$board['bo_table']) {
}
if (!$bo_table) {
alert('bo_table 값이 넘어오지 않았습니다.'.PHP_EOL.PHP_EOL.'write.php?bo_table=code 와 같은 방식으로 넘겨 주세요.', $g4['path']);
alert("bo_table 값이 넘어오지 않았습니다.\\nwrite.php?bo_table=code 와 같은 방식으로 넘겨 주세요.", $g4['path']);
}
@include_once ($g4['path'].'/skin/board/write.head.skin.php');
@ -198,16 +197,9 @@ if ($member['mb_level'] >= $board['bo_html_level'])
$is_secret = $board['bo_use_secret'];
$is_dhtml_editor = false;
if ($board['bo_use_dhtml_editor'] && $member['mb_level'] >= $board['bo_html_level']) {
define('_EDITOR_', true);
$is_dhtml_editor = true;
} else {
$is_dhtml_editor = false;
}
$captcha_html = "";
if ($is_guest) {
$captcha_html = captcha_html('wr_key');
}
$is_mail = false;
@ -369,4 +361,4 @@ include_once('./board_tail.php');
include_once($g4['path'].'/tail.sub.php');
@include_once ($board_skin_path.'/write.tail.skin.php');
?>
?>

View File

@ -1,11 +1,8 @@
<?
define('_CAPTCHA_', true);
include_once('./_common.php');
$g4['title'] = '게시글 저장';
if (isset($captcha->lib)) include_once($captcha->lib);
$msg = array();
$wr_subject = '';
@ -151,8 +148,10 @@ if ($w == '' || $w == 'u') {
alert('w 값이 제대로 넘어오지 않았습니다.');
}
if (!chk_captcha('wr_key')) {
alert('자동등록방지의 답변으로 입력한 숫자가 틀렸습니다.');
if (defined('_CAPTCHA_')) {
if ($is_guest && !chk_captcha()) {
alert('스팸방지의 답변으로 입력한 숫자가 틀렸습니다.');
}
}
if ($w == '' || $w == 'r') {
@ -283,8 +282,8 @@ if ($w == '' || $w == 'r') {
} else {
$mb_id = '';
// 비회원의 경우 이름이 누락되는 경우가 있음
$wr_name = strip_tags(mysql_escape_string($_POST['wr_name']));
if (!trim($wr_name))
$wr_name = escape_trim($_POST['wr_name']);
if (!$wr_name)
alert('이름은 필히 입력하셔야 합니다.');
$wr_password = sql_password($wr_password);
}