/**
  * Get the right VCS for a given repository
  *
  * @param  string $repo repository name
  * @return string Name of the VCS or false if the repo does not exist
  */
 public static function getVCS($repo)
 {
     $vcs = ['git' => ['firefox_ios', 'mozilla_org'], 'hg' => [], 'svn' => []];
     $vcs['hg'] = array_merge(Project::getDesktopRepositories(), Project::getGaiaRepositories(), $vcs['hg']);
     foreach ($vcs as $system => $repos) {
         if (in_array($repo, $repos)) {
             return $system;
         }
     }
     return false;
 }
Example #2
0
<?php

namespace Transvision;

/* Global variables used across the project */
// Repositories
$repos = Project::getRepositories();
$repos_nice_names = Project::getRepositoriesNames();
$gaia_repos = Project::getGaiaRepositories();
$desktop_repos = Project::getDesktopRepositories();
// Search forms
$form_search_options = ['case_sensitive', 'whole_word', 'perfect_match', 't2t', 'repo', 'search_type'];
$form_checkboxes = array_diff($form_search_options, ['repo', 'search_type']);