当前位置: 首页>>代码示例>>PHP>>正文


PHP PKPRequest::redirect方法代码示例

本文整理汇总了PHP中PKPRequest::redirect方法的典型用法代码示例。如果您正苦于以下问题:PHP PKPRequest::redirect方法的具体用法?PHP PKPRequest::redirect怎么用?PHP PKPRequest::redirect使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在PKPRequest的用法示例。


在下文中一共展示了PKPRequest::redirect方法的10个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。

示例1: execute

 /**
  * Save the form
  */
 function execute()
 {
     $userEmail = $this->getData('email');
     $notificationSettingsDao =& DAORegistry::getDAO('NotificationSettingsDAO');
     if ($password = $notificationSettingsDao->subscribeGuest($userEmail)) {
         Notification::sendMailingListEmail($userEmail, $password, 'NOTIFICATION_MAILLIST_WELCOME');
         return true;
     } else {
         PKPRequest::redirect(null, 'notification', 'mailListSubscribed', array('error'));
         return false;
     }
 }
开发者ID:anorton,项目名称:pkp-lib,代码行数:15,代码来源:NotificationMailingListForm.inc.php

示例2: redirect

 /**
  * Redirect to the specified page within Open Harvesting Systems.
  * Shorthand for a common call to $request->redirect($dispatcher->url($request, ROUTE_PAGE, ...)).
  * @param $page string The name of the op to redirect to.
  * @param $op string optional The name of the op to redirect to.
  * @param $path mixed string or array containing path info for redirect.
  * @param $params array Map of name => value pairs for additional parameters
  * @param $anchor string Name of desired anchor on the target page
  */
 function redirect($page = null, $op = null, $path = null, $params = null, $anchor = null)
 {
     parent::redirect(null, $page, $op, $path, $params, $anchor);
 }
开发者ID:Rygbee,项目名称:harvester,代码行数:13,代码来源:Request.inc.php

示例3: savePassword

 /**
  * Save user's new password.
  */
 function savePassword()
 {
     $this->validate();
     $this->setupTemplate();
     import('classes.user.form.LoginChangePasswordForm');
     $passwordForm = new LoginChangePasswordForm();
     $passwordForm->readInputData();
     if ($passwordForm->validate()) {
         if ($passwordForm->execute()) {
             $user = Validation::login($passwordForm->getData('username'), $passwordForm->getData('password'), $reason);
         }
         PKPRequest::redirect(null, 'user');
     } else {
         $passwordForm->display();
     }
 }
开发者ID:ramonsodoma,项目名称:pkp-lib,代码行数:19,代码来源:PKPLoginHandler.inc.php

示例4: validate

 /**
  * Redirect to index if system has already been installed.
  */
 function validate()
 {
     if (Config::getVar('general', 'installed')) {
         PKPRequest::redirect(null, 'index');
     }
 }
开发者ID:sedici,项目名称:ocs,代码行数:9,代码来源:PKPInstallHandler.inc.php

示例5: updateAnnouncementType

 /**
  * Save changes to an announcement type.
  */
 function updateAnnouncementType()
 {
     $this->validate();
     $this->setupTemplate(true);
     import('manager.form.AnnouncementTypeForm');
     $typeId = Request::getUserVar('typeId') == null ? null : (int) Request::getUserVar('typeId');
     $announcementTypeDao =& DAORegistry::getDAO('AnnouncementTypeDAO');
     if ($this->_announcementTypeIsValid($typeId)) {
         $announcementTypeForm = new AnnouncementTypeForm($typeId);
         $announcementTypeForm->readInputData();
         if ($announcementTypeForm->validate()) {
             $announcementTypeForm->execute();
             if (Request::getUserVar('createAnother')) {
                 PKPRequest::redirect(null, null, 'createAnnouncementType');
             } else {
                 PKPRequest::redirect(null, null, 'announcementTypes');
             }
         } else {
             $templateMgr =& TemplateManager::getManager();
             $templateMgr->append('pageHierarchy', array(Request::url(null, null, 'manager', 'announcementTypes'), 'manager.announcementTypes'));
             if ($typeId == null) {
                 $templateMgr->assign('announcementTypeTitle', 'manager.announcementTypes.createTitle');
             } else {
                 $templateMgr->assign('announcementTypeTitle', 'manager.announcementTypes.editTitle');
             }
             $announcementTypeForm->display();
         }
     } else {
         PKPRequest::redirect(null, null, 'announcementTypes');
     }
 }
