From: Alexander Ebert Date: Tue, 11 Mar 2014 15:06:29 +0000 (+0100) Subject: Fixed show order of poll options X-Git-Tag: 2.0.4~21^2~2 X-Git-Url: https://git.stricted.de/?a=commitdiff_plain;h=00de864bf714013aafe2c7d8ee7ab3c04ac501ae;p=GitHub%2FWoltLab%2FWCF.git Fixed show order of poll options --- diff --git a/wcfsetup/install/files/lib/data/poll/Poll.class.php b/wcfsetup/install/files/lib/data/poll/Poll.class.php index 7444d3024f..07257f459f 100644 --- a/wcfsetup/install/files/lib/data/poll/Poll.class.php +++ b/wcfsetup/install/files/lib/data/poll/Poll.class.php @@ -78,6 +78,12 @@ class Poll extends DatabaseObject { return ($a->votes > $b->votes) ? -1 : 1; }); } + else { + // order options by show order + uasort($this->options, function($a, $b) { + return ($a->showOrder < $b->showOrder) ? -1 : 1; + }); + } return $this->options; }