Commit Graph

198 Commits

Author SHA1 Message Date
Christopher Smith 1d82c8d343 Ensure language strings are reloaded for each unit test 2013-10-16 18:00:46 +01:00
Andreas Gohr 93a7873eb0 Merge remote-tracking branch 'janschumann/master' into future
This merge fixes all conflicts but is otherwise untested and might break
funktionality in the auth system somewhere. It NEEDS MAJOR TESTING!

Some refactoring of the auth plugins is still needed:

  * move to PHP5 style
  * fix comments
  * add plugin.info.txt

* janschumann/master:
  Refactored auth system: All auth methods are now introduced as plugins.
  Bugfix: auth types are now correcty added
  Setup auth system from plugins
  Added Auth-Plugin-Prototype to autoload
  Load auth types from plugins in settings_authtype class
  Added prototype for Auth-Plugins
  added plugin type 'auth'

Conflicts:
	inc/auth.php
	inc/auth/pgsql.class.php
	inc/init.php
	inc/load.php
	lib/plugins/auth.php
	lib/plugins/authad/auth.php
	lib/plugins/authldap/auth.php
	lib/plugins/authmysql/auth.php
	lib/plugins/authplain/auth.php
2012-10-06 10:46:10 +02:00
Andreas Gohr c114d4c4a0 don't call set_magic_quotes_runtime if it doesn't exists FS#2583
this function was removed in PHP 5.4.0
2012-08-26 13:25:29 +02:00
Michael Hamann 99e10b7f23 Always disable compression when sitemaps are delivered
The class loader isn't available at that place in inc/init.php so the
check if the sitemap is compressed didn't work.
2012-08-24 17:24:07 +02:00
Michael Hamann 65f6e7d681 Disable compression when a compressed sitemap might be delivered FS#2576
Compressing a gzip file again for transport is standards compliant, but
some clients assume that the file is only compressed once then and don't
remove the outer compression layer. This could disable compression in
too many cases theses cases should be rare and shouldn't cause any
problems.
2012-08-24 16:50:07 +02:00
Anika Henke c8839c220c changed all doctypes to html5 doctype 2012-07-14 12:10:08 +01:00
Andreas Gohr 3272d79733 some code cleanup and php docs 2012-06-25 19:03:02 +02:00
Andreas Gohr 89177306a2 Introducing a $_REQUEST/POST/GET wrapper
This new wrapper ensures types are correct and accessed parameters are
actually set (with custom default fallbacks).

The wrapper is available in the global $INPUT variable. It accesses
$_REQUEST by default. If POST or GET is required, the post and get
members can be used:

$INPUT->int('foo',false); // access $_REQUEST['foo'], default false
$INPUT->post->int('foo'); // access $_POST['foo'], default 0
$INPUT->get->int('foo'); // access $_GET['foo'], default 0

