Permalink
Browse files

Merge pull request #13 from mdogadailo/feedback-date-fix

added limit date
  • Loading branch information...
stdex committed Mar 20, 2017
2 parents e7312f5 + 5f641fb commit 5877291a49f78557db89590e94c39793bf1ea539
Showing with 3 additions and 2 deletions.
  1. +3 −2 feedback/feedback.php
View
@@ -175,7 +175,8 @@ function plugin_feedback_showScreen($mode = 0, $errorText = '') {
}
$tEntry['options']['month'] = $opts;
$opts = $fInfo['required'] ? '' : '<option value="">--</option>';
for ($di = 1970; $di <= 2012; $di++) {
$yearLimit = date('Y');
for ($di = 1970; $di <= $yearLimit; $di++) {
$opts .= '<option value="' . $di . '"' . ($di == $setValueYear ? ' selected="selected"' : '') . '>' . $di . '</option>';
}
$tEntry['options']['year'] = $opts;
@@ -488,4 +489,4 @@ function plugin_feedback_post() {
),
);
$template['vars']['mainblock'] = $xt->render($tVars);
}
}

0 comments on commit 5877291

Please sign in to comment.