]> git.mxchange.org Git - mailer.git/commitdiff
Fixed also usage of previously renamed fields as they must be the same
authorRoland Häder <roland@mxchange.org>
Thu, 17 Jan 2013 01:28:32 +0000 (01:28 +0000)
committerRoland Häder <roland@mxchange.org>
Thu, 17 Jan 2013 01:28:32 +0000 (01:28 +0000)
inc/modules/admin/what-add_rallye.php
inc/modules/admin/what-config_mediadata.php
inc/modules/admin/what-list_rallyes.php
inc/modules/member/what-holiday.php

index dc42366a2ec6a7edf4dceca70cedac5ec0deb0a1..b4662eaa82ee3177e07a90813a2b3bd4772a3a1b 100644 (file)
@@ -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",
index 114934d3ff345070c622973c996a4d16292c4555..61e14a68320e344b46e9f280136f1d00c7d94ba1 100644 (file)
@@ -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);
index 94e8f6f68a4cfcef3129aff74f195f148f2eaa69..3ef8993c1f4a0996a2872e2d9df294afbdd9aeb4 100644 (file)
@@ -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
index 713119e5b66c8a0f718283ed586d64433e939093..31c69e5283400c2787bd29ed7e81c6a0e7c09123 100644 (file)
@@ -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__);