X-Git-Url: https://git.heureux-cyclage.org/?a=blobdiff_plain;f=includes%2Fspecials%2FSpecialLog.php;h=bad17466b54d7ed52804e5c8519a44920e21da7d;hb=40ced7e89ca9cd6896cd37b4b35051ed5754eb44;hp=6a11bf4d949e7c76510948ae1b5b9df457e580f9;hpb=12ff4dec05ff8bb1a1910bf6745155b93e1912b5;p=lhc%2Fweb%2Fwiklou.git diff --git a/includes/specials/SpecialLog.php b/includes/specials/SpecialLog.php index 6a11bf4d94..bad17466b5 100644 --- a/includes/specials/SpecialLog.php +++ b/includes/specials/SpecialLog.php @@ -51,6 +51,7 @@ class SpecialLog extends SpecialPage { $opts->add( 'dir', '' ); $opts->add( 'offender', '' ); $opts->add( 'subtype', '' ); + $opts->add( 'logid', '' ); // Set values $opts->fetchValuesFromRequest( $this->getRequest() ); @@ -169,6 +170,16 @@ class SpecialLog extends SpecialPage { return $subpages; } + /** + * Set options based on the subpage title parts: + * - One part that is a valid log type: Special:Log/logtype + * - Two parts: Special:Log/logtype/username + * - Otherwise, assume the whole subpage is a username. + * + * @param FormOptions $opts + * @param $par + * @throws ConfigException + */ private function parseParams( FormOptions $opts, $par ) { # Get parameters $par = $par !== null ? $par : ''; @@ -204,7 +215,8 @@ class SpecialLog extends SpecialPage { $opts->getValue( 'year' ), $opts->getValue( 'month' ), $opts->getValue( 'tagfilter' ), - $opts->getValue( 'subtype' ) + $opts->getValue( 'subtype' ), + $opts->getValue( 'logid' ) ); $this->addHeader( $opts->getValue( 'type' ) );