The codebase still needs to be updated to make use of this.
2012-06-24 14:00:49 +02:00
Anika Henke 7f086b678f improved earlier change for paths error messages to not produce any notices 2012-05-27 12:33:51 +01:00
Anika Henke 6b9c156c2d improved error message for savedir paths (FS#2502) 2012-05-27 11:51:32 +01:00
Dominik Eckelmann 3a6d76070b Merge branch 'master' of https://github.com/splitbrain/dokuwiki
Conflicts:
	lib/exe/xmlrpc.php
2012-03-14 12:52:36 +01:00
Andreas Gohr 9189204ab4 Merge branch 'jscachekey'
* jscachekey:
  trigger JS_CACHE_USE in lib/exe/js.php
  added INIT_LANG_LOAD event
  let js.php use multiple caches
2012-03-10 15:55:05 +01:00
Andreas Gohr c476695664 DOKU_TPL* considered harmful
Some plugins want to dynamically switch the template based on users,
namspaces or the phase of the moon. Having fixed paths in a unchangable
constant prevents this.

This changes deprecates the DOKU_TPL* constants in favor of two new
tpl_* functions that return the correct paths based on the $conf
variables which can be changed from the DOKUWIKI_STARTED event.
2012-01-30 20:38:41 +01:00
Dominik Eckelmann 6d06b26afa added INIT_LANG_LOAD event 2012-01-24 14:30:34 +01:00
Michael Hamann 4fcd684a8a Disable E_STRICT error reporting
This change disables the reporting of strict standard errors in PHP 5.4,
in PHP versions prior to 5.4 E_STRICT wasn't part of E_ALL so for
these versions this doesn't cause any change (however E_STRICT is
available in all versions of PHP 5 so this doesn't cause any problems).
See also FS#2427.
2012-01-15 11:37:12 +01:00
Jan Schumann eb274bf3ee added plugin type 'auth' 2012-01-02 21:35:09 +01:00
Dominik Eckelmann a4e0e797f6 enabled remote as plugintype 2011-11-19 14:40:11 +01:00
Kate Arzamastseva 47e84e7a97 merging 2011-08-25 15:01:15 +03:00
Dominik Eckelmann b546d86400 Merge pull request #19 from gbirke/master
Make cookie path configurable
2011-08-18 03:40:04 -07:00
Kate Arzamastseva e4f389ef17 media version saving 2011-05-26 14:23:33 +03:00
Piyush Mishra ac4be4d7b5 Minor: Edited the delta_time function for php5 2011-03-21 19:18:34 +05:30
Michael Hamann f77fc90de1 Merge branch 'master' into indexer_rewrite
Conflicts:
	inc/fulltext.php
	inc/indexer.php
	lib/exe/indexer.php
2011-02-24 23:27:24 +01:00
Roland Hager cca94fbcfc made config cascade more flexible 2011-02-06 19:57:44 +00:00
Michael Hamann fc756e0d4d Merge branch 'master' into indexer_improvements
Conflicts:
	inc/fulltext.php
	inc/indexer.php
	lib/exe/indexer.php
2011-01-23 20:33:32 +01:00
Michael Hamann 204b27c8e0 Fix getBaseURL for literal IPv6 addresses in URLs (RFC 2732) + test case 2011-01-16 22:43:34 +01:00
Gabriel Birke 73ab87de74 If cookiedir is configured, use it.
If $conf['cookiedir'] is set, use this setting instead of DOKU_REL.
2011-01-02 21:00:02 +01:00
Tom N Harris 9b41be2446 Indexer v3 Rewrite part two, update uses of indexer 2010-12-29 03:50:05 -05:00
Andreas Gohr 5627186c2f more robust hostname detection
as discussed in
http://www.freelists.org/post/dokuwiki/git-changes-20101209,7
2010-12-18 10:07:04 +01:00
Andreas Gohr 5ec3fefc5f handle mailfrom replacements in a central place FS#2091 2010-11-05 11:18:31 +01:00
Andreas Gohr 195b28c865 remove deprecated scriptify() mechanism 2010-10-18 22:07:31 +02:00
Andreas Gohr e6a6dbfe6c moved default config cascade to its own file 2010-06-27 14:53:42 +02:00
Andreas Gohr c8f80b4e70 Use config_cascade for ACLs and plain auth users FS#1677 2010-06-27 14:44:30 +02:00
Andreas Gohr 345b1674b6 create title.idx with the correct length FS#1978
The title.idx file needs to have exactly the same length as the
page.idx. This patch creates the file with the correct length if it
doesn't exist yet.

If you upgrade in between you need to delete your data/index/title.idx
file
2010-06-26 12:11:13 +02:00
Adrian Lang a0070b52bb Add title index to the indexer files, improve indexer calls 2010-06-16 16:16:05 +02:00
Michael Klier f198658907 moved plugincontroller and event handler creation to init.php 2010-03-26 11:43:35 +01:00
Adrian Lang c7cb395c4e Load libraries after init 2010-03-15 12:17:23 +01:00
Andreas Gohr c2a6d81662 plugin related autoloading
This patch moved the place where DOKU_PLUGIN is defined. It no longer
can be set from a normal config (only via preload)
2010-02-01 16:10:25 +01:00
Andreas Gohr 1690534421 first attempt to centralize all include loading
Classes are loaded throug PHP5's class autoloader, all other
includes are just loaded by default. This skips a lot of
require_once calls.

Parser and Plugin stuff isn't handled by the class loader yet.
2010-01-31 19:02:14 +01:00
Adrian Lang c66972f2cb Emit less E_NOTICEs and E_STRICTs
Changes of behaviour are:
  * Allow the user name, title & description \e2\80\9c0\e2\80\9d
  * Default to Port 443 if using HTTPS
  * Set $INFO['isadmin'] and $INFO['ismanager'] to \e2\80\9cfalse\e2\80\9d even if no user is
    logged in
  * Do not pass empty fragment field in the event data for event
    ACTION_SHOW_REDIRECT
  * Handle chunked encoding in HTTPClient

darcs-hash:20091104100115-e4919-5cf6397d4a457e3f98a8ca49fbdab03f2147721d.gz
2009-11-04 11:01:15 +01:00
Andreas Gohr 1f8eb24f4e Supress timezone warnings in PHP 5.3.0
Ignore-this: 3686859078d4a5e4af166eaec089268b

darcs-hash:20091103180625-7ad00-36d8e781f9a25095cf5efaad5efb16a6b8f95b1e.gz
2009-11-03 19:06:25 +01:00
Andreas Gohr db959ae307 Coding Standard Cleanup
Ignore-this: 259cb5773c3144c6c706d87298dcf674

darcs-hash:20091020212338-7ad00-6bf1c5c403491f136a1c02af5ecd9f84d7227107.gz
2009-10-20 23:23:38 +02:00
furun 47583ff042 Whitespace cleanup FS#1709
Ignore-this: 27ea52110bce929b2c61ed8faba67cfc

darcs-hash:20091016205526-c0bf4-35eba4e65d37980a667ba982f7f1ea5b7b07f01c.gz
2009-10-16 22:55:26 +02:00
Andreas Gohr 656c8fb3f2 Use the server port in DOKU_COOKIE when securecookie is defined FS#1664
Ignore-this: de9ef30fc53fbfc1caa74b55f97290a5

This should avoid problems on portbased virtual hosts.
This patch might log you out ;-)

