Commit e685f254 authored by Robert Nix's avatar Robert Nix

Merge branch 'update/CustomLogs' into 'master'

Update CustomLogs

Closes #80

See merge request !69
parents 9c96df3b dd945b40
......@@ -16,7 +16,7 @@ class ApiCustomLogWriter extends ApiBase {
}
$logType = $apiParams['logtype'];
$logEntry = new ManualLogEntry('custom', $logType);
$logEntry = new ManualLogEntry($logType, $logType);
$logEntry->setTarget($this->getTitleFromTitleOrPageId($apiParams));
$logEntry->setComment($apiParams['summary']);
$logEntry->setPerformer($this->getUser());
......
......@@ -6,7 +6,7 @@ class CustomLogCreator {
global $wgLogTypes, $wgLogActionsHandlers;
$wgLogTypes = array_merge($wgLogTypes, $logList);
foreach ($wgLogTypes as $log) {
$wgLogActionsHandlers["custom/$log"] = CustomLogFormatter::class;
$wgLogActionsHandlers[$log . '/*'] = CustomLogFormatter::class;
}
}
......
......@@ -5,7 +5,7 @@ class CustomLogFormatter extends LogFormatter {
$message = $this->msg($this->getMessageKey());
if (! $message->exists()) {
$entry = $this->entry;
$logName = $entry->getSubtype();
$logName = $entry->getType();
$msgText = $this->msg('customlogs-nomessage')->plain();
$message = new RawMessage(str_replace('%NAME%',$logName,$msgText));
}
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment