__construct() 공개 메소드

public __construct ( )
예제 #1
0
 public function __construct()
 {
     parent::__construct();
     $this->mDescription = "Flag videos which are deleted on provider, private, or have some form of error returned from API";
     $this->addOption('test', 'Test mode; make no changes', false, false, 't');
     $this->addOption('verbose', 'Show extra debugging output', false, false, 'v');
 }
예제 #2
0
 function __construct()
 {
     parent::__construct();
     $this->mDescription = 'Script to fix bug 20757 assuming that blob_tracking is intact';
     $this->addOption('dry-run', 'Report only');
     $this->addOption('start', 'old_id to start at', false, true);
 }
 public function __construct()
 {
     parent::__construct();
     $this->mDescription = "Count of the number of articles and update the site statistics table";
     $this->addOption('update', 'Update the site_stats table with the new count');
     $this->addOption('use-master', 'Count using the master database');
 }
예제 #4
0
    function __construct()
    {
        parent::__construct();
        $gz = in_array('compress.zlib', stream_get_wrappers()) ? 'ok' : '(disabled; requires PHP zlib module)';
        $bz2 = in_array('compress.bzip2', stream_get_wrappers()) ? 'ok' : '(disabled; requires PHP bzip2 module)';
        $this->mDescription = <<<TEXT
This script reads pages from an XML file as produced from Special:Export or
dumpBackup.php, and saves them into the current wiki.

Compressed XML files may be read directly:
  .gz {$gz}
  .bz2 {$bz2}
  .7z (if 7za executable is in PATH)

Note that for very large data sets, importDump.php may be slow; there are
alternate methods which can be much faster for full site restoration:
<https://www.mediawiki.org/wiki/Manual:Importing_XML_dumps>
TEXT;
        $this->stderr = fopen("php://stderr", "wt");
        $this->addOption('report', 'Report position and speed after every n pages processed', false, true);
        $this->addOption('namespaces', 'Import only the pages from namespaces belonging to the list of ' . 'pipe-separated namespace names or namespace indexes', false, true);
        $this->addOption('dry-run', 'Parse dump without actually importing pages');
        $this->addOption('debug', 'Output extra verbose debug information');
        $this->addOption('uploads', 'Process file upload data if included (experimental)');
        $this->addOption('no-updates', 'Disable link table updates. Is faster but leaves the wiki in an inconsistent state');
        $this->addOption('image-base-path', 'Import files from a specified path', false, true);
        $this->addArg('file', 'Dump file to import [else use stdin]', false);
    }
예제 #5
0
 public function __construct()
 {
     parent::__construct();
     $this->mDescription = "Show number of jobs waiting in master database";
     $this->addOption('group', 'Show number of jobs per job type');
     $this->addOption('list', 'Show a complete list of all jobs in a machine-readable format, instead of statistics');
 }
예제 #6
0
 public function __construct()
 {
     parent::__construct();
     $this->addDescription('Parse random pages and compare output to cache.');
     $this->addOption('namespace', 'Page namespace number', true, true);
     $this->addOption('maxpages', 'Number of pages to try', true, true);
 }
예제 #7
0
파일: minify.php 프로젝트: rocLv/conference
 public function __construct()
 {
     parent::__construct();
     $this->addOption('outfile', 'File for output. Only a single file may be specified for input.', false, true);
     $this->addOption('outdir', "Directory for output. If this is not specified, and neither is --outfile, then the\n" . "output files will be sent to the same directories as the input files.", false, true);
     $this->mDescription = "Minify a file or set of files.\n\n" . "If --outfile is not specified, then the output file names will have a .min extension\n" . "added, e.g. jquery.js -> jquery.min.js.";
 }
예제 #8
0
 function __construct()
 {
     parent::__construct();
     $this->addArg('path', 'The file name to format', false);
     $this->addOption('outfile', 'The output file name', false, true);
     $this->addOption('html', 'Use HTML output format. By default, wikitext is used.');
 }
 public function __construct()
 {
     parent::__construct();
     $this->mDescription = "Review all pages in reviewable namespaces. " . "A user ID must be given to specifiy the \"reviewer\" who accepted the pages.";
     $this->addOption('username', 'The user name of the existing user to use as the "reviewer"', true, true);
     $this->setBatchSize(100);
 }
