We are moving to Git Issues for bug tracking in future releases. During transition, content will be in both tools. If you'd like to file a new bug, please create an issue.

View | Details | Raw Unified | Return to bug 3166 | Differences between
and this patch

Collapse All | Expand All

(-)pages/schedConf/SchedConfHandler.inc.php (-5 / +18 lines)
 Lines 153-164    Link Here 
153
			// This user has already registered.
153
			// This user has already registered.
154
			$registration =& $registrationDao->getRegistration($registrationId);
154
			$registration =& $registrationDao->getRegistration($registrationId);
155
155
156
			if ($registration && $registration->getDatePaid()) $templateMgr->assign('message', 'schedConf.registration.alreadyRegisteredAndPaid');
156
			import('payment.ocs.OCSPaymentManager');
157
			else $templateMgr->assign('message', 'schedConf.registration.alreadyRegistered');
157
			$paymentManager =& OCSPaymentManager::getManager();
158
158
159
			$templateMgr->assign('backLinkLabel', 'common.back');
159
			if (!$paymentManager->isConfigured() || !$registration || $registration->getDatePaid()) {
160
			$templateMgr->assign('backLink', Request::url(null, null, 'index'));
160
				// If the system isn't fully configured or the registration is already paid,
161
			$templateMgr->display('common/message.tpl');
161
				// display a message and block the user from going further.
162
				$templateMgr->assign('message', 'schedConf.registration.alreadyRegisteredAndPaid');
163
				$templateMgr->assign('backLinkLabel', 'common.back');
164
				$templateMgr->assign('backLink', Request::url(null, null, 'index'));
165
				return $templateMgr->display('common/message.tpl');
166
			} else {
167
				// Otherwise, allow them to try to pay again.
168
				$registrationTypeDao =& DAORegistry::getDAO('RegistrationTypeDAO');
169
				$registrationType =& $registrationTypeDao->getRegistrationType($registration->getTypeId());
170
				$queuedPayment =& $paymentManager->createQueuedPayment($schedConf->getConferenceId(), $schedConf->getSchedConfId(), QUEUED_PAYMENT_TYPE_REGISTRATION, $user->getUserId(), $registrationId, $registrationType->getCost(), $registrationType->getCurrencyCodeAlpha());
171
				$queuedPaymentId = $paymentManager->queuePayment($queuedPayment, time() + (60 * 60 * 24 * 30)); // 30 days to complete
172
173
				$paymentManager->displayPaymentForm($queuedPaymentId, $queuedPayment);
174
			}
162
		} else {
175
		} else {
163
			import('registration.form.UserRegistrationForm');
176
			import('registration.form.UserRegistrationForm');
164
177
165
178

Return to bug 3166