示例#1
0
function parseRequestRSpec($rspec_filename)
{
    // Handle case wherein no file provided (for update, not upload)
    if ($rspec_filename == NULL || $rspec_filename == "") {
        return array(NULL, False, False, array(), False);
    }
    $rspec = file_get_contents($rspec_filename);
    return parseRequestRSpecContents($rspec);
}
示例#2
0
            }
        }
    }
}
// redirect if no RSpec is specified
if (!isset($rspec) || is_null($rspec)) {
    error_log("RSPEC is not set or null");
    no_rspec_error();
    //  $rspec = fetchRSpecById(1);
}
// check stitching to see if AM is required to be specified
$bound_rspec = 0;
$stitch_rspec = 0;
$partially_bound_rspec = 0;
$am_urns = array();
$parse_results = parseRequestRSpecContents($rspec);
if (is_null($parse_results)) {
    error_log("Invalid request RSpec");
    no_rspec_error();
} else {
    // is_bound is located in parse_results[1]
    if ($parse_results[1] === true) {
        $bound_rspec = 1;
    }
    // is_stitch is located in parse_results[2]
    if ($parse_results[2] === true) {
        $stitch_rspec = 1;
    }
    // List of AMs is in parse_results[3] for bound rspecs
    $am_urns = $parse_results[3];
    // is_partially_bound is located in parse_results[4]