Index: trunk/extensions/EducationProgram/specials/SpecialEPPage.php |
— | — | @@ -16,7 +16,7 @@ |
17 | 17 | |
18 | 18 | /** |
19 | 19 | * The subpage, ie the part after Special:PageName/ |
20 | | - * Emptry string if none is provided. |
| 20 | + * Empty string if none is provided. |
21 | 21 | * |
22 | 22 | * @since 0.1 |
23 | 23 | * @var string |
— | — | @@ -49,7 +49,9 @@ |
50 | 50 | * |
51 | 51 | * @since 0.1 |
52 | 52 | * |
53 | | - * @param string|null $arg |
| 53 | + * @param string|null $subPage |
| 54 | + * |
| 55 | + * @return boolean |
54 | 56 | */ |
55 | 57 | public function execute( $subPage ) { |
56 | 58 | $subPage = is_null( $subPage ) ? '' : $subPage; |
— | — | @@ -128,7 +130,7 @@ |
129 | 131 | * |
130 | 132 | * @since 0.1 |
131 | 133 | * |
132 | | - * @param array $links |
| 134 | + * @param array $items |
133 | 135 | */ |
134 | 136 | protected function displayNavigation( array $items = array() ) { |
135 | 137 | $links = array(); |
Index: trunk/extensions/EducationProgram/specials/SpecialEPFormPage.php |
— | — | @@ -100,6 +100,8 @@ |
101 | 101 | } |
102 | 102 | |
103 | 103 | /** |
| 104 | + * Display the form and set the item field, or redirect the user. |
| 105 | + * |
104 | 106 | * @since 0.1 |
105 | 107 | */ |
106 | 108 | protected function showContent() { |
— | — | @@ -371,7 +373,7 @@ |
372 | 374 | } |
373 | 375 | |
374 | 376 | /** |
375 | | - * Gets called for evey known submitted value, so they can be dealth with if needed. |
| 377 | + * Gets called for evey known submitted value, so they can be dealt with if needed. |
376 | 378 | * |
377 | 379 | * @since 0.1 |
378 | 380 | * |
Index: trunk/extensions/EducationProgram/includes/EPDBObject.php |
— | — | @@ -207,7 +207,7 @@ |
208 | 208 | * |
209 | 209 | * @since 0.1 |
210 | 210 | * |
211 | | - * @param integere|null $id |
| 211 | + * @param integer|null $id |
212 | 212 | */ |
213 | 213 | public function setId( $id ) { |
214 | 214 | return $this->setField( 'id', $id ); |
— | — | @@ -429,7 +429,6 @@ |
430 | 430 | * |
431 | 431 | * @param string $name |
432 | 432 | * @param mixed $value |
433 | | - * @param boolean $haxPrefix |
434 | 433 | * |
435 | 434 | * @throws MWException |
436 | 435 | */ |
— | — | @@ -943,6 +942,7 @@ |
944 | 943 | * @param array $conditions |
945 | 944 | * @param array $options |
946 | 945 | * @param array $joinConds |
| 946 | + * @param array $tables |
947 | 947 | * |
948 | 948 | * @return ResultWrapper |
949 | 949 | */ |
Index: trunk/extensions/EducationProgram/includes/EPPager.php |
— | — | @@ -1,7 +1,7 @@ |
2 | 2 | <?php |
3 | 3 | |
4 | 4 | /** |
5 | | - * Abstract class extensing the TablePager with common functions |
| 5 | + * Abstract class extending the TablePager with common functions |
6 | 6 | * for pagers listing EPDBObject deriving classes and some compatibility helpers. |
7 | 7 | * |
8 | 8 | * @since 0.1 |
— | — | @@ -135,8 +135,7 @@ |
136 | 136 | $this->currentObject = $c::newFromDBResult( $row ); |
137 | 137 | |
138 | 138 | $cells = array(); |
139 | | - $fields = $this->getFieldNames(); |
140 | | - |
| 139 | + |
141 | 140 | foreach ( $this->getFieldNames() as $field => $name ) { |
142 | 141 | if ( $field === '_select' ) { |
143 | 142 | $value = Html::element( |
— | — | @@ -189,8 +188,7 @@ |
190 | 189 | * @return array |
191 | 190 | */ |
192 | 191 | public function getFieldNames() { |
193 | | - $c = $this->className; // Yeah, this is needed in PHP 5.3 >_> |
194 | | - $conds = $this->conds; // Indeed, this is also needed >_> |
| 192 | + $conds = $this->conds; // Yeah, this is needed in PHP 5.3 >_> |
195 | 193 | $fields = array_filter( $this->getFields(), function( $name ) use ( $conds ) { |
196 | 194 | return !array_key_exists( $name, $conds ); |
197 | 195 | } ); |
— | — | @@ -198,18 +196,18 @@ |
199 | 197 | $fields = $this->getFieldNameList( $fields ); |
200 | 198 | |
201 | 199 | if ( $this->hasMultipleItemControl() ) { |
202 | | - // This is a hack to get an extra colum for select all control. |
| 200 | + // This is a hack to get an extra column for select all control. |
203 | 201 | $fields = array_merge( array( '_select' => '' ), $fields ); |
204 | 202 | } |
205 | 203 | |
206 | | - $fields['_controls'] = ''; // This is a hack to get an extra colum for the control links. |
| 204 | + $fields['_controls'] = ''; // This is a hack to get an extra column for the control links. |
207 | 205 | |
208 | 206 | return $fields; |
209 | 207 | } |
210 | 208 | |
211 | 209 | /** |
212 | 210 | * Returns HTML for the multiple item control. |
213 | | - * With actions comming from @see getMultipleItemActions. |
| 211 | + * With actions coming from @see getMultipleItemActions. |
214 | 212 | * |
215 | 213 | * @since 0.1 |
216 | 214 | * |
— | — | @@ -520,7 +518,7 @@ |
521 | 519 | protected abstract function getFormattedValue( $name, $value ); |
522 | 520 | |
523 | 521 | /** |
524 | | - * Returns a list of (escaped, html) links to add in an adittional column. |
| 522 | + * Returns a list of (escaped, html) links to add in an additional column. |
525 | 523 | * |
526 | 524 | * @since 0.1 |
527 | 525 | * |
— | — | @@ -538,7 +536,7 @@ |
539 | 537 | * @since 0.1 |
540 | 538 | * |
541 | 539 | * @param string $type |
542 | | - * @paran integer $id |
| 540 | + * @param integer $id |
543 | 541 | * |
544 | 542 | * @return string |
545 | 543 | */ |
Index: trunk/extensions/EducationProgram/api/ApiDeleteEducation.php |
— | — | @@ -14,6 +14,13 @@ |
15 | 15 | */ |
16 | 16 | class ApiDeleteEducation extends ApiBase { |
17 | 17 | |
| 18 | + /** |
| 19 | + * Maps class names to values for the type parameter. |
| 20 | + * |
| 21 | + * @since 0.1 |
| 22 | + * |
| 23 | + * @var array |
| 24 | + */ |
18 | 25 | protected static $typeMap = array( |
19 | 26 | 'org' => 'EPOrg', |
20 | 27 | 'course' => 'EPCourse', |
— | — | @@ -22,6 +29,15 @@ |
23 | 30 | 'mentor' => 'EPMentor', |
24 | 31 | ); |
25 | 32 | |
| 33 | + /** |
| 34 | + * Returns the type param value for a class name. |
| 35 | + * |
| 36 | + * @since 0.1 |
| 37 | + * |
| 38 | + * @param string $className |
| 39 | + * |
| 40 | + * @return string |
| 41 | + */ |
26 | 42 | public static function getTypeForClassName( $className ) { |
27 | 43 | static $map = null; |
28 | 44 | |
— | — | @@ -57,10 +73,14 @@ |
58 | 74 | } |
59 | 75 | |
60 | 76 | /** |
| 77 | + * Returns if the user is allowed to delete the specified object(s). |
| 78 | + * |
61 | 79 | * @since 0.1 |
62 | 80 | * |
63 | 81 | * @param string $type |
64 | 82 | * @param array $params |
| 83 | + * |
| 84 | + * @return boolean |
65 | 85 | */ |
66 | 86 | protected function userIsAllowed( $type, array $params ) { |
67 | 87 | $user = $this->getUser(); |