private function calculateForWikiService($project_id)
 {
     if (!$this->plugin_manager->isPluginAllowedForProject($this->fulltextsearch_plugin, $project_id)) {
         return Search_SearchWiki::NAME;
     }
     return $this->getFullTextTypeName();
 }
Exemple #2
0
 public function __construct(GitPlugin $plugin, Git_RemoteServer_GerritServerFactory $gerrit_server_factory, Git_Driver_Gerrit_GerritDriverFactory $driver_factory, GitRepositoryManager $repository_manager, Git_SystemEventManager $system_event_manager, Git_Driver_Gerrit_UserAccountManager $gerrit_usermanager, GitRepositoryFactory $git_repository_factory, UserManager $user_manager, ProjectManager $project_manager, PluginManager $plugin_manager, Codendi_Request $request, Git_Driver_Gerrit_ProjectCreator $project_creator, Git_Driver_Gerrit_Template_TemplateFactory $template_factory, GitPermissionsManager $permissions_manager, Git_GitRepositoryUrlManager $url_manager, Logger $logger, Git_Backend_Gitolite $backend_gitolite, Git_Mirror_MirrorDataMapper $mirror_data_mapper)
 {
     parent::__construct($user_manager, $request);
     $this->userManager = $user_manager;
     $this->projectManager = $project_manager;
     $this->factory = $git_repository_factory;
     $this->gerrit_server_factory = $gerrit_server_factory;
     $this->driver_factory = $driver_factory;
     $this->repository_manager = $repository_manager;
     $this->git_system_event_manager = $system_event_manager;
     $this->gerrit_usermanager = $gerrit_usermanager;
     $this->plugin_manager = $plugin_manager;
     $this->project_creator = $project_creator;
     $this->template_factory = $template_factory;
     $this->permissions_manager = $permissions_manager;
     $this->plugin = $plugin;
     $this->url_manager = $url_manager;
     $this->logger = $logger;
     $this->backend_gitolite = $backend_gitolite;
     $this->mirror_data_mapper = $mirror_data_mapper;
     $url = new Git_URL($this->projectManager, $this->factory, $_SERVER['REQUEST_URI']);
     $this->routeGitSmartHTTP($url);
     $this->routeUsingFriendlyURLs($url);
     $this->routeUsingStandardURLs($url);
     $valid = new Valid_GroupId('group_id');
     $valid->required();
     if ($this->request->valid($valid)) {
         $this->groupId = (int) $this->request->get('group_id');
     }
     $valid = new Valid_String('action');
     $valid->required();
     if ($this->request->valid($valid)) {
         $this->action = $this->request->get('action');
     }
     if (empty($this->action)) {
         $this->action = 'index';
     }
     if (empty($this->groupId)) {
         $this->addError('Bad request');
         $this->redirect('/');
     }
     $this->project = $this->projectManager->getProject($this->groupId);
     $this->projectName = $this->project->getUnixName();
     if (!$this->plugin_manager->isPluginAllowedForProject($this->plugin, $this->groupId)) {
         $this->addError($this->getText('project_service_not_available'));
         $this->redirect('/projects/' . $this->projectName . '/');
     }
     $this->permittedActions = array();
 }