2 rcs_id('$Id: main.php,v 1.105 2004-01-25 03:57:15 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');
10 require_once("lib/WikiUserNew.php");
12 require_once("lib/WikiUser.php");
13 require_once('lib/WikiDB.php');
15 class WikiRequest extends Request {
18 function WikiRequest () {
19 $this->_dbi = WikiDB::open($GLOBALS['DBParams']);
22 include_once('lib/DB_Session.php');
23 $this->_dbsession = & new DB_Session($this->getDbh(),
24 $GLOBALS['DBParams']['db_session_table']);
30 $this->setArg('pagename', $this->_deducePagename());
31 $this->setArg('action', $this->_deduceAction());
33 // Restore auth state. This doesn't check for proper authorization!
34 if (ENABLE_USER_NEW) {
35 $this->_user = WikiUser($this->_deduceUsername());
36 $this->_prefs = $this->_user->_prefs;
38 $this->_user = new WikiUser($this, $this->_deduceUsername());
39 $this->_prefs = $this->_user->getPreferences();
43 function initializeLang () {
44 if ($user_lang = $this->getPref('lang')) {
45 //trigger_error("DEBUG: initializeLang() ". $user_lang ." calling update_locale()...");
46 update_locale($user_lang);
50 function initializeTheme () {
54 if ($user_theme = $this->getPref('theme'))
55 include_once("themes/$user_theme/themeinfo.php");
56 if (empty($Theme) and defined ('THEME'))
57 include_once("themes/" . THEME . "/themeinfo.php");
59 include_once("themes/default/themeinfo.php");
60 assert(!empty($Theme));
64 // This really maybe should be part of the constructor, but since it
65 // may involve HTML/template output, the global $request really needs
66 // to be initialized before we do this stuff.
67 function updateAuthAndPrefs () {
69 // Handle preference updates, and authentication requests, if any.
70 if ($new_prefs = $this->getArg('pref')) {
71 $this->setArg('pref', false);
72 if ($this->isPost() and !empty($new_prefs['passwd']) and
73 ($new_prefs['passwd2'] != $new_prefs['passwd'])) {
75 $this->_prefs->set('passwd','');
76 // $this->_prefs->set('passwd2',''); // This is not stored anyway
79 foreach ($new_prefs as $key => $val) {
80 if ($key == 'passwd') {
82 $val = crypt('passwd');
84 $this->_prefs->set($key, $val);
88 // FIXME: need to move authentication request processing
89 // up to be before pref request processing, I think,
90 // since logging in may change which preferences
91 // we're talking about...
93 // even we have disallow anon users?
94 // if (! $this->_user ) $this->_user = new _AnonUser();
96 // Handle authentication request, if any.
97 if ($auth_args = $this->getArg('auth')) {
98 $this->setArg('auth', false);
99 $this->_handleAuthRequest($auth_args); // possible NORETURN
101 elseif ( ! $this->_user or ! $this->_user->isSignedIn() ) {
102 // If not auth request, try to sign in as saved user.
103 if (($saved_user = $this->getPref('userid')) != false) {
104 $this->_signIn($saved_user);
108 // Save preferences in session and cookie
109 // FIXME: hey! what about anonymous users? Can't they have
113 $this->_user->setPreferences($this->_prefs, $id_only);
115 // Ensure user has permissions for action
116 $require_level = $this->requiredAuthority($this->getArg('action'));
117 if (! $this->_user->hasAuthority($require_level))
118 $this->_notAuthorized($require_level); // NORETURN
121 function getUser () {
125 function getPrefs () {
126 return $this->_prefs;
129 // Convenience function:
130 function getPref ($key) {
131 if (isset($this->_prefs))
132 return $this->_prefs->get($key);
139 function getAuthDbh () {
140 global $DBParams, $DBAuthParams;
141 if (!isset($this->_auth_dbi)) {
142 if ($DBParams['dbtype'] == 'dba' or empty($DBAuthParams['auth_dsn']))
143 $this->_auth_dbi = $this->getDbh(); // use phpwiki database
144 elseif ($DBAuthParams['auth_dsn'] == $DBParams['dsn'])
145 $this->_auth_dbi = $this->getDbh(); // same phpwiki database
146 else // use external database
147 // needs PHP 4.1. better use $this->_user->...
148 $this->_auth_dbi = WikiDB_User::open($DBAuthParams);
150 return $this->_auth_dbi;
154 * Get requested page from the page database.
155 * By default it will grab the page requested via the URL
157 * This is a convenience function.
158 * @param string $pagename Name of page to get.
159 * @return WikiDB_Page Object with methods to pull data from
160 * database for the page requested.
162 function getPage ($pagename = false) {
163 if (!isset($this->_dbi))
166 $pagename = $this->getArg('pagename');
167 return $this->_dbi->getPage($pagename);
170 /** Get URL for POST actions.
172 * Officially, we should just use SCRIPT_NAME (or some such),
173 * but that causes problems when we try to issue a redirect, e.g.
174 * after saving a page.
176 * Some browsers (at least NS4 and Mozilla 0.97 won't accept
177 * a redirect from a page to itself.)
179 * So, as a HACK, we include pagename and action as query args in
180 * the URL. (These should be ignored when we receive the POST
183 function getPostURL ($pagename=false) {
184 if ($pagename === false)
185 $pagename = $this->getArg('pagename');
186 $action = $this->getArg('action');
187 if ($this->getArg('start_debug')) // zend ide support
188 return WikiURL($pagename, array('action' => $action, 'start_debug' => 1));
190 return WikiURL($pagename, array('action' => $action));
193 function _handleAuthRequest ($auth_args) {
194 if (!is_array($auth_args))
197 // Ignore password unless POST'ed.
198 if (!$this->isPost())
199 unset($auth_args['passwd']);
201 $olduser = $this->_user;
202 $user = $this->_user->AuthCheck($auth_args);
204 if (isa($user,(ENABLE_USER_NEW ? '_' : '') . 'WikiUser') and $user->isSignedIn()) {
205 // Successful login (or logout.)
206 $this->_setUser($user);
208 elseif (is_string($user)) {
209 // Login attempt failed.
210 $fail_message = $user;
211 $auth_args['pass_required'] = true;
212 // If no password was submitted, it's not really
213 // a failure --- just need to prompt for password...
214 if (!isset($auth_args['passwd'])) {
215 //$auth_args['pass_required'] = false;
216 $fail_message = false;
218 $olduser->PrintLoginForm($this, $auth_args, $fail_message);
219 $this->finish(); //NORETURN
222 // Login request cancelled.
227 * Attempt to sign in (bogo-login).
231 * @param $userid string Userid to attempt to sign in as.
234 function _signIn ($userid) {
235 if (ENABLE_USER_NEW) {
237 $this->_user = new _BogoUser($userid);
239 $this->_user = new _PassUser($userid);
241 $user = $this->_user->AuthCheck(array('userid' => $userid));
242 if (isa($user, (ENABLE_USER_NEW ? '_' : '') . 'WikiUser')) {
243 $this->_setUser($user); // success!
247 function _setUser ($user) {
248 $this->_user = $user;
249 $this->setCookieVar('WIKI_ID', $user->getAuthenticatedId(), 365);
250 $this->setSessionVar('wiki_user', $user);
251 if ($user->isSignedIn())
252 $user->_authhow = 'signin';
254 // Save userid to prefs..
255 if (!($this->_prefs = $this->_user->getPreferences()))
256 $this->_prefs = $this->_user->_prefs;
257 $this->_prefs->set('userid',
258 $user->isSignedIn() ? $user->getId() : '');
261 function _notAuthorized ($require_level) {
262 // Display the authority message in the Wiki's default
263 // language, in case it is not english.
265 // Note that normally a user will not see such an error once
266 // logged in, unless the admin has altered the default
267 // disallowed wikiactions. In that case we should probably
268 // check the user's language prefs too at this point; this
269 // would be a situation which is not really handled with the
271 update_locale(DEFAULT_LANGUAGE);
273 // User does not have required authority. Prompt for login.
274 $what = $this->getActionDescription($this->getArg('action'));
276 if ($require_level == WIKIAUTH_FORBIDDEN) {
277 $this->finish(fmt("%s is disallowed on this wiki.",
278 $this->getDisallowedActionDescription($this->getArg('action'))));
280 elseif ($require_level == WIKIAUTH_BOGO)
281 $msg = fmt("You must sign in to %s.", $what);
282 elseif ($require_level == WIKIAUTH_USER)
283 $msg = fmt("You must log in to %s.", $what);
285 $msg = fmt("You must be an administrator to %s.", $what);
286 $pass_required = ($require_level >= WIKIAUTH_USER);
288 $this->_user->PrintLoginForm($this, compact('require_level','pass_required'), $msg);
289 $this->finish(); // NORETURN
292 function getActionDescription($action) {
293 static $actionDescriptions;
294 if (! $actionDescriptions) {
296 = array('browse' => _("browse pages in this wiki"),
297 'diff' => _("diff pages in this wiki"),
298 'dumphtml' => _("dump html pages from this wiki"),
299 'dumpserial' => _("dump serial pages from this wiki"),
300 'edit' => _("edit pages in this wiki"),
301 'create' => _("create pages in this wiki"),
302 'loadfile' => _("load files into this wiki"),
303 'lock' => _("lock pages in this wiki"),
304 'remove' => _("remove pages from this wiki"),
305 'unlock' => _("unlock pages in this wiki"),
306 'upload' => _("upload a zip dump to this wiki"),
307 'verify' => _("verify the current action"),
308 'viewsource' => _("view the source of pages in this wiki"),
309 'xmlrpc' => _("access this wiki via XML-RPC"),
310 'zip' => _("download a zip dump from this wiki"),
311 'ziphtml' => _("download an html zip dump from this wiki")
314 if (in_array($action, array_keys($actionDescriptions)))
315 return $actionDescriptions[$action];
319 function getDisallowedActionDescription($action) {
320 static $disallowedActionDescriptions;
321 if (! $disallowedActionDescriptions) {
322 $disallowedActionDescriptions
323 = array('browse' => _("Browsing pages"),
324 'diff' => _("Diffing pages"),
325 'dumphtml' => _("Dumping html pages"),
326 'dumpserial' => _("Dumping serial pages"),
327 'edit' => _("Editing pages"),
328 'create' => _("Creating pages"),
329 'loadfile' => _("Loading files"),
330 'lock' => _("Locking pages"),
331 'remove' => _("Removing pages"),
332 'unlock' => _("Unlocking pages"),
333 'upload' => _("Uploading zip dumps"),
334 'verify' => _("Verify the current action"),
335 'viewsource' => _("Viewing the source of pages"),
336 'xmlrpc' => _("XML-RPC access"),
337 'zip' => _("Downloading zip dumps"),
338 'ziphtml' => _("Downloading html zip dumps")
341 if (in_array($action, array_keys($disallowedActionDescriptions)))
342 return $disallowedActionDescriptions[$action];
347 function requiredAuthority ($action) {
348 $auth = $this->requiredAuthorityForAction($action);
351 * This is a hook for plugins to require authority
352 * for posting to them.
354 * IMPORTANT: this is not a secure check, so the plugin
355 * may not assume that any POSTs to it are authorized.
356 * All this does is cause PhpWiki to prompt for login
357 * if the user doesn't have the required authority.
359 if ($this->isPost()) {
360 $post_auth = $this->getArg('require_authority_for_post');
361 if ($post_auth !== false)
362 $auth = max($auth, $post_auth);
367 function requiredAuthorityForAction ($action) {
369 // Todo: Check individual page permissions instead.
377 return WIKIAUTH_ANON;
381 if (defined('ZIPDUMP_AUTH') && ZIPDUMP_AUTH)
382 return WIKIAUTH_ADMIN;
383 return WIKIAUTH_ANON;
386 if (defined('REQUIRE_SIGNIN_BEFORE_EDIT') && REQUIRE_SIGNIN_BEFORE_EDIT)
387 return WIKIAUTH_BOGO;
388 return WIKIAUTH_ANON;
389 // return WIKIAUTH_BOGO;
392 $page = $this->getPage();
393 $current = $page->getCurrentRevision();
394 if ($current->hasDefaultContents())
395 return $this->requiredAuthorityForAction('edit');
396 return $this->requiredAuthorityForAction('browse');
405 return WIKIAUTH_ADMIN;
407 global $WikiNameRegexp;
408 if (preg_match("/$WikiNameRegexp\Z/A", $action))
409 return WIKIAUTH_ANON; // ActionPage.
411 return WIKIAUTH_ADMIN;
415 function possiblyDeflowerVirginWiki () {
416 if ($this->getArg('action') != 'browse')
418 if ($this->getArg('pagename') != HOME_PAGE)
421 $page = $this->getPage();
422 $current = $page->getCurrentRevision();
423 if ($current->getVersion() > 0)
424 return; // Homepage exists.
426 include('lib/loadsave.php');
428 $this->finish(); // NORETURN
431 function handleAction () {
432 $action = $this->getArg('action');
433 $method = "action_$action";
434 if (method_exists($this, $method)) {
437 elseif ($page = $this->findActionPage($action)) {
438 $this->actionpage($page);
441 $this->finish(fmt("%s: Bad action", $action));
445 function finish ($errormsg = false) {
449 exit(); // just in case CloseDataBase calls us
452 if (!empty($this->_dbi))
453 $this->_dbi->close();
457 global $ErrorManager;
458 $ErrorManager->flushPostponedErrors();
460 if (!empty($errormsg)) {
463 HTML::h2(_("Fatal PhpWiki Error")),
466 echo "\n</body></html>";
473 function _deducePagename () {
474 if ($this->getArg('pagename'))
475 return $this->getArg('pagename');
478 $pathinfo = $this->get('PATH_INFO');
479 $tail = substr($pathinfo, strlen(PATH_INFO_PREFIX));
481 if ($tail && $pathinfo == PATH_INFO_PREFIX . $tail) {
485 elseif ($this->isPost()) {
487 * In general, for security reasons, HTTP_GET_VARS should be ignored
488 * on POST requests, but we make an exception here (only for pagename).
490 * The justifcation for this hack is the following
491 * asymmetry: When POSTing with USE_PATH_INFO set, the
492 * pagename can (and should) be communicated through the
493 * request URL via PATH_INFO. When POSTing with
494 * USE_PATH_INFO off, this cannot be done --- the only way
495 * to communicate the pagename through the URL is via
496 * QUERY_ARGS (HTTP_GET_VARS).
498 global $HTTP_GET_VARS;
499 if (isset($HTTP_GET_VARS['pagename'])) {
500 return $HTTP_GET_VARS['pagename'];
505 * Support for PhpWiki 1.2 style requests.
507 $query_string = $this->get('QUERY_STRING');
508 if (preg_match('/^[^&=]+$/', $query_string)) {
509 return urldecode($query_string);
515 function _deduceAction () {
516 if (!($action = $this->getArg('action'))) {
517 // Detect XML-RPC requests
519 && $this->get('CONTENT_TYPE') == 'text/xml') {
520 global $HTTP_RAW_POST_DATA;
521 if (strstr($HTTP_RAW_POST_DATA, '<methodCall>')) {
526 return 'browse'; // Default if no action specified.
529 if (method_exists($this, "action_$action"))
532 // Allow for, e.g. action=LikePages
533 if ($this->isActionPage($action))
536 trigger_error("$action: Unknown action", E_USER_NOTICE);
540 function _deduceUsername () {
541 if (!empty($this->args['auth']) and !empty($this->args['auth']['userid']))
542 return $this->args['auth']['userid'];
544 if ($userid = $this->getSessionVar('wiki_user')) {
545 if (!empty($this->_user))
546 $this->_user->_authhow = 'session';
547 // users might switch in a session between the two objects
548 $s = ENABLE_USER_NEW ? "UserName" : "_userid";
549 if (isa($userid,(ENABLE_USER_NEW ? '_' : '') .'WikiUser'))
550 return $userid->{$s};
552 if ($userid = $this->getCookieVar('WIKI_ID')) {
553 if (!empty($this->_user))
554 $this->_user->authhow = 'cookie';
560 function _isActionPage ($pagename) {
561 $dbi = $this->getDbh();
562 $page = $dbi->getPage($pagename);
563 $rev = $page->getCurrentRevision();
564 // FIXME: more restrictive check for sane plugin?
565 if (strstr($rev->getPackedContent(), '<?plugin'))
567 if (!$rev->hasDefaultContents())
568 trigger_error("$pagename: Does not appear to be an 'action page'", E_USER_NOTICE);
572 function findActionPage ($action) {
575 // check for translated version, as per users preferred language
576 // (or system default in case it is not en)
577 $translation = gettext($action);
579 if (isset($cache) and isset($cache[$translation]))
580 return $cache[$translation];
582 // check for cached translated version
583 if ($this->_isActionPage($translation))
584 return $cache[$action] = $translation;
586 // Allow for, e.g. action=LikePages
587 global $WikiNameRegexp;
588 if (!preg_match("/$WikiNameRegexp\\Z/A", $action))
589 return $cache[$action] = false;
591 // check for translated version (default language)
593 if ($LANG != DEFAULT_LANGUAGE and $LANG != "en") {
595 //trigger_error("DEBUG: findActionPage() ". DEFAULT_LANGUAGE." calling update_locale()...");
596 update_locale(DEFAULT_LANGUAGE);
597 $default = gettext($action);
598 //trigger_error("DEBUG: findActionPage() ". $save_lang." restoring save_lang, calling update_locale()...");
599 update_locale($save_lang);
600 if ($this->_isActionPage($default))
601 return $cache[$action] = $default;
604 $default = $translation;
607 // check for english version
608 if ($action != $translation and $action != $default) {
609 if ($this->_isActionPage($action))
610 return $cache[$action] = $action;
613 trigger_error("$action: Cannot find action page", E_USER_NOTICE);
614 return $cache[$action] = false;
617 function isActionPage ($pagename) {
618 return $this->findActionPage($pagename);
621 function action_browse () {
622 $this->buffer_output();
623 include_once("lib/display.php");
627 function action_verify () {
628 $this->action_browse();
631 function actionpage ($action) {
632 $this->buffer_output();
633 include_once("lib/display.php");
634 actionPage($this, $action);
637 function action_diff () {
638 $this->buffer_output();
639 include_once "lib/diff.php";
643 function action_search () {
644 // This is obsolete: reformulate URL and redirect.
645 // FIXME: this whole section should probably be deleted.
646 if ($this->getArg('searchtype') == 'full') {
647 $search_page = _("FullTextSearch");
650 $search_page = _("TitleSearch");
652 $this->redirect(WikiURL($search_page,
653 array('s' => $this->getArg('searchterm')),
657 function action_edit () {
658 $this->buffer_output();
659 include "lib/editpage.php";
660 $e = new PageEditor ($this);
664 function action_create () {
665 $this->action_edit();
668 function action_viewsource () {
669 $this->buffer_output();
670 include "lib/editpage.php";
671 $e = new PageEditor ($this);
675 function action_lock () {
676 $page = $this->getPage();
677 $page->set('locked', true);
678 $this->action_browse();
681 function action_unlock () {
682 // FIXME: This check is redundant.
683 //$user->requireAuth(WIKIAUTH_ADMIN);
684 $page = $this->getPage();
685 $page->set('locked', false);
686 $this->action_browse();
689 function action_remove () {
690 // FIXME: This check is redundant.
691 //$user->requireAuth(WIKIAUTH_ADMIN);
692 $pagename = $this->getArg('pagename');
693 if (strstr($pagename,_('PhpWikiAdministration'))) {
694 $this->action_browse();
696 include('lib/removepage.php');
702 function action_upload () {
703 include_once("lib/loadsave.php");
707 function action_xmlrpc () {
708 include_once("lib/XmlRpcServer.php");
709 $xmlrpc = new XmlRpcServer($this);
713 function action_zip () {
714 include_once("lib/loadsave.php");
716 // I don't think it hurts to add cruft at the end of the zip file.
717 echo "\n========================================================\n";
718 echo "PhpWiki " . PHPWIKI_VERSION . " source:\n$GLOBALS[RCS_IDS]\n";
721 function action_ziphtml () {
722 include_once("lib/loadsave.php");
723 MakeWikiZipHtml($this);
724 // I don't think it hurts to add cruft at the end of the zip file.
725 echo "\n========================================================\n";
726 echo "PhpWiki " . PHPWIKI_VERSION . " source:\n$GLOBALS[RCS_IDS]\n";
729 function action_dumpserial () {
730 include_once("lib/loadsave.php");
734 function action_dumphtml () {
735 include_once("lib/loadsave.php");
736 DumpHtmlToDir($this);
739 function action_loadfile () {
740 include_once("lib/loadsave.php");
741 LoadFileOrDir($this);
746 function is_safe_action ($action) {
747 return WikiRequest::requiredAuthorityForAction($action) < WIKIAUTH_ADMIN;
750 function validateSessionPath() {
751 // Try to defer any session.save_path PHP errors before any html
752 // is output, which causes some versions of IE to display a blank
753 // page (due to its strict mode while parsing a page?).
754 if (! is_writeable(ini_get('session.save_path'))) {
757 (sprintf(_("%s is not writable."),
758 _("The session.save_path directory"))
760 . sprintf(_("Please ensure that %s is writable, or redefine %s in index.php."),
761 sprintf(_("the directory '%s'"),
762 ini_get('session.save_path')),
765 . sprintf(_("Attempting to use the directory '%s' instead."),
768 if (! is_writeable($tmpdir)) {
770 (sprintf(_("%s is not writable."), $tmpdir)
772 . _("Users will not be able to sign in.")
776 ini_set('session.save_path', $tmpdir);
782 validateSessionPath();
786 $request = new WikiRequest();
789 * Allow for disabling of markup cache.
790 * (Mostly for debugging ... hopefully.)
792 * See also <?plugin WikiAdminUtils action=purge-cache ?>
794 if (!defined('WIKIDB_NOCACHE_MARKUP') and $request->getArg('nocache'))
795 define('WIKIDB_NOCACHE_MARKUP', $request->getArg('nocache'));
797 // Initialize with system defaults in case user not logged in.
798 // Should this go into constructor?
799 $request->initializeTheme();
801 $request->updateAuthAndPrefs();
802 // initialize again with user's prefs
803 $request->initializeTheme();
804 $request->initializeLang();
806 // Enable the output of most of the warning messages.
807 // The warnings will screw up zip files though.
808 global $ErrorManager;
809 if (substr($request->getArg('action'), 0, 3) != 'zip') {
810 $ErrorManager->setPostponedErrorMask(E_NOTICE|E_USER_NOTICE);
811 //$ErrorManager->setPostponedErrorMask(0);
815 //if ($user->is_authenticated())
816 // $LogEntry->user = $user->getId();
818 $request->possiblyDeflowerVirginWiki();
820 if(defined('WIKI_XMLRPC')) return;
822 $validators = array('wikiname' => WIKI_NAME,
823 'args' => hash($request->getArgs()),
824 'prefs' => hash($request->getPrefs()));
825 if (CACHE_CONTROL == 'STRICT') {
826 $dbi = $request->getDbh();
827 $timestamp = $dbi->getTimestamp();
828 $validators['mtime'] = $timestamp;
829 $validators['%mtime'] = (int)$timestamp;
831 // FIXME: we should try to generate strong validators when possible,
832 // but for now, our validator is weak, since equal validators do not
833 // indicate byte-level equality of content. (Due to DEBUG timing output, etc...)
835 // (If DEBUG if off, this may be a strong validator, but I'm going
836 // to go the paranoid route here pending further study and testing.)
838 $validators['%weak'] = true;
840 $request->setValidators($validators);
842 $request->handleAction();
844 if (defined('DEBUG') and DEBUG>1) phpinfo(INFO_VARIABLES);
852 // $Log: not supported by cvs2svn $
853 // Revision 1.104 2003/12/26 06:41:16 carstenklapp
854 // Bugfix: Try to defer OS errors about session.save_path and ACCESS_LOG,
855 // so they don't prevent IE from partially (or not at all) rendering the
856 // page. This should help a little for the IE user who encounters trouble
857 // when setting up a new PhpWiki for the first time.
859 // Revision 1.103 2003/12/02 00:10:00 carstenklapp
860 // Bugfix: Ongoing work to untangle UserPreferences/WikiUser/request code
861 // mess: UserPreferences should take effect immediately now upon signing
864 // Revision 1.102 2003/11/25 22:55:32 carstenklapp
865 // Localization bugfix: For wikis where English is not the default system
866 // language, make sure that the authority error message (i.e. "You must
867 // sign in to edit pages in this wiki" etc.) is displayed in the wiki's
868 // default language. Previously it would always display in English.
869 // (Added call to update_locale() before displaying any messages prior to
870 // the login prompt.)
872 // Revision 1.101 2003/11/25 21:49:44 carstenklapp
873 // Bugfix: For a non-english wiki or when the user's preference is not
874 // english, the wiki would always use the english ActionPage first if it
875 // was present rather than the appropriate localised variant. (PhpWikis
876 // running only in english or Wikis running ONLY without any english
877 // ActionPages would not notice this bug, only when both english and
878 // localised ActionPages were in the DB.) Now we check for the localised
881 // Revision 1.100 2003/11/18 16:54:18 carstenklapp
882 // Reformatting only: Tabs to spaces, added rcs log.
890 // c-hanging-comment-ender-p: nil
891 // indent-tabs-mode: nil