site disabled for upgrade message fails to appear

Bug #579762 reported by PiersHarding
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
Mahara
Fix Released
Undecided
PiersHarding
1.2
Fix Released
Undecided
PiersHarding
1.3
Fix Released
Undecided
PiersHarding
Trunk
Fix Released
Undecided
PiersHarding

Bug Description

site disabled for upgrade message fails to appear when user logs in after code upgrade for 1.2, and trunk (pre 1.3). This is because an error message fails on translation because it expects a parameter to be passed to sprintf for substitution.

Revision history for this message
PiersHarding (piersharding) wrote :

I have a fix for this, I'm just making sure that it is reported. I will commit the fix to 1.2Stable and master.

Revision history for this message
PiersHarding (piersharding) wrote :

diff --git a/htdocs/auth/user.php b/htdocs/auth/user.php
index c1b88fb..75f7e41 100644
--- a/htdocs/auth/user.php
+++ b/htdocs/auth/user.php
@@ -923,7 +923,7 @@ class LiveUser extends User {
         $siteclosedforupgrade = get_config('siteclosed');
         if ($siteclosedforupgrade && get_config('disablelogin')) {
             global $SESSION;
- $SESSION->add_error_msg(get_string('siteclosedlogindisabled'));
+ $SESSION->add_error_msg(get_string('siteclosedlogindisabled', 'mahara', get_config('wwwroot') . 'admin/upgrade.php'), false);
             return false;
         }
         if (!$user->admin && ($siteclosedforupgrade || get_config('siteclosedbyadmin'))) {

To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.