+

: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($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. }