Index: trunk/extensions/LiquidThreads/api/ApiThreadAction.php |
— | — | @@ -43,6 +43,35 @@ |
44 | 44 | 'NULL to specify the default signature', |
45 | 45 | ); |
46 | 46 | } |
| 47 | + |
| 48 | + public function getPossibleErrors() { |
| 49 | + return array( |
| 50 | + array( 'code' => 'sessionfailure', 'info' => '' ), |
| 51 | + array( 'code' => 'action', 'info' => 'missing-param' ), |
| 52 | + array( 'code' => 'too-many-threads', 'info' => 'You may only split one thread at a time' ), |
| 53 | + array( 'code' => 'no-specified-threads', 'info' => 'You must specify a thread to split' ), |
| 54 | + array( 'code' => 'already-top-level', 'info' => 'This thread is already a top-level thread.' ), |
| 55 | + array( 'code' => 'no-valid-subject', 'info' => 'No subject, or an invalid subject, was specified' ), |
| 56 | + array( 'code' => 'no-specified-threads', 'info' => 'You must specify a thread to merge' ), |
| 57 | + array( 'code' => 'no-parent-thread', 'info' => 'You must specify a new parent thread to merge beneath' ), |
| 58 | + array( 'code' => 'invalid-parent-thread', 'info' => 'The parent thread you specified was neither the title of a thread, nor a thread ID.' ), |
| 59 | + array( 'code' => 'missing-param', 'info' => 'You must specify a talk-page to post the thread to' ), |
| 60 | + array( 'code' => 'invalid-talkpage', 'info' => 'The talkpage you specified is invalid, or does not have discussion threading enabled.' ), |
| 61 | + array( 'code' => 'talkpage-protected', 'info' => 'You cannot post to the specified talkpage, because it is protected from new posts' ), |
| 62 | + array( 'code' => 'missing-param', 'info' => 'You must specify a thread subject' ), |
| 63 | + array( 'code' => 'invalid-subject', 'info' => 'The subject you specified is not valid' ), |
| 64 | + array( 'code' => 'no-text', 'info' => 'You must include text in your post' ), |
| 65 | + array( 'code' => 'too-many-threads', 'info' => 'You may only edit one thread at a time' ), |
| 66 | + array( 'code' => 'invalid-subject', 'info' => 'You must specify a thread to edit' ), |
| 67 | + array( 'code' => 'no-specified-threads', 'info' => '' ), 'You must specify a thread to reply to' |
| 68 | + array( 'code' => 'perm_result-protected', 'info' => 'You cannot reply to this thread, because the perm_result is protected from replies.' ), |
| 69 | + array( 'code' => 'too-many-threads', 'info' => 'You may only change the subject of one thread at a time' ), |
| 70 | + array( 'code' => 'no-specified-threads', 'info' => 'You must specify a thread to change the subject of' ), |
| 71 | + array( 'code' => 'missing-param', 'info' => 'You must specify a thread subject' ), |
| 72 | + array( 'code' => 'no-specified-threads', 'info' => 'You must specify a thread to set the sortkey of' ), |
| 73 | + array( 'code' => 'invalid-sortkey', 'info' => 'You must specify a valid timestamp for the sortkey parameter. It should be in the form YYYYMMddhhmmss, a unix timestamp or "now".' ), |
| 74 | + ); |
| 75 | + } |
47 | 76 | |
48 | 77 | public function getExamples() { |
49 | 78 | return array( |
— | — | @@ -743,7 +772,7 @@ |
744 | 773 | |
745 | 774 | // Validate timestamp |
746 | 775 | if ( empty( $params['sortkey'] ) ) { |
747 | | - $this->dieUsage( 'You must specify a valid timestamp for the sortkey' . |
| 776 | + $this->dieUsage( 'You must specify a valid timestamp for the sortkey ' . |
748 | 777 | 'parameter. It should be in the form YYYYMMddhhmmss, a ' . |
749 | 778 | 'unix timestamp or "now".', 'invalid-sortkey' ); |
750 | 779 | return; |