darcs-hash:20090801222159-7ad00-808a91dd29af758ef10d7942888c2c22d8b8b888.gz
2009-08-02 00:21:59 +02:00
Andreas Gohr ccaeaa85e8 SECURITY: fix local file inclusion with register globals
Ignore-this: ce01faedc6c3d9370362b0e1e39ded36

This fixes a security hole when register_globals is enabled. An exploit is
in the wild: http://www.milw0rm.com/exploits/8781

darcs-hash:20090526145030-7ad00-c0483e021f47898c8597f3bfbdd26c637f891d86.gz
2009-05-26 16:50:30 +02:00
Andreas Gohr b9c4302b4c fixed fullpath() for certain Windows setups
Ignore-this: 7059284786889a3ead12f5a4b3873bdf

darcs-hash:20090205170449-7ad00-63f9459819a355abc7a154e07b487d8431097614.gz
2009-02-05 18:04:49 +01:00
Andreas Gohr 98bda4fdc7 fixed multiple gzip/sendfile problems in css and js dispatchers FS#1571
- Avoid double compression when gzip_output is enabled
- Only compress when gzip_output is enabled
- Do not use x-sendfile for compressed content (content-encoding is not supported)
- Make sure the script terminates after using x-sendfile
- Moved gzip browser support check to init.php

darcs-hash:20090122215010-7ad00-765765d353ff78df5b8704086328c5c699bbe7e0.gz
2009-01-22 22:50:10 +01:00
Chris Smith f8121585ae further updates to config_cascade patch
- add mediameta and license config files into the cascade
- update the cache validity code in cache.php, css.php & js.php to use config_cascade
- redo inclusion of main config files to avoid suppression of errors in config files
- add getConfigFiles($type) function
- minor updates elsewhere to use config_cascade rather than hardcoded config file names

