Implemented feature request #4914: Adding to new conditions to class.t3lib_matchcondi...
authorAndreas Otto <andreas.otto@dkd.de>
Tue, 3 Apr 2007 15:30:01 +0000 (15:30 +0000)
committerAndreas Otto <andreas.otto@dkd.de>
Tue, 3 Apr 2007 15:30:01 +0000 (15:30 +0000)
git-svn-id: https://svn.typo3.org/TYPO3v4/Core/trunk@2248 709f56b5-9817-0410-a4d7-c38de5d9e867

ChangeLog
t3lib/class.t3lib_matchcondition.php

index c1fc6a9..38fa59b 100755 (executable)
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,7 @@
+2007-04-03 Andreas Otto <andreas.otto@dkd.de>
+
+       * Implemented feature request #4914: Adding to new conditions to class.t3lib_matchcondition.php.
+
 2007-04-03  Dmitry Dulepov  <dmitry@typo3.org>
 
        * Workspaces: added configurable synchronious stage change and publishing
index 455601d..0891f48 100644 (file)
@@ -251,12 +251,14 @@ class t3lib_matchCondition {
                        case 'hostname':
                                if (t3lib_div::cmpFQDN(t3lib_div::getIndpEnv('REMOTE_ADDR'), $value))  {return true;}
                        break;
-                               // hour, minute, dayofweek, dayofmonth, month
+                               // hour, minute, dayofweek, dayofmonth, month, year, julianday
                        case 'hour':
                        case 'minute':
                        case 'dayofweek':
                        case 'dayofmonth':
                        case 'month':
+                       case 'year':
+                       case 'julianday':
                                $theEvalTime = $GLOBALS['SIM_EXEC_TIME'];       // In order to simulate time properly in templates.
                                switch($key) {
                                        case 'hour':            $theTestValue = date('H',$theEvalTime); break;
@@ -264,6 +266,8 @@ class t3lib_matchCondition {
                                        case 'dayofweek':       $theTestValue = date('w',$theEvalTime); break;
                                        case 'dayofmonth':      $theTestValue = date('d',$theEvalTime); break;
                                        case 'month':           $theTestValue = date('m',$theEvalTime); break;
+                                       case 'year':            $theTestValue = date('Y',$theEvalTime); break;
+                                       case 'julianday':               $theTestValue = date('z',$theEvalTime); break;
                                }
                                $theTestValue = intval($theTestValue);
                                        // comp