| @@ 672-691 (lines=20) @@ | ||
| 669 | ||
| 670 | // setup chunks template files - array : name, description, type - 0:file or 1:content, file or content |
|
| 671 | $mc = &$moduleChunks; |
|
| 672 | if (is_dir($chunkPath) && is_readable($chunkPath)) { |
|
| 673 | $d = dir($chunkPath); |
|
| 674 | while (false !== ($tplfile = $d->read())) { |
|
| 675 | if (substr($tplfile, -4) != '.tpl') { |
|
| 676 | continue; |
|
| 677 | } |
|
| 678 | $params = parse_docblock($chunkPath, $tplfile); |
|
| 679 | if (is_array($params) && count($params) > 0) { |
|
| 680 | $mc[] = array( |
|
| 681 | $params['name'], |
|
| 682 | $params['description'], |
|
| 683 | "$chunkPath/{$params['filename']}", |
|
| 684 | $params['modx_category'], |
|
| 685 | array_key_exists('overwrite', $params) ? $params['overwrite'] : 'true', |
|
| 686 | array_key_exists('installset', $params) ? preg_split("/\s*,\s*/", $params['installset']) : false |
|
| 687 | ); |
|
| 688 | } |
|
| 689 | } |
|
| 690 | $d->close(); |
|
| 691 | } |
|
| 692 | ||
| 693 | // setup snippets template files - array : name, description, type - 0:file or 1:content, file or content,properties |
|
| 694 | $ms = &$moduleSnippets; |
|
| @@ 87-106 (lines=20) @@ | ||
| 84 | ||
| 85 | // setup chunks template files - array : name, description, type - 0:file or 1:content, file or content |
|
| 86 | $mc = &$moduleChunks; |
|
| 87 | if (is_dir($chunkPath) && is_readable($chunkPath)) { |
|
| 88 | $d = dir($chunkPath); |
|
| 89 | while (false !== ($tplfile = $d->read())) { |
|
| 90 | if (substr($tplfile, -4) != '.tpl') { |
|
| 91 | continue; |
|
| 92 | } |
|
| 93 | $params = parse_docblock($chunkPath, $tplfile); |
|
| 94 | if (is_array($params) && count($params) > 0) { |
|
| 95 | $mc[] = array( |
|
| 96 | $params['name'], |
|
| 97 | $params['description'], |
|
| 98 | "$chunkPath/{$params['filename']}", |
|
| 99 | $params['modx_category'], |
|
| 100 | array_key_exists('overwrite', $params) ? $params['overwrite'] : 'true', |
|
| 101 | array_key_exists('installset', $params) ? preg_split("/\s*,\s*/", $params['installset']) : false |
|
| 102 | ); |
|
| 103 | } |
|
| 104 | } |
|
| 105 | $d->close(); |
|
| 106 | } |
|
| 107 | ||
| 108 | // setup snippets template files - array : name, description, type - 0:file or 1:content, file or content,properties |
|
| 109 | $ms = &$moduleSnippets; |
|