darcs-hash:20090122114457-f07c6-98ad5627fd5df93edf8dd03289b9cf6d81962afe.gz
2009-01-22 12:44:57 +01:00
Chris Smith f0a201c570 add error suppression to iswin check to avoid notices when DOKU_UNITTEST_ASSUME_WINDOWS isn't set
darcs-hash:20090122081649-f07c6-e7744b1496e1a05ab089812fd7ca3716ecec2290.gz
2009-01-22 09:16:49 +01:00
Chris Smith e6266454ce include preload.php without error suppression (but after existence check)
darcs-hash:20090122080426-f07c6-c2e4cb107f9d07f333a9fe295f5df5bd9d3fb15f.gz
2009-01-22 09:04:26 +01:00
Chris Smith b303b92c45 Update for config cascade patch, fixes a couple of issues
darcs-hash:20090119050218-f07c6-8cb3615ee51fe81ef90b1e54675c359d84a2e57c.gz
2009-01-19 06:02:18 +01:00
Chris Smith cb043f52e8 Rework configuration loading to use a predefined file list or cascade
This change add the global $config_cascade which holds the list of files to be
read for each configuration setting group.  Dokuwiki adds in its configuration
file values after preload.php, giving preload.php to set its own configuration
cascade.

One side effect of the change is "local.protected.php" is part of the default
cascade, removing the need for it to be included at the bottom of local.php.

darcs-hash:20090118181204-f07c6-fea1c406da1bbdb0a52ab40914f11b835e797728.gz
2009-01-18 19:12:04 +01:00
michael 99c8d7f212 Media changelog added
There is a new media changelog now, with the flag RECENTS_MEDIA_CHANGES media changes can be requested from the getRecents()-function or the new getRecentsSince()-function, that returns all changes since a given timestamp and optionally before a given timestamp. The media upload and the XML-RPC-server have been changed to use these functions.

Additionally, the event MEDIA_UPLOAD_FINISH has been extended, it has a new $data-attribute (the 5th), that contains a boolean if the file does already exist and will be overwritten.

darcs-hash:20090118154345-074e0-5d9a90d269e86d8c6a156ecce5cf63115c827433.gz
2009-01-18 16:43:45 +01:00
Andreas Gohr 3dea4ebc5f moved no purg on referer code to the correct position
darcs-hash:20081212225011-7ad00-dbd829b7c617cc519735525522c3155df506cb2b.gz
2008-12-12 23:50:11 +01:00
Andreas Gohr b328697d6c don't check for file existance in fullpath() by default
In most (all) calls to fullpath() the existance of the resulting path is not
important or is checked externally, so checking inside fullpath() is a waste
of CPU cycles.

darcs-hash:20081213083355-7ad00-4987a85950a13e5d3c527b3b17b1092e0fa1c567.gz
2008-12-13 09:33:55 +01:00
Andreas Gohr 58e3a7bfa7 ignore purge command when HTTP referer is set
darcs-hash:20081212222614-7ad00-0b69e3b788b8ee3423cbbd9fb32868234ca679ca.gz
2008-12-12 23:26:14 +01:00
Andreas Gohr 066fee3089 Make license selectable from config FS#312
darcs-hash:20081012113150-7ad00-6408da058bdb6c923159d445e03b76f54b579362.gz
2008-10-12 13:31:50 +02:00
Andreas Gohr 14a122de54 keep undisplayed messages over redirects
When act_redirect is executed (post data was received and mode show is called)
all undisplayed messages (from calls to msg()) are saved in the session now.
These messages are then revived in inc/init.php. This makes sure no errors
that occured before the redirect are lost.

darcs-hash:20080929203831-7ad00-d0869fd3093f57c1ea64ccbaf05d7fd98f68c5e1.gz
2008-09-29 22:38:31 +02:00
Andreas Gohr 4761d30ceb rewrote the fullpath function FS#1462
The fullpath function now correctly handles windows drive letter paths and UNC
paths making sure that those are not destroyed with upper dir .. notation.

Unit tests where added.

darcs-hash:20080914134744-7ad00-9abf5931d910a0b12979b1f69b090e8ecd568c71.gz
2008-09-14 15:47:44 +02:00
Andreas Gohr f5c6743cf7 more cookie security FS#1490
This patch adds the httponly option to the PHP session cookies and DokuWiki's
auth cookie when supported by the PHP version.

It also adds a new config option 'securecookie' which is enabled by default.
It makes sure the browser will not sent a cookie set via HTTPS over a
non-secured connection. This option has to be disabled for wikis that only
protect the login with SSL but not the whole wiki.

