From 25b609ff9eaf2e48587a0f0e29e5606313397081 Mon Sep 17 00:00:00 2001 From: rurban Date: Wed, 3 Nov 2004 16:50:31 +0000 Subject: [PATCH] some new defaults and constants, renamed USE_DOUBLECLICKEDIT to ENABLE_DOUBLECLICKEDIT git-svn-id: svn://svn.code.sf.net/p/phpwiki/code/trunk@4083 96ab9672-09ca-45d6-a79d-3d69d39ca109 --- config/config-default.ini | 44 ++++++++++++++++++++++++--------------- config/config-dist.ini | 41 +++++++++++++++++++++++++++++------- lib/IniConfig.php | 10 +++++++-- lib/Theme.php | 9 +++++--- 4 files changed, 74 insertions(+), 30 deletions(-) diff --git a/config/config-default.ini b/config/config-default.ini index 9666acd80..0e4084732 100644 --- a/config/config-default.ini +++ b/config/config-default.ini @@ -1,12 +1,14 @@ -; $Id: config-default.ini,v 1.16 2004-07-05 13:04:46 rurban Exp $ +; $Id: config-default.ini,v 1.17 2004-11-03 16:50:31 rurban Exp $ ; This is the default PhpWiki configuration for undefined config.ini entries. ; recent development features: -; DEBUG = 0 +DEBUG = 0 ENABLE_USER_NEW = true ENABLE_PAGEPERM = true ENABLE_EDIT_TOOLBAR = true JS_SEARCHREPLACE = false +ENABLE_DOUBLECLICKEDIT = true +ENABLE_XHTML_XML = false WIKI_NAME = PhpWiki ENABLE_REVERSE_DNS = true @@ -32,7 +34,7 @@ DATABASE_TYPE = dba ; DATABASE_SESSION_TABLE = session DATABASE_DIRECTORY = /tmp DATABASE_DBA_HANDLER = gdbm -DATABASE_TIMEOUT = 20 +DATABASE_TIMEOUT = 5 MAJOR_MAX_AGE = 32 MAJOR_KEEP = 8 MINOR_MAX_AGE = 7 @@ -47,7 +49,7 @@ ALLOW_ANON_EDIT = true ALLOW_BOGO_LOGIN = true ALLOW_USER_PASSWORDS = true USER_AUTH_ORDER = PersonalPage -PASSWORD_LENGTH_MINIMUM = 2 +PASSWORD_LENGTH_MINIMUM = 0 USER_AUTH_POLICY = stacked ;LDAP_AUTH_HOST = "ldap://localhost:389" ;LDAP_BASE_DN = "ou=Users,o=Development,dc=mycompany.com" @@ -73,6 +75,10 @@ DBAUTH_PREF_UPDATE = "REPLACE INTO pref SET prefs='$pref_blob',userid='$userid'" ; DBAUTH_GROUP_MEMBERS = "SELECT user FROM user WHERE group='$groupname'" ; DBAUTH_USER_GROUPS = "SELECT group FROM user WHERE user='$userid'" EDITING_POLICY = "EditingPolicy" +; old WikiUser options: +ALLOW_HTTP_AUTH_LOGIN = false +ALLOW_LDAP_LOGIN = false +ALLOW_IMAP_LOGIN = false THEME = default CHARSET = iso-8859-1 @@ -98,7 +104,17 @@ COPYRIGHTPAGE_URL = "http://www.gnu.org/copyleft/gpl.html#SEC1" ; COPYRIGHTPAGE_TITLE = Creative Commons License 1.0 ; COPYRIGHTPAGE_URL = http://creativecommons.org/licenses/by/1.0/ AUTHORPAGE_TITLE = "The PhpWiki Programming Team" -AUTHORPAGE_URL = "http://phpwiki.sourceforge.net/phpwiki/ThePhpWikiProgrammingTeam" +AUTHORPAGE_URL = "http://phpwiki.org/ThePhpWikiProgrammingTeam" + +; these not: +; DBAUTH_AUTH_DSN = +; SERVER_NAME = +; SERVER_PORT = +; SCRIPT_NAME = +; DATA_PATH = +; PHPWIKI_DIR = +; VIRTUAL_PATH = +; USE_PATH_INFO = PLUGIN_CACHED_DATABASE = file ; PLUGIN_CACHED_CACHE_DIR = /tmp/cache @@ -111,15 +127,9 @@ PLUGIN_CACHED_USECACHE = true PLUGIN_CACHED_FORCE_SYNCMAP = true PLUGIN_CACHED_IMGTYPES = "png|gif|gd|gd2|jpeg|wbmp|xbm|xpm" -; These not: -; DBAUTH_AUTH_DSN = -; SERVER_NAME = -; SERVER_PORT = -; SCRIPT_NAME = -; DATA_PATH = -; PHPWIKI_DIR = -; VIRTUAL_PATH = -; USE_PATH_INFO = - -; DISABLE_HTTP_REDIRECT = false - +DISABLE_HTTP_REDIRECT = false +DISABLE_GETIMAGESIZE = false +; FORTUNE_DIR = /usr/share/fortune +; DBADMIN_USER = +; DBADMIN_PASSWD = +; USE_EXTERNAL_HTML2PDF = "htmldoc --quiet --format pdf14 --no-toc --no-title %s" diff --git a/config/config-dist.ini b/config/config-dist.ini index 3d25a84b2..75c23b95e 100644 --- a/config/config-dist.ini +++ b/config/config-dist.ini @@ -8,7 +8,7 @@ ; however, we recommend you tailor things to your particular setting. ;========================================================================= -; Part Zero: Tricky Options +; Part Zero: Latest and Tricky Options ;========================================================================= ; ; If PHP needs help in finding where you installed the rest of the PhpWiki @@ -31,15 +31,27 @@ ; Enable the new method of handling WikiUsers. This is currently an ; experimental feature, although it is considered fairly stable. It's best ; to leave it on, and only disable it if you have problems with it. +; Servers with memory-limit problems might want to turn it off. It costs ~300KB ; Default: true ;ENABLE_USER_NEW = false +; I suspect ACL page permissions to degrade speed by 10% +ENABLE_PAGEPERM = true + ; Experimental new edit feature. Default: true +; Reportedly broken on MacOSX Safari, and with application/xhtml+xml ;ENABLE_EDIT_TOOLBAR = false + ; Adds two additional buttons in EDIT_TOOLBAR, Search&Replace and Undo ; Currently broken. Default: false ;JS_SEARCHREPLACE = true +ENABLE_DOUBLECLICKEDIT = true + +; Experimental. Conflicts with ENABLE_EDIT_TOOLBAR and Signin Button +; document.write() javascript. Needed for inlined SVG and MathML. +ENABLE_XHTML_XML = false + ;========================================================================== ; Part One: Authentication and security settings. ; @@ -279,7 +291,7 @@ DATABASE_SESSION_TABLE = session DATABASE_DIRECTORY = /tmp ; For the dba backend, this defines which DBA variant you wish to use. -; gdbm - commonly available +; gdbm - commonly available, Fedora not ; db2 - Berkeley DB v2; not supported by modern versions of PHP ; db3 - Berkeley DB v3; as per db2. The best on Windows ; db4 - Berkeley DB v4; current version, however PHP has some issues @@ -290,7 +302,7 @@ DATABASE_DBA_HANDLER = gdbm ; How long will the system wait for a database operation to complete? ; Specified in seconds. -DATABASE_TIMEOUT = 20 +DATABASE_TIMEOUT = 5 ; If action=upgrade detects mysql problems, but has no ALTER permissions, ; give here a user which has the necessary ALTER or CREATE permissions. @@ -434,12 +446,13 @@ ALLOW_USER_PASSWORDS = true ; Several of these methods can be used together, in the manner specified by ; USER_AUTH_POLICY, below. To specify multiple authentication methods, ; separate the name of each one with colons. -USER_AUTH_ORDER = "PersonalPage : Db" +;USER_AUTH_ORDER = "PersonalPage : Db" +USER_AUTH_ORDER = "PersonalPage" ; For "security" purposes, you can specify that a password be at least a ; certain number of characters long. This applies even to the BogoLogin ; method. -PASSWORD_LENGTH_MINIMUM = 2 +;PASSWORD_LENGTH_MINIMUM = 2 ; The following policies are available for user authentication: ; first-only: use only the first method in USER_AUTH_ORDER @@ -560,6 +573,9 @@ GROUP_METHOD = WIKIPAGE ; ; USER/PASSWORD queries ; +; For USER_AUTH_POLICY=strict and the Db method this is required: +; DBAUTH_AUTH_USER_EXISTS = "SELECT userid FROM user WHERE userid='$userid'" +; ; Check to see if the supplied username/password pair is OK ; ; plaintext passwords: @@ -573,7 +589,6 @@ DBAUTH_AUTH_CRYPT_METHOD = plain ; to get the password out of the database with a simple SELECT query, and ; specify DBAUTH_AUTH_USER_EXISTS and DBAUTH_AUTH_CRYPT_METHOD: ; DBAUTH_AUTH_CHECK = "SELECT passwd FROM user where userid='$userid'" -; DBAUTH_AUTH_USER_EXISTS = "SELECT userid FROM user WHERE userid='$userid'" ; DBAUTH_AUTH_CRYPT_METHOD = crypt ; ; Update the user's authentication credential. If this is not defined but @@ -764,7 +779,7 @@ COPYRIGHTPAGE_URL = "http://www.gnu.org/copyleft/gpl.html#SEC1" ; COPYRIGHTPAGE_URL = "http://creativecommons.org/licenses/by/2.0/" ; see http://creativecommons.org/learn/licenses/ for variations AUTHORPAGE_TITLE = The PhpWiki Programming Team -AUTHORPAGE_URL = http://phpwiki.sourceforge.net/phpwiki/ThePhpWikiProgrammingTeam +AUTHORPAGE_URL = http://phpwiki.org/ThePhpWikiProgrammingTeam ; Allow full markup in headers to be parsed by the CreateToc plugin. ; @@ -896,7 +911,17 @@ TOC_FULL_SYNTAX = true ; the getimagesize() function, which crashes on certain php versions and ; and some external images (png's, ..). ; getimagesize() is only needed for spam prevention. -;DISABLE_GETIMAGESIZE = 1 +;DISABLE_GETIMAGESIZE = true + +; Experimental: For using the Google API +; GOOGLE_LICENSE_KEY = "..." + +; Optional: administrative SQL DB access (action=upgrade) +; DBADMIN_USER = +; DBADMIN_PASSWD = + +; Optional: external PDF executable, %s is the xhtml filename +; USE_EXTERNAL_HTML2PDF = "htmldoc --quiet --format pdf14 --no-toc --no-title %s" ;=========================================================================== ; PLUGINCACHED Pear/Cache Settings: (moved from lib/plugincache-config.php) diff --git a/lib/IniConfig.php b/lib/IniConfig.php index d4a1d2a6e..c1929e593 100644 --- a/lib/IniConfig.php +++ b/lib/IniConfig.php @@ -1,5 +1,5 @@ _dbi instead +// ... +// // Revision 1.56 2004/10/21 20:20:53 rurban // From patch #970004 "Double clic to edit" by pixels. // diff --git a/lib/Theme.php b/lib/Theme.php index 0df8dfcea..0a2e6ed77 100644 --- a/lib/Theme.php +++ b/lib/Theme.php @@ -1,4 +1,4 @@ -_themes_dir = NormalizeLocalFileName("themes"); $this->_path = defined('PHPWIKI_DIR') ? NormalizeLocalFileName("") : ""; $this->_theme = "themes/$theme_name"; - if (USE_DOUBLECLICKEDIT) // by pixels + if (ENABLE_DOUBLECLICKEDIT) // by pixels $this->initDoubleClickEdit(); if ($theme_name != 'default') @@ -1132,7 +1132,7 @@ class Theme { // Works only on action=browse. Patch #970004 by pixels // Usage: call $WikiTheme->initDoubleClickEdit() from theme init or - // define USE_DOUBLECLICKEDIT + // define ENABLE_DOUBLECLICKEDIT function initDoubleClickEdit() { $this->addMoreAttr('body', HTML::Raw(" ondblclick=\"url = document.URL; url2 = url; if (url.indexOf('?') != -1) url2 = url.slice(0, url.indexOf('?')); if ((url.indexOf('action') == -1) || (url.indexOf('action=browse') != -1)) document.location = url2 + '?action=edit';\"")); } @@ -1376,6 +1376,9 @@ function listAvailableLanguages() { } // $Log: not supported by cvs2svn $ +// Revision 1.111 2004/10/21 20:20:53 rurban +// From patch #970004 "Double clic to edit" by pixels. +// // Revision 1.110 2004/10/15 11:05:10 rurban // fix yesterdays premature dumphtml fix for $default_text (thanks John Shen) // -- 2.45.0