Last modified: 2013-06-18 16:24:15 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 T20169, the corresponding Phabricator task for complete and up-to-date bug report information.
Bug 18169 - $wgExportAllowListContributors and related unused code should be removed
$wgExportAllowListContributors and related unused code should be removed
Status: RESOLVED FIXED
Product: MediaWiki
Classification: Unclassified
Documentation (Other open bugs)
1.15.x
All All
: Low enhancement (vote)
: ---
Assigned To: Nobody - You can work on this!
:
Depends on:
Blocks:
  Show dependency treegraph
 
Reported: 2009-03-26 03:17 UTC by Dan Jacobson
Modified: 2013-06-18 16:24 UTC (History)
5 users (show)

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


Attachments

Description Dan Jacobson 2009-03-26 03:17:03 UTC
In DefaultSettings.php please document $wgExportAllowListContributors what does.
(Does it still do it too?!)
Comment 1 Dan Jacobson 2009-03-26 03:17:48 UTC
I mean:
In DefaultSettings.php please document what $wgExportAllowListContributors does.
(Does it still do it too?!)
Comment 2 Chad H. 2009-03-26 03:21:46 UTC
Done in r48852
Comment 3 Dan Jacobson 2009-03-26 04:09:17 UTC
I'm sorry but I'm afraid this all must be just a remnant of something
from the past, as all I can find is

find|xargs grep -inH listauthors
./maintenance/fuzz-tester.php:1215: 'listauthors' => wikiFuzz::chooseInput( array("", "0", "-1", wikiFuzz::makeFuzz(2)) ),
./includes/specials/SpecialExport.php:128: $list_authors = $wgRequest->getCheck( 'listauthors' );

Hence the unused code should all be removed, no?
Comment 4 Chad H. 2009-03-26 04:13:14 UTC
Reclosing, this does do stuff. Look in Export.php. Please don't reopen.
Comment 5 Dan Jacobson 2009-03-26 04:25:48 UTC
OK, but there is no such checkbox:
  $list_authors = $wgRequest->getCheck( 'listauthors' );
so that will always fail. And then you throw that answer away anyway, with:
  if ( !$this->curonly || !$wgExportAllowListContributors ) $list_authors = false ;
no?
Comment 6 Dan Jacobson 2009-03-26 04:40:17 UTC
Well, at least don't check the nonexistent checkbox.
Comment 7 Dan Jacobson 2009-03-26 04:42:14 UTC
In any case $list_authors has no place that it will be set to true.
Comment 8 Dan Jacobson 2009-03-30 00:08:43 UTC
I swear you are making a big mistake. Please check the above three comments and reclose.

No point in documenting it in DefaultSettings if it can never affect anything.
Comment 9 p858snake 2009-03-30 00:17:43 UTC
I believe, although not completely sure that it effects this checkbox "Include only the current revision, not the full history" on special export.
Comment 10 Ángel González 2009-03-30 00:24:40 UTC
It could be a 'hidden' option (no checkbox, but available as a get parameter if
you know its name), Special:Export has several of these.

Instead of removing the do_list_authors code for being unused, please consider
applying the patch at bug 16082.

Comment 11 Mike.lifeguard 2009-03-30 00:26:52 UTC
Edited summary for easier parsing.
Comment 12 Dan Jacobson 2009-03-30 00:38:25 UTC
Anyway, there are only two line with...
$ find *|fgrep -v .svn|xargs grep -l listauthors|xargs grep -c listauthors
includes/specials/SpecialExport.php:1
maintenance/fuzz-tester.php:1
Comment 13 Ryan Schmidt 2009-03-30 00:42:12 UTC
This is most certainly NOT unused, you just fail at searching.

Here's how it works:
1) User visits Special:Export, and chooses to only get the current revision.
2) User somehow manages to add &listauthors=1 to the GET request (having a checkbox would be nice for this).
3) Providing that $wgExportAllowListAuthors is true, the export interface will return a list of all authors to the page, even though it is only returning the top revision.

Not entirely sure what the software does with this list upon importing into another wiki, etc., as of yet, but I'm assuming it is used to fill out the history to some extent -- will have to do some more in-depth review of this
Comment 14 Dan Jacobson 2009-03-30 01:10:19 UTC
Well, you've documented $wgExportAllowListContributors, but without
also somewhere documenting
>2) User somehow manages to add &listauthors=1 to the GET request (having a
> checkbox would be nice for this).
there will be little chance anybody will figure it out.
I'm not saying you need to necessarily clutter the interface with a checkbox, but do
document this secret parameter somewhere...
Comment 15 Ariel T. Glenn 2011-11-16 12:03:39 UTC
Checkbox added in rev 103314 (if the admins have enabled the option globally, it might as well show up in the form).
Comment 16 Antoine "hashar" Musso (WMF) 2013-02-18 10:44:28 UTC
Seems like nothing is left to be done.  The global is documented, we even have a checkbox for user to use that function :-]

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


Navigation
Links