Avoid timezone issues
authorAlexander Ebert <ebert@woltlab.com>
Tue, 31 Dec 2013 12:27:53 +0000 (13:27 +0100)
committerAlexander Ebert <ebert@woltlab.com>
Tue, 31 Dec 2013 12:27:53 +0000 (13:27 +0100)
wcfsetup/install/files/lib/system/poll/PollManager.class.php

index a72d31ff7e70118b8e79bd2f91ad9190b357b436..a50751880284acb7c2a4f5630e4237ff37a2c5dd 100644 (file)
@@ -205,17 +205,10 @@ class PollManager extends SingletonFactory {
                }
                
                if ($this->pollData['endTime'] && $this->pollData['endTime'] <= TIME_NOW) {
-                       if ($this->poll === null) {
+                       if ($this->poll === null || $this->poll->endTime >= TIME_NOW) {
                                // end time is in the past
                                throw new UserInputException('pollEndTime', 'notValid');
                        }
-                       else {
-                               // check if the difference to the stored time is less than 60 minutes (editing an old poll)
-                               $difference = abs($this->poll->endTime - $this->pollData['endTime']);
-                               if ($difference > 3599) {
-                                       throw new UserInputException('pollEndTime', 'notValid');
-                               }
-                       }
                }
                
                // no options given