예제 #10
0
	public function __construct() {
		parent::__construct();

		global $wgCategoryCollation;
		$this->mDescription = <<<TEXT
This script will find all rows in the categorylinks table whose collation is
out-of-date (cl_collation != '$wgCategoryCollation') and repopulate cl_sortkey
using the page title and cl_sortkey_prefix.  If everything's collation is
up-to-date, it will do nothing.
TEXT;

		$this->addOption( 'force', 'Run on all rows, even if the collation is ' .
			'supposed to be up-to-date.' );
		$this->addOption( 'previous-collation', 'Set the previous value of ' .
			'$wgCategoryCollation here to speed up this script, especially if your ' .
			'categorylinks table is large. This will only update rows with that ' .
			'collation, though, so it may miss out-of-date rows with a different, ' .
			'even older collation.', false, true );
		$this->addOption( 'target-collation', 'Set this to the new collation type to ' .
			'use instead of $wgCategoryCollation. Usually you should not use this, ' .
			'you should just update $wgCategoryCollation in LocalSettings.php.',
			false, true );
		$this->addOption( 'dry-run', 'Don\'t actually change the collations, just ' .
			'compile statistics.' );
		$this->addOption( 'verbose-stats', 'Show more statistics.' );
	}
예제 #11
0
 /**
  * Set script options
  */
 public function __construct()
 {
     parent::__construct();
     $this->addOption('debug', 'Show a lot of debugging stuff.');
     $this->addOption('local', 'Read files from local file system (uses: /raid/images/by_id/).');
     $this->mDescription = 'Calculate md5 checksums for images';
 }
예제 #12
0
 public function __construct()
 {
     parent::__construct();
     $this->addOption('list', 'List special page names');
     $this->addOption('only', 'Only update "page"; case sensitive, ' . 'check correct case by calling this script with --list or on ' . 'includes/QueryPage.php. Ex: --only=BrokenRedirects', false, true);
     $this->addOption('override', 'Also update pages that have updates disabled');
 }
예제 #13
0
 public function __construct()
 {
     parent::__construct();
     $this->addOption('delete', 'Actually delete the account');
     $this->addOption('ignore-groups', 'List of comma-separated groups to exclude', false, true);
     $this->addOption('ignore-touched', 'Skip accounts touched in last N days', false, true);
 }
예제 #14
0
 function __construct()
 {
     parent::__construct();
     global $IP;
     $this->addArg('name', 'The name of the wiki', true);
     $this->addArg('admin', 'The username of the wiki administrator (WikiSysop)', true);
     $this->addOption('pass', 'The password for the wiki administrator.', false, true);
     $this->addOption('passfile', 'An alternative way to provide pass option, as the contents of this file', false, true);
     /* $this->addOption( 'email', 'The email for the wiki administrator', false, true ); */
     $this->addOption('scriptpath', 'The relative path of the wiki in the web server (/wiki)', false, true);
     $this->addOption('lang', 'The language to use (en)', false, true);
     /* $this->addOption( 'cont-lang', 'The content language (en)', false, true ); */
     $this->addOption('dbtype', 'The type of database (mysql)', false, true);
     $this->addOption('dbserver', 'The database host (localhost)', false, true);
     $this->addOption('dbport', 'The database port; only for PostgreSQL (5432)', false, true);
     $this->addOption('dbname', 'The database name (my_wiki)', false, true);
     $this->addOption('dbpath', 'The path for the SQLite DB (/var/data)', false, true);
     $this->addOption('dbprefix', 'Optional database table name prefix', false, true);
     $this->addOption('installdbuser', 'The user to use for installing (root)', false, true);
     $this->addOption('installdbpass', 'The pasword for the DB user to install as.', false, true);
     $this->addOption('dbuser', 'The user to use for normal operations (wikiuser)', false, true);
     $this->addOption('dbpass', 'The pasword for the DB user for normal operations', false, true);
     $this->addOption('dbpassfile', 'An alternative way to provide dbpass option, as the contents of this file', false, true);
     $this->addOption('confpath', "Path to write LocalSettings.php to, default {$IP}", false, true);
     /* $this->addOption( 'dbschema', 'The schema for the MediaWiki DB in pg (mediawiki)', false, true ); */
     /* $this->addOption( 'namespace', 'The project namespace (same as the name)', false, true ); */
     $this->addOption('env-checks', "Run environment checks only, don't change anything");
 }
예제 #15
0
 function __construct()
 {
     parent::__construct();
     $this->mDescription = "Rebuilds titlekey table entries for all pages in DB.";
     $this->setBatchSize(1000);
     $this->addOption('start', 'Page ID to start from', false, true);
 }
