Commit 0949d4ff authored by Martyn Smith's avatar Martyn Smith Committed by Martyn Smith
Browse files
parents 9806998d 69ec5036
...@@ -293,7 +293,7 @@ function log_build_backtrace($backtrace) { ...@@ -293,7 +293,7 @@ function log_build_backtrace($backtrace) {
foreach ($calls as $call) { foreach ($calls as $call) {
$textmessage .= " * {$call['class']}{$call['type']}{$call['func']}({$call['args']}) at {$call['file']}:{$call['line']}\n"; $textmessage .= " * {$call['class']}{$call['type']}{$call['func']}({$call['args']}) at {$call['file']}:{$call['line']}\n";
$htmlmessage .= '<li><span style="color:#933;">' . htmlspecialchars($call['class'], ENT_COMPAT, 'UTF-8') . '</span><span style="color:#060;">' $htmlmessage .= '<li><span style="color:#933;">' . htmlspecialchars($call['class'], ENT_COMPAT, 'UTF-8') . '</span><span style="color:#060;">'
. htmlspecialchars($call['type'], ENT_COMPAT, 'UTF-8') . '</span><span style="color:#933;">' . htmlspecialchars($call['func'], ENT_COMPAT, 'UTF-8') . htmlspecialchars($call['type'], ENT_COMPAT, 'UTF-8') . '</span><span style="color:#339;">' . htmlspecialchars($call['func'], ENT_COMPAT, 'UTF-8')
. '</span><span style="color:#060;">(</span><span style="color:#f00;">' . htmlspecialchars($call['args'], ENT_COMPAT, 'UTF-8') . '</span><span style="color:#060;">)</span> at <strong>' . htmlspecialchars($call['file'], ENT_COMPAT, 'UTF-8') . ':' . $call['line'] . '</strong></li>'; . '</span><span style="color:#060;">(</span><span style="color:#f00;">' . htmlspecialchars($call['args'], ENT_COMPAT, 'UTF-8') . '</span><span style="color:#060;">)</span> at <strong>' . htmlspecialchars($call['file'], ENT_COMPAT, 'UTF-8') . ':' . $call['line'] . '</strong></li>';
} }
$htmlmessage .= "</pre>\n"; $htmlmessage .= "</pre>\n";
......
...@@ -154,6 +154,12 @@ function check_upgrades($name=null) { ...@@ -154,6 +154,12 @@ function check_upgrades($name=null) {
$toupgrade[$pluginkey] = $plugininfo; $toupgrade[$pluginkey] = $plugininfo;
} }
else if ($config->version > $pluginversion) { else if ($config->version > $pluginversion) {
if (isset($config->minupgradefrom) && isset($config->minupgraderelease)
&& $pluginversion < $config->minupgradefrom) {
throw new SanityException("Must upgrade to $config->minupgradefrom "
. " ($config->minupgraderelease) first "
. " (you have $pluginversion ($pluginrelease))");
}
if (isset($config->minupgradefrom) && isset($config->minupgraderelease) if (isset($config->minupgradefrom) && isset($config->minupgraderelease)
&& $pluginversion < $config->minupgradefrom) { && $pluginversion < $config->minupgradefrom) {
throw new ConfigSanityException("Must upgrade to $config->minupgradefrom " throw new ConfigSanityException("Must upgrade to $config->minupgradefrom "
......
...@@ -60,7 +60,7 @@ function createview4_submit($values) { ...@@ -60,7 +60,7 @@ function createview4_submit($values) {
if (param_boolean('back')) { if (param_boolean('back')) {
$data['accesslist'] = array_values($values['accesslist']); $data['accesslist'] = array_values((array)$values['accesslist']);
log_debug($data); log_debug($data);
$SESSION->set('create_' . $createid, $data); $SESSION->set('create_' . $createid, $data);
redirect(get_config('wwwroot') . 'view/create3.php?createid=' . $createid); redirect(get_config('wwwroot') . 'view/create3.php?createid=' . $createid);
......
...@@ -61,11 +61,11 @@ my $m = WWW::Mechanize->new( autocheck => 1 ); ...@@ -61,11 +61,11 @@ my $m = WWW::Mechanize->new( autocheck => 1 );
# Check for a mahara install page, and run it if we find it # Check for a mahara install page, and run it if we find it
$m->get($CFG->{url}); $m->get($CFG->{url});
croak 'This doesn\'t look like a mahara install page!' unless $m->content =~ m{admin/upgrade\.php">Agree</a>}; croak 'This doesn\'t look like a mahara install page!' unless $m->content =~ m{admin/upgrade\.php" method};
# Agree to license # Agree to license
debug("Agreeing to license..."); debug("Agreeing to license...");
$m->follow_link( text_regex => qr/Agree/ ); $m->submit_form( form_number => 1 );
# At this point, need to parse page to get scripts to hit to install stuff # At this point, need to parse page to get scripts to hit to install stuff
$_ = $m->content; $_ = $m->content;
......
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