Index: trunk/phase3/includes/specials/SpecialUpload.php |
— | — | @@ -405,7 +405,7 @@ |
406 | 406 | * filter out illegal characters, and try to make a legible name |
407 | 407 | * out of it. We'll strip some silently that Title would die on. |
408 | 408 | */ |
409 | | - if( $this->mDesiredDestName ) { |
| 409 | + if( $this->mDesiredDestName != '' ) { |
410 | 410 | $basename = $this->mDesiredDestName; |
411 | 411 | } else { |
412 | 412 | $basename = $this->mSrcName; |
— | — | @@ -1000,7 +1000,7 @@ |
1001 | 1001 | return false; |
1002 | 1002 | } |
1003 | 1003 | |
1004 | | - if( $this->mDesiredDestName ) { |
| 1004 | + if( $this->mDesiredDestName != '' ) { |
1005 | 1005 | $title = Title::makeTitleSafe( NS_FILE, $this->mDesiredDestName ); |
1006 | 1006 | // Show a subtitle link to deleted revisions (to sysops et al only) |
1007 | 1007 | if( $title instanceof Title && ( $count = $title->isDeleted() ) > 0 && $wgUser->isAllowed( 'deletedhistory' ) ) { |
— | — | @@ -1136,7 +1136,7 @@ |
1137 | 1137 | } else { |
1138 | 1138 | $filename_form = |
1139 | 1139 | "<input tabindex='1' type='file' name='wpUploadFile' id='wpUploadFile' " . |
1140 | | - ($this->mDesiredDestName?"":"onchange='fillDestFilename(\"wpUploadFile\")' ") . |
| 1140 | + ($this->mDesiredDestName!=''?"":"onchange='fillDestFilename(\"wpUploadFile\")' ") . |
1141 | 1141 | "size='60' />" . |
1142 | 1142 | "<input type='hidden' name='wpSourceType' value='file' />" ; |
1143 | 1143 | } |
Index: trunk/phase3/RELEASE-NOTES |
— | — | @@ -224,6 +224,9 @@ |
225 | 225 | whether the engines are actually available |
226 | 226 | * (bug 19390) Omit the "printable version" link on the printable version |
227 | 227 | * (bug 18394) img_auth.php now respects userCan |
| 228 | +* (bug 19509) Uploading to a file named '0' previously treated it as null input |
| 229 | + and attempted to upload with the source name. Now warns about not having an |
| 230 | + extension (since 0.ext is perfectly valid) |
228 | 231 | |
229 | 232 | == API changes in 1.16 == |
230 | 233 | |