From c8c950c7c6b719f267719199ad434959668bb628 Mon Sep 17 00:00:00 2001 From: Alexander Ebert Date: Fri, 8 Nov 2013 16:33:37 +0100 Subject: [PATCH] Added script-PIP to remove old language items --- com.woltlab.wcf/package.xml | 1 + wcfsetup/install/files/acp/update_rc1.php | 32 +++++++++++++++++++++++ 2 files changed, 33 insertions(+) create mode 100644 wcfsetup/install/files/acp/update_rc1.php 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()); -- 2.20.1