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

Platonides <platoni...@gmail.com> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
                 CC|                            |platoni...@gmail.com

--- Comment #12 from Platonides <platoni...@gmail.com> 2011-11-23 16:24:02 UTC 
---
(In reply to comment #4)
> [19:02:29] <Reedy> Size: 6.83 MB (7,164,781 bytes)
> [19:02:39] <Reedy> Size on disk: 148 MB (156,164,096 bytes)
> 
> on NTFS..

I get 28 MB vs 171 MB (it has grown?). And 15 MB in the zip.

The file footprint could be much smaller (~96:1) if the rotation, flipping and
filling was done by the script. That would appeal small sites. Large ones would
still want to cache it in the fs.

The server code seems very messy, including html injection, register globals
problems and ugly direct $_REQUEST manipulation (I understand you may want to
keep it separate from, but you should avoid the notices if they are unset, eg.
array addition to some defaults). There's a general lack of indentation, and at
least on swmp.php should be tab based.

Old conventions MW extension uses: Registration should be done to the passed
$parser with ParserFirstCallInit, not to $wgParser with $wgExtensionFunctions.
Should use $wgExtensionAssetsPath

You should have very good reasons to defend this line:
    $parser->disableCache();//should solve caching problem.
Luckily, it is apparently unneeded, so it seems it could be removed without
harm.

The chdir() 'quick hack so scripts works' should be removed if possible. You
can use __DIR__ or dirname( __FILE__ ) in the server includes (also not that
include_path is not duaranteed to contain .).
Classes should be autoloaded.
There are also html injection problems in swmp.php but in general, shouldn't be
hard to fix that file. I'm more concerned about making the server safe.

As it is now, there's no chance it gets enabled in any WMF project.

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