X-Git-Url: https://git.m6w6.name/?a=blobdiff_plain;f=app%2FController%2FGithub.php;h=0dfc5b00d0e09ea017a2e536a95219beead41216;hb=4c462ab66e6c65c15df7bd5fe6d2673884c639a0;hp=49b14885be7eb986f88e88e73a884ac0a67ee961;hpb=7f4e70ea88d180cfa25f25f3846f842c5958ebf4;p=pharext%2Fpharext.org diff --git a/app/Controller/Github.php b/app/Controller/Github.php index 49b1488..0dfc5b0 100644 --- a/app/Controller/Github.php +++ b/app/Controller/Github.php @@ -27,10 +27,14 @@ abstract class Github implements Controller */ protected $session; - function __construct(Web $app, API $github) { + function __construct(Web $app, API $github, Session $session) { $this->app = $app; $this->github = $github; - $this->app->getView()->addData(["location" => "github"]); + $this->session = $session; + $this->app->getView()->addData(compact("session") + [ + "location" => "github", + "title" => "Github" + ]); $this->app->getView()->registerFunction("check", [$this, "checkRepoHook"]); } @@ -45,10 +49,6 @@ abstract class Github implements Controller return false; } - function setSession(Session $session) { - $this->session = $session; - } - function checkRepoHook($repo) { if ($repo->hooks) { foreach ($repo->hooks as $hook) {