From fff615308cc5f11bd3aa8b3c7614cc1c2b947f8a Mon Sep 17 00:00:00 2001 From: Marcel Werk Date: Tue, 26 Jun 2012 15:43:37 +0200 Subject: [PATCH] Fixed small postgresql issue --- .../install/files/lib/acp/page/IndexPage.class.php | 12 ++++-------- 1 file changed, 4 insertions(+), 8 deletions(-) diff --git a/wcfsetup/install/files/lib/acp/page/IndexPage.class.php b/wcfsetup/install/files/lib/acp/page/IndexPage.class.php index 354d40ad2a..a7f180ff60 100755 --- a/wcfsetup/install/files/lib/acp/page/IndexPage.class.php +++ b/wcfsetup/install/files/lib/acp/page/IndexPage.class.php @@ -95,14 +95,10 @@ class IndexPage extends AbstractPage { $this->calculateHealth(); - $sql = "SELECT - languageItem - FROM - wcf".WCF_N."_language_item - WHERE - languageCategoryID = ? - ORDER BY - rand()"; + $sql = "SELECT languageItem + FROM wcf".WCF_N."_language_item + WHERE languageCategoryID = ? + ORDER BY ".(WCF::getDB()->getDBType() == 'wcf\system\database\PostgreSQLDatabase' ? 'RANDOM()' : 'RAND()'); $statement = WCF::getDB()->prepareStatement($sql, 1); // TODO: Change category $statement->execute(array(LanguageFactory::getInstance()->getCategory('wcf.global')->languageCategoryID)); -- 2.20.1