예제 #16
0
 public function __construct()
 {
     parent::__construct();
     $this->addOption('start-page', 'page_id of the page to start with');
     $this->addOption('start-image', 'il_to of the image to start with');
     $this->addOption('maxlag', 'Maximum replication lag', false, true);
 }
 public function __construct()
 {
     parent::__construct();
     $this->mDescription = "Delete old (non-current) revisions from the database";
     $this->addOption('delete', 'Actually perform the deletion');
     $this->addOption('page_id', 'List of page ids to work on', false);
 }
예제 #18
0
 function __construct()
 {
     parent::__construct();
     $this->addDescription("Remove old objects from the parser cache. " . "This only works when the parser cache is in an SQL database.");
     $this->addOption('expiredate', 'Delete objects expiring before this date.', false, true);
     $this->addOption('age', 'Delete objects created more than this many seconds ago, assuming $wgParserCacheExpireTime ' . 'has been consistent.', false, true);
 }
예제 #19
0
 public function __construct()
 {
     parent::__construct();
     $this->mDescription = 'Outputs page text to stdout';
     $this->addOption('show-private', 'Show the text even if it\'s not available to the public');
     $this->addArg('title', 'Page title');
 }
예제 #20
0
 public function __construct()
 {
     parent::__construct();
     $this->addDescription('Remove a page record from the database');
     $this->addOption('delete', "Actually delete the page");
     $this->addArg('title', 'Title to delete');
 }
 public function __construct()
 {
     parent::__construct();
     $this->mDescription = 'Converts extension entry points to the new JSON registration format';
     $this->addArg('path', 'Location to the PHP entry point you wish to convert', true);
     $this->addOption('skin', 'Whether to write to skin.json', false, false);
 }
예제 #22
0
 public function __construct()
 {
     parent::__construct();
     $this->mDescription = "Build file cache for content pages";
     $this->addOption('agedays', 'How many days old files must be in order to delete', true, true);
     $this->addOption('subdir', 'Prune one $wgFileCacheDirectory subdirectory name', false, true);
 }
예제 #23
0
 public function __construct()
 {
     parent::__construct();
     $this->mDescription = "Parse a given wikitext";
     $this->addOption('title', 'Title name for the given wikitext (Default: \'CLIParser\')', false, true);
     $this->addArg('file', 'File containing wikitext (Default: stdin)', false);
 }
예제 #24
0
 public function __construct()
 {
     parent::__construct();
     $this->mDescription = "Pick a database that has pending jobs";
     $this->addOption('type', "Search by job type", false, true);
     $this->addOption('types', "Space separated list of job types to search for", false, true);
 }
 public function __construct()
 {
     parent::__construct();
     $this->mDescription = "Script to normalize double-byte latin UTF-8 characters";
     $this->addOption('q', 'quiet', false, true);
     $this->addOption('l', 'How long the searchindex and revision tables will be locked for', false, true);
 }
 public function __construct()
 {
     parent::__construct();
     $this->mDescription = "Scan the logging table and purge files that where deleted.";
     $this->addOption('starttime', 'Starting timestamp', false, true);
     $this->addOption('endtime', 'Ending timestamp', false, true);
 }
예제 #27
0
 public function __construct()
 {
     parent::__construct();
     $this->mDescription = 'Sets up the SMW storage backend currently selected in LocalSettings.php.';
     $this->addArg('backend', 'Execute the operation for the storage backend of the given name.', false);
     $this->addOption('delete', 'Delete all SMW data, uninstall the selected storage backend.');
 }
 public function __construct()
 {
     parent::__construct();
     $this->mDescription = "Deletes all archived images.";
     $this->addOption('delete', 'Perform the deletion');
     $this->addOption('force', 'Force deletion of rows from filearchive');
 }
예제 #29
0
 public function __construct()
 {
     parent::__construct();
     $this->mDescription = "Fix image attribution";
     $this->addOption('test', 'Test', false, false, 't');
     $this->addOption('conf', 'Configuration file', true, true, 't');
 }
예제 #30
0
 public function __construct()
 {
     parent::__construct();
     $this->addOption("threads", "The number of simultaneous transcode threads to run", false, true);
     $this->addOption("frequency", "How often the script checks for job threads to be active", false, true);
     $this->mDescription = "Transcode job running demon, continuously runs transcode jobs";
 }