mirror of
https://gerrit.wikimedia.org/r/mediawiki/extensions/Thanks
synced 2024-11-23 22:44:42 +00:00
ApiCoreThank: support subtypes in AllowedLogTypes
Bug: T191599
Bug: T316860
Change-Id: I0e21b3da5888bd5323bda6b59c5edddcb6ae14f1
(cherry picked from commit 62810454f3
)
This commit is contained in:
parent
4b9b385bfa
commit
cbe682d279
|
@ -140,7 +140,8 @@ class ApiCoreThank extends ApiThank {
|
|||
|
||||
// Make sure this log type is allowed.
|
||||
$allowedLogTypes = $this->getConfig()->get( 'ThanksAllowedLogTypes' );
|
||||
if ( !in_array( $logEntry->getType(), $allowedLogTypes ) ) {
|
||||
if ( !in_array( $logEntry->getType(), $allowedLogTypes )
|
||||
&& !in_array( $logEntry->getType() . '/' . $logEntry->getSubtype(), $allowedLogTypes ) ) {
|
||||
$err = $this->msg( 'thanks-error-invalid-log-type', $logEntry->getType() );
|
||||
$this->dieWithError( $err, 'thanks-error-invalid-log-type' );
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue