mirror of
https://gerrit.wikimedia.org/r/mediawiki/extensions/Thanks
synced 2024-11-15 02:54:23 +00:00
ApiCoreThank: support subtypes in AllowedLogTypes
Bug: T191599 Bug: T316860 Change-Id: I0e21b3da5888bd5323bda6b59c5edddcb6ae14f1
This commit is contained in:
parent
43f43c9a26
commit
62810454f3
|
@ -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