summaryrefslogtreecommitdiff
path: root/docs
diff options
context:
space:
mode:
Diffstat (limited to 'docs')
-rw-r--r--docs/database.txt10
-rw-r--r--docs/deferred.txt8
-rw-r--r--docs/design.txt19
-rw-r--r--docs/hooks.txt61
-rw-r--r--docs/memcached.txt10
-rw-r--r--docs/title.txt15
6 files changed, 97 insertions, 26 deletions
diff --git a/docs/database.txt b/docs/database.txt
index 25dce8b7..80044734 100644
--- a/docs/database.txt
+++ b/docs/database.txt
@@ -7,7 +7,7 @@ By Tim Starling, January 2006.
For information about the MediaWiki database layout, such as a
description of the tables and their contents, please see:
- http://meta.wikimedia.org/wiki/Help:Database_layout
+ http://www.mediawiki.org/wiki/Manual:Database_layout
http://svn.wikimedia.org/viewvc/mediawiki/trunk/phase3/maintenance/tables.sql?view=markup
@@ -17,7 +17,7 @@ description of the tables and their contents, please see:
To make a read query, something like this usually suffices:
-$dbr =& wfGetDB( DB_SLAVE );
+$dbr = wfGetDB( DB_SLAVE );
$res = $dbr->select( /* ...see docs... */ );
while ( $row = $dbr->fetchObject( $res ) ) {
...
@@ -28,7 +28,7 @@ Note the assignment operator in the while condition.
For a write query, use something like:
-$dbw =& wfGetDB( DB_MASTER );
+$dbw = wfGetDB( DB_MASTER );
$dbw->insert( /* ...see docs... */ );
We use the convention $dbr for read and $dbw for write to help you keep
@@ -103,7 +103,7 @@ regularly lag by several minutes, making review of recent edits
difficult.
In addition to this, MediaWiki attempts to ensure that the user sees
-events occuring on the wiki in chronological order. A few seconds of lag
+events occurring on the wiki in chronological order. A few seconds of lag
can be tolerated, as long as the user sees a consistent picture from
subsequent requests. This is done by saving the master binlog position
in the session, and then at the start of each request, waiting for the
@@ -157,7 +157,7 @@ Often this approach is not good enough, and it becomes necessary to
enclose small groups of queries in their own transaction. Use the
following syntax:
-$dbw =& wfGetDB( DB_MASTER );
+$dbw = wfGetDB( DB_MASTER );
$dbw->immediateBegin();
/* Do queries */
$dbw->immediateCommit();
diff --git a/docs/deferred.txt b/docs/deferred.txt
index 445eb0e4..06155c56 100644
--- a/docs/deferred.txt
+++ b/docs/deferred.txt
@@ -17,3 +17,11 @@ smart like collating updates to the same table or such because
the list is almost always going to have just one item on it, if
that, so it's not worth the trouble.
+
+Since 1.6 there is a 'job queue' in the jobs table, which is used
+to update link tables of transcluding pages after edits; this
+may be extended in the future to more general background tasks.
+
+Job queue items are fetched out of the queue and run either
+at a random rate during regular page views (by default) or by
+a batch process which can be run via maintenance/runJobs.php.
diff --git a/docs/design.txt b/docs/design.txt
index 5fff9fd0..8f24d0d8 100644
--- a/docs/design.txt
+++ b/docs/design.txt
@@ -1,5 +1,8 @@
This is a brief overview of the new design.
+More thorough and up-to-date information is available on the documentation
+wiki at http://www.mediawiki.org/
+
Primary source files/objects:
index.php
@@ -42,10 +45,15 @@ Primary source files/objects:
don't involve their text, such as access rights.
Article
- Encapsulates access to the "cur" table of the database. The
+ Encapsulates access to the "page" table of the database. The
object represents a an article, and maintains state such as
text (in Wikitext format), flags, etc.
+ Revision
+ Encapsulates individual page revision data and access to the
+ revision/text/blobs storage system. Higher-level code should
+ never touch text storage directly; this class mediates it.
+
Skin
Encapsulates a "look and feel" for the wiki. All of the
functions that render HTML, and make choices about how to
@@ -117,12 +125,3 @@ Naming/coding conventions:
of session variables are wsName, cookies wcName, and form field
values wpName ("p" for "POST").
- - Be kind to your release manager and don't use CVS keywords (Id,
- Revision, etc.) to mark file versions. They make merging code
- between different branches a pain for CVS, and are kind of sketchy
- for versions after that. (Yes, you can use the '-kk' flag so that
- merges ignore keywords, but that messes up binary files. See
- https://www.cvshome.org/docs/manual/cvs-1.11.18/cvs_5.html#SEC64).
-
-
-
diff --git a/docs/hooks.txt b/docs/hooks.txt
index d5a17660..9f5d289f 100644
--- a/docs/hooks.txt
+++ b/docs/hooks.txt
@@ -286,6 +286,11 @@ $isminor: minor flag
$iswatch: watch flag
$section: section #
+'ArticleUndeleted': When one or more revisions of an article are restored
+$title: Title corresponding to the article restored
+$create: Whether or not the restoration caused the page to be created
+(i.e. it didn't exist before)
+
'AuthPluginSetup': update or replace authentication plugin object ($wgAuth)
Gives a chance for an extension to set it programattically to a variable class.
&$auth: the $wgAuth object, probably a stub
@@ -308,6 +313,18 @@ $user: the user _doing_ the block (not the one being blocked)
$block: the Block object that was saved
$user: the user who did the block (not the one being blocked)
+'BookInformation': Before information output on Special:Booksources
+$isbn: ISBN to show information for
+$output: OutputPage object in use
+
+'CustomEditor': When invoking the page editor
+$article: Article being edited
+$user: User performing the edit
+
+Return true to allow the normal editor to be used, or false
+if implementing a custom editor, e.g. for a special namespace,
+etc.
+
'DiffViewHeader': called before diff display
$diff: DifferenceEngine object that's calling
$oldRev: Revision object of the "old" revision (may be null/invalid)
@@ -321,6 +338,11 @@ saved, that is before insertNewArticle() is called
&$text: Text to preload with
&$title: Title object representing the page being created
+'EditPage::showEditForm:fields': allows injection of form field into edit form
+&$editor: the EditPage instance for reference
+&$out: an OutputPage instance to write to
+return value is ignored (should always return true)
+
'EditFilter': Perform checks on an edit
$editor: Edit form (see includes/EditPage.php)
$text: Contents of the edit box
@@ -356,6 +378,9 @@ $text: text of the mail
&$list: List object (defaults to NULL, change it to an object instance and return
false override the list derivative used)
+'FileUpload': When a file upload occurs
+$file : Image object representing the file that was uploaded
+
'GetInternalURL': modify fully-qualified URLs used for squid cache purging
$title: Title object of page
$url: string value as output (out parameter, can modify)
@@ -371,6 +396,12 @@ $title: Title object of page
$url: string value as output (out parameter, can modify)
$query: query options passed to Title::getFullURL()
+'InternalParseBeforeLinks': during Parser's internalParse method before links but
+after noinclude/includeonly/onlyinclude and other processing.
+&$this: Parser object
+&$text: string containing partially parsed text
+&$this->mStripState: Parser's internal StripState object
+
'LogPageValidTypes': action being logged. DEPRECATED: Use $wgLogTypes
&$type: array of strings
@@ -405,11 +436,23 @@ the resulting HTML is about to be displayed.
$parserOutput: the parserOutput (object) that corresponds to the page
$text: the text that will be displayed, in HTML (string)
+'PageHistoryBeforeList': When a history page list is about to be constructed.
+$article: the article that the history is loading for
+
+'PageHistoryLineEnding' : right before the end <li> is added to a history line
+$row: the revision row for this line
+$s: the string representing this parsed line
+
'PageRenderingHash': alter the parser cache option hash key
A parser extension which depends on user options should install
this hook and append its values to the key.
$hash: reference to a hash key string which can be modified
+'ParserTestTables': alter the list of tables to duplicate when parser tests
+are run. Use when page save hooks require the presence of custom tables
+to ensure that tests continue to run properly.
+&$tables: array of table names
+
'PersonalUrls': Alter the user-specific navigation links (e.g. "my page,
my talk page, my contributions" etc).
@@ -427,6 +470,16 @@ the built-in rate limiting checks are used, if enabled.
$form : PreferencesForm object
&$html : HTML to append to
+'RawPageViewBeforeOutput': Right before the text is blown out in action=raw
+&$obj: RawPage object
+&$text: The text that's going to be the output
+
+'SearchUpdate': Prior to search update completion
+$id : Page id
+$namespace : Page namespace
+$title : Page title
+$text : Current text being indexed
+
'SiteNoticeBefore': Before the sitenotice/anonnotice is composed
&$siteNotice: HTML returned as the sitenotice
Return true to allow the normal method of notice selection/rendering to work,
@@ -436,6 +489,10 @@ or change the value of $siteNotice and return false to alter it.
&$siteNotice: HTML sitenotice
Alter the contents of $siteNotice to add to/alter the sitenotice/anonnotice.
+'SkinTemplateOutputPageBeforeExec': Before SkinTemplate::outputPage() starts page output
+&$sktemplate: SkinTemplate object
+&$tpl: Template engine object
+
'TitleMoveComplete': after moving an article (title)
$old: old title
$nt: new title
@@ -529,5 +586,9 @@ $content_actions: The array of content actions
Can be used to set custom CSS/JS
$out: OutputPage object
+'AjaxAddScript': Called in output page just before the initialisation
+of the javascript ajax engine. The hook is only called when ajax
+is enabled ( $wgUseAjax = true; ).
+
More hooks might be available but undocumented, you can execute
./maintenance/findhooks.php to find hidden one.
diff --git a/docs/memcached.txt b/docs/memcached.txt
index 6752e9c8..d4e2915f 100644
--- a/docs/memcached.txt
+++ b/docs/memcached.txt
@@ -29,7 +29,6 @@ can run multiple servers on one machine or on multiple machines on
a network; storage can be distributed across multiple servers, and
multiple web servers can use the same cache cluster.
-
********************* W A R N I N G ! ! ! ! ! ***********************
Memcached has no security or authentication. Please ensure that your
server is appropriately firewalled, and that the port(s) used for
@@ -54,8 +53,8 @@ on port 11000, using up to 64MB of memory)
In your LocalSettings.php file, set:
- $wgUseMemCached = true;
- $wgMemCachedServers = array( "127.0.0.1:11000" );
+ $wgMainCacheType = CACHE_MEMCACHED;;
+ $wgMemCachedServers = array( "127.0.0.1:11000" );
The wiki should then use memcached to cache various data. To use
multiple servers (physically separate boxes or multiple caches
@@ -66,10 +65,9 @@ usage evenly), make its entry a subarray:
$wgMemCachedServers = array(
"127.0.0.1:11000", # one gig on this box
- array("192.168.0.1:11000", 2) # two gigs on the other box
+ array("192.168.0.1:11000", 2 ) # two gigs on the other box
);
-
== PHP client for memcached ==
As of this writing, MediaWiki includes version 1.0.10 of the PHP
@@ -129,4 +127,4 @@ IP blocks:
stores: array of arrays, for the BlockCache class
cleared by: BlockCache:clear()
-... more to come ...
+... more to come ... \ No newline at end of file
diff --git a/docs/title.txt b/docs/title.txt
index b404bd3c..5d9bd417 100644
--- a/docs/title.txt
+++ b/docs/title.txt
@@ -35,9 +35,14 @@ and the colon is just removed. Note that because of these
rules, it is possible to have articles with colons in their
names. "E. Coli 0157:H7" is a valid title, as is "2001: A Space
Odyssey", because "E. Coli 0157" and "2001" are not valid
-interwikis or namespaces. Likewise, ":de:name" is a link to
-the article "de:name"--even though "de" is a valid interwiki,
-the initial colon stops all prefix matching.
+interwikis or namespaces.
+
+It is not possible to have an article whose bare name includes
+a namespace or interwiki prefix.
+
+An initial colon in a title listed in wiki text may however
+suppress special handling for interlanguage links, image links,
+and category links.
Character mapping rules: Once prefixes have been stripped, the
rest of the title processed this way: spaces and underscores are
@@ -64,9 +69,9 @@ lowercase. The namespace will use underscores when returned
alone; it will use spaces only when attached to the text title.
getArticleID() needs some explanation: for "internal" articles,
-it should return the "cur_id" field if the article exists, else
+it should return the "page_id" field if the article exists, else
it returns 0. For all external articles it returns 0. All of
the IDs for all instances of Title created during a request are
-cached, so they can be looked up wuickly while rendering wiki
+cached, so they can be looked up quickly while rendering wiki
text with lots of internal links.