Manual:fetchText.php

From MediaWiki.org
Jump to: navigation, search
Translate this page; This page contains changes which are not marked for translation.

Other languages:
català • ‎Deutsch • ‎English • ‎español • ‎suomi • ‎français • ‎italiano • ‎日本語 • ‎Nederlands • ‎polski • ‎português • ‎português do Brasil

Details[edit]

fetchText.php file is a maintenance script to fetch a particular revision text from an old_id. This is used by dumpTextPass.php when the --spawn option is present.

Usage[edit]

This is an interactive script.

Provide a text id (old_id from the text table) followed by a newline, and the script will output a string containing the following in order:

  • textid
  • length of text (-1 on error = failure to retrieve/unserialize/gunzip/etc)
  • text (may be empty)

Note Note: The text string itself is *not* followed by newline. You can exit from the script typing Ctrl+C.

Since revisions can be deleted without the actual revision text being removed, this script can also return text, which is no longer associated to any revision at all (may it be a current, historic or deleted revision).

See also[edit]