コード例 #1
0
ファイル: eventum.php プロジェクト: korusdipl/eventum
// +----------------------------------------------------------------------+
define('APP_PATH', dirname(__FILE__) . '/..');
require_once APP_PATH . '/autoload.php';
list($user_email, $user_password, $hostname, $port, $relative_url) = Command_Line::getEnvironmentSettings();
if (empty($port)) {
    $port = 80;
}
if (empty($relative_url)) {
    $relative_url = '/';
}
if (count($argv) == 1) {
    Command_Line::quit('Requirement argument not found');
}
// show usage information if user gave --help
if ($argv[1] == '--help' || $argv[1] == 'help') {
    Command_Line::usage(__FILE__);
}
$should_confirm = Command_Line::isSafeExecution();
$scheme = $port == 443 ? 'https' : 'http';
$client = new Eventum_RPC("{$scheme}://{$hostname}{$relative_url}/rpc/xmlrpc.php");
//$client->setCredentials($user_email, $user_password);
if (in_array('--debug', $argv)) {
    $client->setDebug(true);
    $debug = true;
    unset($argv[array_search('--debug', $argv)]);
} else {
    $debug = false;
}
$auth = array($user_email, $user_password);
$issue_id = (int) $argv[1];
try {