From: Roland Häder Date: Thu, 17 Jan 2013 01:28:32 +0000 (+0000) Subject: Fixed also usage of previously renamed fields as they must be the same X-Git-Url: https://git.mxchange.org/?a=commitdiff_plain;h=a4389fc8acbd7e4faded34ddaf5d7100e4b90849;p=mailer.git Fixed also usage of previously renamed fields as they must be the same --- diff --git a/inc/modules/admin/what-add_rallye.php b/inc/modules/admin/what-add_rallye.php index dc42366a2e..b4662eaa82 100644 --- a/inc/modules/admin/what-add_rallye.php +++ b/inc/modules/admin/what-add_rallye.php @@ -45,8 +45,8 @@ addYouAreHereLink('admin', __FILE__); if (isFormSent()) { // Generate timestamps - $START = mktime(postRequestElement('start_time_hour'), postRequestElement('start_time_min'), 0, postRequestElement('start_time_month'), postRequestElement('start_time_day'), postRequestElement('start_time_year')); - $END = mktime(postRequestElement('end_time_hour') , postRequestElement('end_time_min') , 0, postRequestElement('end_time_month') , postRequestElement('end_time_day') , postRequestElement('end_time_year') ); + $START = mktime(postRequestElement('start_time_ho'), postRequestElement('start_time_mi'), 0, postRequestElement('start_time_mo'), postRequestElement('start_time_da'), postRequestElement('start_time_ye')); + $END = mktime(postRequestElement('end_time_ho') , postRequestElement('end_time_mi') , 0, postRequestElement('end_time_mo') , postRequestElement('end_time_da') , postRequestElement('end_time_ye') ); // Is there already a rallye running? $result = SQL_QUERY_ESC("SELECT `id`, `admin_id` FROM `{?_MYSQL_PREFIX?}_rallye_data` WHERE (`start_time` <= %s AND `end_time` >= %s) OR (`start_time` >= %s AND `start_time` <= %s) LIMIT 1", diff --git a/inc/modules/admin/what-config_mediadata.php b/inc/modules/admin/what-config_mediadata.php index 114934d3ff..61e14a6832 100644 --- a/inc/modules/admin/what-config_mediadata.php +++ b/inc/modules/admin/what-config_mediadata.php @@ -45,15 +45,15 @@ addYouAreHereLink('admin', __FILE__); if (isFormSent('save_config')) { // Test timestamp - $STAMP = mktime(0, 0, 0, bigintval(postRequestElement('month')), bigintval(postRequestElement('day')), bigintval(postRequestElement('year'))); + $STAMP = mktime(0, 0, 0, bigintval(postRequestElement('mo')), bigintval(postRequestElement('da')), bigintval(postRequestElement('ye'))); if ($STAMP > time()) { // Date is in the future! unsetPostRequestElement('ok'); } else { // Remove entries - unsetPostRequestElement('day'); - unsetPostRequestElement('month'); - unsetPostRequestElement('year'); + unsetPostRequestElement('da'); + unsetPostRequestElement('mo'); + unsetPostRequestElement('ye'); // Remember timestamp setPostRequestElement('mt_start', $STAMP); diff --git a/inc/modules/admin/what-list_rallyes.php b/inc/modules/admin/what-list_rallyes.php index 94e8f6f68a..3ef8993c1f 100644 --- a/inc/modules/admin/what-list_rallyes.php +++ b/inc/modules/admin/what-list_rallyes.php @@ -138,8 +138,8 @@ if (isGetRequestElementSet('rallye_id')) { $id = bigintval($id); // Generate timestamps - $START = mktime(postRequestElement('start_time_hour', $id), postRequestElement('start_time_min', $id), 0, postRequestElement('start_time_month', $id), postRequestElement('start_time_day', $id), postRequestElement('start_time_year', $id)); - $END = mktime(postRequestElement('end_time_hour', $id) , postRequestElement('end_time_min', $id) , 0, postRequestElement('end_time_month', $id) , postRequestElement('end_time_day', $id) , postRequestElement('end_time_year', $id) ); + $START = mktime(postRequestElement('start_time_ho', $id), postRequestElement('start_time_mi', $id), 0, postRequestElement('start_time_mo', $id), postRequestElement('start_time_da', $id), postRequestElement('start_time_ye', $id)); + $END = mktime(postRequestElement('end_time_ho', $id) , postRequestElement('end_time_mi', $id) , 0, postRequestElement('end_time_mo', $id) , postRequestElement('end_time_da', $id) , postRequestElement('end_time_ye', $id) ); // Update entry addSql(SQL_QUERY_ESC("UPDATE diff --git a/inc/modules/member/what-holiday.php b/inc/modules/member/what-holiday.php index 713119e5b6..31c69e5283 100644 --- a/inc/modules/member/what-holiday.php +++ b/inc/modules/member/what-holiday.php @@ -109,12 +109,12 @@ SQL_FREERESULT($result2); if (isFormSent()) { // Check holiday request... - $START = mktime(0, 0, 0, postRequestElement('start_month'), postRequestElement('start_day'), postRequestElement('start_year')); - $content['holiday_end'] = mktime(0, 0, 0, postRequestElement('end_month') , postRequestElement('end_day') , postRequestElement('end_year') ); + $content['holiday_start'] = mktime(0, 0, 0, postRequestElement('start_mo'), postRequestElement('start_da'), postRequestElement('start_ye')); + $content['holiday_end'] = mktime(0, 0, 0, postRequestElement('end_mo') , postRequestElement('end_da') , postRequestElement('end_ye') ); // Test both values - $TEST = $content['holiday_end'] - $START; - if (($TEST < 0) || ($TEST > (getOneDay() * getConfig('holiday_max'))) || ($START < time()) || ($content['holiday_end'] < time())) { + $TEST = $content['holiday_end'] - $content['holiday_start']; + if (($TEST < 0) || ($TEST > (getOneDay() * getConfig('holiday_max'))) || ($content['holiday_start'] < time()) || ($content['holiday_end'] < time())) { // Time test failed unsetPostRequestElement('ok'); } else { @@ -122,7 +122,7 @@ if (isFormSent()) { SQL_QUERY_ESC("INSERT INTO `{?_MYSQL_PREFIX?}_user_holidays` (`userid`, `holiday_start`, `holiday_end`, `comments`) VALUES ('%s','%s','%s','%s')", array( getMemberId(), - $START, + $content['holiday_start'], $content['holiday_end'], postRequestElement('comments') ), __FILE__, __LINE__);