aboutsummaryrefslogtreecommitdiffstats
path: root/include
diff options
context:
space:
mode:
authorredmatrix <redmatrix@redmatrix.me>2015-12-22 19:53:00 -0800
committerredmatrix <redmatrix@redmatrix.me>2015-12-22 19:53:00 -0800
commit36717e5f32a154582a2069ebc60e4fa256bb9f90 (patch)
treef68ce6d4c65ea978e54544d884d7b078472a20c7 /include
parent7a9fe0907a748f28520810be0b18d598fdec99ff (diff)
downloadvolse-hubzilla-36717e5f32a154582a2069ebc60e4fa256bb9f90.tar.gz
volse-hubzilla-36717e5f32a154582a2069ebc60e4fa256bb9f90.tar.bz2
volse-hubzilla-36717e5f32a154582a2069ebc60e4fa256bb9f90.zip
start on refactor of plugin/theme/widget info block parsing
Diffstat (limited to 'include')
-rwxr-xr-xinclude/plugin.php16
1 files changed, 8 insertions, 8 deletions
diff --git a/include/plugin.php b/include/plugin.php
index 4a35a0170..4da73dfd8 100755
--- a/include/plugin.php
+++ b/include/plugin.php
@@ -313,7 +313,6 @@ function call_hooks($name, &$data = null) {
* * Version: 1.2.3
* * Author: John <profile url>
* * Author: Jane <email>
- * * Compat: Red [(version)], Friendica [(version)]
* *
*\endcode
* @param string $plugin the name of the plugin
@@ -325,8 +324,8 @@ function get_plugin_info($plugin){
'name' => $plugin,
'description' => '',
'author' => array(),
- 'version' => '',
- 'compat' => ''
+ 'maintainer' => array(),
+ 'version' => ''
);
if (!is_file("addon/$plugin/$plugin.php"))
@@ -342,22 +341,23 @@ function get_plugin_info($plugin){
if ($l != ""){
list($k, $v) = array_map("trim", explode(":", $l, 2));
$k = strtolower($k);
- if ($k == 'author'){
+ if ($k == 'author' || $k == 'maintainer'){
$r = preg_match("|([^<]+)<([^>]+)>|", $v, $m);
if ($r) {
- $info['author'][] = array('name' => $m[1], 'link' => $m[2]);
+ $info[$k][] = array('name' => $m[1], 'link' => $m[2]);
} else {
- $info['author'][] = array('name' => $v);
+ $info[$k][] = array('name' => $v);
}
} else {
- if (array_key_exists($k, $info)){
+// if (array_key_exists($k, $info)){
$info[$k] = $v;
- }
+// }
}
}
}
}
+
return $info;
}