1
0
mirror of https://github.com/flarum/core.git synced 2025-10-19 02:36:08 +02:00

Add events for serializing/unserializing config values

This commit is contained in:
Toby Zerner
2015-09-18 13:16:35 +09:30
parent 4752142c11
commit ca09e834b1
4 changed files with 76 additions and 1 deletions

View File

@@ -14,6 +14,7 @@ use Flarum\Api\Request;
use Flarum\Core\Settings\SettingsRepository;
use Flarum\Core\Groups\Permission;
use Flarum\Core\Exceptions\PermissionDeniedException;
use Flarum\Events\SerializeConfig;
use Zend\Diactoros\Response\EmptyResponse;
use Exception;
@@ -49,6 +50,8 @@ class ConfigAction implements Action
}
foreach ($config as $k => $v) {
event($event = new SerializeConfig($k, $v));
$this->settings->set($k, $v);
if (strpos($k, 'theme_') === 0 || $k === 'custom_less') {