From: <var...@us...> - 2015-09-16 10:17:40
|
Revision: 9725 http://sourceforge.net/p/phpwiki/code/9725 Author: vargenau Date: 2015-09-16 10:17:38 +0000 (Wed, 16 Sep 2015) Log Message: ----------- Use class error for Fatal PhpWiki Error message Modified Paths: -------------- trunk/lib/main.php Modified: trunk/lib/main.php =================================================================== --- trunk/lib/main.php 2015-09-16 09:45:49 UTC (rev 9724) +++ trunk/lib/main.php 2015-09-16 10:17:38 UTC (rev 9725) @@ -778,13 +778,13 @@ $pagename = $page->getName(); if (strlen($pagename) > MAX_PAGENAME_LENGTH) { $pagename = substr($pagename, 0, MAX_PAGENAME_LENGTH - 1) . '…'; - $CONTENT = HTML::div(array('class' => 'error'), + $CONTENT = HTML::p(array('class' => 'error'), _('Page name too long')); GeneratePage($CONTENT, $pagename); $this->finish(); } if (preg_match("/[<\[\{\|\"\}\]>]/", $pagename, $matches) > 0) { - $CONTENT = HTML::div( + $CONTENT = HTML::p( array('class' => 'error'), sprintf(_("Illegal character “%s” in page name."), $matches[0])); @@ -847,12 +847,10 @@ $ErrorManager->flushPostponedErrors(); if (!empty($errormsg)) { - PrintXML(HTML::br(), - HTML::hr(), - HTML::h2(_("Fatal PhpWiki Error")), - $errormsg); + PrintXML(HTML::p(array('class' => 'error'), + _("Fatal PhpWiki Error")._(': ').$errormsg)); // HACK: - echo "\n</body></html>"; + echo "\n</div>\n</div>\n</div>\n</div>\n</body>\n</html>"; } if (is_object($this->_user)) { $this->_user->page = $this->getArg('pagename'); This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <var...@us...> - 2015-12-08 09:48:38
|
Revision: 9736 http://sourceforge.net/p/phpwiki/code/9736 Author: vargenau Date: 2015-12-08 09:48:35 +0000 (Tue, 08 Dec 2015) Log Message: ----------- Whitespace Modified Paths: -------------- trunk/lib/main.php Modified: trunk/lib/main.php =================================================================== --- trunk/lib/main.php 2015-12-08 09:47:59 UTC (rev 9735) +++ trunk/lib/main.php 2015-12-08 09:48:35 UTC (rev 9736) @@ -306,7 +306,7 @@ } } - function & getUser() + function &getUser() { if (isset($this->_user)) return $this->_user; @@ -314,7 +314,7 @@ return $GLOBALS['ForbiddenUser']; } - function & getGroup() + function &getGroup() { if (isset($this->_user) and isset($this->_user->_group)) return $this->_user->_group; @@ -339,7 +339,7 @@ return false; } - function & getDbh() + function &getDbh() { return $this->_dbi; } This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <var...@us...> - 2016-02-12 11:35:44
|
Revision: 9803 http://sourceforge.net/p/phpwiki/code/9803 Author: vargenau Date: 2016-02-12 11:35:42 +0000 (Fri, 12 Feb 2016) Log Message: ----------- Add variable initialisation Modified Paths: -------------- trunk/lib/main.php Modified: trunk/lib/main.php =================================================================== --- trunk/lib/main.php 2016-02-11 20:05:46 UTC (rev 9802) +++ trunk/lib/main.php 2016-02-12 11:35:42 UTC (rev 9803) @@ -1004,6 +1004,9 @@ if ($userid = $this->getCookieVar(getCookieName())) { if (!empty($userid) and substr($userid, 0, 2) != 's:') { + if (!isset($this->_user)) { + $this->_user = new stdClass(); + } $this->_user->_authhow = 'cookie'; return $userid; } This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <var...@us...> - 2017-01-11 15:10:22
|
Revision: 10000 http://sourceforge.net/p/phpwiki/code/10000 Author: vargenau Date: 2017-01-11 15:10:19 +0000 (Wed, 11 Jan 2017) Log Message: ----------- Remove unused USE_PREFS_IN_PAGE Modified Paths: -------------- trunk/lib/main.php Modified: trunk/lib/main.php =================================================================== --- trunk/lib/main.php 2017-01-11 15:08:45 UTC (rev 9999) +++ trunk/lib/main.php 2017-01-11 15:10:19 UTC (rev 10000) @@ -24,9 +24,6 @@ * */ -define ('USE_PREFS_IN_PAGE', true); - -//include "lib/config.php"; require_once 'lib/stdlib.php'; require_once 'lib/Request.php'; require_once 'lib/WikiDB.php'; This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <var...@us...> - 2019-04-16 15:14:04
|
Revision: 10097 http://sourceforge.net/p/phpwiki/code/10097 Author: vargenau Date: 2019-04-16 15:14:02 +0000 (Tue, 16 Apr 2019) Log Message: ----------- findActionPage(__("PageDump")) Modified Paths: -------------- trunk/lib/main.php Modified: trunk/lib/main.php =================================================================== --- trunk/lib/main.php 2019-04-16 12:45:18 UTC (rev 10096) +++ trunk/lib/main.php 2019-04-16 15:14:02 UTC (rev 10097) @@ -1143,7 +1143,7 @@ function action_dump() { - $action = $this->findActionPage(_("PageDump")); + $action = $this->findActionPage(__("PageDump")); if ($action) { $this->actionpage($action); } else { This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <var...@us...> - 2021-01-16 19:56:41
|
Revision: 10242 http://sourceforge.net/p/phpwiki/code/10242 Author: vargenau Date: 2021-01-16 19:56:38 +0000 (Sat, 16 Jan 2021) Log Message: ----------- Fix error on logout Modified Paths: -------------- trunk/lib/main.php Modified: trunk/lib/main.php =================================================================== --- trunk/lib/main.php 2021-01-16 19:24:53 UTC (rev 10241) +++ trunk/lib/main.php 2021-01-16 19:56:38 UTC (rev 10242) @@ -463,8 +463,10 @@ } $this->_user->_group = $this->getGroup(); $this->setSessionVar('wiki_user', $user); - $this->_prefs->set('userid', - $isSignedIn ? $user->getId() : ''); + if ($isSignedIn) { + $this->_prefs->set('userid', $user->getId()); + } + $this->initializeTheme($isSignedIn ? 'login' : 'logout'); define('MAIN_setUser', true); } This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <var...@us...> - 2021-07-27 12:04:35
|
Revision: 10368 http://sourceforge.net/p/phpwiki/code/10368 Author: vargenau Date: 2021-07-27 12:04:28 +0000 (Tue, 27 Jul 2021) Log Message: ----------- Add {} Modified Paths: -------------- trunk/lib/main.php Modified: trunk/lib/main.php =================================================================== --- trunk/lib/main.php 2021-07-27 12:03:13 UTC (rev 10367) +++ trunk/lib/main.php 2021-07-27 12:04:28 UTC (rev 10368) @@ -537,8 +537,9 @@ $this->finish(); return; } - } elseif ($require_level == WIKIAUTH_BOGO) - $msg = fmt("You must sign in to %s.", $what); elseif ($require_level == WIKIAUTH_USER) { + } elseif ($require_level == WIKIAUTH_BOGO) { + $msg = fmt("You must sign in to %s.", $what); + } elseif ($require_level == WIKIAUTH_USER) { // LoginForm should display the relevant messages... $msg = ""; /*if (!ALLOW_ANON_USER) This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <var...@us...> - 2021-09-20 10:37:44
|
Revision: 10586 http://sourceforge.net/p/phpwiki/code/10586 Author: vargenau Date: 2021-09-20 10:37:42 +0000 (Mon, 20 Sep 2021) Log Message: ----------- function WikiUser has only one argument Modified Paths: -------------- trunk/lib/main.php Modified: trunk/lib/main.php =================================================================== --- trunk/lib/main.php 2021-09-20 10:32:58 UTC (rev 10585) +++ trunk/lib/main.php 2021-09-20 10:37:42 UTC (rev 10586) @@ -117,7 +117,7 @@ or (strtolower(get_class($this->_user)) == '_passuser') or (strtolower(get_class($this->_user)) == '_fusionforgepassuser')) ) { - $this->_user = WikiUser($userid, $this->_user->_prefs); + $this->_user = WikiUser($userid); } // revive other db handle if (isset($this->_user->_prefs->_method) This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <var...@us...> - 2021-10-11 12:55:32
|
Revision: 10624 http://sourceforge.net/p/phpwiki/code/10624 Author: vargenau Date: 2021-10-11 12:55:31 +0000 (Mon, 11 Oct 2021) Log Message: ----------- Improve error_reporting() Modified Paths: -------------- trunk/lib/main.php Modified: trunk/lib/main.php =================================================================== --- trunk/lib/main.php 2021-10-11 10:18:58 UTC (rev 10623) +++ trunk/lib/main.php 2021-10-11 12:55:31 UTC (rev 10624) @@ -86,9 +86,6 @@ . $dbi->getParam('db_session_table')); } -// Fixme: Does pear reset the error mask to 1? We have to find the culprit -//$x = error_reporting(); - parent::__construct(); // [90ms] // Normalize args... @@ -1468,12 +1465,19 @@ $request->finish(); } -if ((!(defined('FUSIONFORGE') && FUSIONFORGE)) || (forge_get_config('installation_environment') != 'production')) { - if (defined('E_STRICT') and (E_ALL & E_STRICT)) // strict php5? - error_reporting(E_ALL & ~E_STRICT); // exclude E_STRICT - else - error_reporting(E_ALL); // php4 -} else { +if (defined('FUSIONFORGE') && FUSIONFORGE) { + if (forge_get_config('installation_environment') == 'production') { + // Do not display warnings + error_reporting(E_ERROR); + } else { + // Display warnings + error_reporting(E_ALL); + } +} elseif (DEBUG) { + // Display warnings + error_reporting(E_ALL); +} else { + // Do not display warnings error_reporting(E_ERROR); } This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
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. |
From: <var...@us...> - 2022-01-20 15:22:31
|
Revision: 10917 http://sourceforge.net/p/phpwiki/code/10917 Author: vargenau Date: 2022-01-20 15:22:30 +0000 (Thu, 20 Jan 2022) Log Message: ----------- Set mb_regex_encoding so that mb_ereg_replace works; setlocale to UTF-8 so that basename works Modified Paths: -------------- trunk/lib/main.php Modified: trunk/lib/main.php =================================================================== --- trunk/lib/main.php 2022-01-20 15:15:20 UTC (rev 10916) +++ trunk/lib/main.php 2022-01-20 15:22:30 UTC (rev 10917) @@ -1425,6 +1425,8 @@ // Should this go into the constructor? $request->initializeTheme('default'); $request->updateAuthAndPrefs(); + setlocale(LC_ALL, 'en_US.UTF-8'); + mb_regex_encoding('UTF-8'); $request->initializeLang(); $request->possiblyDeflowerVirginWiki(); This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |