From cafd14a45bc0497f62cd6fb609749bd6186c7b9a Mon Sep 17 00:00:00 2001 From: Pavol Rusnak Date: Tue, 8 Nov 2011 15:39:07 +0100 Subject: [PATCH] fix typos --- syntax.php | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/syntax.php b/syntax.php index 8bd1745..2f1c273 100644 --- a/syntax.php +++ b/syntax.php @@ -27,15 +27,15 @@ class syntax_plugin_nextday extends DokuWiki_Syntax_Plugin { $day = NULL; if (count($in) == 1) { if (in_array($in[0], array('mon','tue','wed','thu','fri','sat','sun'))) { - $day = strtotime('next ' . $match, strtotime('yesterday')); + $day = strtotime('next ' . $in[0], strtotime('yesterday')); } } else if (count($in) == 2) { if (in_array($in[0], array('first','second','third','fourth','fifth','last')) && in_array($in[1], array('mon','tue','wed','thu','fri','sat','sun'))) { $day_today = strtotime('today'); - $day_next = strtotime("{$in[0]} {$in[1]} of next month"); - $day_this = strtotime("{$in[0]} {$in[1]} of this month"); - $day = $date_this < $date_today ? $date_next : $date_this; + $day_next = strtotime("${in[0]} ${in[1]} of next month"); + $day_this = strtotime("${in[0]} ${in[1]} of this month"); + $day = ($day_this < $day_today) ? $day_next : $day_this; } } return $day ? strftime('%d %B %Y', $day) : '';