diff --git a/helper.php b/helper.php index 51752b8..3eee77b 100644 --- a/helper.php +++ b/helper.php @@ -508,9 +508,10 @@ function _replacePlaceholdersInSQL(&$data) { // allow current user name in filter: $data['sql'] = str_replace('%user%', $_SERVER['REMOTE_USER'], $data['sql']); $data['sql'] = str_replace('%groups%', implode("','", (array) $USERINFO['grps']), $data['sql']); - // allow current date in filter: + // allow current date, month and year in filter: $data['sql'] = str_replace('%now%', dformat(null, '%Y-%m-%d'), $data['sql']); - + $data['sql'] = str_replace('%month%', dformat(null, '%m'),$data['sql']); + $data['sql'] = str_replace('%year%', dformat(null, '%Y'),$data['sql']); // language filter $data['sql'] = $this->makeTranslationReplacement($data['sql']); }