darcs-hash:20080912224922-7ad00-d5275147ba9d17a9f6defa8a51ca720da74ba8a0.gz
2008-09-13 00:49:22 +02:00
Andreas Gohr de9104dd6c avoid warning on file_exists FS#1428
darcs-hash:20080912212311-7ad00-26249ceb7fb08a442888942072ef2dd8279ab3d2.gz
2008-09-12 23:23:11 +02:00
Andreas Gohr fc80ed598f avoid deprected warnings in php5.3 FS#1464
darcs-hash:20080824085653-7ad00-44925f90b286493b9b55d1ace59136a676786faf.gz
2008-08-24 10:56:53 +02:00
Andreas Gohr 48beefec86 support for an option inc/preload.php file
This patch readds the possibilities previously gained by the DOKUWIKI_INIT event
by adding support for including a file named inc/preload.php. When available, it
will be included before any defines for dokuwiki are set.

darcs-hash:20080627222629-7ad00-a663ded7ac08369f011e1f63e1c60fa81ec05b51.gz
2008-06-28 00:26:29 +02:00
Andreas Gohr a81c88022e DOKUWIKI_INIT patch rollback
darcs-hash:20080627214831-7ad00-d6eee0ddd406c972455871da75d04c5f5fc8a307.gz
2008-06-27 23:48:31 +02:00
Michael Klier 7ba4151174 added DOKUWIKI_INIT event
This patch adds a new event DOKUWIKI_INIT to the event system. The event is
	triggered in inc/init.php right after DOKU_INC has been defined and allows
	action plugins to interfere with DokuWiki s init process.

darcs-hash:20080622144154-23886-5153094bd78c2cea7f97e24c7b41cac6c641f49f.gz
2008-06-22 16:41:54 +02:00
ilya b934b85140 fix for UNC paths
This patch fixes use of UNC path in $conf['savedir'] and calling of /bin/ scripts.

darcs-hash:20080412124628-51399-9f85214fa4d787d5ad3a3b3c1ca655a29efc07e4.gz
2008-04-12 14:46:28 +02:00
Chris Smith 46c73e019a Update GetBaseURL() to avoid multiple consecutive slashes in absolute return values (incl. test cases)
darcs-hash:20080418101946-f07c6-615691fab5d4b5714134634b38567ca8422a0aa0.gz
2008-04-18 12:19:46 +02:00
Andreas Gohr 6deb5405c9 try to increase the PCRE backtrack limit
This should avoid problems with larger pages on newer PHP versions.
See http://www.freelists.org/archives/dokuwiki/04-2008/msg00049.html

darcs-hash:20080409181615-7ad00-de4f7a0602692b28e048d215c2e2b9657f96b81c.gz
2008-04-09 20:16:15 +02:00
Michael Klier de33a58fdd introducing the new tmp dir
darcs-hash:20080227215640-23886-606fc55ada5d6c3c80f14967746ec6aa0a4b3321.gz
2008-02-27 22:56:40 +01:00
Andreas Gohr e656dcd46a use strftime() instead of date() FS#1335 :!:
This patch replaces the use of the date() function with the strftime()
function. The latter will respect a set locale and will use localized
strings for things like month names.

Because the format options for strftime differ from the ones used in date,
DokuWiki will rest the value of $conf['dformat'] if it contains an old
date format string (detected by missing % characters).

Plugins or templates using the $conf['dformat'] need to be updated.

darcs-hash:20080223124045-7ad00-6afb2b839afc58781463e25577e06adb675fff79.gz
2008-02-23 13:40:45 +01:00
Andreas Gohr 8b11f0a58a Probably fixes cookie loss on https/http switch FS#1174
darcs-hash:20080124211231-7ad00-5d9f8e834be5d7d3abc772ad7c956455258dad59.gz
2008-01-24 22:12:31 +01:00
Andreas Gohr ef38bfe8bb fullpath fix for Windows
darcs-hash:20070930214958-7ad00-bc8ca26f86ea4c9e68ea2b8f3cacc2a598543122.gz
2007-09-30 23:49:58 +02:00
Andreas Gohr 009768124d don't use realpath() anymore (FS#1261 and others)
The use of realpath() to clean up relative file names caused some
trouble in certain setups relying on symlinks or having restricitve
file structure setups.

