+

:4736 Function create_function() is deprecated [8192]

Last commit for main.php: 4fd6f93c8230ff9f1a58c43c43c84d18d5412635

Move plugin file in subdirectory with valid name for deploying

Benjamin Renard [2013-08-21 17:25:21]
Move plugin file in subdirectory with valid name for deploying
  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($conf['projects'][$project]['url'])) {
  19. if (is_array($conf['projects'][$project]['url'])) {
  20. $page['project_infos']['url']=array($conf['projects'][$project]['url']);
  21. }
  22. else {
  23. $page['project_infos']['url']=$conf['projects'][$project]['url'];
  24. }
  25. }
  26. $this->display_plugin_template('summary', FALSE);
  27. }
  28.  
  29. function hook($type) {
  30. global $conf;
  31.  
  32. if ($type == 'summary') {
  33. $this -> hook_summary();
  34. }
  35. }
  36. }