コード例 #1
0
 /**
  * Save the public notification email subscription form
  * @param $args array
  * @param $request Request
  */
 function saveSubscribeMailList($args, &$request)
 {
     $this->validate();
     $this->setupTemplate(true);
     import('lib.pkp.classes.notification.form.NotificationMailingListForm');
     $notificationMailingListForm = new NotificationMailingListForm();
     $notificationMailingListForm->readInputData();
     if ($notificationMailingListForm->validate()) {
         $notificationMailingListForm->execute($request);
         $router =& $request->getRouter();
         $request->redirectUrl($router->url($request, null, 'notification', 'mailListSubscribed', array('success')));
     } else {
         $notificationMailingListForm->display($request);
     }
 }
コード例 #2
0
 /**
  * Save the public notification email subscription form
  */
 function saveSubscribeMailList()
 {
     $this->validate();
     $this->setupTemplate(true);
     import('notification.form.NotificationMailingListForm');
     $notificationMailingListForm = new NotificationMailingListForm();
     $notificationMailingListForm->readInputData();
     if ($notificationMailingListForm->validate()) {
         $notificationMailingListForm->execute();
         PKPRequest::redirect(null, 'notification', 'mailListSubscribed', array('success'));
     } else {
         $notificationMailingListForm->display();
     }
 }