From: Marcel Werk Date: Sat, 5 Dec 2015 13:09:16 +0000 (+0100) Subject: Fixed issue in paid subscription forms X-Git-Tag: 2.1.9~11 X-Git-Url: https://git.stricted.de/?a=commitdiff_plain;h=1f340ef2c8c71fdd1935f3effc42caefad8e3085;p=GitHub%2FWoltLab%2FWCF.git Fixed issue in paid subscription forms --- diff --git a/wcfsetup/install/files/lib/acp/form/PaidSubscriptionAddForm.class.php b/wcfsetup/install/files/lib/acp/form/PaidSubscriptionAddForm.class.php index 7357d726c2..afed0ac75a 100644 --- a/wcfsetup/install/files/lib/acp/form/PaidSubscriptionAddForm.class.php +++ b/wcfsetup/install/files/lib/acp/form/PaidSubscriptionAddForm.class.php @@ -186,8 +186,10 @@ class PaidSubscriptionAddForm extends AbstractForm { if (isset($_POST['cost'])) $this->cost = floatval($_POST['cost']); if (isset($_POST['currency'])) $this->currency = $_POST['currency']; if (!empty($_POST['subscriptionLengthPermanent'])) $this->subscriptionLengthPermanent = 1; - if (isset($_POST['subscriptionLength'])) $this->subscriptionLength = intval($_POST['subscriptionLength']); - if (isset($_POST['subscriptionLengthUnit'])) $this->subscriptionLengthUnit = $_POST['subscriptionLengthUnit']; + if (!$this->subscriptionLengthPermanent) { + if (isset($_POST['subscriptionLength'])) $this->subscriptionLength = intval($_POST['subscriptionLength']); + if (isset($_POST['subscriptionLengthUnit'])) $this->subscriptionLengthUnit = $_POST['subscriptionLengthUnit']; + } if (!empty($_POST['isRecurring'])) $this->isRecurring = 1; if (isset($_POST['groupIDs']) && is_array($_POST['groupIDs'])) $this->groupIDs = ArrayUtil::toIntegerArray($_POST['groupIDs']); if (isset($_POST['excludedSubscriptionIDs']) && is_array($_POST['excludedSubscriptionIDs'])) $this->excludedSubscriptionIDs = ArrayUtil::toIntegerArray($_POST['excludedSubscriptionIDs']); diff --git a/wcfsetup/install/files/lib/acp/form/PaidSubscriptionEditForm.class.php b/wcfsetup/install/files/lib/acp/form/PaidSubscriptionEditForm.class.php index 02e45401aa..ea0cf1d746 100644 --- a/wcfsetup/install/files/lib/acp/form/PaidSubscriptionEditForm.class.php +++ b/wcfsetup/install/files/lib/acp/form/PaidSubscriptionEditForm.class.php @@ -93,8 +93,10 @@ class PaidSubscriptionEditForm extends PaidSubscriptionAddForm { if (isset($_POST['cost'])) $this->cost = floatval($_POST['cost']); if (isset($_POST['currency'])) $this->currency = $_POST['currency']; if (!empty($_POST['subscriptionLengthPermanent'])) $this->subscriptionLengthPermanent = 1; - if (isset($_POST['subscriptionLength'])) $this->subscriptionLength = intval($_POST['subscriptionLength']); - if (isset($_POST['subscriptionLengthUnit'])) $this->subscriptionLengthUnit = $_POST['subscriptionLengthUnit']; + if (!$this->subscriptionLengthPermanent) { + if (isset($_POST['subscriptionLength'])) $this->subscriptionLength = intval($_POST['subscriptionLength']); + if (isset($_POST['subscriptionLengthUnit'])) $this->subscriptionLengthUnit = $_POST['subscriptionLengthUnit']; + } if (!empty($_POST['isRecurring'])) $this->isRecurring = 1; if (isset($_POST['groupIDs']) && is_array($_POST['groupIDs'])) $this->groupIDs = ArrayUtil::toIntegerArray($_POST['groupIDs']); }