OSDN Git Service

PKWK_READONLY cause edit-link-without-page => nomal text. A little shrink string...
authorhenoheno <henoheno>
Wed, 26 Jan 2005 13:20:26 +0000 (22:20 +0900)
committerhenoheno <henoheno>
Wed, 26 Jan 2005 13:20:26 +0000 (22:20 +0900)
plugin/calendar2.inc.php

index 3b9fa5c..3a3a00c 100644 (file)
@@ -1,5 +1,5 @@
 <?php
-// $Id: calendar2.inc.php,v 1.21 2004/07/31 03:09:20 henoheno Exp $
+// $Id: calendar2.inc.php,v 1.22 2005/01/26 13:20:26 henoheno Exp $
 // *°ú¿ô¤Ëoff¤È½ñ¤¯¤³¤È¤Çº£Æü¤ÎÆüµ­¤òɽ¼¨¤·¤Ê¤¤¤è¤¦¤Ë¤·¤¿¡£
 function plugin_calendar2_convert()
 {
@@ -121,14 +121,21 @@ EOD;
                }
 
                if (is_page($page)) {
-                       $link = "<a href=\"$script?$r_page\" title=\"$s_page\"><strong>$day</strong></a>";
-               }
-               else {
-                       $link = "<a class=\"small\" href=\"$script?cmd=edit&amp;page=$r_page&amp;refer=$r_base\" title=\"$s_page\">$day</a>";
+                       $link = '<a href="' . $script . '?' . $r_page . '" title="' . $s_page .
+                               '"><strong>' . $day . '</strong></a>';
+               } else {
+                       if (PKWK_READONLY) {
+                               $link = '<span class="small">' . $day . '</small>';
+                       } else {
+                               $link = $script . '?cmd=edit&amp;page=' . $r_page . '&amp;refer=' . $r_base;
+                               $link = '<a class="small" href="' . $link . '" title="' . $s_page . '">' . $day . '</a>';
+                       }
                }
 
-               $ret .= "     <td class=\"$style\">\n      $link\n     </td>\n";
-               $day++;
+               $ret .= '     <td class="' . $style . '">' . "\n" .
+                       '      ' . $link . "\n" .
+                       '     </td>' . "\n";
+               ++$day;
                $wday = ++$wday % 7;
        }
        if ($wday > 0) {