• 设为首页
  • 点击收藏
  • 手机版
    手机扫一扫访问
    迪恩网络手机版
  • 关注官方公众号
    微信扫一扫关注
    迪恩网络公众号

PHP Codendi_Request类代码示例

原作者: [db:作者] 来自: [db:来源] 收藏 邀请

本文整理汇总了PHP中Codendi_Request的典型用法代码示例。如果您正苦于以下问题:PHP Codendi_Request类的具体用法?PHP Codendi_Request怎么用?PHP Codendi_Request使用的例子?那么恭喜您, 这里精选的类代码示例或许可以为您提供帮助。



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

示例1: process

 public function process(Tracker_IDisplayTrackerLayout $layout, Codendi_Request $request, PFUser $current_user)
 {
     if ($this->workflow_factory->deleteWorkflow($request->get('delete'))) {
         $GLOBALS['Response']->addFeedback('info', $GLOBALS['Language']->getText('workflow_admin', 'deleted'));
         $GLOBALS['Response']->redirect(TRACKER_BASE_URL . '/?' . http_build_query(array('tracker' => (int) $this->tracker->id, 'func' => Workflow::FUNC_ADMIN_TRANSITIONS)));
     }
 }
开发者ID:pombredanne,项目名称:tuleap,代码行数:7,代码来源:Delete.class.php


示例2: process

 public function process(Tracker_IDisplayTrackerLayout $layout, Codendi_Request $request, PFUser $current_user)
 {
     if (!$this->tracker->userCanSubmitArtifact($current_user)) {
         $this->logsErrorAndRedirectToTracker('plugin_tracker_admin', 'access_denied');
         return;
     }
     $from_artifact = $this->artifact_factory->getArtifactByIdUserCanView($current_user, $request->get('from_artifact_id'));
     if (!$from_artifact || $from_artifact->getTracker() !== $this->tracker) {
         $this->logsErrorAndRedirectToTracker('plugin_tracker_include_type', 'error_missing_param');
         return;
     }
     $from_changeset = $from_artifact->getChangeset($request->get('from_changeset_id'));
     if (!$from_changeset) {
         $this->logsErrorAndRedirectToTracker('plugin_tracker_include_type', 'error_missing_param');
         return;
     }
     $submitted_values = $request->get('artifact');
     if (!is_array($submitted_values)) {
         $this->logsErrorAndRedirectToTracker('plugin_tracker_include_type', 'error_missing_param');
         return;
     }
     try {
         $this->processCopy($from_changeset, $current_user, $submitted_values);
     } catch (Tracker_XML_Exporter_TooManyChildrenException $exception) {
         $GLOBALS['Response']->addFeedback('error', $GLOBALS['Language']->getText('plugin_tracker_artifact', 'copy_too_many_children', array(Tracker_XML_ChildrenCollector::MAX)));
         $this->redirectToArtifact($from_artifact);
     }
 }
开发者ID:amanikamail,项目名称:tuleap,代码行数:28,代码来源:CopyArtifact.class.php


示例3: index

 public function index(Codendi_Request $request)
 {
     if (!$request->get('type_of_search')) {
         $request->set('type_of_search', Search_SearchProject::NAME);
     }
     $this->results($request);
 }
开发者ID:pombredanne,项目名称:tuleap,代码行数:7,代码来源:SearchController.class.php


示例4: execute

 /**
  * @see Cardwall_OnTop_Config_Command::execute()
  */
 public function execute(Codendi_Request $request)
 {
     if ($request->get('new_column')) {
         $this->dao->create($this->tracker->getId(), $request->get('new_column'));
         $GLOBALS['Response']->addFeedback('info', $GLOBALS['Language']->getText('plugin_cardwall', 'on_top_column_added'));
     }
 }
开发者ID:pombredanne,项目名称:tuleap,代码行数:10,代码来源:CreateColumn.class.php


示例5: getControllerFromRequest

 private function getControllerFromRequest(Codendi_Request $request)
 {
     if ($request->get('pane') == 'gerrit_servers_admin') {
         return new Git_AdminGerritController($this->csrf, $this->gerrit_server_factory);
     } else {
         return new Git_AdminMirrorController($this->csrf, $this->git_mirror_mapper, $this->git_mirror_resource_restrictor, $this->project_manager, $this->git_mirror_manifest_manager, $this->git_system_event_manager);
     }
 }
开发者ID:pombredanne,项目名称:tuleap,代码行数:8,代码来源:AdminRouter.class.php


示例6: enhanceRedirect

 protected function enhanceRedirect(Codendi_Request $request)
 {
     $from_aid = $request->get('from_aid');
     if ($from_aid != null) {
         $this->redirect->query_parameters['from_aid'] = $from_aid;
     }
     parent::enhanceRedirect($request);
 }
开发者ID:uniteddiversity,项目名称:tuleap,代码行数:8,代码来源:EditRenderer.class.php


