From: Marcel Werk Date: Tue, 26 Jun 2012 13:43:37 +0000 (+0200) Subject: Fixed small postgresql issue X-Git-Tag: 2.0.0_Beta_1~1049 X-Git-Url: https://git.stricted.de/?a=commitdiff_plain;h=fff615308cc5f11bd3aa8b3c7614cc1c2b947f8a;p=GitHub%2FWoltLab%2FWCF.git Fixed small postgresql issue --- 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));