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: /**
13: * Publisher install
14: *
15: * @copyright 2014 XOOPS Project (http://xoops.org)
16: * @license GNU GPL 2 or later (http://www.gnu.org/licenses/gpl-2.0.html)
17: * @package publisher
18: * @author Richard Griffith <richard@geekwright.com>
19: */
20:
21: use Xmf\Database\TableLoad;
22:
23: /**
24: * @param XoopsModule $module
25: * @return boolean
26: */
27: function xoops_module_install_publisher($module)
28: {
29: $xoops = Xoops::getInstance();
30:
31: $count = TableLoad::rowCount('publisher_mimetypes');
32: if ($count==0) {
33: $filename = $xoops->path('modules/publisher/sql/publisher_mimetypes.yml');
34: TableLoad::loadTableFromYamlFile('publisher_mimetypes', $filename);
35: }
36: return true;
37: }
38: