Commit c7a138b9 authored by Nigel McNie's avatar Nigel McNie Committed by Penny Leach
Browse files

Attempt to make the bootstrap script work again

parent 591ac76b
......@@ -14,7 +14,7 @@ use Carp;
use Data::Dumper;
use Getopt::Declare;
use Mahara::Config;
use Mahara::RandomData;
#use Mahara::RandomData;
use JSON;
use WWW::Mechanize;
......@@ -65,7 +65,7 @@ my $components = /var todo = \[(".*",?)+\]/s;
my @things = split(/","/, substr($1, 1, -1));
for my $thing (@things) {
debug("Installing $thing ... ", 1);
$m->get($CFG->{url} . 'admin/upgrade.json.php?name=' . $thing);
$m->get($CFG->{url} . 'admin/upgrade.json.php?name=' . $thing . '&sesskey=');
$json_response = my_jsonToObj($m->content());
if ( $json_response->{error} ) {
croak qq{Failed to install $thing} . Dumper($json_response);
......@@ -77,7 +77,7 @@ for my $thing (@things) {
# Request the core data page
debug("Installing core data...");
$m->get($CFG->{url} . 'admin/upgrade.json.php?install=1');
$m->get($CFG->{url} . 'admin/upgrade.json.php?install=1&sesskey=');
$json_response = my_jsonToObj($m->content());
if ( $json_response->{error} ) {
croak qq{Failed to install core data:} . Dumper($json_response);
......
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