OSDN Git Service

BugTrack/391: *.lngに$_no_subject,$_no_nameを追加
authorarino <arino>
Thu, 10 Jul 2003 03:21:12 +0000 (12:21 +0900)
committerarino <arino>
Thu, 10 Jul 2003 03:21:12 +0000 (12:21 +0900)
en.lng
ja.lng
plugin/article.inc.php
plugin/comment.inc.php
plugin/pcomment.inc.php

diff --git a/en.lng b/en.lng
index 8ffa0ab..8c8299b 100644 (file)
--- a/en.lng
+++ b/en.lng
@@ -2,7 +2,7 @@
 /////////////////////////////////////////////////
 // PukiWiki - Yet another WikiWikiWeb clone.
 //
-// $Id: en.lng,v 1.19 2003/07/03 06:39:17 arino Exp $
+// $Id: en.lng,v 1.20 2003/07/10 03:21:12 arino Exp $
 //
 // PukiWiki message file (english)
 
@@ -84,6 +84,13 @@ $_tb_header_Weblog = 'Weblog:';
 $_tb_header_Tracked = 'Tracked:';
 $_tb_date = 'F j, Y, g:i A';
 
+/////////////////////////////////////////////////
+// no subject (article)
+$_no_subject = 'no subject';
+/////////////////////////////////////////////////
+// no name (article,comment,pcomment)
+$_no_name = '';
+
 ///////////////////////////////////////
 // plug-in message
 
diff --git a/ja.lng b/ja.lng
index 8a083aa..dcf2a31 100644 (file)
--- a/ja.lng
+++ b/ja.lng
@@ -2,7 +2,7 @@
 /////////////////////////////////////////////////
 // PukiWiki - Yet another WikiWikiWeb clone.
 //
-// $Id: ja.lng,v 1.19 2003/07/03 06:14:20 arino Exp $
+// $Id: ja.lng,v 1.20 2003/07/10 03:21:12 arino Exp $
 //
 // PukiWiki message file (japanese)
 
@@ -84,6 +84,13 @@ $_tb_header_Weblog = 'Weblog:';
 $_tb_header_Tracked = 'Æü»þ:';
 $_tb_date = 'Yǯn·îjÆü H:i:s';
 
+/////////////////////////////////////////////////
+// Âê̾¤¬Ì¤µ­Æþ¤Î¾ì¹ç¤Îɽµ­ (article)
+$_no_subject = '̵Âê';
+/////////////////////////////////////////////////
+// Ì¾Á°¤¬Ì¤µ­Æþ¤Î¾ì¹ç¤Îɽµ­ (article,comment,pcomment)
+$_no_name = '';
+
 ///////////////////////////////////////
 // plug-in message
 
index 0c48195..248c1b5 100644 (file)
@@ -19,7 +19,7 @@
  -Åê¹ÆÆâÍƤΥ᡼¥ë¼«Æ°ÇÛ¿®Àè
  ¤òÀßÄê¤Î¾å¡¢¤´»ÈÍѤ¯¤À¤µ¤¤¡£
 
- $Id: article.inc.php,v 1.15 2003/07/03 05:35:14 arino Exp $
+ $Id: article.inc.php,v 1.16 2003/07/10 03:21:12 arino Exp $
  
  */
 
@@ -44,9 +44,6 @@ define('NAME_FORMAT','[[$name]]');
 // Âê̾¤ÎÁÞÆþ¥Õ¥©¡¼¥Þ¥Ã¥È
 define('SUBJECT_FORMAT','**$subject');
 /////////////////////////////////////////////////
-// Âê̾¤¬Ì¤µ­Æþ¤Î¾ì¹ç¤Îɽµ­ 
-define('NO_SUBJECT','̵Âê');
-/////////////////////////////////////////////////
 // ÁÞÆþ¤¹¤ë°ÌÃÖ 1:Íó¤ÎÁ° 0:Íó¤Î¸å
 define('ARTICLE_INS',0);
 /////////////////////////////////////////////////
@@ -75,22 +72,16 @@ function plugin_article_action()
 {
        global $script,$post,$vars,$cols,$rows,$now;
        global $_title_collided,$_msg_collided,$_title_updated;
-       global $_mailto;
+       global $_mailto,$_no_subject,$_no_name;
        
        if ($post['msg'] == '') {
-               return;
-       }
-       
-       $postdata = '';
-       $postdata_old  = get_source($post['refer']);
-       $article_no = 0;
-       
-       if ($post['name'] != '') {
-               $name = str_replace('$name',$post['name'],NAME_FORMAT);
+               return array('msg'=>'','body'=>'');
        }
        
-       $subject = str_replace('$subject',$post['subject'] == '' ? NO_SUBJECT : $post['subject'],SUBJECT_FORMAT);
-       
+       $name = ($post['name'] == '') ? $_no_name : $post['name'];
+       $name = ($name == '') ? '' : str_replace('$name',$name,NAME_FORMAT);
+       $subject = ($post['subject'] == '') ? $_no_subject : $post['subject'];
+       $subject = ($subject == '') ? '' : str_replace('$subject',$subject,SUBJECT_FORMAT);
        $article  = "$subject\n>$name ($now)~\n~\n";
        
        $msg = rtrim($post['msg']);
@@ -105,6 +96,10 @@ function plugin_article_action()
                $article .= "\n\n#comment\n";
        }
        