This patch replaces all realpath() calls with a PHP only replacement
which should solve those problems.

darcs-hash:20070930184250-7ad00-512ff04c95f57fc9eaf104f80372237a3c94286f.gz
2007-09-30 20:42:50 +02:00
Andreas Gohr 81c54349cd fix for magic quote fixing inside array keys
darcs-hash:20070819211952-7ad00-a1a321178ef3c5a85b2e422a01eda8066eb10588.gz
2007-08-19 23:19:52 +02:00
Andreas Gohr b8595a6604 separated TOC from page
This patch introduces a tpl_toc() function which can be used to freely place
the Table of Contents in a template. When used, tpl_content should be called
with a parameter of false to supress the automatic TOC placement.

Note: if tpl_toc() us run *before* tpl_content(), TOCs will not work in the
preview. A work around is to run tpl_content() in a output buffer first.

This patch also adds a getTOC() function for admin plugins which allows plugin
authors to put create their own TOC which will be placed correctly in the
template. A convenience function html_mktocitem() is available.

The config manager was adjusted to make ue of this new feature, but some bugs
might remain.

darcs-hash:20070805132405-7ad00-77d2c3cdf66cc62b2d408cc6580f938636a109af.gz
2007-08-05 15:24:05 +02:00
Andreas Gohr 4b1a4e046d never use full URL in cookie paths FS#1146
Introduces a DOKU_REL constant always pointing to the DokuWiki directory regardless
of the used canonical setting.

darcs-hash:20070603191451-7ad00-a5227a3632b3337f5da90551d3166d9b5db56638.gz
2007-06-03 21:14:51 +02:00
Andreas Gohr 8a447e5c94 typo fix in compression method check FS#919
darcs-hash:20070514165529-7ad00-bf2cd39a2e34b03aa8d10dd8ca943b0b27127e79.gz
2007-05-14 18:55:29 +02:00
Andreas Gohr d7e6bba9c0 disable any possibly configured global zlib compression FS#1132
darcs-hash:20070514164557-7ad00-7a40f60658af5e626698b4a262f5e70168c5c896.gz
2007-05-14 18:45:57 +02:00
Andreas Gohr a1637ffdf2 rebuild $_REQUEST manually to avoid cookie interference FS#1104
darcs-hash:20070513181524-7ad00-20cb0328fc1b2881120d825f74ec032a5171f782.gz
2007-05-13 20:15:24 +02:00
Guy Brand 1983acc205 Typo in default nice_die message
darcs-hash:20070424211611-19e2d-ae76695e8114a064b5cebc2cad6fd55e7030e096.gz
2007-04-24 23:16:11 +02:00
Andreas Gohr f77429b85e set scope for session cookies FS#1109
darcs-hash:20070326180948-7ad00-c35eeabfe0d77e9decfd4fc6d776eaaa72be219c.gz
2007-03-26 20:09:48 +02:00
Mike Frysinger 3a3e1c5fc9 make setup error a little more verbose
if a subdir is not setup properly, then init_paths() in inc/init.php will use
the pretty name ("datadir" instead of "pages"; "olddir" instead of "attic").
attached patch simply includes the actual directory name in the output so
people dont have to look it up in the source
code.

darcs-hash:20061211194244-5224c-2d22eeb08d770108d1d993783e95d11bef0e8855.gz
2006-12-11 20:42:44 +01:00
chris 0a7e3bce2e metadata update to support both persistent and non-persistent metadata
Key changes:
- metadata stored on disk in two arrays, 'current' & 'persistent'
- p_set_metadata has an additional parameter, $persistent, which defaults to true
- metadata set within the renderer defaults to non-persistent
- new event hook, PARSER_METADATA_RENDER, which wraps around metadata rendering process. For
  full details of this event refer to the event list documentation at splitbrain.

The patch includes automatic conversion of metadata in current form to the new format

