MediaWiki  1.23.12
SpecialExport.php
Go to the documentation of this file.
1 <?php
31 class SpecialExport extends SpecialPage {
33  private $images;
34 
35  public function __construct() {
36  parent::__construct( 'Export' );
37  }
38 
39  public function execute( $par ) {
40  global $wgSitename, $wgExportAllowListContributors, $wgExportFromNamespaces;
41  global $wgExportAllowHistory, $wgExportMaxHistory, $wgExportMaxLinkDepth;
42  global $wgExportAllowAll;
43 
44  $this->setHeaders();
45  $this->outputHeader();
46 
47  // Set some variables
48  $this->curonly = true;
49  $this->doExport = false;
50  $request = $this->getRequest();
51  $this->templates = $request->getCheck( 'templates' );
52  $this->images = $request->getCheck( 'images' ); // Doesn't do anything yet
53  $this->pageLinkDepth = $this->validateLinkDepth(
54  $request->getIntOrNull( 'pagelink-depth' )
55  );
56  $nsindex = '';
57  $exportall = false;
58 
59  if ( $request->getCheck( 'addcat' ) ) {
60  $page = $request->getText( 'pages' );
61  $catname = $request->getText( 'catname' );
62 
63  if ( $catname !== '' && $catname !== null && $catname !== false ) {
64  $t = Title::makeTitleSafe( NS_MAIN, $catname );
65  if ( $t ) {
71  $catpages = $this->getPagesFromCategory( $t );
72  if ( $catpages ) {
73  $page .= "\n" . implode( "\n", $catpages );
74  }
75  }
76  }
77  } elseif ( $request->getCheck( 'addns' ) && $wgExportFromNamespaces ) {
78  $page = $request->getText( 'pages' );
79  $nsindex = $request->getText( 'nsindex', '' );
80 
81  if ( strval( $nsindex ) !== '' ) {
85  $nspages = $this->getPagesFromNamespace( $nsindex );
86  if ( $nspages ) {
87  $page .= "\n" . implode( "\n", $nspages );
88  }
89  }
90  } elseif ( $request->getCheck( 'exportall' ) && $wgExportAllowAll ) {
91  $this->doExport = true;
92  $exportall = true;
93 
94  /* Although $page and $history are not used later on, we
95  nevertheless set them to avoid that PHP notices about using
96  undefined variables foul up our XML output (see call to
97  doExport(...) further down) */
98  $page = '';
99  $history = '';
100  } elseif ( $request->wasPosted() && $par == '' ) {
101  $page = $request->getText( 'pages' );
102  $this->curonly = $request->getCheck( 'curonly' );
103  $rawOffset = $request->getVal( 'offset' );
104 
105  if ( $rawOffset ) {
106  $offset = wfTimestamp( TS_MW, $rawOffset );
107  } else {
108  $offset = null;
109  }
110 
111  $limit = $request->getInt( 'limit' );
112  $dir = $request->getVal( 'dir' );
113  $history = array(
114  'dir' => 'asc',
115  'offset' => false,
116  'limit' => $wgExportMaxHistory,
117  );
118  $historyCheck = $request->getCheck( 'history' );
119 
120  if ( $this->curonly ) {
121  $history = WikiExporter::CURRENT;
122  } elseif ( !$historyCheck ) {
123  if ( $limit > 0 && ( $wgExportMaxHistory == 0 || $limit < $wgExportMaxHistory ) ) {
124  $history['limit'] = $limit;
125  }
126 
127  if ( !is_null( $offset ) ) {
128  $history['offset'] = $offset;
129  }
130 
131  if ( strtolower( $dir ) == 'desc' ) {
132  $history['dir'] = 'desc';
133  }
134  }
135 
136  if ( $page != '' ) {
137  $this->doExport = true;
138  }
139  } else {
140  // Default to current-only for GET requests.
141  $page = $request->getText( 'pages', $par );
142  $historyCheck = $request->getCheck( 'history' );
143 
144  if ( $historyCheck ) {
145  $history = WikiExporter::FULL;
146  } else {
147  $history = WikiExporter::CURRENT;
148  }
149 
150  if ( $page != '' ) {
151  $this->doExport = true;
152  }
153  }
154 
155  if ( !$wgExportAllowHistory ) {
156  // Override
157  $history = WikiExporter::CURRENT;
158  }
159 
160  $list_authors = $request->getCheck( 'listauthors' );
161  if ( !$this->curonly || !$wgExportAllowListContributors ) {
162  $list_authors = false;
163  }
164 
165  if ( $this->doExport ) {
166  $this->getOutput()->disable();
167 
168  // Cancel output buffering and gzipping if set
169  // This should provide safer streaming for pages with history
171  $request->response()->header( "Content-type: application/xml; charset=utf-8" );
172 
173  if ( $request->getCheck( 'wpDownload' ) ) {
174  // Provide a sane filename suggestion
175  $filename = urlencode( $wgSitename . '-' . wfTimestampNow() . '.xml' );
176  $request->response()->header( "Content-disposition: attachment;filename={$filename}" );
177  }
178 
179  $this->doExport( $page, $history, $list_authors, $exportall );
180 
181  return;
182  }
183 
184  $out = $this->getOutput();
185  $out->addWikiMsg( 'exporttext' );
186 
187  $form = Xml::openElement( 'form', array( 'method' => 'post',
188  'action' => $this->getPageTitle()->getLocalURL( 'action=submit' ) ) );
190  $this->msg( 'export-addcattext' )->text(),
191  'catname',
192  'catname',
193  40
194  ) . '&#160;';
196  $this->msg( 'export-addcat' )->text(),
197  array( 'name' => 'addcat' )
198  ) . '<br />';
199 
200  if ( $wgExportFromNamespaces ) {
202  array(
203  'selected' => $nsindex,
204  'label' => $this->msg( 'export-addnstext' )->text()
205  ), array(
206  'name' => 'nsindex',
207  'id' => 'namespace',
208  'class' => 'namespaceselector',
209  )
210  ) . '&#160;';
212  $this->msg( 'export-addns' )->text(),
213  array( 'name' => 'addns' )
214  ) . '<br />';
215  }
216 
217  if ( $wgExportAllowAll ) {
219  $this->msg( 'exportall' )->text(),
220  'exportall',
221  'exportall',
222  $request->wasPosted() ? $request->getCheck( 'exportall' ) : false
223  ) . '<br />';
224  }
225 
226  $form .= Xml::element(
227  'textarea',
228  array( 'name' => 'pages', 'cols' => 40, 'rows' => 10 ),
229  $page,
230  false
231  );
232  $form .= '<br />';
233 
234  if ( $wgExportAllowHistory ) {
236  $this->msg( 'exportcuronly' )->text(),
237  'curonly',
238  'curonly',
239  $request->wasPosted() ? $request->getCheck( 'curonly' ) : true
240  ) . '<br />';
241  } else {
242  $out->addWikiMsg( 'exportnohistory' );
243  }
244 
246  $this->msg( 'export-templates' )->text(),
247  'templates',
248  'wpExportTemplates',
249  $request->wasPosted() ? $request->getCheck( 'templates' ) : false
250  ) . '<br />';
251 
252  if ( $wgExportMaxLinkDepth || $this->userCanOverrideExportDepth() ) {
254  $this->msg( 'export-pagelinks' )->text(),
255  'pagelink-depth',
256  'pagelink-depth',
257  20,
258  0
259  ) . '<br />';
260  }
261 
262  // Enable this when we can do something useful exporting/importing image information. :)
263  //$form .= Xml::checkLabel( $this->msg( 'export-images' )->text(), 'images', 'wpExportImages', false ) . '<br />';
265  $this->msg( 'export-download' )->text(),
266  'wpDownload',
267  'wpDownload',
268  $request->wasPosted() ? $request->getCheck( 'wpDownload' ) : true
269  ) . '<br />';
270 
271  if ( $wgExportAllowListContributors ) {
273  $this->msg( 'exportlistauthors' )->text(),
274  'listauthors',
275  'listauthors',
276  $request->wasPosted() ? $request->getCheck( 'listauthors' ) : false
277  ) . '<br />';
278  }
279 
281  $this->msg( 'export-submit' )->text(),
283  );
284  $form .= Xml::closeElement( 'form' );
285 
286  $out->addHTML( $form );
287  }
288 
292  private function userCanOverrideExportDepth() {
293  return $this->getUser()->isAllowed( 'override-export-depth' );
294  }
295 
305  private function doExport( $page, $history, $list_authors, $exportall ) {
306 
307  // If we are grabbing everything, enable full history and ignore the rest
308  if ( $exportall ) {
309  $history = WikiExporter::FULL;
310  } else {
311 
312  $pageSet = array(); // Inverted index of all pages to look up
313 
314  // Split up and normalize input
315  foreach ( explode( "\n", $page ) as $pageName ) {
316  $pageName = trim( $pageName );
317  $title = Title::newFromText( $pageName );
318  if ( $title && !$title->isExternal() && $title->getText() !== '' ) {
319  // Only record each page once!
320  $pageSet[$title->getPrefixedText()] = true;
321  }
322  }
323 
324  // Set of original pages to pass on to further manipulation...
325  $inputPages = array_keys( $pageSet );
326 
327  // Look up any linked pages if asked...
328  if ( $this->templates ) {
329  $pageSet = $this->getTemplates( $inputPages, $pageSet );
330  }
331  $linkDepth = $this->pageLinkDepth;
332  if ( $linkDepth ) {
333  $pageSet = $this->getPageLinks( $inputPages, $pageSet, $linkDepth );
334  }
335 
336  // Enable this when we can do something useful exporting/importing image information.
337  // if( $this->images ) ) {
338  // $pageSet = $this->getImages( $inputPages, $pageSet );
339  // }
340 
341  $pages = array_keys( $pageSet );
342 
343  // Normalize titles to the same format and remove dupes, see bug 17374
344  foreach ( $pages as $k => $v ) {
345  $pages[$k] = str_replace( " ", "_", $v );
346  }
347 
348  $pages = array_unique( $pages );
349  }
350 
351  /* Ok, let's get to it... */
352  if ( $history == WikiExporter::CURRENT ) {
353  $lb = false;
354  $db = wfGetDB( DB_SLAVE );
355  $buffer = WikiExporter::BUFFER;
356  } else {
357  // Use an unbuffered query; histories may be very long!
358  $lb = wfGetLBFactory()->newMainLB();
359  $db = $lb->getConnection( DB_SLAVE );
360  $buffer = WikiExporter::STREAM;
361 
362  // This might take a while... :D
364  set_time_limit( 0 );
366  }
367 
368  $exporter = new WikiExporter( $db, $history, $buffer );
369  $exporter->list_authors = $list_authors;
370  $exporter->openStream();
371 
372  if ( $exportall ) {
373  $exporter->allPages();
374  } else {
375  foreach ( $pages as $page ) {
376  #Bug 8824: Only export pages the user can read
377  $title = Title::newFromText( $page );
378  if ( is_null( $title ) ) {
379  // @todo Perhaps output an <error> tag or something.
380  continue;
381  }
382 
383  if ( !$title->userCan( 'read', $this->getUser() ) ) {
384  // @todo Perhaps output an <error> tag or something.
385  continue;
386  }
387 
388  $exporter->pageByTitle( $title );
389  }
390  }
391 
392  $exporter->closeStream();
393 
394  if ( $lb ) {
395  $lb->closeAll();
396  }
397  }
398 
403  private function getPagesFromCategory( $title ) {
405 
406  $name = $title->getDBkey();
407 
408  $dbr = wfGetDB( DB_SLAVE );
409  $res = $dbr->select(
410  array( 'page', 'categorylinks' ),
411  array( 'page_namespace', 'page_title' ),
412  array( 'cl_from=page_id', 'cl_to' => $name ),
413  __METHOD__,
414  array( 'LIMIT' => '5000' )
415  );
416 
417  $pages = array();
418 
419  foreach ( $res as $row ) {
420  $n = $row->page_title;
421  if ( $row->page_namespace ) {
422  $ns = $wgContLang->getNsText( $row->page_namespace );
423  $n = $ns . ':' . $n;
424  }
425 
426  $pages[] = $n;
427  }
428 
429  return $pages;
430  }
431 
436  private function getPagesFromNamespace( $nsindex ) {
438 
439  $dbr = wfGetDB( DB_SLAVE );
440  $res = $dbr->select(
441  'page',
442  array( 'page_namespace', 'page_title' ),
443  array( 'page_namespace' => $nsindex ),
444  __METHOD__,
445  array( 'LIMIT' => '5000' )
446  );
447 
448  $pages = array();
449 
450  foreach ( $res as $row ) {
451  $n = $row->page_title;
452 
453  if ( $row->page_namespace ) {
454  $ns = $wgContLang->getNsText( $row->page_namespace );
455  $n = $ns . ':' . $n;
456  }
457 
458  $pages[] = $n;
459  }
460 
461  return $pages;
462  }
463 
470  private function getTemplates( $inputPages, $pageSet ) {
471  return $this->getLinks( $inputPages, $pageSet,
472  'templatelinks',
473  array( 'namespace' => 'tl_namespace', 'title' => 'tl_title' ),
474  array( 'page_id=tl_from' )
475  );
476  }
477 
483  private function validateLinkDepth( $depth ) {
484  global $wgExportMaxLinkDepth;
485 
486  if ( $depth < 0 ) {
487  return 0;
488  }
489 
490  if ( !$this->userCanOverrideExportDepth() ) {
491  if ( $depth > $wgExportMaxLinkDepth ) {
492  return $wgExportMaxLinkDepth;
493  }
494  }
495 
496  /*
497  * There's a HARD CODED limit of 5 levels of recursion here to prevent a
498  * crazy-big export from being done by someone setting the depth
499  * number too high. In other words, last resort safety net.
500  */
501 
502  return intval( min( $depth, 5 ) );
503  }
504 
512  private function getPageLinks( $inputPages, $pageSet, $depth ) {
513  for ( ; $depth > 0; --$depth ) {
514  $pageSet = $this->getLinks(
515  $inputPages, $pageSet, 'pagelinks',
516  array( 'namespace' => 'pl_namespace', 'title' => 'pl_title' ),
517  array( 'page_id=pl_from' )
518  );
519  $inputPages = array_keys( $pageSet );
520  }
521 
522  return $pageSet;
523  }
524 
533  private function getImages( $inputPages, $pageSet ) {
534  return $this->getLinks(
535  $inputPages,
536  $pageSet,
537  'imagelinks',
538  array( 'namespace' => NS_FILE, 'title' => 'il_to' ),
539  array( 'page_id=il_from' )
540  );
541  }
542 
552  private function getLinks( $inputPages, $pageSet, $table, $fields, $join ) {
553  $dbr = wfGetDB( DB_SLAVE );
554 
555  foreach ( $inputPages as $page ) {
556  $title = Title::newFromText( $page );
557 
558  if ( $title ) {
559  $pageSet[$title->getPrefixedText()] = true;
562  $result = $dbr->select(
563  array( 'page', $table ),
564  $fields,
565  array_merge(
566  $join,
567  array(
568  'page_namespace' => $title->getNamespace(),
569  'page_title' => $title->getDBkey()
570  )
571  ),
572  __METHOD__
573  );
574 
575  foreach ( $result as $row ) {
576  $template = Title::makeTitle( $row->namespace, $row->title );
577  $pageSet[$template->getPrefixedText()] = true;
578  }
579  }
580  }
581 
582  return $pageSet;
583  }
584 
585  protected function getGroupName() {
586  return 'pagetools';
587  }
588 }
Xml\checkLabel
static checkLabel( $label, $name, $id, $checked=false, $attribs=array())
Convenience function to build an HTML checkbox with a label.
Definition: Xml.php:433
SpecialPage\getPageTitle
getPageTitle( $subpage=false)
Get a self-referential title object.
Definition: SpecialPage.php:488
Title\makeTitle
static & makeTitle( $ns, $title, $fragment='', $interwiki='')
Create a new Title from a namespace index and a DB key.
Definition: Title.php:398
$result
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
Definition: hooks.txt:1528
Title\newFromText
static newFromText( $text, $defaultNamespace=NS_MAIN)
Create a new Title from text, such as what one would find in a link.
Definition: Title.php:189
SpecialExport\getLinks
getLinks( $inputPages, $pageSet, $table, $fields, $join)
Expand a list of pages to include items used in those pages.
Definition: SpecialExport.php:552
wfResetOutputBuffers
wfResetOutputBuffers( $resetGzipEncoding=true)
Clear away any user-level output buffers, discarding contents.
Definition: GlobalFunctions.php:2273
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
SpecialExport
A special page that allows users to export pages in a XML file.
Definition: SpecialExport.php:31
SpecialPage\getOutput
getOutput()
Get the OutputPage being used for this instance.
Definition: SpecialPage.php:535
SpecialExport\execute
execute( $par)
Default execute method Checks user permissions, calls the function given in mFunction.
Definition: SpecialExport.php:39
SpecialExport\getImages
getImages( $inputPages, $pageSet)
Expand a list of pages to include images used in those pages.
Definition: SpecialExport.php:533
WikiExporter\CURRENT
const CURRENT
Definition: Export.php:41
wfGetDB
& wfGetDB( $db, $groups=array(), $wiki=false)
Get a Database object.
Definition: GlobalFunctions.php:3706
text
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 text
Definition: design.txt:12
SpecialExport\getTemplates
getTemplates( $inputPages, $pageSet)
Expand a list of pages to include templates used in those pages.
Definition: SpecialExport.php:470
$form
usually copyright or history_copyright This message must be in HTML not wikitext $subpages will be ignored and the rest of subPageSubtitle() will run. 'SkinTemplateBuildNavUrlsNav_urlsAfterPermalink' whether MediaWiki currently thinks this is a CSS JS page Hooks may change this value to override the return value of Title::isCssOrJsPage(). 'TitleIsAlwaysKnown' whether MediaWiki currently thinks this page is known isMovable() always returns false. $title whether MediaWiki currently thinks this page is movable Hooks may change this value to override the return value of Title::isMovable(). 'TitleIsWikitextPage' whether MediaWiki currently thinks this is a wikitext page Hooks may change this value to override the return value of Title::isWikitextPage() 'TitleMove' use UploadVerification and UploadVerifyFile instead $form
Definition: hooks.txt:2578
wfTimestamp
wfTimestamp( $outputtype=TS_UNIX, $ts=0)
Get a timestamp string in one of various formats.
Definition: GlobalFunctions.php:2530
$n
$n
Definition: RandomTest.php:76
wfSuppressWarnings
wfSuppressWarnings( $end=false)
Reference-counted warning suppression.
Definition: GlobalFunctions.php:2434
NS_FILE
const NS_FILE
Definition: Defines.php:85
$limit
if( $sleep) $limit
Definition: importImages.php:99
SpecialExport\doExport
doExport( $page, $history, $list_authors, $exportall)
Do the actual page exporting.
Definition: SpecialExport.php:305
$wgContLang
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 render it are here and are called from various other places when and is meant to be subclassed with other skins that may override some of its functions The User object contains a reference to a and so rather than having a global skin object we just rely on the global User and get the skin with $wgUser and also has some character encoding functions and other locale stuff The current user interface language is instantiated as and the content language as $wgContLang
Definition: design.txt:56
SpecialExport\$curonly
$curonly
Definition: SpecialExport.php:32
SpecialExport\$templates
$templates
Definition: SpecialExport.php:32
Xml\openElement
static openElement( $element, $attribs=null)
This opens an XML element.
Definition: Xml.php:109
true
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 noclasses just before the function returns a value If you return true
Definition: hooks.txt:1530
$dbr
$dbr
Definition: testCompression.php:48
SpecialExport\getGroupName
getGroupName()
Under which header this special page is listed in Special:SpecialPages See messages 'specialpages-gro...
Definition: SpecialExport.php:585
NS_MAIN
const NS_MAIN
Definition: Defines.php:79
Linker\tooltipAndAccesskeyAttribs
static tooltipAndAccesskeyAttribs( $name)
Returns the attributes for the tooltip and access key.
Definition: Linker.php:2298
SpecialExport\getPagesFromCategory
getPagesFromCategory( $title)
Definition: SpecialExport.php:403
$lb
if( $wgAPIRequestLog) $lb
Definition: api.php:126
SpecialExport\$doExport
$doExport
Definition: SpecialExport.php:32
$out
$out
Definition: UtfNormalGenerate.php:167
wfRestoreWarnings
wfRestoreWarnings()
Restore error level to previous value.
Definition: GlobalFunctions.php:2464
SpecialExport\$images
$images
Definition: SpecialExport.php:33
Xml\element
static element( $element, $attribs=null, $contents='', $allowShortTag=true)
Format an XML element with given attributes and, optionally, text content.
Definition: Xml.php:39
SpecialExport\getPageLinks
getPageLinks( $inputPages, $pageSet, $depth)
Expand a list of pages to include pages linked to from that page.
Definition: SpecialExport.php:512
array
the array() calling protocol came about after MediaWiki 1.4rc1.
List of Api Query prop modules.
SpecialPage\setHeaders
setHeaders()
Sets headers - this should be called from the execute() method of all derived classes!
Definition: SpecialPage.php:352
SpecialPage\getUser
getUser()
Shortcut to get the User executing this instance.
Definition: SpecialPage.php:545
Xml\inputLabel
static inputLabel( $label, $name, $id, $size=false, $value=false, $attribs=array())
Convenience function to build an HTML text input field with a label.
Definition: Xml.php:398
global
when a variable name is used in a it is silently declared as a new masking the global
Definition: design.txt:93
wfTimestampNow
wfTimestampNow()
Convenience function; returns MediaWiki timestamp for the present time.
Definition: GlobalFunctions.php:2561
WikiExporter
Definition: Export.php:33
false
processing should stop and the error should be shown to the user * false
Definition: hooks.txt:188
TS_MW
const TS_MW
MediaWiki concatenated string timestamp (YYYYMMDDHHMMSS)
Definition: GlobalFunctions.php:2478
SpecialExport\$pageLinkDepth
$pageLinkDepth
Definition: SpecialExport.php:32
Title\makeTitleSafe
static makeTitleSafe( $ns, $title, $fragment='', $interwiki='')
Create a new Title from a namespace index and a DB key.
Definition: Title.php:422
$title
presenting them properly to the user as errors is done by the caller $title
Definition: hooks.txt:1324
$name
Allows to change the fields on the form that will be generated $name
Definition: hooks.txt:336
SpecialPage\msg
msg()
Wrapper around wfMessage that sets the current context.
Definition: SpecialPage.php:609
SpecialPage
Parent class for all special pages.
Definition: SpecialPage.php:33
WikiExporter\STREAM
const STREAM
Definition: Export.php:47
SpecialPage\getRequest
getRequest()
Get the WebRequest being used for this instance.
Definition: SpecialPage.php:525
WikiExporter\FULL
const FULL
Definition: Export.php:40
SpecialExport\validateLinkDepth
validateLinkDepth( $depth)
Validate link depth setting, if available.
Definition: SpecialExport.php:483
SpecialExport\getPagesFromNamespace
getPagesFromNamespace( $nsindex)
Definition: SpecialExport.php:436
DB_SLAVE
const DB_SLAVE
Definition: Defines.php:55
Xml\closeElement
static closeElement( $element)
Shortcut to close an XML element.
Definition: Xml.php:118
wfGetLBFactory
& wfGetLBFactory()
Get the load balancer factory object.
Definition: GlobalFunctions.php:3725
$dir
if(count( $args)==0) $dir
Definition: importImages.php:49
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
Html\namespaceSelector
static namespaceSelector(array $params=array(), array $selectAttribs=array())
Build a drop-down box for selecting a namespace.
Definition: Html.php:710
Xml\submitButton
static submitButton( $value, $attribs=array())
Convenience function to build an HTML submit button.
Definition: Xml.php:463
$t
$t
Definition: testCompression.php:65
$res
$res
Definition: database.txt:21
SpecialPage\outputHeader
outputHeader( $summaryMessageKey='')
Outputs a summary message on top of special pages Per default the message key is the canonical name o...
Definition: SpecialPage.php:443
SpecialExport\userCanOverrideExportDepth
userCanOverrideExportDepth()
Definition: SpecialExport.php:292
WikiExporter\BUFFER
const BUFFER
Definition: Export.php:46
SpecialExport\__construct
__construct()
Definition: SpecialExport.php:35