+

:4736 Function create_function() is deprecated [8192]

Last commit for projectinfos/main.php: e538d65f710c830cb12383fb162775f5229232eb

Put CSS in separated file

Benjamin Renard [2013-08-21 17:39:18]
Put CSS in separated file
  1. <?php
  2. /**
  3.  * Project infos plugin for ViewGit.
  4.  *
  5.  * This add project infos on summary page.
  6.  *
  7.  * @author Benjamin Renard <brenard@easter-eggs.com>
  8.  */
  9. class ProjectInfosPlugin extends VGPlugin
  10. {
  11. function __construct() {
  12. $this->register_hook('summary');
  13. }
  14.  
  15. function hook_summary() {
  16. global $page;
  17. $page['project_infos']=get_project_info($page['project']);
  18. if (isset($page['project_infos']['url']) && !is_array($page['project_infos']['url'])) {
  19. $page['project_infos']['url']=array($page['project_infos']['url']);
  20. }
  21. $this->display_plugin_template('summary', FALSE);
  22. }
  23.  
  24. function hook($type) {
  25. global $conf;
  26.  
  27. if ($type == 'summary') {
  28. $this -> hook_summary();
  29. }
  30. }
  31. }