コード例 #1
0
        git_log('Invoking ' . $command, 'DEB');
    }
    $process = proc_open($command, $descriptor_spec, $pipes, NULL, $env);
    if (is_resource($process)) {
        $stdout = stream_get_contents($pipes[1]);
        fclose($pipes[1]);
        $stderr = stream_get_contents($pipes[2]);
        fclose($pipes[2]);
        $return_code = proc_close($process);
        if ($return_code != 0 && !$fail_safe) {
            throw new Exception("Invocation of '" . $command . "' failed with return code " . $return_code . ": \n" . $stdout . $stderr);
        }
        return $stdout;
    }
}
$all_projects = project_list();
if (count($argv) > 1) {
    $projects = $argv;
    array_shift($projects);
} else {
    $projects = array_keys($all_projects);
}
foreach ($projects as $project_name) {
    if (!isset($all_projects[$project_name])) {
        git_log("Project " . $project . " doesn't exist.", 'ERR-');
        continue;
    }
    $project = $all_projects[$project_name];
    if ($project->short_name == 'drupal') {
        continue;
    }
コード例 #2
0
ファイル: if_get_project.php プロジェクト: dangdang/zhs
<?php

require_once 'config/tank_config.php';
$getjson = file_get_contents('php://input');
$dataarr = json_decode($getjson, true);
$token = $dataarr['token'];
$tab = $dataarr['tab'];
$uid = check_token($token);
if ($uid != 3) {
    mysql_select_db($database_tankdb, $tankdb);
    $query_Recordset_sumtotal = sprintf("SELECT \n\t\t\t\t\t\t\tCOUNT(*) as count_prj   \n\t\t\t\t\t\t\tFROM tk_project \t\n\t\t\t\t\t\t\tWHERE project_to_user = %s", GetSQLValueString($uid, "int"));
    $Recordset_sumtotal = mysql_query($query_Recordset_sumtotal, $tankdb) or die(mysql_error());
    $row_Recordset_sumtotal = mysql_fetch_assoc($Recordset_sumtotal);
    $my_totalprj = $row_Recordset_sumtotal['count_prj'];
    $get_function = project_list($uid, "project_lastupdate", "DESC", "0", $tab);
    $rearr = array('summprj' => $my_totalprj, 'list' => $get_function);
    $redata = json_encode($rearr);
    echo $redata;
} else {
    echo 3;
}
コード例 #3
0
ファイル: if_get_file_project.php プロジェクト: dangdang/zhs
<?php

require_once 'config/tank_config.php';
$getjson = file_get_contents('php://input');
$dataarr = json_decode($getjson, true);
$token = $dataarr['token'];
$uid = check_token($token);
if ($uid != 3) {
    $get_function = project_list(0, "project_lastupdate", "DESC", "0", "allprj", "file");
    $redata = json_encode($get_function);
    echo $redata;
} else {
    echo 3;
}