Index: trunk/phase3/maintenance/edit.php |
— | — | @@ -26,23 +26,23 @@ |
27 | 27 | public function __construct() { |
28 | 28 | parent::__construct(); |
29 | 29 | $this->mDescription = "Edit an article from the command line, text is from stdin"; |
30 | | - $this->addOption( 'u', 'Username', false, true ); |
31 | | - $this->addOption( 's', 'Edit summary', false, true ); |
32 | | - $this->addOption( 'm', 'Minor edit' ); |
33 | | - $this->addOption( 'b', 'Bot edit' ); |
34 | | - $this->addOption( 'a', 'Enable autosummary' ); |
35 | | - $this->addOption( 'no-rc', 'Do not show the change in recent changes' ); |
| 30 | + $this->addOption( 'user', 'Username', false, true, 'u' ); |
| 31 | + $this->addOption( 'summary', 'Edit summary', false, true, 's' ); |
| 32 | + $this->addOption( 'minor', 'Minor edit', false, false, 'm' ); |
| 33 | + $this->addOption( 'bot', 'Bot edit', false, false, 'b' ); |
| 34 | + $this->addOption( 'autosummary', 'Enable autosummary', false, false, 'a' ); |
| 35 | + $this->addOption( 'no-rc', 'Do not show the change in recent changes', false, false, 'r' ); |
36 | 36 | $this->addArg( 'title', 'Title of article to edit' ); |
37 | 37 | } |
38 | 38 | |
39 | 39 | public function execute() { |
40 | 40 | global $wgUser, $wgTitle; |
41 | 41 | |
42 | | - $userName = $this->getOption( 'u', 'Maintenance script' ); |
43 | | - $summary = $this->getOption( 's', '' ); |
44 | | - $minor = $this->hasOption( 'm' ); |
45 | | - $bot = $this->hasOption( 'b' ); |
46 | | - $autoSummary = $this->hasOption( 'a' ); |
| 42 | + $userName = $this->getOption( 'user', 'Maintenance script' ); |
| 43 | + $summary = $this->getOption( 'summary', '' ); |
| 44 | + $minor = $this->hasOption( 'minor' ); |
| 45 | + $bot = $this->hasOption( 'bot' ); |
| 46 | + $autoSummary = $this->hasOption( 'autosummary' ); |
47 | 47 | $noRC = $this->hasOption( 'no-rc' ); |
48 | 48 | |
49 | 49 | $wgUser = User::newFromName( $userName ); |