| @@ 31-41 (lines=11) @@ | ||
| 28 | ||
| 29 | // XMF TableLoad for SAMPLE data |
|
| 30 | ||
| 31 | function loadSampleData() |
|
| 32 | { |
|
| 33 | // $moduleDirName = basename(dirname(__DIR__)); |
|
| 34 | xoops_loadLanguage('comment'); |
|
| 35 | $items = \Xmf\Yaml::readWrapped('quotes_data.yml'); |
|
| 36 | ||
| 37 | \Xmf\Database\TableLoad::truncateTable('randomquote_quotes'); |
|
| 38 | \Xmf\Database\TableLoad::loadTableFromArray('randomquote_quotes', $items); |
|
| 39 | ||
| 40 | redirect_header('../admin/index.php', 1, _CM_ACTIVE); |
|
| 41 | } |
|
| 42 | ||
| @@ 31-41 (lines=11) @@ | ||
| 28 | ||
| 29 | // XMF TableLoad for SAMPLE data |
|
| 30 | ||
| 31 | function loadSampleData() |
|
| 32 | { |
|
| 33 | // $moduleDirName = basename(dirname(__DIR__)); |
|
| 34 | xoops_loadLanguage('comment'); |
|
| 35 | $items = \Xmf\Yaml::readWrapped('quotes_data.yml'); |
|
| 36 | ||
| 37 | \Xmf\Database\TableLoad::truncateTable('randomquote_quotes'); |
|
| 38 | \Xmf\Database\TableLoad::loadTableFromArray('randomquote_quotes', $items); |
|
| 39 | ||
| 40 | redirect_header('../admin/index.php', 1, _CM_ACTIVE); |
|
| 41 | } |
|
| 42 | ||