Go to the documentation of this file.
64 $result->warning(
'config-no-fts3' );
71 if ( isset( $_SERVER[
'DOCUMENT_ROOT'] ) ) {
75 dirname( $_SERVER[
'DOCUMENT_ROOT'] ) .
'/data'
87 'config-sqlite-dir',
array(),
88 $this->parent->getHelpBox(
'config-sqlite-dir-help' )
94 $this->parent->getHelpBox(
'config-sqlite-name-help' )
120 # Try realpath() if the directory already exists
124 # Try expanding again in case we've just created it
128 # Table prefix is not used on SQLite, keep it empty
129 $this->
setVar(
'wgDBprefix',
'' );
140 if ( !is_dir(
$dir ) ) {
141 if ( !is_writable( dirname(
$dir ) ) ) {
143 if ( $webserverGroup !==
null ) {
145 'config-sqlite-parent-unwritable-group',
151 'config-sqlite-parent-unwritable-nogroup',
157 # Called early on in the installer, later we just want to sanity check
158 # if it's still writable
166 # Put a .htaccess file in in case the user didn't take our advice
167 file_put_contents(
"$dir/.htaccess",
"Deny from all\n" );
170 if ( !is_writable(
$dir ) ) {
174 # We haven't blown up yet, fall through
186 $dbName = $this->
getVar(
'wgDBname' );
188 # @todo FIXME: Need more sensible constructor parameters, e.g. single associative array
189 # Setting globals kind of sucks
190 $wgSQLiteDataDir =
$dir;
192 $status->value =
$db;
194 $status->fatal(
'config-sqlite-connection-error',
$e->getMessage() );
205 $dbName = $this->
getVar(
'wgDBname' );
212 return parent::needsUpgrade();
221 # Sanity check. We checked this before but maybe someone deleted the
222 # data dir between then and now
224 if ( !$dir_status->isOK() ) {
230 if ( file_exists(
$file ) ) {
231 if ( !is_writable(
$file ) ) {
235 if ( file_put_contents(
$file,
'' ) ===
false ) {
240 $this->
setVar(
'wgDBserver',
'' );
241 $this->
setVar(
'wgDBuser',
'' );
242 $this->
setVar(
'wgDBpassword',
'' );
252 $status = parent::createTables();
265 $fts3tTable = $this->db->checkForEnabledSearch();
266 if ( $fts3tTable && !$module ) {
267 $status->warning(
'config-sqlite-fts3-downgrade' );
268 $this->db->sourceFile(
"$IP/maintenance/sqlite/archives/searchindex-no-fts.sql" );
269 } elseif ( !$fts3tTable && $module ==
'FTS3' ) {
270 $this->db->sourceFile(
"$IP/maintenance/sqlite/archives/searchindex-fts3.sql" );
282 return "# SQLite-specific settings
283 \$wgSQLiteDataDir = \"{$dir}\";";
The index of the header message $result[1]=The index of the body text message $result[2 through n]=Parameters passed to body text message. Please note the header message cannot receive/use parameters. 'ImportHandleLogItemXMLTag':When parsing a XML tag in a log item. $reader:XMLReader object $logInfo:Array of information Return false to stop further processing of the tag 'ImportHandlePageXMLTag':When parsing a XML tag in a page. $reader:XMLReader object $pageInfo:Array of information Return false to stop further processing of the tag 'ImportHandleRevisionXMLTag':When parsing a XML tag in a page revision. $reader:XMLReader object $pageInfo:Array of page information $revisionInfo:Array of revision information Return false to stop further processing of the tag 'ImportHandleToplevelXMLTag':When parsing a top level XML tag. $reader:XMLReader object Return false to stop further processing of the tag 'ImportHandleUploadXMLTag':When parsing a XML tag in a file upload. $reader:XMLReader object $revisionInfo:Array of information Return false to stop further processing of the tag 'InfoAction':When building information to display on the action=info page. $context:IContextSource object & $pageInfo:Array of information 'InitializeArticleMaybeRedirect':MediaWiki check to see if title is a redirect. $title:Title object for the current page $request:WebRequest $ignoreRedirect:boolean to skip redirect check $target:Title/string of redirect target $article:Article object 'InterwikiLoadPrefix':When resolving if a given prefix is an interwiki or not. Return true without providing an interwiki to continue interwiki search. $prefix:interwiki prefix we are looking for. & $iwData:output array describing the interwiki with keys iw_url, iw_local, iw_trans and optionally iw_api and iw_wikiid. 'InternalParseBeforeSanitize':during Parser 's internalParse method just before the parser removes unwanted/dangerous HTML tags and after nowiki/noinclude/includeonly/onlyinclude and other processings. Ideal for syntax-extensions after template/parser function execution which respect nowiki and HTML-comments. & $parser:Parser object & $text:string containing partially parsed text & $stripState:Parser 's internal StripState object 'InternalParseBeforeLinks':during Parser 's internalParse method before links but after nowiki/noinclude/includeonly/onlyinclude and other processings. & $parser:Parser object & $text:string containing partially parsed text & $stripState:Parser 's internal StripState object 'InvalidateEmailComplete':Called after a user 's email has been invalidated successfully. $user:user(object) whose email is being invalidated 'IRCLineURL':When constructing the URL to use in an IRC notification. Callee may modify $url and $query, URL will be constructed as $url . $query & $url:URL to index.php & $query:Query string $rc:RecentChange object that triggered url generation 'IsFileCacheable':Override the result of Article::isFileCacheable()(if true) $article:article(object) being checked 'IsTrustedProxy':Override the result of wfIsTrustedProxy() $ip:IP being check $result:Change this value to override the result of wfIsTrustedProxy() 'IsUploadAllowedFromUrl':Override the result of UploadFromUrl::isAllowedUrl() $url:URL used to upload from & $allowed:Boolean indicating if uploading is allowed for given URL 'isValidEmailAddr':Override the result of User::isValidEmailAddr(), for instance to return false if the domain name doesn 't match your organization. $addr:The e-mail address entered by the user & $result:Set this and return false to override the internal checks 'isValidPassword':Override the result of User::isValidPassword() $password:The password entered by the user & $result:Set this and return false to override the internal checks $user:User the password is being validated for 'Language::getMessagesFileName':$code:The language code or the language we 're looking for a messages file for & $file:The messages file path, you can override this to change the location. 'LanguageGetNamespaces':Provide custom ordering for namespaces or remove namespaces. Do not use this hook to add namespaces. Use CanonicalNamespaces for that. & $namespaces:Array of namespaces indexed by their numbers 'LanguageGetMagic':DEPRECATED, use $magicWords in a file listed in $wgExtensionMessagesFiles instead. Use this to define synonyms of magic words depending of the language $magicExtensions:associative array of magic words synonyms $lang:language code(string) 'LanguageGetSpecialPageAliases':DEPRECATED, use $specialPageAliases in a file listed in $wgExtensionMessagesFiles instead. Use to define aliases of special pages names depending of the language $specialPageAliases:associative array of magic words synonyms $lang:language code(string) 'LanguageGetTranslatedLanguageNames':Provide translated language names. & $names:array of language code=> language name $code language of the preferred translations 'LanguageLinks':Manipulate a page 's language links. This is called in various places to allow extensions to define the effective language links for a page. $title:The page 's Title. & $links:Associative array mapping language codes to prefixed links of the form "language:title". & $linkFlags:Associative array mapping prefixed links to arrays of flags. Currently unused, but planned to provide support for marking individual language links in the UI, e.g. for featured articles. 'LinkBegin':Used when generating internal and interwiki links in Linker::link(), before processing starts. Return false to skip default processing and return $ret. See documentation for Linker::link() for details on the expected meanings of parameters. $skin:the Skin object $target:the Title that the link is pointing to & $html:the contents that the< a > tag should have(raw HTML) $result
skin txt MediaWiki includes four core it has been set as the default in MediaWiki since the replacing Monobook it had been been the default skin since before being replaced by Vector largely rewritten in while keeping its appearance Several legacy skins were removed in the as the burden of supporting them became too heavy to bear Those in etc for skin dependent CSS etc for skin dependent JavaScript These can also be customised on a per user by etc This feature has led to a wide variety of user styles becoming that gallery is a good place to ending in php
Class for setting up the MediaWiki database using SQLLite.
static checkExtension( $name)
Convenience function.
wfMkdirParents( $dir, $mode=null, $caller=null)
Make directory, and make all parent directories if they don't exist.
static dataDirOKmaybeCreate( $dir, $create=false)
getConnection()
Connect to the database using the administrative user/password currently defined in the session.
wfSuppressWarnings( $end=false)
Reference-counted warning suppression.
This class allows simple acccess to a SQLite database independently from main database settings.
static newGood( $value=null)
Factory function for good results.
getConnectForm()
Get HTML for a web form that configures this database.
getTextBox( $var, $label, $attribs=array(), $helpData="")
Get a labelled text box to configure a local variable.
static generateFileName( $dir, $dbName)
Generates a database file name.
static realpath( $path)
Safe wrapper for PHP's realpath() that fails gracefully if it's unable to canonicalize the path.
wfRestoreWarnings()
Restore error level to previous value.
setupSchemaVars()
Set appropriate schema variables in the current database connection.
the array() calling protocol came about after MediaWiki 1.4rc1.
List of Api Query prop modules.
when a variable name is used in a it is silently declared as a new masking the global
setupSearchIndex(&$status)
getVar( $var, $default=null)
Get a variable, taking local defaults into account.
Base class for DBMS-specific installation helper classes.
getGlobalDefaults()
Get a name=>value map of MW configuration globals that overrides.
if(PHP_SAPI !='cli') $file
if(count( $args)==0) $dir
getName()
Return the internal name, e.g.
setVar( $name, $value)
Convenience alias for $this->parent->setVar()
setVarsFromRequest( $varNames)
Convenience function to set variables based on form data.
static escapePhpString( $string)
Returns the escaped version of a string of php code.
static getFulltextSearchModule()
Returns version of currently supported SQLite fulltext search module or false if none present.
static maybeGetWebserverPrimaryGroup()
On POSIX systems return the primary group of the webserver we're running under.
static newFatal( $message)
Factory function for fatal errors.