For more details also see http://www.freelists.org/archives/dokuwiki/11-2006/msg00221.html
and any follow-up messages.

darcs-hash:20061126152144-9b6ab-a4e40c221e0274b13da07dc2fc1d2100f5f3a50e.gz
2006-11-26 16:21:44 +01:00
TNHarris 579b0f7e8d Word-Length Indexer
A modification to the indexer that sorts words based on length. This should make
searching a little bit more efficient. After the patch is applied, your old index
will be automatically converted to the new format (when you visit a page). The
new index format is:

1. Index files are stored in savedir/index
2. Word lists are stored as wlen.idx. This used to be word.idx.
3. Word indexes are stored as ilen.idx. This used to be index.idx.
4. The page list, page.idx, is simply copied to the new location.

Any plugins you have, such as the blog plugin, that read the index files need to
be updated.

darcs-hash:20061112194900-2b9f0-a975498ccf0a1d39c6df73b79bcd028d5e81c389.gz
2006-11-12 20:49:00 +01:00
Andreas Gohr e71ce681bd use DOKU_URL as key for sessions and auth cookie #896 #581 #884
This patch changes the DOKU_COOKIE define to be based on the DOKU_URL define.
DOKU_COOKIE is now used as session key as well, making sessions no longer
dependend on the title option. This should fix problems with multiple
wikis on the same host (using the same title) and wikis accessed through
different URLs.

darcs-hash:20061003121546-7ad00-aea4c256b7752815ed422ce74a659152a601d267.gz
2006-10-03 14:15:46 +02:00
chris bb4866bd74 minor bugfix and boring error removal
darcs-hash:20060923203609-9b6ab-ecca679faa254a29772868508050fcf3206b0814.gz
2006-09-23 22:36:09 +02:00
chris a424cd8e52 add authname memory cache
actions which concern multiple pages (e.g. search, backlinks, recents)
end up repeatedly encoding the current user's name and groups. This
change caches the results of the encoding allowing them to be reused.

darcs-hash:20060923161206-9b6ab-a3ec8f1c2ec284d84b9ff85cba1e56165b2967a7.gz
2006-09-23 18:12:06 +02:00
Ben Coburn d818621633 suppress boring errors
Suppress any errors from set_time_limit,
unlink, and file_exists functions.
see: http://www.freelists.org/archives/dokuwiki/09-2006/msg00004.html

darcs-hash:20060908193433-05dcb-013617431870ab5bfb2ce8c6e99ba5af13493228.gz
2006-09-08 21:34:33 +02:00
Andreas Gohr bc3e97beca conflict resolution for memory cache init
darcs-hash:20060830210459-7ad00-8f7a2ae826d5f893d3e48f41c8ae868987ec0dd2.gz
2006-08-30 23:04:59 +02:00
Ben Coburn 71726d7801 scalable changelog redesign
This patch provides a rewritten changelog system that is designed to run
efficiently on both small and large wikis. The patch includes a plugin to
convert changelogs from the current format. The conversion is
non-destructive and happens automatically. For more information on the new
changelog format see "http://wiki.splitbrain.org/wiki:changelog".

Structure
In short the changelog is now stored in per-page changelog files, with a
recent changes cache. The recent changes cache is kept in
"/data/meta/_dokuwiki.changes" and trimmed daily. The per-page changelogs
are kept in "/data/meta/<ns>/<page_id>.changes" files. To preserve
revision information for revisions stored in the attic, the "*.changes"
files are not removed when their page is deleted. This allows the full
life-cycle of page creation, deletion, and reversion to be tracked.

Format
The changelog line format now uses a general "line type" field in place of
the special "minor" change syntax. There is also an extra field that can
be used to store arbitrary data associated with special line types. The
reverted line type (R) is a good example. There the extra field holds the
revision date used as the source for reverting the page. See the wiki for
the complete syntax description.

Code Notes
The changelog functions have been rewritten to load the whole file only if
it is small. For larger files, the function loads only the relevant
chunk(s). Parsed changelog lines are cached in memory to speed future
function calls.

getRevisionInfo
A binary search is used to locate the chunk expected to contain the
requested revision. The whole chunk is parsed, and adjacent lines are
optimistically cached to speed consecutive calls.

