r63981 MediaWiki - Code Review archive

Repository:MediaWiki
Revision:r63980‎ | r63981 | r63982 >
Date:17:27, 20 March 2010
Author:ialex
Status:ok
Tags:
Comment:
Fixed some doxygen warnings
Modified paths:
  • /trunk/phase3/includes/specials/SpecialUpload.php (modified) (history)

Diff [purge]

Index: trunk/phase3/includes/specials/SpecialUpload.php
@@ -11,7 +11,7 @@
1212 /**
1313 * Constructor : initialise object
1414 * Get data POSTed through the form and assign them to the object
15 - * @param WebRequest $request Data posted.
 15+ * @param $request WebRequest : data posted.
1616 */
1717 public function __construct( $request = null ) {
1818 global $wgRequest;
@@ -53,7 +53,7 @@
5454 /**
5555 * Initialize instance variables from request and create an Upload handler
5656 *
57 - * @param WebRequest $request The request to extract variables from
 57+ * @param $request WebRequest: the request to extract variables from
5858 */
5959 protected function loadRequest( $request ) {
6060 global $wgUser;
@@ -106,8 +106,8 @@
107107 * Handle permission checking elsewhere in order to be able to show
108108 * custom error messages.
109109 *
110 - * @param User $user
111 - * @return bool
 110+ * @param $user User object
 111+ * @return Boolean
112112 */
113113 public function userCanExecute( $user ) {
114114 return UploadBase::isEnabled() && parent::userCanExecute( $user );
@@ -187,7 +187,7 @@
188188 /**
189189 * Show the main upload form
190190 *
191 - * @param mixed $form An HTMLForm instance or HTML string to show
 191+ * @param $form Mixed: an HTMLForm instance or HTML string to show
192192 */
193193 protected function showUploadForm( $form ) {
194194 # Add links if file was previously deleted
@@ -207,8 +207,9 @@
208208 /**
209209 * Get an UploadForm instance with title and text properly set.
210210 *
211 - * @param string $message HTML string to add to the form
212 - * @param string $sessionKey Session key in case this is a stashed upload
 211+ * @param $message String: HTML string to add to the form
 212+ * @param $sessionKey String: session key in case this is a stashed upload
 213+ * @param $hideIgnoreWarning Boolean: whether to hide "ignore warning" check box
213214 * @return UploadForm
214215 */
215216 protected function getUploadForm( $message = '', $sessionKey = '', $hideIgnoreWarning = false ) {
@@ -290,7 +291,7 @@
291292 * essentially means that UploadBase::VERIFICATION_ERROR and
292293 * UploadBase::EMPTY_FILE should not be passed here.
293294 *
294 - * @param string $message HTML message to be passed to mainUploadForm
 295+ * @param $message String: HTML message to be passed to mainUploadForm
295296 */
296297 protected function showRecoverableUploadError( $message ) {
297298 $sessionKey = $this->mUpload->stashSession();
@@ -305,7 +306,7 @@
306307 * Stashes the upload, shows the main form, but adds an "continue anyway button".
307308 * Also checks whether there are actually warnings to display.
308309 *
309 - * @param array $warnings
 310+ * @param $warnings Array
310311 * @return boolean true if warnings were displayed, false if there are no
311312 * warnings and the should continue processing like there was no warning
312313 */
@@ -360,7 +361,7 @@
361362 /**
362363 * Show the upload form with error message, but do not stash the file.
363364 *
364 - * @param string $message
 365+ * @param $message String
365366 */
366367 protected function showUploadError( $message ) {
367368 $message = '<h2>' . wfMsgHtml( 'uploadwarning' ) . "</h2>\n" .
@@ -491,7 +492,7 @@
492493 /**
493494 * Provides output to the user for a result of UploadBase::verifyUpload
494495 *
495 - * @param array $details Result of UploadBase::verifyUpload
 496+ * @param $details Array: result of UploadBase::verifyUpload
496497 */
497498 protected function processVerificationError( $details ) {
498499 global $wgFileExtensions, $wgLang;
@@ -556,7 +557,8 @@
557558
558559 /**
559560 * Remove a temporarily kept file stashed by saveTempUploadedFile().
560 - * @return success
 561+ *
 562+ * @return Boolean: success
561563 */
562564 protected function unsaveUploadedFile() {
563565 global $wgOut;
@@ -578,8 +580,8 @@
579581 * Formats a result of UploadBase::getExistsWarning as HTML
580582 * This check is static and can be done pre-upload via AJAX
581583 *
582 - * @param array $exists The result of UploadBase::getExistsWarning
583 - * @return string Empty string if there is no warning or an HTML fragment
 584+ * @param $exists Array: the result of UploadBase::getExistsWarning
 585+ * @return String: empty string if there is no warning or an HTML fragment
584586 */
585587 public static function getExistsWarning( $exists ) {
586588 global $wgUser, $wgContLang;
@@ -635,8 +637,8 @@
636638 /**
637639 * Get a list of warnings
638640 *
639 - * @param string local filename, e.g. 'file exists', 'non-descriptive filename'
640 - * @return array list of warning messages
 641+ * @param $filename String: local filename, e.g. 'file exists', 'non-descriptive filename'
 642+ * @return Array: list of warning messages
641643 */
642644 public static function ajaxGetExistsWarning( $filename ) {
643645 $file = wfFindFile( $filename );
@@ -734,7 +736,7 @@
735737 * Get the descriptor of the fieldset that contains the file source
736738 * selection. The section is 'source'
737739 *
738 - * @return array Descriptor array
 740+ * @return Array: descriptor array
739741 */
740742 protected function getSourceSection() {
741743 global $wgLang, $wgUser, $wgRequest;
@@ -812,7 +814,7 @@
813815 /**
814816 * Get the messages indicating which extensions are preferred and prohibitted.
815817 *
816 - * @return string HTML string containing the message
 818+ * @return String: HTML string containing the message
817819 */
818820 protected function getExtensionsMessage() {
819821 # Print a list of allowed file extensions, if so configured. We ignore
@@ -849,7 +851,7 @@
850852 * Get the descriptor of the fieldset that contains the file description
851853 * input. The section is 'description'
852854 *
853 - * @return array Descriptor array
 855+ * @return Array: descriptor array
854856 */
855857 protected function getDescriptionSection() {
856858 global $wgUser, $wgOut;
@@ -927,7 +929,7 @@
928930 * Get the descriptor of the fieldset that contains the upload options,
929931 * such as "watch this file". The section is 'options'
930932 *
931 - * @return array Descriptor array
 933+ * @return Array: descriptor array
932934 */
933935 protected function getOptionsSection() {
934936 global $wgUser;
@@ -970,9 +972,6 @@
971973
972974 /**
973975 * Add upload JS to $wgOut
974 - *
975 - * @param $autofill Boolean: Whether or not to autofill the destination
976 - * filename text box
977976 */
978977 protected function addUploadJS() {
979978 global $wgUseAjax, $wgAjaxUploadDestCheck, $wgAjaxLicensePreview, $wgEnableAPI;

Status & tagging log