kritbit

kritbit Commit Details


Date:2015-12-13 16:03:13 (9 years 8 days ago)
Author:Natalie Adams
Branch:master
Commit:62274b2b0b1863efa1fc1a6e5ae5bb7d5fff3d60
Parents: 0a8c8b6bd29127a28efaf1d5cc6cab8926c69abd
Message:Updating support for seperate directories per script

Changes:

File differences

web/application/controllers/service.php
8989
9090
9191
92
92
9393
94
94
95
9596
9697
9798
......
100101
101102
102103
103
104
104105
105106
106107
......
112113
113114
114115
115
116
116117
117118
118119
$returnVar = 0;
$jobName = (isset($job->jobName) && !empty($job->jobName) && $job->jobName) ? $job->jobName : "----NOT-SET----";
$dir = __DIR__ . "/../tmp/" . $jobName;
$dir = __DIR__ . DIRECTORY_SEPARATOR .".." . DIRECTORY_SEPARATOR . "tmp" . DIRECTORY_SEPARATOR . $jobName;
if (is_dir($dir)) {
$this->rrmdir($dir . "/");
$this->rrmdir($dir . DIRECTORY_SEPARATOR);
mkdir($dir, 0777, true);
} else {
mkdir($dir, 0777, true);
}
// grumble grumble something something windows
if (stripos(php_uname("s"), "Win") !== false) {
file_put_contents("$dir/kritscript.bat", $job->runScript);
exec("c:\\windows\\system32\\cmd.exe /c $dir/kritscript.bat", $output, $returnVar);
exec("c:\\windows\\system32\\cmd.exe /c $dir\kritscript.bat", $output, $returnVar);
} else {
file_put_contents("$dir/kritscript", $job->runScript);
chmod("$dir/kritscript", 0777);
if ($returnVar != 0) {
if (stripos(php_uname("s"), "Win") !== false) {
file_put_contents("$dir/failkritscript.bat", $job->failScript);
exec("c:\\windows\\system32\\cmd.exe /c $dir/failkirtscript.bat");
exec("c:\\windows\\system32\\cmd.exe /c $dir\failkirtscript.bat");
} else {
file_put_contents("$dir/failkritscript", $job->failScript);
chmod("$dir/failkritscript", 0777);

Archive Download the corresponding diff file

Branches

Number of commits:
Page rendered in 0.09763s using 14 queries.