示例7: update

 public function update(Codendi_Request $request, Response $response)
 {
     $emailgateway_mode = $request->get('emailgateway_mode');
     if ($emailgateway_mode && $this->config->setEmailgatewayMode($emailgateway_mode)) {
         $response->addFeedback(Feedback::INFO, $GLOBALS['Language']->getText('admin_main', 'successfully_updated'));
     }
     $response->redirect($_SERVER['REQUEST_URI']);
 }
开发者ID:pkdevbox,项目名称:tuleap,代码行数:8,代码来源:TrackerPluginConfigController.php


示例8: getUGroup

 private function getUGroup(Codendi_Request $request)
 {
     $ugroup_id = $request->getValidated('ugroup_id', 'uint', 0);
     if (!$ugroup_id) {
         exit_error($GLOBALS['Language']->getText('global', 'error'), 'The ugroup ID is missing');
     }
     return $this->ugroup_manager->getById($ugroup_id);
 }
开发者ID:pombredanne,项目名称:tuleap,代码行数:8,代码来源:UGroupRouter.class.php


示例9: sendResponse

 private function sendResponse(Codendi_Request $request, $feedback_level, $message, $unsubscribe)
 {
     if ($request->isAjax()) {
         $this->sendAjaxResponse($unsubscribe, $message);
         return;
     }
     $GLOBALS['Response']->addFeedback($feedback_level, $message);
     $GLOBALS['Response']->redirect($this->artifact->getUri());
 }
开发者ID:pombredanne,项目名称:tuleap,代码行数:9,代码来源:ArtifactNotificationSubscriber.class.php


示例10: update

 public function update(Codendi_Request $request, Response $response)
 {
     $emailgateway_mode = $request->get('emailgateway_mode');
     if ($emailgateway_mode && $this->config->setEmailgatewayMode($emailgateway_mode)) {
         $response->addFeedback(Feedback::INFO, $GLOBALS['Language']->getText('plugin_tracker_config', 'successfully_updated'));
     }
     $this->event_manager->processEvent(Event::UPDATE_ALIASES, null);
     $response->redirect($_SERVER['REQUEST_URI']);
 }
开发者ID:pombredanne,项目名称:tuleap,代码行数:9,代码来源:TrackerPluginConfigController.php


示例11: getRequestedView

 /**
  * @return Tracker_Artifact_View_View
  */
 private function getRequestedView(Codendi_Request $request)
 {
     if (isset($this->views[$request->get('view')])) {
         return $this->views[$request->get('view')];
     } else {
         list(, $first_view) = each($this->views);
         return $first_view;
     }
 }
开发者ID:pombredanne,项目名称:tuleap,代码行数:12,代码来源:ViewCollection.class.php


示例12: route

 public function route(Codendi_Request $request)
 {
     $controller = new Project_OneStepCreation_OneStepCreationController($request, $this->project_manager, $this->custom_description_factory, $this->trove_cat_factory);
     if ($request->get('create_project')) {
         $controller->create();
     } else {
         $controller->index();
     }
 }
开发者ID:pombredanne,项目名称:tuleap,代码行数:9,代码来源:OneStepCreationRouter.class.php


示例13: execute

 /**
  * @see Cardwall_OnTop_Config_Command::execute()
  */
 public function execute(Codendi_Request $request)
 {
     if ($request->get('add_mapping_on')) {
         $new_mapping_tracker = $this->tracker_factory->getTrackerById($request->get('add_mapping_on'));
         if ($new_mapping_tracker && $this->dao->create($this->tracker->getId(), $new_mapping_tracker->getId(), null)) {
             $GLOBALS['Response']->addFeedback('info', $GLOBALS['Language']->getText('plugin_cardwall', 'on_top_mapping_added', array($new_mapping_tracker->getName())));
         }
     }
 }
开发者ID:nterray,项目名称:tuleap,代码行数:12,代码来源:CreateMappingField.class.php


示例14: updateGerritServers

 private function updateGerritServers(Codendi_Request $request)
 {
     $request_gerrit_servers = $request->get('gerrit_servers');
     if (is_array($request_gerrit_servers)) {
         $this->csrf->check();
         $this->fetchGerritServers();
         $this->updateServers($request_gerrit_servers);
         $GLOBALS['Response']->redirect('/plugins/git/admin/?pane=gerrit_servers_admin');
     }
 }
开发者ID:pombredanne,项目名称:tuleap,代码行数:10,代码来源:AdminGerritController.class.php


示例15: getSendNotificationsFromRequest

 /**
  * @return boolean
  */
 private function getSendNotificationsFromRequest(Codendi_Request $request)
 {
     $send_notifications = false;
     if ($request->exist('notify')) {
         if ($request->get('notify') == 'ok') {
             $send_notifications = true;
         }
     }
     return $send_notifications;
 }
开发者ID:pombredanne,项目名称:tuleap,代码行数:13,代码来源:MasschangeUpdater.class.php


