https://bugzilla.wikimedia.org/show_bug.cgi?id=27645

           Summary: rebuildImages.php fails upon odd character sets
           Product: MediaWiki
           Version: 1.16.2
          Platform: All
        OS/Version: All
            Status: NEW
          Severity: enhancement
          Priority: Normal
         Component: Maintenance scripts
        AssignedTo: wikibugs-l@lists.wikimedia.org
        ReportedBy: benjaom...@gmail.com
                CC: innocentkil...@gmail.com


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;
                                }
                        }

-- 
Configure bugmail: https://bugzilla.wikimedia.org/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the assignee for the bug.
You are on the CC list for the bug.

_______________________________________________
Wikibugs-l mailing list
Wikibugs-l@lists.wikimedia.org
https://lists.wikimedia.org/mailman/listinfo/wikibugs-l

Reply via email to