빈 제목, 빈 내용일때 오류 메세지 나오기

2008-07-10 16:07:45

공백페이지가 나왔을때가 안타까워 추가해봤습니다.

Code:

Index: app/controllers/post/save.php
===================================================================
--- app/controllers/post/save.php       (revision 1212)
+++ app/controllers/post/save.php       (working copy)
@@ -4,7 +4,8 @@
 }

 if (!$post->valid()) {
-       // TODO: more friendly error message
+       header('HTTP/1.1 403 Forbidden');
+       print_notice(i('Inputs is Empty.'), i('Fill out The Title and Body.'). ' ' . link_text('#', i('Back to Write Page'), array('onclick' => 'history.back();return false;')));
        exit;
 }

Index: lang/ko.php
===================================================================
--- lang/ko.php (revision 1212)
+++ lang/ko.php (working copy)
@@ -143,3 +143,6 @@
 $lang['Maintenance'] = '유지 보수';
 $lang['Site theme'] = '사이트 테마';
 $lang['Information'] = '정보';
+$lang['Inputs is Empty.'] = '입력란이 비었습니다.';
+$lang['Fill out The Title and Body.'] = '제목과 내용을 채워주세요.';
+$lang['Back to Write Page'] = '쓰기 페이지로 이동';

← 업데이트 후 미리보기가 되지 않습니다. | metadata 관련 버그 수정 →