开发者ID:anorton,项目名称:pkp-lib,代码行数:34,代码来源:PKPAnnouncementHandler.inc.php

示例6: saveSubscribeMailList

 /**
  * 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();
     }
 }
开发者ID:pulipulichen,项目名称:ocs,代码行数:17,代码来源:NotificationHandler.inc.php

示例7: objectsForReviewLogin

 /**
  * Connector from AnthroNet.  Receives a token in the 'token' query string argument
  * that is used to fetch author information via SOAP, create/or validate the author login,
  * and redirect to author home page.
  * @param array $args
  * @param PKPRequest $request
  */
 function objectsForReviewLogin($args, $request)
 {
     $token = $request->getUserVar('token');
     if ($token) {
         $authToken = $this->_doAuthenticate();
         if ($authToken) {
             $user = $this->_doUserRequest($token, $authToken);
             if ($user) {
                 $sessionManager =& SessionManager::getManager();
                 $sessionManager->regenerateSessionId();
                 $session =& $sessionManager->getUserSession();
                 $session->setSessionVar('userId', $user->getId());
                 $session->setUserId($user->getId());
                 $session->setSessionVar('username', $user->getUsername());
                 $request->redirect(null, 'objectsForReview');
                 // place them on the landing page for available objects.
             } else {
                 $request->redirect(null, 'user');
             }
         }
     }
 }
开发者ID:justinshaffner,项目名称:AAAObjectsForReview,代码行数:29,代码来源:ObjectsForReviewAuthorHandler.inc.php

示例8: redirect

 /**
  * Redirect to the specified page within OCS.
  * Shorthand for a common call to $request->redirect($dispatcher->url($request, ROUTE_PAGE, ...)).
  * @param $conferencePath string The path of the conference to redirect to.
  * @param $schedConfPath string The path of the conference to redirect to.
  * @param $page string The name of the op to redirect to.
  * @param $op string optional The name of the op to redirect to.
  * @param $path mixed string or array containing path info for redirect.
  * @param $params array Map of name => value pairs for additional parameters
  * @param $anchor string Name of desired anchor on the target page
  */
 function redirect($conferencePath = null, $schedConfPath = null, $page = null, $op = null, $path = null, $params = null, $anchor = null)
 {
     parent::redirect(array($conferencePath, $schedConfPath), $page, $op, $path, $params, $anchor);
 }
开发者ID:artkuo,项目名称:ocs,代码行数:15,代码来源:Request.inc.php

示例9: viewFile

 /**
  * Download an article file
  * @param array $args
  * @param PKPRequest $request
  */
 function viewFile($args, $request)
 {
     // For deprecated OJS 2.x URLs; see https://github.com/pkp/pkp-lib/issues/1541
     $articleId = isset($args[0]) ? $args[0] : 0;
     $galleyId = isset($args[1]) ? $args[1] : 0;
     $fileId = isset($args[2]) ? (int) $args[2] : 0;
     header("HTTP/1.1 301 Moved Permanently");
     $request->redirect(null, null, 'download', array($articleId, $galleyId, $fileId));
 }
开发者ID:bkroll,项目名称:ojs,代码行数:14,代码来源:ArticleHandler.inc.php

示例10: objectsForReviewUnenroll

 /**
  * Unenroll a publisher.
  * @param array $args
  * @param PKPRequest $request
  */
 function objectsForReviewUnenroll($args, &$request)
 {
     $publisherId = (int) Request::getUserVar('publisherId');
     $userId = (int) Request::getUserVar('userId');
     if ($publisherId && $userId) {
         $ofrEdAssOrgDao = DAORegistry::getDAO('ObjectForReviewEditorAssignmentDAO');
         $assignment = $ofrEdAssOrgDao->getByPublisherAndUserId($publisherId, $userId);
         if ($assignment) {
             $ofrEdAssOrgDao->deleteById($assignment->getId());
         }
     }
     $request->redirect(null, 'editor', 'objectsForReviewEnrollPublishers');
 }
开发者ID:justinshaffner,项目名称:AAAObjectsForReview,代码行数:18,代码来源:ObjectsForReviewEditorHandler.inc.php


注:本文中的PKPRequest::redirect方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。