Last modified: 2012-04-12 13:55:58 UTC

Wikimedia Bugzilla is closed!

Wikimedia migrated from Bugzilla to Phabricator. Bug reports are handled in Wikimedia Phabricator.
This static website is read-only and for historical purposes. It is not possible to log in and except for displaying bug reports and their history, links might be broken. See T29645, the corresponding Phabricator task for complete and up-to-date bug report information.
Bug 27645 - rebuildImages.php fails upon odd character sets
rebuildImages.php fails upon odd character sets
Status: NEW
Product: MediaWiki
Classification: Unclassified
Maintenance scripts (Other open bugs)
1.16.x
All All
: Normal minor (vote)
: ---
Assigned To: Nobody - You can work on this!
:
Depends on:
Blocks:
  Show dependency treegraph
 
Reported: 2011-02-22 23:14 UTC by Benjamin Bach
Modified: 2012-04-12 13:55 UTC (History)
2 users (show)

See Also:
Web browser: ---
Mobile Platform: ---
Assignee Huggle Beta Tester: ---


Attachments

Description Benjamin Bach 2011-02-22 23:14:32 UTC
Hi!

I have a proposition to fix line 196 as it will fail if wfLocalFile(...) fails to return an object. In my case, it was due to an odd character in the file name.

Some people might want it to fail with incompatible filenames. In my case, importing images from Wikipedia, I don't want it to stop at every broken filename. So I propose the following, and maybe someone can add some commandline option such as "--skip-unreadable" or similar.


                        $file = wfLocalFile( $filename );
                        if (!$file) {
                           $this->log ("cannot be read: $filename");
                        } else {
                                if ( !$file->recordUpload( '', '(recovered file$
                                false, $timestamp ) )
                                {
                                        $this->log( "Error uploading file $full$
                                        return;
                                }
                        }
Comment 1 Benjamin Bach 2011-02-23 10:32:40 UTC
Problematic filename:

cannot be read: Eublemma_anachoresis_%28Noctuidae%2C_Eublemminae%29_P1010030.JPG
Comment 2 Mark A. Hershberger 2011-02-23 21:51:10 UTC
If you can supply a reasonable patch that does what you want, we'll try to get it applied.

Note You need to log in before you can comment on or make changes to this bug.


Navigation
Links