Commit 1bc1fee4 authored by Richard Mansfield's avatar Richard Mansfield
Browse files

Call pieform before smarty to avoid js error on admin page

parent b64e4779
......@@ -41,10 +41,14 @@ else {
require(get_config('libroot') . 'upgrade.php');
require(get_config('libroot') . 'registration.php');
$smarty = smarty();
if (!get_config('registration_lastsent')) {
$register = register_site();
}
$upgrades = check_upgrades();
$smarty = smarty();
if (isset($upgrades['core']) && !empty($upgrades['core']->install)) {
$smarty->assign('installing', true);
$smarty->assign('releaseargs', array($upgrades['core']->torelease, $upgrades['core']->to));
......@@ -55,8 +59,7 @@ if (isset($upgrades['core']) && !empty($upgrades['core']->install)) {
// normal admin page starts here
$smarty->assign('upgrades', $upgrades);
if (!get_config('registration_lastsent')) {
$register = register_site();
if (isset($register)) {
$smarty->assign('register', $register);
}
......
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