private function queueProjectsConfigurationUpdate(DataAccessResult $dar)
 {
     $projects_ids = array();
     if (count($dar) > 0) {
         foreach ($dar as $row) {
             $projects_ids[] = $row['group_id'];
         }
         $this->git_system_event_manager->queueProjectsConfigurationUpdate($projects_ids);
     }
     return $projects_ids;
 }
Ejemplo n.º 2
0
 private function importRepository(Project $project, PFUser $creator, SimpleXMLElement $repository_xmlnode, $extraction_path)
 {
     $repository_info = $repository_xmlnode->attributes();
     $this->logger->debug("Importing {$repository_info['name']} using {$repository_info['bundle-path']}");
     $description = isset($repository_info['description']) ? (string) $repository_info['description'] : GitRepository::DEFAULT_DESCRIPTION;
     $repository = $this->repository_factory->buildRepository($project, $repository_info['name'], $creator, $this->gitolite_backend, $description);
     $absolute_bundle_path = $extraction_path . '/' . $repository_info['bundle-path'];
     $extraction_path_arg = escapeshellarg($extraction_path);
     $this->system_command->exec("chmod 755 {$extraction_path_arg}");
     $this->repository_manager->createFromBundle($repository, $this->gitolite_backend, $absolute_bundle_path);
     $this->importPermissions($project, $repository_xmlnode->children(), $repository);
     $this->system_event_manager->queueProjectsConfigurationUpdate(array($project->getGroupId()));
 }