@@ 719-743 (lines=25) @@ | ||
716 | ||
717 | // setup plugins template files - array : name, description, type - 0:file or 1:content, file or content,properties |
|
718 | $mp = &$modulePlugins; |
|
719 | if (is_dir($pluginPath) && is_readable($pluginPath)) { |
|
720 | $d = dir($pluginPath); |
|
721 | while (false !== ($tplfile = $d->read())) { |
|
722 | if (substr($tplfile, -4) != '.tpl') { |
|
723 | continue; |
|
724 | } |
|
725 | $params = parse_docblock($pluginPath, $tplfile); |
|
726 | if (is_array($params) && count($params) > 0) { |
|
727 | $description = empty($params['version']) ? $params['description'] : "<strong>{$params['version']}</strong> {$params['description']}"; |
|
728 | $mp[] = array( |
|
729 | $params['name'], |
|
730 | $description, |
|
731 | "$pluginPath/{$params['filename']}", |
|
732 | $params['properties'], |
|
733 | $params['events'], |
|
734 | $params['guid'], |
|
735 | $params['modx_category'], |
|
736 | $params['legacy_names'], |
|
737 | array_key_exists('installset', $params) ? preg_split("/\s*,\s*/", $params['installset']) : false, |
|
738 | (int)$params['disabled'] |
|
739 | ); |
|
740 | } |
|
741 | } |
|
742 | $d->close(); |
|
743 | } |
|
744 | ||
745 | // setup modules - array : name, description, type - 0:file or 1:content, file or content,properties, guid,enable_sharedparams |
|
746 | $mm = &$moduleModules; |
@@ 134-158 (lines=25) @@ | ||
131 | ||
132 | // setup plugins template files - array : name, description, type - 0:file or 1:content, file or content,properties |
|
133 | $mp = &$modulePlugins; |
|
134 | if (is_dir($pluginPath) && is_readable($pluginPath)) { |
|
135 | $d = dir($pluginPath); |
|
136 | while (false !== ($tplfile = $d->read())) { |
|
137 | if (substr($tplfile, -4) != '.tpl') { |
|
138 | continue; |
|
139 | } |
|
140 | $params = parse_docblock($pluginPath, $tplfile); |
|
141 | if (is_array($params) && count($params) > 0) { |
|
142 | $description = empty($params['version']) ? $params['description'] : "<strong>{$params['version']}</strong> {$params['description']}"; |
|
143 | $mp[] = array( |
|
144 | $params['name'], |
|
145 | $description, |
|
146 | "$pluginPath/{$params['filename']}", |
|
147 | $params['properties'], |
|
148 | $params['events'], |
|
149 | $params['guid'], |
|
150 | $params['modx_category'], |
|
151 | $params['legacy_names'], |
|
152 | array_key_exists('installset', $params) ? preg_split("/\s*,\s*/", $params['installset']) : false, |
|
153 | (int)$params['disabled'] |
|
154 | ); |
|
155 | } |
|
156 | } |
|
157 | $d->close(); |
|
158 | } |
|
159 | ||
160 | // setup modules - array : name, description, type - 0:file or 1:content, file or content,properties, guid,enable_sharedparams |
|
161 | $mm = &$moduleModules; |