2 rcs_id('$Id: main.php,v 1.110 2004-02-03 09:45:39 rurban Exp $');
4 define ('USE_PREFS_IN_PAGE', true);
6 include "lib/config.php";
7 require_once("lib/stdlib.php");
8 require_once('lib/Request.php');
9 require_once('lib/WikiDB.php');
11 require_once("lib/WikiUserNew.php");
13 require_once("lib/WikiUser.php");
14 require_once("lib/WikiGroup.php");
16 class WikiRequest extends Request {
19 function WikiRequest () {
20 $this->_dbi = WikiDB::open($GLOBALS['DBParams']);
23 include_once('lib/DB_Session.php');
24 $prefix = isset($GLOBALS['DBParams']['prefix']) ? $GLOBALS['DBParams']['prefix'] : '';
25 $this->_dbsession = & new DB_Session($this->getDbh(),
26 $prefix . $GLOBALS['DBParams']['db_session_table']);
32 $this->setArg('pagename', $this->_deducePagename());
33 $this->setArg('action', $this->_deduceAction());
35 // Restore auth state. This doesn't check for proper authorization!
36 if (ENABLE_USER_NEW) {
37 $userid = $this->_deduceUsername();
38 $user = WikiUser($userid);
39 // todo: upgrade later at updateAuthAndPrefs()
40 if (isset($this->_user))
41 $user = UpgradeUser($this->_user,$user);
43 $this->_prefs = $this->_user->_prefs;
45 $this->_user = new WikiUser($this, $this->_deduceUsername());
46 $this->_prefs = $this->_user->getPreferences();
50 function initializeLang () {
51 if ($user_lang = $this->getPref('lang')) {
52 //trigger_error("DEBUG: initializeLang() ". $user_lang ." calling update_locale()...");
53 update_locale($user_lang);
57 function initializeTheme () {
61 if ($user_theme = $this->getPref('theme'))
62 include_once("themes/$user_theme/themeinfo.php");
63 if (empty($Theme) and defined ('THEME'))
64 include_once("themes/" . THEME . "/themeinfo.php");
66 include_once("themes/default/themeinfo.php");
67 assert(!empty($Theme));
71 // This really maybe should be part of the constructor, but since it
72 // may involve HTML/template output, the global $request really needs
73 // to be initialized before we do this stuff.
74 function updateAuthAndPrefs () {
76 // Handle preference updates, and authentication requests, if any.
77 if ($new_prefs = $this->getArg('pref')) {
78 $this->setArg('pref', false);
79 if ($this->isPost() and !empty($new_prefs['passwd']) and
80 ($new_prefs['passwd2'] != $new_prefs['passwd'])) {
82 $this->_prefs->set('passwd','');
83 // $this->_prefs->set('passwd2',''); // This is not stored anyway
86 foreach ($new_prefs as $key => $val) {
87 if ($key == 'passwd') {
89 $val = crypt('passwd');
91 $this->_prefs->set($key, $val);
95 // FIXME: need to move authentication request processing
96 // up to be before pref request processing, I think,
97 // since logging in may change which preferences
98 // we're talking about...
100 // even we have disallow anon users?
101 // if (! $this->_user ) $this->_user = new _AnonUser();
103 // Handle authentication request, if any.
104 if ($auth_args = $this->getArg('auth')) {
105 $this->setArg('auth', false);
106 $this->_handleAuthRequest($auth_args); // possible NORETURN
108 elseif ( ! $this->_user or ! $this->_user->isSignedIn() ) {
109 // If not auth request, try to sign in as saved user.
110 if (($saved_user = $this->getPref('userid')) != false) {
111 $this->_signIn($saved_user);
115 // Save preferences in session and cookie
116 // FIXME: hey! what about anonymous users? Can't they have
120 $this->_user->setPreferences($this->_prefs, $id_only);
122 // Ensure user has permissions for action
123 $require_level = $this->requiredAuthority($this->getArg('action'));
124 if (! $this->_user->hasAuthority($require_level))
125 $this->_notAuthorized($require_level); // NORETURN
128 function getUser () {
132 function getPrefs () {
133 return $this->_prefs;
136 // Convenience function:
137 function getPref ($key) {
138 if (isset($this->_prefs))
139 return $this->_prefs->get($key);
147 * Get requested page from the page database.
148 * By default it will grab the page requested via the URL
150 * This is a convenience function.
151 * @param string $pagename Name of page to get.
152 * @return WikiDB_Page Object with methods to pull data from
153 * database for the page requested.
155 function getPage ($pagename = false) {
156 if (!isset($this->_dbi))
159 $pagename = $this->getArg('pagename');
160 return $this->_dbi->getPage($pagename);
163 /** Get URL for POST actions.
165 * Officially, we should just use SCRIPT_NAME (or some such),
166 * but that causes problems when we try to issue a redirect, e.g.
167 * after saving a page.
169 * Some browsers (at least NS4 and Mozilla 0.97 won't accept
170 * a redirect from a page to itself.)
172 * So, as a HACK, we include pagename and action as query args in
173 * the URL. (These should be ignored when we receive the POST
176 function getPostURL ($pagename=false) {
177 if ($pagename === false)
178 $pagename = $this->getArg('pagename');
179 $action = $this->getArg('action');
180 if ($this->getArg('start_debug')) // zend ide support
181 return WikiURL($pagename, array('action' => $action, 'start_debug' => 1));
183 return WikiURL($pagename, array('action' => $action));
186 function _handleAuthRequest ($auth_args) {
187 if (!is_array($auth_args))
190 // Ignore password unless POST'ed.
191 if (!$this->isPost())
192 unset($auth_args['passwd']);
194 $olduser = $this->_user;
195 $user = $this->_user->AuthCheck($auth_args);
196 if (isa($user,WikiUserClassname())) {
197 // Successful login (or logout.)
198 $this->_setUser($user);
200 elseif (is_string($user)) {
201 // Login attempt failed.
202 $fail_message = $user;
203 $auth_args['pass_required'] = true;
204 // If no password was submitted, it's not really
205 // a failure --- just need to prompt for password...
206 if (!isset($auth_args['passwd'])) {
207 //$auth_args['pass_required'] = false;
208 $fail_message = false;
210 $olduser->PrintLoginForm($this, $auth_args, $fail_message);
211 $this->finish(); //NORETURN
214 // Login request cancelled.
219 * Attempt to sign in (bogo-login).
223 * @param $userid string Userid to attempt to sign in as.
226 function _signIn ($userid) {
227 if (ENABLE_USER_NEW) {
229 $this->_user = new _BogoUser($userid);
231 $this->_user = new _PassUser($userid);
233 $user = $this->_user->AuthCheck(array('userid' => $userid));
234 if (isa($user,WikiUserClassname())) {
235 $this->_setUser($user); // success!
239 // login or logout or restore state
240 function _setUser ($user) {
241 $this->_user = $user;
242 $this->setCookieVar('WIKI_ID', $user->getAuthenticatedId(), 365);
243 $this->setSessionVar('wiki_user', $user);
244 if ($user->isSignedIn())
245 $user->_authhow = 'signin';
247 // Save userid to prefs..
248 if (!($this->_prefs = $this->_user->getPreferences()))
249 $this->_prefs = $this->_user->_prefs;
250 $this->_prefs->set('userid',
251 $user->isSignedIn() ? $user->getId() : '');
254 function _notAuthorized ($require_level) {
255 // Display the authority message in the Wiki's default
256 // language, in case it is not english.
258 // Note that normally a user will not see such an error once
259 // logged in, unless the admin has altered the default
260 // disallowed wikiactions. In that case we should probably
261 // check the user's language prefs too at this point; this
262 // would be a situation which is not really handled with the
264 update_locale(DEFAULT_LANGUAGE);
266 // User does not have required authority. Prompt for login.
267 $what = $this->getActionDescription($this->getArg('action'));
269 if ($require_level == WIKIAUTH_FORBIDDEN) {
270 $this->finish(fmt("%s is disallowed on this wiki.",
271 $this->getDisallowedActionDescription($this->getArg('action'))));
273 elseif ($require_level == WIKIAUTH_BOGO)
274 $msg = fmt("You must sign in to %s.", $what);
275 elseif ($require_level == WIKIAUTH_USER)
276 $msg = fmt("You must log in to %s.", $what);
278 $msg = fmt("You must be an administrator to %s.", $what);
279 $pass_required = ($require_level >= WIKIAUTH_USER);
281 $this->_user->PrintLoginForm($this, compact('require_level','pass_required'), $msg);
282 $this->finish(); // NORETURN
285 function getActionDescription($action) {
286 static $actionDescriptions;
287 if (! $actionDescriptions) {
289 = array('browse' => _("browse pages in this wiki"),
290 'diff' => _("diff pages in this wiki"),
291 'dumphtml' => _("dump html pages from this wiki"),
292 'dumpserial' => _("dump serial pages from this wiki"),
293 'edit' => _("edit pages in this wiki"),
294 'create' => _("create pages in this wiki"),
295 'loadfile' => _("load files into this wiki"),
296 'lock' => _("lock pages in this wiki"),
297 'remove' => _("remove pages from this wiki"),
298 'unlock' => _("unlock pages in this wiki"),
299 'upload' => _("upload a zip dump to this wiki"),
300 'verify' => _("verify the current action"),
301 'viewsource' => _("view the source of pages in this wiki"),
302 'xmlrpc' => _("access this wiki via XML-RPC"),
303 'zip' => _("download a zip dump from this wiki"),
304 'ziphtml' => _("download an html zip dump from this wiki")
307 if (in_array($action, array_keys($actionDescriptions)))
308 return $actionDescriptions[$action];
312 function getDisallowedActionDescription($action) {
313 static $disallowedActionDescriptions;
314 if (! $disallowedActionDescriptions) {
315 $disallowedActionDescriptions
316 = array('browse' => _("Browsing pages"),
317 'diff' => _("Diffing pages"),
318 'dumphtml' => _("Dumping html pages"),
319 'dumpserial' => _("Dumping serial pages"),
320 'edit' => _("Editing pages"),
321 'create' => _("Creating pages"),
322 'loadfile' => _("Loading files"),
323 'lock' => _("Locking pages"),
324 'remove' => _("Removing pages"),
325 'unlock' => _("Unlocking pages"),
326 'upload' => _("Uploading zip dumps"),
327 'verify' => _("Verify the current action"),
328 'viewsource' => _("Viewing the source of pages"),
329 'xmlrpc' => _("XML-RPC access"),
330 'zip' => _("Downloading zip dumps"),
331 'ziphtml' => _("Downloading html zip dumps")
334 if (in_array($action, array_keys($disallowedActionDescriptions)))
335 return $disallowedActionDescriptions[$action];
340 function requiredAuthority ($action) {
341 $auth = $this->requiredAuthorityForAction($action);
344 * This is a hook for plugins to require authority
345 * for posting to them.
347 * IMPORTANT: this is not a secure check, so the plugin
348 * may not assume that any POSTs to it are authorized.
349 * All this does is cause PhpWiki to prompt for login
350 * if the user doesn't have the required authority.
352 if ($this->isPost()) {
353 $post_auth = $this->getArg('require_authority_for_post');
354 if ($post_auth !== false)
355 $auth = max($auth, $post_auth);
360 function requiredAuthorityForAction ($action) {
362 // Todo: Check individual page permissions instead.
370 return WIKIAUTH_ANON;
374 if (defined('ZIPDUMP_AUTH') && ZIPDUMP_AUTH)
375 return WIKIAUTH_ADMIN;
376 return WIKIAUTH_ANON;
379 if (defined('REQUIRE_SIGNIN_BEFORE_EDIT') && REQUIRE_SIGNIN_BEFORE_EDIT)
380 return WIKIAUTH_BOGO;
381 return WIKIAUTH_ANON;
382 // return WIKIAUTH_BOGO;
385 $page = $this->getPage();
386 $current = $page->getCurrentRevision();
387 if ($current->hasDefaultContents())
388 return $this->requiredAuthorityForAction('edit');
389 return $this->requiredAuthorityForAction('browse');
398 return WIKIAUTH_ADMIN;
400 global $WikiNameRegexp;
401 if (preg_match("/$WikiNameRegexp\Z/A", $action))
402 return WIKIAUTH_ANON; // ActionPage.
404 return WIKIAUTH_ADMIN;
408 function possiblyDeflowerVirginWiki () {
409 if ($this->getArg('action') != 'browse')
411 if ($this->getArg('pagename') != HOME_PAGE)
414 $page = $this->getPage();
415 $current = $page->getCurrentRevision();
416 if ($current->getVersion() > 0)
417 return; // Homepage exists.
419 include('lib/loadsave.php');
421 $this->finish(); // NORETURN
424 function handleAction () {
425 $action = $this->getArg('action');
426 $method = "action_$action";
427 if (method_exists($this, $method)) {
430 elseif ($page = $this->findActionPage($action)) {
431 $this->actionpage($page);
434 $this->finish(fmt("%s: Bad action", $action));
438 function finish ($errormsg = false) {
442 exit(); // just in case CloseDataBase calls us
445 if (!empty($this->_dbi))
446 $this->_dbi->close();
450 global $ErrorManager;
451 $ErrorManager->flushPostponedErrors();
453 if (!empty($errormsg)) {
456 HTML::h2(_("Fatal PhpWiki Error")),
459 echo "\n</body></html>";
466 function _deducePagename () {
467 if ($this->getArg('pagename'))
468 return $this->getArg('pagename');
471 $pathinfo = $this->get('PATH_INFO');
472 $tail = substr($pathinfo, strlen(PATH_INFO_PREFIX));
474 if ($tail && $pathinfo == PATH_INFO_PREFIX . $tail) {
478 elseif ($this->isPost()) {
480 * In general, for security reasons, HTTP_GET_VARS should be ignored
481 * on POST requests, but we make an exception here (only for pagename).
483 * The justifcation for this hack is the following
484 * asymmetry: When POSTing with USE_PATH_INFO set, the
485 * pagename can (and should) be communicated through the
486 * request URL via PATH_INFO. When POSTing with
487 * USE_PATH_INFO off, this cannot be done --- the only way
488 * to communicate the pagename through the URL is via
489 * QUERY_ARGS (HTTP_GET_VARS).
491 global $HTTP_GET_VARS;
492 if (isset($HTTP_GET_VARS['pagename'])) {
493 return $HTTP_GET_VARS['pagename'];
498 * Support for PhpWiki 1.2 style requests.
500 $query_string = $this->get('QUERY_STRING');
501 if (preg_match('/^[^&=]+$/', $query_string)) {
502 return urldecode($query_string);
508 function _deduceAction () {
509 if (!($action = $this->getArg('action'))) {
510 // Detect XML-RPC requests
512 && $this->get('CONTENT_TYPE') == 'text/xml') {
513 global $HTTP_RAW_POST_DATA;
514 if (strstr($HTTP_RAW_POST_DATA, '<methodCall>')) {
519 return 'browse'; // Default if no action specified.
522 if (method_exists($this, "action_$action"))
525 // Allow for, e.g. action=LikePages
526 if ($this->isActionPage($action))
529 trigger_error("$action: Unknown action", E_USER_NOTICE);
533 function _deduceUsername() {
534 if (!empty($this->args['auth']) and !empty($this->args['auth']['userid']))
535 return $this->args['auth']['userid'];
537 if ($user = $this->getSessionVar('wiki_user')) {
538 // users might switch in a session between the two objects
539 // restore old auth level here or in updateAuthAndPrefs()?
540 if (isa($user,WikiUserClassname()) and !empty($user->_level)) {
541 if (empty($this->_user)) {
542 $c = get_class($user);
543 $userid = $user->UserName();
545 $this->_user = new $c($userid);
547 $this->_user = new $c($this,$userid,$user->_level);
549 //if ($user = UpgradeUser($this->_user,$user))
550 // $this->_user = $user;
551 $this->_user->_authhow = 'session';
553 if (isa($user,WikiUserClassname()))
554 return $user->UserName();
556 if ($userid = $this->getCookieVar('WIKI_ID')) {
557 if (!empty($this->_user))
558 $this->_user->authhow = 'cookie';
564 function _isActionPage ($pagename) {
565 $dbi = $this->getDbh();
566 $page = $dbi->getPage($pagename);
567 $rev = $page->getCurrentRevision();
568 // FIXME: more restrictive check for sane plugin?
569 if (strstr($rev->getPackedContent(), '<?plugin'))
571 if (!$rev->hasDefaultContents())
572 trigger_error("$pagename: Does not appear to be an 'action page'", E_USER_NOTICE);
576 function findActionPage ($action) {
579 // check for translated version, as per users preferred language
580 // (or system default in case it is not en)
581 $translation = gettext($action);
583 if (isset($cache) and isset($cache[$translation]))
584 return $cache[$translation];
586 // check for cached translated version
587 if ($this->_isActionPage($translation))
588 return $cache[$action] = $translation;
590 // Allow for, e.g. action=LikePages
591 global $WikiNameRegexp;
592 if (!preg_match("/$WikiNameRegexp\\Z/A", $action))
593 return $cache[$action] = false;
595 // check for translated version (default language)
597 if ($LANG != DEFAULT_LANGUAGE and $LANG != "en") {
599 //trigger_error("DEBUG: findActionPage() ". DEFAULT_LANGUAGE." calling update_locale()...");
600 update_locale(DEFAULT_LANGUAGE);
601 $default = gettext($action);
602 //trigger_error("DEBUG: findActionPage() ". $save_lang." restoring save_lang, calling update_locale()...");
603 update_locale($save_lang);
604 if ($this->_isActionPage($default))
605 return $cache[$action] = $default;
608 $default = $translation;
611 // check for english version
612 if ($action != $translation and $action != $default) {
613 if ($this->_isActionPage($action))
614 return $cache[$action] = $action;
617 trigger_error("$action: Cannot find action page", E_USER_NOTICE);
618 return $cache[$action] = false;
621 function isActionPage ($pagename) {
622 return $this->findActionPage($pagename);
625 function action_browse () {
626 $this->buffer_output();
627 include_once("lib/display.php");
631 function action_verify () {
632 $this->action_browse();
635 function actionpage ($action) {
636 $this->buffer_output();
637 include_once("lib/display.php");
638 actionPage($this, $action);
641 function action_diff () {
642 $this->buffer_output();
643 include_once "lib/diff.php";
647 function action_search () {
648 // This is obsolete: reformulate URL and redirect.
649 // FIXME: this whole section should probably be deleted.
650 if ($this->getArg('searchtype') == 'full') {
651 $search_page = _("FullTextSearch");
654 $search_page = _("TitleSearch");
656 $this->redirect(WikiURL($search_page,
657 array('s' => $this->getArg('searchterm')),
661 function action_edit () {
662 $this->buffer_output();
663 include "lib/editpage.php";
664 $e = new PageEditor ($this);
668 function action_create () {
669 $this->action_edit();
672 function action_viewsource () {
673 $this->buffer_output();
674 include "lib/editpage.php";
675 $e = new PageEditor ($this);
679 function action_lock () {
680 $page = $this->getPage();
681 $page->set('locked', true);
682 $this->action_browse();
685 function action_unlock () {
686 // FIXME: This check is redundant.
687 //$user->requireAuth(WIKIAUTH_ADMIN);
688 $page = $this->getPage();
689 $page->set('locked', false);
690 $this->action_browse();
693 function action_remove () {
694 // FIXME: This check is redundant.
695 //$user->requireAuth(WIKIAUTH_ADMIN);
696 $pagename = $this->getArg('pagename');
697 if (strstr($pagename,_('PhpWikiAdministration'))) {
698 $this->action_browse();
700 include('lib/removepage.php');
706 function action_upload () {
707 include_once("lib/loadsave.php");
711 function action_xmlrpc () {
712 include_once("lib/XmlRpcServer.php");
713 $xmlrpc = new XmlRpcServer($this);
717 function action_zip () {
718 include_once("lib/loadsave.php");
720 // I don't think it hurts to add cruft at the end of the zip file.
721 echo "\n========================================================\n";
722 echo "PhpWiki " . PHPWIKI_VERSION . " source:\n$GLOBALS[RCS_IDS]\n";
725 function action_ziphtml () {
726 include_once("lib/loadsave.php");
727 MakeWikiZipHtml($this);
728 // I don't think it hurts to add cruft at the end of the zip file.
729 echo "\n========================================================\n";
730 echo "PhpWiki " . PHPWIKI_VERSION . " source:\n$GLOBALS[RCS_IDS]\n";
733 function action_dumpserial () {
734 include_once("lib/loadsave.php");
738 function action_dumphtml () {
739 include_once("lib/loadsave.php");
740 DumpHtmlToDir($this);
743 function action_loadfile () {
744 include_once("lib/loadsave.php");
745 LoadFileOrDir($this);
750 function is_safe_action ($action) {
751 return WikiRequest::requiredAuthorityForAction($action) < WIKIAUTH_ADMIN;
754 function validateSessionPath() {
755 // Try to defer any session.save_path PHP errors before any html
756 // is output, which causes some versions of IE to display a blank
757 // page (due to its strict mode while parsing a page?).
758 if (! is_writeable(ini_get('session.save_path'))) {
761 (sprintf(_("%s is not writable."),
762 _("The session.save_path directory"))
764 . sprintf(_("Please ensure that %s is writable, or redefine %s in index.php."),
765 sprintf(_("the directory '%s'"),
766 ini_get('session.save_path')),
769 . sprintf(_("Attempting to use the directory '%s' instead."),
772 if (! is_writeable($tmpdir)) {
774 (sprintf(_("%s is not writable."), $tmpdir)
776 . _("Users will not be able to sign in.")
780 ini_set('session.save_path', $tmpdir);
786 validateSessionPath();
790 $request = new WikiRequest();
793 * Allow for disabling of markup cache.
794 * (Mostly for debugging ... hopefully.)
796 * See also <?plugin WikiAdminUtils action=purge-cache ?>
798 if (!defined('WIKIDB_NOCACHE_MARKUP') and $request->getArg('nocache'))
799 define('WIKIDB_NOCACHE_MARKUP', $request->getArg('nocache'));
801 // Initialize with system defaults in case user not logged in.
802 // Should this go into constructor?
803 $request->initializeTheme();
805 $request->updateAuthAndPrefs();
806 // initialize again with user's prefs
807 $request->initializeTheme();
808 $request->initializeLang();
810 // Enable the output of most of the warning messages.
811 // The warnings will screw up zip files though.
812 global $ErrorManager;
813 if (substr($request->getArg('action'), 0, 3) != 'zip') {
814 $ErrorManager->setPostponedErrorMask(E_NOTICE|E_USER_NOTICE);
815 //$ErrorManager->setPostponedErrorMask(0);
819 //if ($user->is_authenticated())
820 // $LogEntry->user = $user->getId();
822 $request->possiblyDeflowerVirginWiki();
824 if(defined('WIKI_XMLRPC')) return;
826 $validators = array('wikiname' => WIKI_NAME,
827 'args' => hash($request->getArgs()),
828 'prefs' => hash($request->getPrefs()));
829 if (CACHE_CONTROL == 'STRICT') {
830 $dbi = $request->getDbh();
831 $timestamp = $dbi->getTimestamp();
832 $validators['mtime'] = $timestamp;
833 $validators['%mtime'] = (int)$timestamp;
835 // FIXME: we should try to generate strong validators when possible,
836 // but for now, our validator is weak, since equal validators do not
837 // indicate byte-level equality of content. (Due to DEBUG timing output, etc...)
839 // (If DEBUG if off, this may be a strong validator, but I'm going
840 // to go the paranoid route here pending further study and testing.)
842 $validators['%weak'] = true;
844 $request->setValidators($validators);
846 $request->handleAction();
848 if (defined('DEBUG') and DEBUG>1) phpinfo(INFO_VARIABLES);
856 // $Log: not supported by cvs2svn $
857 // Revision 1.109 2004/01/30 19:57:58 rurban
858 // fixed DBAuthParams['pref_select']: wrong _auth_dbi object used.
860 // Revision 1.108 2004/01/28 14:34:14 rurban
861 // session table takes the common prefix
862 // + various minor stuff
863 // reallow password changing
865 // Revision 1.107 2004/01/27 23:23:39 rurban
866 // renamed ->Username => _userid for consistency
867 // renamed mayCheckPassword => mayCheckPass
868 // fixed recursion problem in WikiUserNew
869 // fixed bogo login (but not quite 100% ready yet, password storage)
871 // Revision 1.106 2004/01/26 09:17:49 rurban
872 // * changed stored pref representation as before.
873 // the array of objects is 1) bigger and 2)
874 // less portable. If we would import packed pref
875 // objects and the object definition was changed, PHP would fail.
876 // This doesn't happen with an simple array of non-default values.
877 // * use $prefs->retrieve and $prefs->store methods, where retrieve
878 // understands the interim format of array of objects also.
879 // * simplified $prefs->get() and fixed $prefs->set()
880 // * added $user->_userid and class '_WikiUser' portability functions
881 // * fixed $user object ->_level upgrading, mostly using sessions.
882 // this fixes yesterdays problems with loosing authorization level.
883 // * fixed WikiUserNew::checkPass to return the _level
884 // * fixed WikiUserNew::isSignedIn
885 // * added explodePageList to class PageList, support sortby arg
886 // * fixed UserPreferences for WikiUserNew
887 // * fixed WikiPlugin for empty defaults array
888 // * UnfoldSubpages: added pagename arg, renamed pages arg,
889 // removed sort arg, support sortby arg
891 // Revision 1.105 2004/01/25 03:57:15 rurban
892 // WikiUserNew support (temp. ENABLE_USER_NEW constant)
894 // Revision 1.104 2003/12/26 06:41:16 carstenklapp
895 // Bugfix: Try to defer OS errors about session.save_path and ACCESS_LOG,
896 // so they don't prevent IE from partially (or not at all) rendering the
897 // page. This should help a little for the IE user who encounters trouble
898 // when setting up a new PhpWiki for the first time.
900 // Revision 1.103 2003/12/02 00:10:00 carstenklapp
901 // Bugfix: Ongoing work to untangle UserPreferences/WikiUser/request code
902 // mess: UserPreferences should take effect immediately now upon signing
905 // Revision 1.102 2003/11/25 22:55:32 carstenklapp
906 // Localization bugfix: For wikis where English is not the default system
907 // language, make sure that the authority error message (i.e. "You must
908 // sign in to edit pages in this wiki" etc.) is displayed in the wiki's
909 // default language. Previously it would always display in English.
910 // (Added call to update_locale() before displaying any messages prior to
911 // the login prompt.)
913 // Revision 1.101 2003/11/25 21:49:44 carstenklapp
914 // Bugfix: For a non-english wiki or when the user's preference is not
915 // english, the wiki would always use the english ActionPage first if it
916 // was present rather than the appropriate localised variant. (PhpWikis
917 // running only in english or Wikis running ONLY without any english
918 // ActionPages would not notice this bug, only when both english and
919 // localised ActionPages were in the DB.) Now we check for the localised
922 // Revision 1.100 2003/11/18 16:54:18 carstenklapp
923 // Reformatting only: Tabs to spaces, added rcs log.
931 // c-hanging-comment-ender-p: nil
932 // indent-tabs-mode: nil