From: Bryan Tong Minh Date: Tue, 30 Nov 2010 20:57:22 +0000 (+0000) Subject: (bug 26160) Upload description set by extensions are not propagated X-Git-Tag: 1.31.0-rc.0~33666 X-Git-Url: https://git.cyclocoop.org/%27.WWW_URL.%27admin/?a=commitdiff_plain;h=48450b278e89aa3819fb5b2975403cb8dbce2fe3;p=lhc%2Fweb%2Fwiklou.git (bug 26160) Upload description set by extensions are not propagated Regression originating from the UploadForm rewrite; going to mark for 1.16 --- diff --git a/CREDITS b/CREDITS index 07968dd3a3..2842b0c028 100644 --- a/CREDITS +++ b/CREDITS @@ -79,6 +79,7 @@ following names for their contribution to the product. * Brent G * Brianna Laugher * Carlin +* Carsten Nielsen * Conrad Irwin * Dan Barrett * Dan Nessett diff --git a/RELEASE-NOTES b/RELEASE-NOTES index 084cad188d..822f5214b4 100644 --- a/RELEASE-NOTES +++ b/RELEASE-NOTES @@ -442,6 +442,7 @@ LocalSettings.php. The specific bugs are listed below in the general notes. * Show "skin does not exist error" only when the skin is inputted in the wrong case. * (bug 26164) Potential html injection when the database server isn't available +* (bug 26160) Upload description set by extensions are not propagated === API changes in 1.17 === * (bug 22738) Allow filtering by action type on query=logevent. diff --git a/includes/specials/SpecialUpload.php b/includes/specials/SpecialUpload.php index e9e127a9d2..7a7a808c56 100644 --- a/includes/specials/SpecialUpload.php +++ b/includes/specials/SpecialUpload.php @@ -246,6 +246,7 @@ class SpecialUpload extends SpecialPage { 'hideignorewarning' => $hideIgnoreWarning, 'destwarningack' => (bool)$this->mDestWarningAck, + 'description' => $this->mComment, 'texttop' => $this->uploadFormTextTop, 'textaftersummary' => $this->uploadFormTextAfterSummary, 'destfile' => $this->mDesiredDestName, @@ -740,6 +741,7 @@ class UploadForm extends HTMLForm { protected $mDestWarningAck; protected $mDestFile; + protected $mComment; protected $mTextTop; protected $mTextAfterSummary; @@ -754,6 +756,9 @@ class UploadForm extends HTMLForm { $this->mDestWarningAck = !empty( $options['destwarningack'] ); $this->mDestFile = isset( $options['destfile'] ) ? $options['destfile'] : ''; + $this->mComment = isset( $options['description'] ) ? + $options['description'] : ''; + $this->mTextTop = isset( $options['texttop'] ) ? $options['texttop'] : ''; @@ -930,6 +935,7 @@ class UploadForm extends HTMLForm { 'label-message' => $this->mForReUpload ? 'filereuploadsummary' : 'fileuploadsummary', + 'default' => $this->mComment, 'cols' => intval( $wgUser->getOption( 'cols' ) ), 'rows' => 8, )