From: Alexander Ebert Date: Fri, 8 Nov 2013 15:33:37 +0000 (+0100) Subject: Added script-PIP to remove old language items X-Git-Tag: 2.0.0_RC_1^0 X-Git-Url: https://git.stricted.de/?a=commitdiff_plain;h=c8c950c7c6b719f267719199ad434959668bb628;p=GitHub%2FWoltLab%2FWCF.git Added script-PIP to remove old language items --- diff --git a/com.woltlab.wcf/package.xml b/com.woltlab.wcf/package.xml index 0e6d8a88c0..84c950bbb8 100644 --- a/com.woltlab.wcf/package.xml +++ b/com.woltlab.wcf/package.xml @@ -48,6 +48,7 @@ files_update.tar templates_update.tar language/*.xml + acp/update_rc1.php option.xml diff --git a/wcfsetup/install/files/acp/update_rc1.php b/wcfsetup/install/files/acp/update_rc1.php new file mode 100644 index 0000000000..bb3f4a626a --- /dev/null +++ b/wcfsetup/install/files/acp/update_rc1.php @@ -0,0 +1,32 @@ + + * @package com.woltlab.wcf + * @category Community Framework + */ + +// remove outdated language items +$conditions = new PreparedStatementConditionBuilder(); +$conditions->add("languageItem IN (?)", array(array( + 'wcf.date.month.jan', + 'wcf.date.month.feb', + 'wcf.date.month.mar', + 'wcf.date.month.apr', + // may is intentionally left out because it conflicts with the full month name + 'wcf.date.month.jun', + 'wcf.date.month.jul', + 'wcf.date.month.aug', + 'wcf.date.month.sep', + 'wcf.date.month.oct', + 'wcf.date.month.nov', + 'wcf.date.month.dec' +))); +$sql = "DELETE FROM wcf".WCF_N."_language_item + ".$conditions; +$statement = WCF::getDB()->prepareStatement($sql); +$statement->execute($conditions->getParameters());