mirror of
https://github.com/getgrav/grav-plugin-admin.git
synced 2025-11-01 10:56:08 +01:00
Fixed notifications that would not be remembered as hidden + various improvements
This commit is contained in:
@@ -551,11 +551,12 @@ class AdminController extends AdminBaseController
|
||||
return false;
|
||||
}
|
||||
|
||||
$filename = $this->grav['locator']->findResource('user://data/notifications/' . $this->grav['user']->username . YAML_EXT,
|
||||
true, true);
|
||||
$filename = $this->grav['locator']->findResource('user://data/notifications/' . $this->grav['user']->username . YAML_EXT, true, true);
|
||||
$file = CompiledYamlFile::instance($filename);
|
||||
$data = (array)$file->content();
|
||||
$data[] = $notification_id;
|
||||
|
||||
$date = new \DateTime();
|
||||
$data[$notification_id] = $date->format('r');
|
||||
$file->save($data);
|
||||
|
||||
$this->admin->json_response = [
|
||||
|
||||
Reference in New Issue
Block a user