[TWIG] Remove kludge event TwigPopulateVars

This commit is contained in:
2021-09-18 07:27:17 +01:00
parent fda998e335
commit 67d62cf37b
15 changed files with 112 additions and 147 deletions

View File

@@ -71,19 +71,19 @@ class Cover extends Plugin
* @param array $vars
*
* @return bool hook value; true means continue processing, false means stop.
*/
public function onStartTwigPopulateVars(array &$vars): bool
{
/*if (Common::user() != null) {
$cover = DB::find('cover', ['actor_id' => Common::user()->getId()]);
if ($cover != null) {
$vars['profile_extras'][] = ['name' => 'cover', 'vars' => ['img' => '/cover']];
} else {
$vars['profile_extras'][] = ['name' => 'cover', 'vars' => []];
}
}*/
return Event::next;
}
*
* public function onStartTwigPopulateVars(array &$vars): bool
* {
* if (Common::user() != null) {
* $cover = DB::find('cover', ['actor_id' => Common::user()->getId()]);
* if ($cover != null) {
* $vars['profile_extras'][] = ['name' => 'cover', 'vars' => ['img' => '/cover']];
* } else {
* $vars['profile_extras'][] = ['name' => 'cover', 'vars' => []];
* }
* }
* return Event::next;
* }*/
/**
* Output our dedicated stylesheet