public function __construct(Codendi_Request $request, ProjectManager $project_manager, Project_CustomDescription_CustomDescriptionFactory $custom_description_factory, TroveCatFactory $trove_cat_factory)
 {
     parent::__construct('project', $request);
     $this->project_manager = $project_manager;
     $this->required_custom_descriptions = $custom_description_factory->getRequiredCustomDescriptions();
     $this->trove_cats = $trove_cat_factory->getMandatoryParentCategoriesUnderRootOnlyWhenCategoryHasChildren();
     $this->creation_request = new Project_OneStepCreation_OneStepCreationRequest($request, $project_manager);
     $this->presenter = new Project_OneStepCreation_OneStepCreationPresenter($this->creation_request, $this->required_custom_descriptions, $project_manager, $this->trove_cats);
 }
Esempio n. 2
0
 $csv_exporter->buildDatas($dao->getDescriptionOfActiveProjectsBeforeEndDate(), "Description");
 $csv_exporter->buildDatas($dao->getRegisterTimeOfActiveProjectsBeforeEndDate(), "Creation date");
 $csv_exporter->buildDatas($dao->getInfosFromTroveGroupLink(), "Organization");
 $csv_exporter->buildDatas($dao->getAdministrators(), "Created by");
 $csv_exporter->buildDatas($dao->getAdministratorsRealNames(), "Created by (Real name)");
 $csv_exporter->buildDatas($dao->getAdministratorsEMails(), "Created by (Email)");
 $csv_exporter->buildDatas($dao->getNumberOfUserAddedBetweenStartDateAndEndDate(), "Users added");
 //Custom Descriptions
 $custom_description_factory = new Project_CustomDescription_CustomDescriptionFactory(new Project_CustomDescription_CustomDescriptionDao());
 $custom_description_value_dao = new Project_CustomDescription_CustomDescriptionValueDao();
 foreach ($custom_description_factory->getCustomDescriptions() as $custom_description) {
     $csv_exporter->buildDatas($custom_description_value_dao->getAllDescriptionValues($custom_description->getId()), $custom_description->getLabel());
 }
 //Trove Cats
 $trove_cat_dao = new TroveCatDao();
 $trove_cat_factory = new TroveCatFactory($trove_cat_dao);
 $mandatories_trove_cat = $trove_cat_factory->getMandatoryParentCategoriesUnderRoot();
 foreach ($mandatories_trove_cat as $trove_cat) {
     $csv_exporter->buildDatas($trove_cat_dao->getMandatoryCategorySelectForAllProject($trove_cat->getId()), $trove_cat->getFullname());
 }
 //CVS & SVN
 $csv_exporter->buildDatas($dao->getCVSActivities(), "CVS activities");
 $csv_exporter->buildDatas($dao->getSVNActivities(), "SVN activities");
 //GIT
 $p = $pluginManager->getPluginByName('git');
 if ($p && $pluginManager->isPluginAvailable($p)) {
     $csv_exporter->buildDatas($dao->getGitActivities(), "GIT activities");
 }
 //FRS
 $csv_exporter->buildDatas($dao->getFilesPublished(), "Files published");
 $csv_exporter->buildDatas($dao->getDistinctFilesPublished(), "Distinct files published");
Esempio n. 3
0
<?php

//
// SourceForge: Breaking Down the Barriers to Open Source Development
// Copyright 1999-2000 (c) The SourceForge Crew
// http://sourceforge.net
//
//
require_once 'pre.php';
require_once 'trove.php';
session_require(array('group' => '1', 'admin_flags' => 'A'));
$trove_cat_dao = new TroveCatDao();
$trove_cat_factory = new TroveCatFactory($trove_cat_dao);
$list_of_top_level_category_ids = array_keys($trove_cat_factory->getMandatoryParentCategoriesUnderRoot());
// ########################################################
$request =& HTTPRequest::instance();
if ($request->exist('Submit')) {
    $newroot = trove_getrootcat($request->get('form_parent'));
    $mandatory = $request->get('form_mandatory');
    if ($newroot !== '0') {
        $mandatory = 0;
    }
    if (!in_array($newroot, $list_of_top_level_category_ids)) {
        $display = 0;
    } else {
        $display = $request->get('form_display');
    }
    if ($request->get('form_shortname')) {
        db_query('INSERT INTO trove_cat ' . '(shortname,fullname,description,parent,version,root_parent, mandatory,display_during_project_creation) values (' . '\'' . db_escape_string($request->get('form_shortname')) . '\',\'' . db_escape_string($request->get('form_fullname')) . '\',\'' . db_escape_string($request->get('form_description')) . '\',\'' . db_escape_string($request->get('form_parent')) . '\',' . date("Ymd", time()) . '01' . ',\'' . db_es($newroot) . '\'' . ',' . db_escape_int($mandatory) . ',' . db_escape_int($display) . ')');
    }
    // update full paths now