+       $postdata = '';
+       $postdata_old  = get_source($post['refer']);
+       $article_no = 0;
+       
        foreach($postdata_old as $line) {
                if (!ARTICLE_INS) {
                        $postdata .= $line;
index 6555c1e..dac3302 100644 (file)
@@ -2,7 +2,7 @@
 /////////////////////////////////////////////////
 // PukiWiki - Yet another WikiWikiWeb clone.
 //
-// $Id: comment.inc.php,v 1.19 2003/05/28 04:45:10 arino Exp $
+// $Id: comment.inc.php,v 1.20 2003/07/10 03:21:12 arino Exp $
 //
 
 /////////////////////////////////////////////////
@@ -29,7 +29,7 @@ define('COMMENT_INS','1');
 function plugin_comment_action()
 {
        global $script,$vars,$post,$now;
-       global $_title_updated;
+       global $_title_updated,$_no_name;
        global $_msg_comment_collided,$_title_comment_collided;
        
        $post['msg'] = preg_replace("/\n/",'',$post['msg']);
@@ -46,9 +46,10 @@ function plugin_comment_action()
                $post['msg'] = $match[2];
        }
        
-       $_msg  =                                 str_replace('$msg', $post['msg'], COMMENT_MSG_FORMAT);
-       $_name = ($post['name'] == '')    ? '' : str_replace('$name',$post['name'],COMMENT_NAME_FORMAT);
-       $_now  = ($post['nodate'] == '1') ? '' : str_replace('$now', $now,         COMMENT_NOW_FORMAT);
+       $_msg  = str_replace('$msg',$post['msg'],COMMENT_MSG_FORMAT);
+       $_name = $post['name'] == '' ? $_no_name : $post['name'];
+       $_name = ($_name == '') ? '' : str_replace('$name',$_name,COMMENT_NAME_FORMAT);
+       $_now  = ($post['nodate'] == '1') ? '' : str_replace('$now',$now,COMMENT_NOW_FORMAT);
        
        $comment = str_replace("\x08MSG\x08", $_msg, COMMENT_FORMAT);
        $comment = str_replace("\x08NAME\x08",$_name,$comment);
index 6f32718..4c9558c 100644 (file)
@@ -2,7 +2,7 @@
 /////////////////////////////////////////////////
 // PukiWiki - Yet another WikiWikiWeb clone.
 //
-// $Id: pcomment.inc.php,v 1.22 2003/07/04 09:20:20 arino Exp $
+// $Id: pcomment.inc.php,v 1.23 2003/07/10 03:21:12 arino Exp $
 //
 
 /*
@@ -91,8 +91,7 @@ function plugin_pcomment_convert()
                'below' =>FALSE,
                'above' =>FALSE,
                'reply' =>FALSE,
-               '_args' =>array(),
-               '_done' =>FALSE
+               '_args' =>array()
        );
        array_walk(func_get_args(), 'pcmt_check_arg', &$params);
        
@@ -183,7 +182,7 @@ EOD;
 function pcmt_insert()
 {
        global $script,$vars,$post,$now;
-       global $_title_updated,$_pcmt_messages;
+       global $_title_updated,$_no_name,$_pcmt_messages;
        
        $page = $post['page'];
        if (!is_pagename($page))
@@ -199,9 +198,10 @@ function pcmt_insert()
        );
        
        //¥³¥á¥ó¥È¥Õ¥©¡¼¥Þ¥Ã¥È¤òŬÍÑ
-       $msg = sprintf(PCMT_FORMAT_MSG, rtrim($post['msg']));
-       $name = ($post['name'] == '') ? '' :  sprintf(PCMT_FORMAT_NAME, $post['name']);
-       $date = ($post['nodate'] == '1') ? '' : sprintf(PCMT_FORMAT_DATE, $now);
+       $msg = sprintf(PCMT_FORMAT_MSG,rtrim($post['msg']));
+       $name = $post['name'] == '' ? $_no_name : $post['name'];
+       $name = ($name == '') ? '' : sprintf(PCMT_FORMAT_NAME,$name);
+       $date = ($post['nodate'] == '1') ? '' : sprintf(PCMT_FORMAT_DATE,$now);
        if ($date != '' or $name != '')
        {
                $msg = str_replace("\x08MSG\x08", $msg,  PCMT_FORMAT);