From: <var...@us...> - 2021-10-11 13:04:08
|
Revision: 10625 http://sourceforge.net/p/phpwiki/code/10625 Author: vargenau Date: 2021-10-11 13:04:06 +0000 (Mon, 11 Oct 2021) Log Message: ----------- Add braces Modified Paths: -------------- trunk/lib/main.php Modified: trunk/lib/main.php =================================================================== --- trunk/lib/main.php 2021-10-11 12:55:31 UTC (rev 10624) +++ trunk/lib/main.php 2021-10-11 13:04:06 UTC (rev 10625) @@ -488,8 +488,9 @@ // check the user's language prefs too at this point; this // would be a situation which is not really handled with the // current code. - if (empty($GLOBALS['LANG'])) + if (empty($GLOBALS['LANG'])) { update_locale(DEFAULT_LANGUAGE); + } // User does not have required authority. Prompt for login. $action = $this->getArg('action'); @@ -529,19 +530,16 @@ } elseif ($require_level == WIKIAUTH_USER) { // LoginForm should display the relevant messages... $msg = ""; - /*if (!ALLOW_ANON_USER) - $msg = fmt("You must log in first to %s", $what); - else - $msg = fmt("You must log in to %s.", $what); - */ - } elseif ($require_level == WIKIAUTH_ANON) - $msg = fmt("Access for you is forbidden to %s.", $what); else + } elseif ($require_level == WIKIAUTH_ANON) { + $msg = fmt("Access for you is forbidden to %s.", $what); + } else { $msg = fmt("You must be an administrator to %s.", $what); + } - $this->_user->PrintLoginForm($this, compact('require_level', 'pass_required'), - $msg); - if (!$GLOBALS['WikiTheme']->DUMP_MODE) + $this->_user->PrintLoginForm($this, compact('require_level', 'pass_required'), $msg); + if (!$GLOBALS['WikiTheme']->DUMP_MODE) { $this->finish(); // NORETURN + } } // Fixme: for PagePermissions we'll need other strings, @@ -573,10 +571,11 @@ 'ziphtml' => _("download a HTML ZIP dump from this wiki") ); } - if (in_array($action, array_keys($actionDescriptions))) + if (in_array($action, array_keys($actionDescriptions))) { return $actionDescriptions[$action]; - else + } else { return _("use") . " " . $action; + } } /** This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |