Fixed poll issues
authorMarcel Werk <burntime@woltlab.com>
Wed, 14 Aug 2013 20:54:56 +0000 (22:54 +0200)
committerMarcel Werk <burntime@woltlab.com>
Wed, 14 Aug 2013 20:54:56 +0000 (22:54 +0200)
com.woltlab.wcf/templates/__messageFormPoll.tpl
wcfsetup/install/files/lib/system/poll/PollManager.class.php

index df842595b772aeaf9655339e0ba54329c450da70..b1626a1b806a4b70a672baf36c80d52369a805fb 100644 (file)
@@ -35,8 +35,8 @@
                                        <small>{lang}wcf.poll.options.description{/lang}</small>
                                </dd>
                        </dl>
-                       <dl>
-                               <dt{if $errorField == 'pollEndTime'} class="formError"{/if}>
+                       <dl{if $errorField == 'pollEndTime'} class="formError"{/if}>
+                               <dt>
                                        <label for="pollEndTime">{lang}wcf.poll.endTime{/lang}</label>
                                </dt>
                                <dd>
@@ -60,6 +60,9 @@
                                                </small>
                                        {/if}
                                </dd>
+                       </dl>
+                       <dl>
+                               <dt></dt>
                                <dd>
                                        <label><input type="checkbox" name="pollIsChangeable" value="1"{if $pollIsChangeable} checked="checked"{/if} /> {lang}wcf.poll.isChangeable{/lang}</label>
                                </dd>
index 93a690a219b3b7890f50333c9db1ab7db50e9a03..840bf3f458489b4394ecbb051bdd1a50b6574a2b 100644 (file)
@@ -205,7 +205,7 @@ class PollManager extends SingletonFactory {
                }
                
                // end time is in the past
-               if ($this->pollData['endTime'] != 0 && $this->pollData['endTime'] <= TIME_NOW) {
+               if ($this->pollData['endTime'] != 0 && $this->pollData['endTime'] <= TIME_NOW && ($this->poll === null || $this->poll->endTime != $this->pollData['endTime'])) {
                        throw new UserInputException('pollEndTime', 'notValid');
                }