Zionetrix::Git
Repositories
Help
Report an Issue
viewgit-projectinfos-plugin
Code
Commits
Branches
Tags
Search
Tree:
a9021d2
Branches
Tags
master
viewgit-projectinfos-plugin
main.php
Initial commit
Benjamin Renard
commited
a9021d2
at 2012-10-09 16:46:05
main.php
Blame
History
Raw
<?php /** * Project infos plugin for ViewGit. * * This add project infos on summary page. * * @author Benjamin Renard <brenard@easter-eggs.com> */ class ProjectInfosPlugin extends VGPlugin { function __construct() { $this->register_hook('summary'); } function hook_summary() { global $page; $page['project_infos']=get_project_info($page['project']); if (isset($conf['projects'][$project]['url'])) { if (is_array($conf['projects'][$project]['url'])) { $page['project_infos']['url']=array($conf['projects'][$project]['url']); } else { $page['project_infos']['url']=$conf['projects'][$project]['url']; } } $this->display_plugin_template('summary', FALSE); } function hook($type) { global $conf; if ($type == 'summary') { $this -> hook_summary(); } } }