Skip to content

Commit 2e2479e

Browse files
committed
Don’t allow the same start and end dates to be set
1 parent 6e8ca5c commit 2e2479e

2 files changed

Lines changed: 2 additions & 2 deletions

File tree

controller/admin_input.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -116,7 +116,7 @@ public function get_form_data()
116116
}
117117

118118
// Make sure start date is sooner than end date
119-
if ($data['ad_start_date'] != 0 && $data['ad_end_date'] != 0 && $data['ad_start_date'] > $data['ad_end_date'])
119+
if ($data['ad_start_date'] != 0 && $data['ad_end_date'] != 0 && $data['ad_start_date'] >= $data['ad_end_date'])
120120
{
121121
$this->errors[] = $this->language->lang('END_DATE_TOO_SOON');
122122
}

language/en/acp.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -85,7 +85,7 @@
8585
'NO_FILE_SELECTED' => 'No file selected.',
8686
'CANNOT_CREATE_DIRECTORY' => 'The <samp>phpbb_ads</samp> directory could not be created. Please make sure the <samp>/images</samp> directory is writable.',
8787
'FILE_MOVE_UNSUCCESSFUL' => 'Unable to move the file to <samp>images/phpbb_ads</samp>.',
88-
'END_DATE_TOO_SOON' => 'End date is sooner than start date.',
88+
'END_DATE_TOO_SOON' => 'The end date must be later than the start date.',
8989
'ACP_AD_DOES_NOT_EXIST' => 'The advertisement does not exist.',
9090
'ACP_AD_ADD_SUCCESS' => 'Advertisement added successfully.',
9191
'ACP_AD_EDIT_SUCCESS' => 'Advertisement edited successfully.',

0 commit comments

Comments
 (0)