summaryrefslogtreecommitdiff
path: root/inc/common.php
Commit message (Collapse)AuthorAge
* updatecheck featureAndreas Gohr2006-09-16
| | | | | | | | | | | | | | | | | This patch adds a feature to let DokuWiki automatically check if updates are available or any other important messages (like security warnings) and then display this info to the admin user. DokuWiki will contact the URL http://www.splitbrain.org/lib/exe/msg.php with a parameter telling it which messages it already know (read from conf/msg) - the server side script then will return all new messages. The messages will be displayed until DokuWiki was upgraded or conf/msg was updated manually. Messages are cached and only checked once a day. The messenger URL will probably change before the next release. darcs-hash:20060916210229-7ad00-7ac592650e171ae4144b0eb47a751a4ca480f031.gz
* better getVersion when working on a darcs treeAndreas Gohr2006-09-16
| | | | | | | | getVersion tries to find the date of the latest applied patch from _darcs/inventory - this patch makes it only read the last 2000 byte of the file instead of loading the whole file. darcs-hash:20060916182955-7ad00-5a38de1ae4f1a206a8f62cc88551d4f0bc35340e.gz
* TPL_METAHEADER_PRINT event hook addedAndreas Gohr2006-09-16
| | | | | | | | | | This patch changes the tpl_metaheaders function to emit an event to intercept the creation of HTML metadata. The usually generated meta headers are passed in an array structure for easy modification and enhancement. darcs-hash:20060916154722-7ad00-b22ab79803d1abad4ca579b84b6a3fa466403619.gz
* fix for previous pagetemplate event patchAndreas Gohr2006-09-16
| | | | | | Sorry, did mess up in testing the last patch. darcs-hash:20060916000515-7ad00-3874991f9121ac80b2b3b66d4f5ac166702df1d1.gz
* reorganize changelog codeBen Coburn2006-09-11
| | | | | | | Moves changelog code to 'inc/changelog.php' and includes it from 'inc/common.php'. darcs-hash:20060911023822-05dcb-e727737011163cbf04f0a4c682cb9fd8a985e597.gz
* changelog redesign updateBen Coburn2006-09-11
| | | | | | | | | | | - Improves handling of deleted revisions. - Import plugin disables after import. - Check act reports if plugin is still enabled after the import. - Import correctly handles summaries without the minor prefix. - Newlines and tabs are now striped out of type, sum, and extra in the changelog. darcs-hash:20060911014738-05dcb-2f6c9fdffb6346f7d3190610a72b290090b28097.gz
* suppress boring errorsBen Coburn2006-09-08
| | | | | | | | 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
* clientIP() update + additional unit testchris2006-09-08
| | | | darcs-hash:20060908124315-9b6ab-7e4146e1068ab08d5539a7c573502d8373a0e524.gz
* clientIP() update, data cleaning improvementschris2006-09-08
| | | | | | | | | as per recent security warning, clientIP() could return other arbitrary data along with an IP address. This fix ensures only IP addresses can be returned by this function. darcs-hash:20060908122744-9b6ab-8c90ca361b038a47b65f3f3dbf7228ae569f8c08.gz
* scalable changelog redesignBen Coburn2006-08-30
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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
* bug #876, additional data for new user notification emailchris2006-08-22
| | | | | | | This patch updates only the english version of the localised "registermail.txt" file. Other versions need to be updated also. darcs-hash:20060822072444-9b6ab-ff6cb5bc78277c383e82c3986eeb16168e86c27b.gz
* Added bz2 compression support for Atticmarcel2006-08-23
| | | | darcs-hash:20060823211149-9c1ae-569f295c33dc798a429a373f48cb09122334ea29.gz
* bugfix for getRevisionsAndreas Gohr2006-07-11
| | | | | | | This fixes a bug where the list of old revisions isn't build correctly if pagename exists within another one. darcs-hash:20060711191433-7ad00-d8d2a1f072e5874f63a5d82c905920a496d4212a.gz
* IO action eventsBen Coburn2006-07-05
| | | | | | | | | | | | | | | | | | | | | | | | | Adds page and namespace events: IO_WIKIPAGE_READ IO_WIKIPAGE_WRITE IO_NAMESPACE_CREATED IO_NAMESPACE_DELETED The namespace events are purely advisory, while the wikipage events allow page content to be modified between DokuWiki and the disk. These events are primarily intended to simplify keeping other tools in sync with the semantic structure of a DokuWiki site. As an added benefit, the events allow plugins to conduct automated processing of raw wiki page content. The namespace events cover the separate namespace trees for both pages and media. The "name" of the tree that the event belongs to is included in the event data. darcs-hash:20060705105652-05dcb-f44024e852a2adf1a14b8a7d69c46db067e72307.gz
* refactor wiki page edit lockingBen Coburn2006-07-05
| | | | | | | | | | | | | | - Adds a new function in 'inc/pageutils.php', wikiLockFN($id) - All page edit locks should now be created with the file name generated by wikiLockFN($id). - wikiLockFN - Generates wiki page editing locks in the 'data/locks' directory where they belong. - This avoids polluting the 'data/pages' directory with lock files, which were causing namespaces to be created before they logically should exist. darcs-hash:20060705033135-05dcb-8eac316587cd54c6ebd861fe7b15975d90b0e4dc.gz
* aspell fix #836Andreas Gohr2006-06-16
| | | | darcs-hash:20060616154906-7ad00-6ace887070a70fda5f898f241aebb639230b53d8.gz
* register notify #826Sebastian Harl2006-06-15
| | | | | | | A small patch for dokuwiki which enables dokuwiki to notify the administrator about new user registrations darcs-hash:20060615194419-022eb-51630aff3c6d93abc656742fc0bc723b93f97734.gz
* fix php warning in common.php during getRevisionschris2006-06-01
| | | | | | | | A php warning can occur when the page name used in a revision check clashes with a namespace (sub-directory) in the same directory. The strpos() call generates the warning as the offset used is longer than the directory name. darcs-hash:20060601212928-9b6ab-2d9399ba71fbfcae6e797977476e2f5daa50cf7f.gz
* getRevisionInfo much faster (cached)Ben Coburn2006-05-25
| | | | | | | | | | | | Makes getRevisionInfo much faster when loading all the revisions of a page. This is done by efficiently parsing the 'changes.log' data and caching the results (in memory) so that future calls to getRevisionInfo return immediately without reloading the 'changes.log' file. (Note: the changelog system in DokuWiki should still be rewritten so that changes are not logged into one huge file!) darcs-hash:20060525083202-05dcb-8c0eea695055b51a218a0e311169cda0bb0d4363.gz
* makes getRevisions fasterBen Coburn2006-05-25
| | | | | | | Makes inc/common.php#getRevisions a little faster. Takes about half as much time as the preg_match. darcs-hash:20060525030452-05dcb-dbff9f9c134a425669ff6a477612737b022fb6bd.gz
* new metadata renderer; functions p_get_metadata() and p_set_metadata()Esther Brunner2006-04-15
| | | | darcs-hash:20060415104627-283c4-c7d35620fc9dbc21b8a47089692b76d35a9f9ca8.gz
* magpie files removedAndreas Gohr2006-04-14
| | | | darcs-hash:20060414110517-7ad00-a942f845647f301255365b162a22826cd9a983f6.gz
* small fix for getRevisionInfoYann2006-04-10
| | | | darcs-hash:20060410190409-919ab-f77447b1cb1b8de6e2a5790519d4aafc7baa577b.gz
* rewrite export URLsBen Coburn2006-04-05
| | | | | | | | | | | | | | | | | | | This patch rewrites export urls so that robots.txt can be used to request that some (or all) export types are ignored by robots when indexing the wiki. For example: User-agent: * Disallow: _export/ or for example: User-agent: * Disallow: _export/raw/ Note: This rewriting is only done when $conf['userewrite'] is set to '1' for using the rewrite rules from '.htaccess.dist'. darcs-hash:20060405025621-05dcb-b1b5f48681f78d75d25b1e75fab79346fcc8b84e.gz
* move hsc() & ptln() functions from template.php to common.phpchris2006-04-03
| | | | darcs-hash:20060403202815-9b6ab-1b499148333458ee8acb68b5e38ca72d3b1c9b3c.gz
* dichotomic search for getRevisionInfoYann2006-03-17
| | | | darcs-hash:20060317175725-919ab-396129b63c7077477c6d7bad1d7244bd7f0770cd.gz
* Automatic draft savingAndreas Gohr2006-03-11
| | | | | | | | DokuWiki now automatically creates a draft file of the currently edited page. In case of an editing interuption (eg. Browsercrash) the draftfile can be continued later. darcs-hash:20060311200148-7ad00-919337a51e001136178d175a1755cd26122e9726.gz
* enhanced clientIP() functionAndreas Gohr2006-03-11
| | | | | | | | The function now can optinally return a single IP address and tries to be clever about which one to choose if multiple were supplied through X-Forwarded-For headers darcs-hash:20060311185752-7ad00-085bbed7eeffcff0be8f45417d73c13b733c4332.gz
* Postgres backend for new OO authAndreas Gohr2006-03-01
| | | | darcs-hash:20060301223021-7ad00-868d32088de468523c63c4cc7e44869331dfc4b9.gz
* unlock a page directly after deletionAndreas Gohr2006-02-28
| | | | | | This should fix a problem making sweepNS() never work darcs-hash:20060228204811-7ad00-79cca976993d8fa662b94fe683b898985d0dc774.gz
* Fix umask bug and do a code cleanup of chmod/mkdir usage so set the correct ↵Troels Liebe Bentsen2006-02-24
| | | | | | | | | | | permissions, this should also fix problems with dokuwiki making setuid files on some umasks. * Don't set the umask() anymore, this is not good form and we don't really know what is it in the old code anyway as it was not done properly. * Retire the dmask config option introduce 2 new ones called fmode and dmode, this is more in line with posix and should make more sense. * Use chmod for setting the correct permissions but only if it's needed. * Set changing of permissions off by default as i should work properly in most Apache setups without and it does not make sense on windows anyway. darcs-hash:20060224211655-ee6b9-68f7bb59417d6f0033cfd3764146923daa4dcf1b.gz
* mor conservative chunksize for wordblock patternsizeAndreas Gohr2006-02-19
| | | | darcs-hash:20060218232226-7ad00-2835d47a97fb12a04055b8145de26c8406f78a99.gz
* update wl,ml,buildURLParams with optional separator string, update config ↵chris2006-01-31
| | | | | | plugin redirect with new wl(), add meta & lang details for $conf['resendpasswd'] darcs-hash:20060130232818-9b6ab-2f395bc25c536b06bb5ade616a8252060ecb5278.gz
* oo auth update - remove legacy auth remnants, add auth->canDochris2006-01-25
| | | | darcs-hash:20060125000125-9b6ab-9853f11e04d8ea93235317fa8137cef079eb2641.gz
* adds support for wordblock.local.confchris2006-01-22
| | | | darcs-hash:20060122011249-9b6ab-fdd9188322e1dc4441562a905ac481f66b703db2.gz
* urlencode -> rawurlencode (related to #685)Andreas Gohr2006-01-21
| | | | | | | | This changes nearly all occurences of urlencode to rawurlencode. The latter encodes spaces as %20 while the former uses a + sign. For the use in browser URLs %20 is the correct form. darcs-hash:20060121192747-7ad00-6563b77368a41f071609495c6a145982938a8301.gz
* Small patch to recent changes listWolfgang Ocker2006-01-09
| | | | | | | In the "recent changes" list I've seen some artefacts. This patch fixes them. darcs-hash:20060109211929-6ddad-2f467e426b661fb978160c0bfd419abd50537931.gz
* fix for wrong include path #651Andreas Gohr2005-12-03
| | | | darcs-hash:20051203131815-7ad00-b45dfcae203764658deb80e0b18b9ddc0cfba37b.gz
* hidepages configoptionAndreas Gohr2005-11-03
| | | | | | | | | | | | | This new option accepts a RegExp to filter certain pages from all automatic listings (RSS, recent changes, search results, index). This is useful to exclude certain pages like the ones used in the sitebar templates. The regexp is matched against the full page ID with a leading colon. If it matches the page is assumed to be a hidden one. IMPORTANT: this is not related to ACL. A hidden page is still visible to all users (if not restricted by ACL) when linked or called directly. darcs-hash:20051103101726-6e07b-8d45912a1b4f6cfc9e3fce147c15f84a58ea7ca2.gz
* fixed darcs patchset guessing in version checkAndreas Gohr2005-10-27
| | | | darcs-hash:20051027183521-7ad00-08b33c7960975925fdb001476bd14124e9ff3f51.gz
* option for disabling debug outputAndreas Gohr2005-10-27
| | | | darcs-hash:20051027183410-7ad00-5ca48cf2d4058016f5cf07887d9eaa7b07a4043f.gz
* use REMOTE_USER for username if nothing else available #587Andreas Gohr2005-10-22
| | | | darcs-hash:20051022100740-7ad00-29869f9ced046d42d4f0a2fc484d37b85801108f.gz
* no subscribermails for minor editsAndreas Gohr2005-10-02
| | | | darcs-hash:20051002125342-7ad00-42c9155d81a7799f24ec02f6aac210d2ea818e51.gz
* minor edit checkboxAndreas Gohr2005-10-02
| | | | | | | | | This patch adds a minor edit checkbox to the edit form for logged in users. Minor edits are displayed different in recent changes and the page revision history. The RSS feed excludes minor edits by default - this can be changed by adding a minor darcs-hash:20051002113255-7ad00-2bc9e1aaa76d9616428e760529ecc14ef119cf71.gz
* SECURITY FIX: acl check in _getRecents addedAndreas Gohr2005-09-25
| | | | | | | ACLs weren't checked in the new getRecent function. Recent Changes and the RSS/ATOM feeds displayed all changes regardless of user permissions. darcs-hash:20050925095612-7ad00-5885e6616a4214eb99662eac08267b0a6f527625.gz
* more efficient changelog reading for recent changesAndreas Gohr2005-09-18
| | | | | | | | | | | getRecents now reads the changelog backwards in 4KB chunks instead of loading the whole file into an array and rsort it. This should be more memory efficient (and probably faster) for large change logs. Note: the format of the array returned by getRecents changed slightly plugins relying on it need to be adjusted. Sorry. darcs-hash:20050918121008-7ad00-1fdba47d29b0c038c6e4e4edc1d4c93e5ba769e9.gz
* fix for pageinfo() - remove redundant lineschris2005-09-14
| | | | darcs-hash:20050914115601-50fdc-936861fc195a76cb65a20ea9ccd2fca482cfc169.gz
* always read VERSION from DOKU_INCAndreas Gohr2005-09-12
| | | | darcs-hash:20050911221041-7ad00-0e40a42e73cc32813f315f84565749d61b604a7d.gz
* function obfuscate($email) moved to common.php; used in parser and some pluginsEsther Brunner2005-09-02
| | | | darcs-hash:20050902150527-283c4-dae58038c70aacb000f535e8173fa263ba774f52.gz
* exclude subnamespaces from recents: added optional fifth parameterEsther Brunner2005-09-01
| | | | darcs-hash:20050901130231-283c4-fd31cb63033acaf11787d965b285fbfeb36f2a84.gz