Commit abeed676 authored by Leigh B Stoller's avatar Leigh B Stoller

Small fix to the new geni-lib feature check.

parent 91bf8a29
...@@ -850,6 +850,7 @@ function Do_RunScript() ...@@ -850,6 +850,7 @@ function Do_RunScript()
global $this_user; global $this_user;
global $ajax_args; global $ajax_args;
global $suexec_output, $suexec_output_array; global $suexec_output, $suexec_output_array;
$newgenilib = 0;
$script = ""; $script = "";
if (isset($ajax_args["script"])) { if (isset($ajax_args["script"])) {
...@@ -882,20 +883,22 @@ function Do_RunScript() ...@@ -882,20 +883,22 @@ function Do_RunScript()
SPITAJAX_RESPONSE($profile->rspec()); SPITAJAX_RESPONSE($profile->rspec());
} else { } else {
SPITAJAX_ERROR(1, "No rspec for guest user"); SPITAJAX_ERROR(1, "No rspec for guest user");
} }
} }
$this_idx = $this_user->uid_idx(); $this_idx = $this_user->uid_idx();
$this_uid = $this_user->uid(); $this_uid = $this_user->uid();
if (! ($profile->CanInstantiate($this_user) || ISADMIN())) { if (! ($profile->CanInstantiate($this_user) || ISADMIN())) {
SPITAJAX_ERROR(1, "Not enough permission to instantiate profile"); SPITAJAX_ERROR(1, "Not enough permission to instantiate profile");
return; return;
} }
if ($profile->UseNewGeniLib()) {
$newgenilib = 1;
}
} }
if (preg_match("/^import/m", $script)) { if (preg_match("/^import/m", $script)) {
$command = "webrungenilib"; $command = "webrungenilib";
if (Profile::UseNewGeniLib($this_user)) { if ($newgenilib) {
$command .= " -N "; $command .= " -N ";
} }
} }
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment