1: <?php
2: /*
3: You may not change or alter any portion of this comment or credits
4: of supporting developers from this source code or any supporting source code
5: which is considered copyrighted (c) material of the original comment or credit authors.
6:
7: This program is distributed in the hope that it will be useful,
8: but WITHOUT ANY WARRANTY; without even the implied warranty of
9: MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
10: */
11:
12: use Xoops\Core\Kernel\Handlers\XoopsModule;
13:
14: /**
15: * Install and Update debugbar module support routines
16: *
17: * @copyright 2013 XOOPS Project (http://xoops.org)
18: * @license GNU GPL 2 or later (http://www.gnu.org/licenses/gpl-2.0.html)
19: * @author Richard Griffith <richard@geekwright.com>
20: */
21:
22: /**
23: * xoops_module_install_debugbar
24: *
25: * @param XoopsModule $module instance of our module
26: *
27: * @return mixed boolean false on error, integer file count on success
28: */
29: function xoops_module_install_debugbar(XoopsModule $module)
30: {
31: $xoops = Xoops::getInstance();
32: // copy font-awesome font files to assets directory
33: $dir = dirname(__DIR__).'/assets/fonts';
34: $pattern = 'fontawesome-webfont.*';
35: return $xoops->assets()->copyFileAssets($dir, $pattern, 'fonts');
36: }
37:
38: /**
39: * xoops_module_install_debugbar
40: *
41: * @param XoopsModule $module instance of our module
42: * @param integer $version previously installed module version
43: *
44: * @return mixed boolean false on error, integer file count on success
45: */
46: function xoops_module_update_debugbar(XoopsModule $module, $version)
47: {
48: return xoops_module_install_debugbar($module);
49: }
50: