MediaWiki  1.23.15
importImages.php
Go to the documentation of this file.
1 <?php
35  'extensions', 'comment', 'comment-file', 'comment-ext', 'summary', 'user',
36  'license', 'sleep', 'limit', 'from', 'source-wiki-url', 'timestamp',
37 );
38 require_once __DIR__ . '/commandLine.inc';
39 require_once __DIR__ . '/importImages.inc';
40 $processed = $added = $ignored = $skipped = $overwritten = $failed = 0;
41 
42 echo "Import Images\n\n";
43 
44 # Need a path
45 if ( count( $args ) == 0 ) {
46  showUsage();
47 }
48 
49 $dir = $args[0];
50 
51 # Check Protection
52 if ( isset( $options['protect'] ) && isset( $options['unprotect'] ) ) {
53  die( "Cannot specify both protect and unprotect. Only 1 is allowed.\n" );
54 }
55 
56 if ( isset( $options['protect'] ) && $options['protect'] == 1 ) {
57  die( "You must specify a protection option.\n" );
58 }
59 
60 # Prepare the list of allowed extensions
62 $extensions = isset( $options['extensions'] )
63  ? explode( ',', strtolower( $options['extensions'] ) )
65 
66 # Search the path provided for candidates for import
67 $files = findFiles( $dir, $extensions, isset( $options['search-recursively'] ) );
68 
69 # Initialise the user for this operation
70 $user = isset( $options['user'] )
71  ? User::newFromName( $options['user'] )
72  : User::newFromName( 'Maintenance script' );
73 if ( !$user instanceof User ) {
74  $user = User::newFromName( 'Maintenance script' );
75 }
77 
78 # Get block check. If a value is given, this specified how often the check is performed
79 if ( isset( $options['check-userblock'] ) ) {
80  if ( !$options['check-userblock'] ) {
81  $checkUserBlock = 1;
82  } else {
83  $checkUserBlock = (int)$options['check-userblock'];
84  }
85 } else {
86  $checkUserBlock = false;
87 }
88 
89 # Get --from
90 $from = @$options['from'];
91 
92 # Get sleep time.
93 $sleep = @$options['sleep'];
94 if ( $sleep ) {
95  $sleep = (int)$sleep;
96 }
97 
98 # Get limit number
99 $limit = @$options['limit'];
100 if ( $limit ) {
101  $limit = (int)$limit;
102 }
103 
104 $timestamp = isset( $options['timestamp'] ) ? $options['timestamp'] : false;
105 
106 # Get the upload comment. Provide a default one in case there's no comment given.
107 $comment = 'Importing file';
108 
109 if ( isset( $options['comment-file'] ) ) {
110  $comment = file_get_contents( $options['comment-file'] );
111  if ( $comment === false || $comment === null ) {
112  die( "failed to read comment file: {$options['comment-file']}\n" );
113  }
114 } elseif ( isset( $options['comment'] ) ) {
115  $comment = $options['comment'];
116 }
117 
118 $commentExt = isset( $options['comment-ext'] ) ? $options['comment-ext'] : false;
119 
120 $summary = isset( $options['summary'] ) ? $options['summary'] : '';
121 
122 # Get the license specifier
123 $license = isset( $options['license'] ) ? $options['license'] : '';
124 
125 # Batch "upload" operation
126 $count = count( $files );
127 if ( $count > 0 ) {
128 
129  foreach ( $files as $file ) {
130  $base = wfBaseName( $file );
131 
132  # Validate a title
133  $title = Title::makeTitleSafe( NS_FILE, $base );
134  if ( !is_object( $title ) ) {
135  echo "{$base} could not be imported; a valid title cannot be produced\n";
136  continue;
137  }
138 
139  if ( $from ) {
140  if ( $from == $title->getDBkey() ) {
141  $from = null;
142  } else {
143  $ignored++;
144  continue;
145  }
146  }
147 
148  if ( $checkUserBlock && ( ( $processed % $checkUserBlock ) == 0 ) ) {
149  $user->clearInstanceCache( 'name' ); // reload from DB!
150  if ( $user->isBlocked() ) {
151  echo $user->getName() . " was blocked! Aborting.\n";
152  break;
153  }
154  }
155 
156  # Check existence
157  $image = wfLocalFile( $title );
158  if ( $image->exists() ) {
159  if ( isset( $options['overwrite'] ) ) {
160  echo "{$base} exists, overwriting...";
161  $svar = 'overwritten';
162  } else {
163  echo "{$base} exists, skipping\n";
164  $skipped++;
165  continue;
166  }
167  } else {
168  if ( isset( $options['skip-dupes'] ) ) {
169  $repo = $image->getRepo();
170  $sha1 = File::sha1Base36( $file ); # XXX: we end up calculating this again when actually uploading. that sucks.
171 
172  $dupes = $repo->findBySha1( $sha1 );
173 
174  if ( $dupes ) {
175  echo "{$base} already exists as " . $dupes[0]->getName() . ", skipping\n";
176  $skipped++;
177  continue;
178  }
179  }
180 
181  echo "Importing {$base}...";
182  $svar = 'added';
183  }
184 
185  if ( isset( $options['source-wiki-url'] ) ) {
186  /* find comment text directly from source wiki, through MW's API */
187  $real_comment = getFileCommentFromSourceWiki( $options['source-wiki-url'], $base );
188  if ( $real_comment === false ) {
189  $commentText = $comment;
190  } else {
191  $commentText = $real_comment;
192  }
193 
194  /* find user directly from source wiki, through MW's API */
195  $real_user = getFileUserFromSourceWiki( $options['source-wiki-url'], $base );
196  if ( $real_user === false ) {
197  $wgUser = $user;
198  } else {
199  $wgUser = User::newFromName( $real_user );
200  if ( $wgUser === false ) {
201  # user does not exist in target wiki
202  echo "failed: user '$real_user' does not exist in target wiki.";
203  continue;
204  }
205  }
206  } else {
207  # Find comment text
208  $commentText = false;
209 
210  if ( $commentExt ) {
212  if ( !$f ) {
213  echo " No comment file with extension {$commentExt} found for {$file}, using default comment. ";
214  } else {
215  $commentText = file_get_contents( $f );
216  if ( !$commentText ) {
217  echo " Failed to load comment file {$f}, using default comment. ";
218  }
219  }
220  }
221 
222  if ( !$commentText ) {
223  $commentText = $comment;
224  }
225  }
226 
227  # Import the file
228  if ( isset( $options['dry'] ) ) {
229  echo " publishing {$file} by '" . $wgUser->getName() . "', comment '$commentText'... ";
230  } else {
231  $props = FSFile::getPropsFromPath( $file );
232  $flags = 0;
233  $publishOptions = array();
234  $handler = MediaHandler::getHandler( $props['mime'] );
235  if ( $handler ) {
236  $publishOptions['headers'] = $handler->getStreamHeaders( $props['metadata'] );
237  } else {
238  $publishOptions['headers'] = array();
239  }
240  $archive = $image->publish( $file, $flags, $publishOptions );
241  if ( !$archive->isGood() ) {
242  echo "failed. (" .
243  $archive->getWikiText() .
244  ")\n";
245  $failed++;
246  continue;
247  }
248  }
249 
250  $commentText = SpecialUpload::getInitialPageText( $commentText, $license );
251  if ( !isset( $options['summary'] ) ) {
252  $summary = $commentText;
253  }
254 
255  if ( isset( $options['dry'] ) ) {
256  echo "done.\n";
257  } elseif ( $image->recordUpload2( $archive->value, $summary, $commentText, $props, $timestamp ) ) {
258  # We're done!
259  echo "done.\n";
260 
261  $doProtect = false;
262 
263  global $wgRestrictionLevels;
264 
265  $protectLevel = isset( $options['protect'] ) ? $options['protect'] : null;
266 
267  if ( $protectLevel && in_array( $protectLevel, $wgRestrictionLevels ) ) {
268  $doProtect = true;
269  }
270  if ( isset( $options['unprotect'] ) ) {
271  $protectLevel = '';
272  $doProtect = true;
273  }
274 
275  if ( $doProtect ) {
276  # Protect the file
277  echo "\nWaiting for slaves...\n";
278  // Wait for slaves.
279  sleep( 2.0 ); # Why this sleep?
280  wfWaitForSlaves();
281 
282  echo "\nSetting image restrictions ... ";
283 
284  $cascade = false;
285  $restrictions = array();
286  foreach ( $title->getRestrictionTypes() as $type ) {
287  $restrictions[$type] = $protectLevel;
288  }
289 
290  $page = WikiPage::factory( $title );
291  $status = $page->doUpdateRestrictions( $restrictions, array(), $cascade, '', $user );
292  echo ( $status->isOK() ? 'done' : 'failed' ) . "\n";
293  }
294 
295  } else {
296  echo "failed. (at recordUpload stage)\n";
297  $svar = 'failed';
298  }
299 
300  $$svar++;
301  $processed++;
302 
303  if ( $limit && $processed >= $limit ) {
304  break;
305  }
306 
307  if ( $sleep ) {
308  sleep( $sleep );
309  }
310  }
311 
312  # Print out some statistics
313  echo "\n";
314  foreach ( array( 'count' => 'Found', 'limit' => 'Limit', 'ignored' => 'Ignored',
315  'added' => 'Added', 'skipped' => 'Skipped', 'overwritten' => 'Overwritten',
316  'failed' => 'Failed' ) as $var => $desc ) {
317  if ( $$var > 0 ) {
318  echo "{$desc}: {$$var}\n";
319  }
320  }
321 
322 } else {
323  echo "No suitable files could be found for import.\n";
324 }
325 
326 exit( 0 );
327 
328 function showUsage( $reason = false ) {
329  if ( $reason ) {
330  echo $reason . "\n";
331  }
332 
333  echo <<<TEXT
334 Imports images and other media files into the wiki
335 USAGE: php importImages.php [options] <dir>
336 
337 <dir> : Path to the directory containing images to be imported
338 
339 Options:
340 --extensions=<exts> Comma-separated list of allowable extensions, defaults to \$wgFileExtensions
341 --overwrite Overwrite existing images with the same name (default is to skip them)
342 --limit=<num> Limit the number of images to process. Ignored or skipped images are not counted.
343 --from=<name> Ignore all files until the one with the given name. Useful for resuming
344  aborted imports. <name> should be the file's canonical database form.
345 --skip-dupes Skip images that were already uploaded under a different name (check SHA1)
346 --search-recursively Search recursively for files in subdirectories
347 --sleep=<sec> Sleep between files. Useful mostly for debugging.
348 --user=<username> Set username of uploader, default 'Maintenance script'
349 --check-userblock Check if the user got blocked during import.
350 --comment=<text> Set file description, default 'Importing file'.
351 --comment-file=<file> Set description to the content of <file>.
352 --comment-ext=<ext> Causes the description for each file to be loaded from a file with the same name
353  but the extension <ext>. If a global description is also given, it is appended.
354 --license=<code> Use an optional license template
355 --dry Dry run, don't import anything
356 --protect=<protect> Specify the protect value (autoconfirmed,sysop)
357 --summary=<summary> Upload summary, description will be used if not provided
358 --timestamp=<timestamp> Override upload time/date, all MediaWiki timestamp formats are accepted
359 --unprotect Unprotects all uploaded images
360 --source-wiki-url If specified, take User and Comment data for each imported file from this URL.
361  For example, --source-wiki-url="http://en.wikipedia.org/"
362 
363 TEXT;
364  exit( 1 );
365 }
data
and how to run hooks for an and one after Each event has a preferably in CamelCase For ArticleDelete hook A clump of code and data that should be run when an event happens This can be either a function and a chunk of data
Definition: hooks.txt:6
of
globals txt Globals are evil The original MediaWiki code relied on globals for processing context far too often MediaWiki development since then has been a story of slowly moving context out of global variables and into objects Storing processing context in object member variables allows those objects to be reused in a much more flexible way Consider the elegance of
Definition: globals.txt:10
directory
The most up to date schema for the tables in the database will always be tables sql in the maintenance directory
Definition: schema.txt:2
php
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
Definition: skin.txt:62
$files
$files
Definition: importImages.php:67
is
We use the convention $dbr for read and $dbw for write to help you keep track of whether the database object is a the world will explode Or to be a subsequent write query which succeeded on the master may fail when replicated to the slave due to a unique key collision Replication on the slave will stop and it may take hours to repair the database and get it back online Setting read_only in my cnf on the slave will avoid this but given the dire we prefer to have as many checks as possible We provide a but the wrapper functions like please read the documentation for except in special pages derived from QueryPage It s a common pitfall for new developers to submit code containing SQL queries which examine huge numbers of rows Remember that COUNT * is(N), counting rows in atable is like counting beans in a bucket.------------------------------------------------------------------------ Replication------------------------------------------------------------------------The largest installation of MediaWiki, Wikimedia, uses a large set ofslave MySQL servers replicating writes made to a master MySQL server. Itis important to understand the issues associated with this setup if youwant to write code destined for Wikipedia.It 's often the case that the best algorithm to use for a given taskdepends on whether or not replication is in use. Due to our unabashedWikipedia-centrism, we often just use the replication-friendly version, but if you like, you can use wfGetLB() ->getServerCount() > 1 tocheck to see if replication is in use.===Lag===Lag primarily occurs when large write queries are sent to the master.Writes on the master are executed in parallel, but they are executed inserial when they are replicated to the slaves. The master writes thequery to the binlog when the transaction is committed. The slaves pollthe binlog and start executing the query as soon as it appears. They canservice reads while they are performing a write query, but will not readanything more from the binlog and thus will perform no more writes. Thismeans that if the write query runs for a long time, the slaves will lagbehind the master for the time it takes for the write query to complete.Lag can be exacerbated by high read load. MediaWiki 's load balancer willstop sending reads to a slave when it is lagged by more than 30 seconds.If the load ratios are set incorrectly, or if there is too much loadgenerally, this may lead to a slave permanently hovering around 30seconds lag.If all slaves are lagged by more than 30 seconds, MediaWiki will stopwriting to the database. All edits and other write operations will berefused, with an error returned to the user. This gives the slaves achance to catch up. Before we had this mechanism, the slaves wouldregularly lag by several minutes, making review of recent editsdifficult.In addition to this, MediaWiki attempts to ensure that the user seesevents occurring on the wiki in chronological order. A few seconds of lagcan be tolerated, as long as the user sees a consistent picture fromsubsequent requests. This is done by saving the master binlog positionin the session, and then at the start of each request, waiting for theslave to catch up to that position before doing any reads from it. Ifthis wait times out, reads are allowed anyway, but the request isconsidered to be in "lagged slave mode". Lagged slave mode can bechecked by calling wfGetLB() ->getLaggedSlaveMode(). The onlypractical consequence at present is a warning displayed in the pagefooter.===Lag avoidance===To avoid excessive lag, queries which write large numbers of rows shouldbe split up, generally to write one row at a time. Multi-row INSERT ...SELECT queries are the worst offenders should be avoided altogether.Instead do the select first and then the insert.===Working with lag===Despite our best efforts, it 's not practical to guarantee a low-lagenvironment. Lag will usually be less than one second, but mayoccasionally be up to 30 seconds. For scalability, it 's very importantto keep load on the master low, so simply sending all your queries tothe master is not the answer. So when you have a genuine need forup-to-date data, the following approach is advised:1) Do a quick query to the master for a sequence number or timestamp 2) Run the full query on the slave and check if it matches the data you gotfrom the master 3) If it doesn 't, run the full query on the masterTo avoid swamping the master every time the slaves lag, use of thisapproach should be kept to a minimum. In most cases you should just readfrom the slave and let the user deal with the delay.------------------------------------------------------------------------ Lock contention------------------------------------------------------------------------Due to the high write rate on Wikipedia(and some other wikis), MediaWiki developers need to be very careful to structure their writesto avoid long-lasting locks. By default, MediaWiki opens a transactionat the first query, and commits it before the output is sent. Locks willbe held from the time when the query is done until the commit. So youcan reduce lock time by doing as much processing as possible before youdo your write queries.Often this approach is not good enough, and it becomes necessary toenclose small groups of queries in their own transaction. Use thefollowing syntax:$dbw=wfGetDB(DB_MASTER
$extensions
$extensions
Definition: importImages.php:62
FSFile\getPropsFromPath
static getPropsFromPath( $path, $ext=true)
Get an associative array containing information about a file in the local filesystem.
Definition: FSFile.php:243
$timestamp
if( $limit) $timestamp
Definition: importImages.php:104
$f
$f
Definition: UtfNormalTest2.php:38
wiki
Prior to maintenance scripts were a hodgepodge of code that had no cohesion or formal method of action Beginning maintenance scripts have been cleaned up to use a unified class Directory structure How to run a script How to write your own DIRECTORY STRUCTURE The maintenance directory of a MediaWiki installation contains several all of which have unique purposes HOW TO RUN A SCRIPT Ridiculously just call php someScript php that s in the top level maintenance directory if not default wiki
Definition: maintenance.txt:1
$from
$from
Definition: importImages.php:90
anything
This document is intended to provide useful advice for parties seeking to redistribute MediaWiki to end users It s targeted particularly at maintainers for Linux since it s been observed that distribution packages of MediaWiki often break We ve consistently had to recommend that users seeking support use official tarballs instead of their distribution s and this often solves whatever problem the user is having It would be nice if this could such and we might be restricted by PHP settings such as safe mode or open_basedir We cannot assume that the software even has read access anywhere useful Many shared hosts run all users web applications under the same so they can t rely on Unix and must forbid reads to even standard directories like tmp lest users read each others files We cannot assume that the user has the ability to install or run any programs not written as web accessible PHP scripts Since anything that works on cheap shared hosting will work if you have shell or root access MediaWiki s design is based around catering to the lowest common denominator Although we support higher end setups as the way many things work by default is tailored toward shared hosting These defaults are unconventional from the point of view of and they certainly aren t ideal for someone who s installing MediaWiki as MediaWiki does not conform to normal Unix filesystem layout Hopefully we ll offer direct support for standard layouts in the but for now *any change to the location of files is unsupported *Moving things and leaving symlinks will *probably *not break anything
Definition: distributors.txt:39
wfBaseName
wfBaseName( $path, $suffix='')
Return the final portion of a pathname.
Definition: GlobalFunctions.php:3357
NS_FILE
const NS_FILE
Definition: Defines.php:85
$limit
if( $sleep) $limit
Definition: importImages.php:99
User\newFromName
static newFromName( $name, $validate='valid')
Static factory method for creation from username.
Definition: User.php:389
Maintenance
Abstract maintenance class for quickly writing and churning out maintenance scripts with minimal effo...
Definition: maintenance.txt:39
$flags
it s the revision text itself In either if gzip is the revision text is gzipped $flags
Definition: hooks.txt:2124
$sleep
$sleep
Definition: importImages.php:93
file
We ve cleaned up the code here by removing clumps of infrequently used code and moving them off somewhere else It s much easier for someone working with this code to see what s _really_ going and make changes or fix bugs In we can take all the code that deals with the little used title reversing we can concentrate it all in an extension file
Definition: hooks.txt:93
example
deferred txt A few of the database updates required by various functions here can be deferred until after the result page is displayed to the user For example
Definition: deferred.txt:4
$processed
$processed
Definition: importImages.php:40
WikiPage\factory
static factory(Title $title)
Create a WikiPage object of the appropriate class for the given title.
Definition: WikiPage.php:103
$count
$count
Definition: importImages.php:126
MediaWiki
array
the array() calling protocol came about after MediaWiki 1.4rc1.
List of Api Query prop modules.
global
when a variable name is used in a it is silently declared as a new masking the global
Definition: design.txt:93
$comment
$comment
Definition: importImages.php:107
wfWaitForSlaves
wfWaitForSlaves( $maxLag=false, $wiki=false, $cluster=false)
Modern version of wfWaitForSlaves().
Definition: GlobalFunctions.php:3859
URL
design txt This is a brief overview of the new design More thorough and up to date information is available on the documentation wiki at etc Handles the details of getting and saving to the user table of the and dealing with sessions and cookies OutputPage Encapsulates the entire HTML page that will be sent in response to any server request It is used by calling its functions to add in any and then calling but I prefer the flexibility This should also do the output encoding The system allocates a global one in $wgOut Title Represents the title of an and does all the work of translating among various forms such as plain URL
Definition: design.txt:25
list
deferred txt A few of the database updates required by various functions here can be deferred until after the result page is displayed to the user For updating the view updating the linked to tables after a etc PHP does not yet have any way to tell the server to actually return and disconnect while still running these but it might have such a feature in the future We handle these by creating a deferred update object and putting those objects on a global list
Definition: deferred.txt:11
showUsage
showUsage( $reason=false)
Definition: importImages.php:328
will
</td >< td > &</td >< td > t want your writing to be edited mercilessly and redistributed at will
Definition: All_system_messages.txt:914
$options
null means default in associative array with keys and values unescaped Should be merged with default with a value of false meaning to suppress the attribute in associative array with keys and values unescaped & $options
Definition: hooks.txt:1530
Title\makeTitleSafe
static makeTitleSafe( $ns, $title, $fragment='', $interwiki='')
Create a new Title from a namespace index and a DB key.
Definition: Title.php:422
$wgFileExtensions
if(isset( $options['protect']) &&isset( $options['unprotect'])) if(isset( $options['protect']) && $options['protect']==1) global $wgFileExtensions
Definition: importImages.php:56
findFiles
findFiles( $dir, $exts, $recurse=false)
Search a directory for files with one of a set of extensions.
Definition: importImages.inc:34
$title
presenting them properly to the user as errors is done by the caller $title
Definition: hooks.txt:1324
options
We ve cleaned up the code here by removing clumps of infrequently used code and moving them off somewhere else It s much easier for someone working with this code to see what s _really_ going and make changes or fix bugs In we can take all the code that deals with the little used title reversing options(say) and put it in one place. Instead of having little title-reversing if-blocks spread all over the codebase in showAnArticle
up
static configuration should be added through ResourceLoaderGetConfigVars instead can be used to get the real title after the basic globals have been set up
Definition: hooks.txt:1684
SpecialUpload\getInitialPageText
static getInitialPageText( $comment='', $license='', $copyStatus='', $source='')
Get the initial image page text based on a comment and optional file status information.
Definition: SpecialUpload.php:489
sysop
could not be made into a sysop(Did you enter the name correctly?) &lt
$summary
$summary
Definition: importImages.php:120
getFileUserFromSourceWiki
getFileUserFromSourceWiki( $wiki_host, $file)
Definition: importImages.inc:124
$file
if(PHP_SAPI !='cli') $file
Definition: UtfNormalTest2.php:30
$commentExt
if(isset( $options['comment-file'])) elseif(isset( $options['comment'])) $commentExt
Definition: importImages.php:118
$wgUser
if(! $user instanceof User) $wgUser
Definition: importImages.php:76
$args
if( $line===false) $args
Definition: cdb.php:62
$dir
if(count( $args)==0) $dir
Definition: importImages.php:49
are
The ContentHandler facility adds support for arbitrary content types on wiki instead of relying on wikitext for everything It was introduced in MediaWiki Each kind of and so on Built in content types are
Definition: contenthandler.txt:5
used
you don t have to do a grep find to see where the $wgReverseTitle variable is used
Definition: hooks.txt:117
MediaHandler\getHandler
static getHandler( $type)
Get a MediaHandler for a given MIME type from the instance cache.
Definition: MediaHandler.php:48
as
This document is intended to provide useful advice for parties seeking to redistribute MediaWiki to end users It s targeted particularly at maintainers for Linux since it s been observed that distribution packages of MediaWiki often break We ve consistently had to recommend that users seeking support use official tarballs instead of their distribution s and this often solves whatever problem the user is having It would be nice if this could such as
Definition: distributors.txt:9
$optionsWithArgs
$optionsWithArgs
Definition: importImages.php:34
File\sha1Base36
static sha1Base36( $path)
Get a SHA-1 hash of a file in the local filesystem, in base-36 lower case encoding,...
Definition: File.php:1879
source
return true to allow those checks to and false if checking is done use this to change the tables headers temp or archived zone change it to an object instance and return false override the list derivative used the name of the old file when set the default code will be skipped add a value to it if you want to add a cookie that have to vary cache options can modify source
Definition: hooks.txt:1227
getFileCommentFromSourceWiki
getFileCommentFromSourceWiki( $wiki_host, $file)
Definition: importImages.inc:114
$user
$user
Definition: importImages.php:70
from
Please log in again after you receive it</td >< td > s a saved copy from
Definition: All_system_messages.txt:3297
name
design txt This is a brief overview of the new design More thorough and up to date information is available on the documentation wiki at name
Definition: design.txt:12
that
deferred txt A few of the database updates required by various functions here can be deferred until after the result page is displayed to the user For updating the view updating the linked to tables after a etc PHP does not yet have any way to tell the server to actually return and disconnect while still running these but it might have such a feature in the future We handle these by creating a deferred update object and putting those objects on a global then executing the whole list after the page is displayed We don t do anything smart like collating updates to the same table or such because the list is almost always going to have just one item on if that
Definition: deferred.txt:11
findAuxFile
findAuxFile( $file, $auxExtension, $maxStrip=1)
Find an auxilliary file with the given extension, matching the give base file path.
Definition: importImages.inc:86
User
The User object encapsulates all of the user-specific settings (user_id, name, rights,...
Definition: User.php:59
wfLocalFile
wfLocalFile( $title)
Get an object referring to a locally registered file.
Definition: GlobalFunctions.php:3768
$failed
$failed
Definition: Utf8Test.php:90
User\getName
getName()
Get the user name, or the IP of an anonymous user.
Definition: User.php:1876
$license
$license
Definition: importImages.php:123
$type
$type
Definition: testCompression.php:46