示例16: fetchFormElements

 protected function fetchFormElements(Codendi_Request $request)
 {
     $html = '';
     $html .= '<div class="tracker_artifact">';
     foreach ($this->tracker->getFormElements() as $form_element) {
         $html .= $form_element->fetchSubmit($request->get('artifact'));
     }
     $html .= '</div>';
     return $html;
 }
开发者ID:pombredanne,项目名称:tuleap,代码行数:10,代码来源:SubmitAbstractRenderer.class.php


示例17: register_valid

function register_valid(Codendi_Request $request)
{
    global $Language;
    if (!$request->existAndNonEmpty('Update')) {
        return false;
    }
    if (!$request->existAndNonEmpty('user_id')) {
        $GLOBALS['Response']->addFeedback('error', $Language->getText('admin_user_changepw', 'error_userid'));
        return false;
    }
    if (!$request->existAndNonEmpty('form_pw')) {
        $GLOBALS['Response']->addFeedback('error', $Language->getText('admin_user_changepw', 'error_nopasswd'));
        return false;
    }
    if ($request->get('form_pw') != $request->get('form_pw2')) {
        $GLOBALS['Response']->addFeedback('error', $Language->getText('admin_user_changepw', 'error_passwd'));
        return false;
    }
    $errors = array();
    if (!account_pwvalid($request->get('form_pw'), $errors)) {
        foreach ($errors as $e) {
            $GLOBALS['Response']->addFeedback('error', $e);
        }
        return false;
    }
    // if we got this far, it must be good
    $user_manager = UserManager::instance();
    $user = $user_manager->getUserById($request->get('user_id'));
    $user->setPassword($request->get('form_pw'));
    if (!$user_manager->updateDb($user)) {
        $GLOBALS['Response']->addFeedback(Feedback::ERROR, $Language->getText('admin_user_changepw', 'error_update'));
        return false;
    }
    return true;
}
开发者ID:pombredanne,项目名称:tuleap,代码行数:35,代码来源:user_changepw.php


示例18: execute

 /**
  * @see Cardwall_OnTop_Config_Command::execute()
  */
 public function execute(Codendi_Request $request)
 {
     if (is_array($request->get('custom_mapping'))) {
         foreach ($request->get('custom_mapping') as $mapping_tracker_id => $is_custom) {
             $mapping_tracker = $this->tracker_factory->getTrackerById($mapping_tracker_id);
             if ($this->canDelete($is_custom, $mapping_tracker) && $this->delete($mapping_tracker)) {
                 $GLOBALS['Response']->addFeedback('info', $GLOBALS['Language']->getText('plugin_cardwall', 'on_top_mapping_removed', array($mapping_tracker->getName())));
             }
         }
     }
 }
开发者ID:pombredanne,项目名称:tuleap,代码行数:14,代码来源:DeleteMappingFields.class.php


示例19: fetchNewArtifactForm

 private function fetchNewArtifactForm(Codendi_Request $request, PFUser $current_user)
 {
     $html = '';
     $html .= '<input type="hidden" name="link-artifact-id" value="' . $this->source_artifact->getId() . '" />';
     if ($request->get('immediate')) {
         $html .= '<input type="hidden" name="immediate" value="1" />';
     }
     $html .= $this->fetchFormElements($request, $current_user);
     $html .= '<input class="btn btn-primary" type="submit" id="tracker_artifact_submit" value="' . $GLOBALS['Language']->getText('global', 'btn_submit') . '" />';
     return $html;
 }
开发者ID:pombredanne,项目名称:tuleap,代码行数:11,代码来源:SubmitOverlayRenderer.class.php


示例20: execute

 /**
  * @see Cardwall_OnTop_Config_Command::execute()
  */
 public function execute(Codendi_Request $request)
 {
     if ($request->get('column')) {
         foreach ($request->get('column') as $id => $column_definition) {
             $column_label = $column_definition['label'];
             if (!empty($column_label) && $this->dao->save($this->tracker->getId(), $id, $column_label)) {
                 $GLOBALS['Response']->addFeedback('info', $GLOBALS['Language']->getText('plugin_cardwall', 'on_top_column_changed', array($column_label)));
             }
         }
     }
 }
开发者ID:nterray,项目名称:tuleap,代码行数:14,代码来源:UpdateColumns.class.php



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


鲜花

握手

雷人

路过

鸡蛋
该文章已有0人参与评论

请发表评论

全部评论

专题导读
上一篇:
PHP Codes类代码示例发布时间:2022-05-23
下一篇:
PHP Codendi_HTMLPurifier类代码示例发布时间:2022-05-23
热门推荐
阅读排行榜

扫描微信二维码

查看手机版网站

随时了解更新最新资讯

139-2527-9053

在线客服(服务时间 9:00~18:00)

在线QQ客服
地址:深圳市南山区西丽大学城创智工业园
电邮:jeky_zhao#qq.com
移动电话:139-2527-9053

Powered by 互联科技 X3.4© 2001-2213 极客世界.|Sitemap