Skip to content

Commit

Permalink
fixed CLI script detection
Browse files Browse the repository at this point in the history
  • Loading branch information
skodak committed Dec 27, 2009
1 parent 636365f commit 7dccaef
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions admin/generator.php
Original file line number Diff line number Diff line change
Expand Up @@ -1325,7 +1325,7 @@ function definition_after_data() {
}
}

if (isset($argv) && isset($argc)) {
if (CLI_SCRIPT) {
$generator = new generator_cli($argv, $argc);
$generator->generate_data();
} elseif (strstr($_SERVER['REQUEST_URI'], 'generator.php')) {
Expand All @@ -1334,7 +1334,7 @@ function definition_after_data() {
require_capability('moodle/site:config', $systemcontext);

$PAGE->set_url($CFG->wwwroot.'/admin/generator.php');
$PAGE->set_pagelayout('form');
$PAGE->set_pagelayout('base');
$generator = new generator_web();
$generator->setup();
$generator->display();
Expand Down

0 comments on commit 7dccaef

Please sign in to comment.