getRevisions
Reads the changelog file backwards (newest first) in chunks until the
requested number of lines have been read. Parsed changelog lines are
cached for subsequent calls to getRevisionInfo. Because revisions are read
from the changelog they are no longer guaranteed to exist in the attic.

(Note: Even with lines of arbitrary length getRevisionInfo and
getRevisions never split changelog lines while reading. This is done by
sliding the "file pointer" forward to the end of a line after each blind
seek.)

isMinor
Removed. To detect a minor edit check the type as follows:
$parsed_logline['type']

darcs-hash:20060830182753-05dcb-1c5ea17f581197a33732a8d11da223d809c03506.gz
2006-08-30 20:27:53 +02:00
chris 19a3223378 further update to global memory cache arrays
- remove initialisation of caches in inc/pageutils.php
- add global declaration to init.php to support init.php
  being included from within a function, e.g. unit testing

  ;-)

- minor change to utf8_substr, remove non-essential brackets
  added as part of an earlier patch

darcs-hash:20060829134806-9b6ab-ab15191344a83be664c412403dc84a24fa2253a2.gz
2006-08-29 15:48:06 +02:00
Ben Coburn 50602150cd init global memory cache arrays
Update to 'add function result caching for cleanID and wikiFN'.
Makes certain that arrays exist for the caches, without checking on each function call.
Properly create multidimensional arrays in wikiFN().

darcs-hash:20060828071205-05dcb-7c8dbdb5ea4e7b73808ec3bd9222df1b837d3a1f.gz
2006-08-28 09:12:05 +02:00
Andreas Gohr fe8934905b typo fix for compression check
darcs-hash:20060825174755-7ad00-e67f267dd1552ba22b01662de6dbb84faf33e5f8.gz
2006-08-25 19:47:55 +02:00
Andreas Gohr 501252a5b9 compression fallback
This updates the availability check of the choosen compression method. If bzip2
is configured but not available it falls back to gzip if available.

darcs-hash:20060825144739-7ad00-9f7ce54fd1dbf0d7a8272393e9bc02d862b28fff.gz
2006-08-25 16:47:39 +02:00
chris 03c4aec3c8 unittest fixes
darcs-hash:20060804142243-9b6ab-d208f7f1a67a9958fda05c519c8407ad5e733cea.gz
2006-08-04 16:22:43 +02:00
Andreas Gohr 69dc3177b0 init_paths points to the installer now
darcs-hash:20060729144035-7ad00-41ec3091bfda9bded254bd5a1ca7d3a4003a0116.gz
2006-07-29 16:40:35 +02:00
Ben Coburn bad905f13d error reporting E_ALL switch
- Adds a constant DOKU_E_LEVEL for globally overriding the error reporting level.
  - Adds a file based switch for enabling E_ALL errors without changing the code.

This is convenient for developers debugging new patches. It also ensures that
the new patch will not accidentally record manual changes to the error reporting
level. To enable E_ALL errors globally, create the file 'conf/report_e_all'.

darcs-hash:20060707232525-05dcb-0f24e53783f546a83268fe40b0d8b68f4d6ccfa6.gz
2006-07-08 01:25:25 +02:00
Michael Klier chi@chimeric.de 488d5fa0e2 enhanced getBaseURL()
darcs-hash:20060529154201-484ab-42382d9bd2bac83f84226209027001ca1f6deff0.gz
2006-05-29 17:42:01 +02:00
Andreas Gohr 3138b5c760 moved gzip compression to init.php
darcs-hash:20060519212751-7ad00-ace54b61706fdf4f1b7c2abdbabee215a1e256ab.gz
2006-05-19 23:27:51 +02:00
Andreas Gohr 3aee4c2781 changed all occurances of rename() to io_rename()
darcs-hash:20060507101333-7ad00-e687d797fbee26e0b0bc7741ff8a1af496c101bf.gz
2006-05-07 12:13:33 +02:00
Ben Coburn a609a9cc30 show page generation time
darcs-hash:20060324032426-05dcb-cca609254cfef5b583510b86904f1656dea98fc7.gz
2006-03-24 04:24:26 +01:00