OSDN Git Service

BugTrack/2520 Remove spaces between heading text and dagger
[pukiwiki/pukiwiki.git] / rules.ini.php
index 03a33e2..5c507e8 100644 (file)
@@ -1,15 +1,17 @@
 <?php
 // PukiWiki - Yet another WikiWikiWeb clone.
-// $Id: rules.ini.php,v 1.5 2005/04/29 09:47:40 henoheno Exp $
-// Copywrite (C) 2003-2005 PukiWiki Developers Team
+// $Id: rules.ini.php,v 1.10 2007/06/10 02:08:40 henoheno Exp $
+// Copyright (C)
+//   2003-2005 PukiWiki Developers Team
+//   2001-2002 Originally written by yu-ji
 // License: GPL v2 or (at your option) any later version
 //
 // PukiWiki setting file
 
 /////////////////////////////////////////////////
-// Æü»þÃÖ´¹¥ë¡¼¥ë (±ÜÍ÷»þ¤ËÃÖ´¹)
-// $usedatetime = 1¤Ê¤éÆü»þÃÖ´¹¥ë¡¼¥ë¤¬Å¬ÍѤµ¤ì¤Þ¤¹
-// É¬ÍפΤʤ¤Êý¤Ï $usedatetime¤ò0¤Ë¤·¤Æ¤¯¤À¤µ¤¤¡£
+// 日時置換ルール (閲覧時に置換)
+// $usedatetime = 1なら日時置換ルールが適用されます
+// 必要のない方は $usedatetimeを0にしてください。
 $datetime_rules = array(
        '&amp;_now;'    => format_date(UTIME),
        '&amp;_date;'   => get_date($date_format),
@@ -17,22 +19,31 @@ $datetime_rules = array(
 );
 
 /////////////////////////////////////////////////
-// ¥æ¡¼¥¶ÄêµÁ¥ë¡¼¥ë(Êݸ»þ¤ËÃÖ´¹)
-//  Àµµ¬É½¸½¤Çµ­½Ò¤·¤Æ¤¯¤À¤µ¤¤¡£?(){}-*./+\$^|¤Ê¤É
-//  ¤Ï \? ¤Î¤è¤¦¤Ë¥¯¥©¡¼¥È¤·¤Æ¤¯¤À¤µ¤¤¡£
-//  Á°¸å¤Ëɬ¤º / ¤ò´Þ¤á¤Æ¤¯¤À¤µ¤¤¡£¹ÔƬ»ØÄê¤Ï ^ ¤òƬ¤Ë¡£
-//  ¹ÔËö»ØÄê¤Ï $ ¤ò¸å¤í¤Ë¡£
+// ユーザ定義ルール(保存時に置換)
+//  正規表現で記述してください。?(){}-*./+\$^|など
+//  は \? のようにクォートしてください。
+//  前後に必ず / を含めてください。行頭指定は ^ を頭に。
+//  行末指定は $ を後ろに。
 //
+
+// BugTrack2/106: Only variables can be passed by reference from PHP 5.0.5
+$page_array = explode('/', $vars['page']); // with array_pop()
+
 $str_rules = array(
-       'now\?'         => format_date(UTIME),
-       'date\?'        => get_date($date_format),
-       'time\?'        => get_date($time_format),
+
+       // Compat 1.3.x
+       //'now\?'       => format_date(UTIME),
+       //'date\?'      => get_date($date_format),
+       //'time\?'      => get_date($time_format),
+
        '&now;'         => format_date(UTIME),
        '&date;'        => get_date($date_format),
        '&time;'        => get_date($time_format),
-       '&page;'        => array_pop(explode('/', $vars['page'])),
+       '&page;'        => array_pop($page_array),
        '&fpage;'       => $vars['page'],
        '&t;'           => "\t",
 );
 
+unset($page_array);
+
 ?>