From 00de864bf714013aafe2c7d8ee7ab3c04ac501ae Mon Sep 17 00:00:00 2001 From: Alexander Ebert Date: Tue, 11 Mar 2014 16:06:29 +0100 Subject: [PATCH] Fixed show order of poll options --- wcfsetup/install/files/lib/data/poll/Poll.class.php | 6 ++++++ 1 file changed, 6 insertions(+) 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; } -- 2.20.1