- function createTagsCallback($repo) {
- return function($tags, $links) use ($repo) {
- foreach ($tags as $tag) {
- $name = $tag->name;
- settype($repo->tags->$name, "object");
- $repo->tags->$name->tag = $tag;
- }
- };
- }
-
- function createContentsCallback($repo) {
- return function($tree) use($repo) {
- foreach ($tree as $entry) {
- if ($entry->type !== "file" || $entry->size <= 0) {
- continue;
- }
- if ($entry->name === "config.m4" || fnmatch("config?.m4", $entry->name)) {
- $repo->config_m4 = $entry->name;
- } elseif ($entry->name === "package.xml" || $entry->name === "package2.xml") {
- $repo->package_xml = $entry->name;
- } elseif ($entry->name === "pharext_package.php") {
- $repo->pharext_package_php = $entry->name;
- }
- }
- };
+ if (($modal = $this->app->getRequest()->getQuery("modal"))) {
+ $action = $this->app->getRequest()->getQuery($modal);
+ $this->app->getView()->addData(compact("modal", "action"));
+ }
+
+ $this->app->display("github/repo");