diff options
author | Luke Shumaker <LukeShu@sbcglobal.net> | 2010-11-22 12:46:38 -0500 |
---|---|---|
committer | Luke Shumaker <LukeShu@sbcglobal.net> | 2010-11-22 12:46:38 -0500 |
commit | 22702160e6c74460c4937952b9a016d40503c671 (patch) | |
tree | 5f5bfcab538dfd4103aade6a3ca309ee201cfbdb /lib/pluginlist.php | |
parent | 2c438e9ecc3d3cb5191921d03ab343f4c5f53cc6 (diff) |
fix: pluginlist.php's metaInfo(): Warning: horribly inefficient and may explode!
This also means that plugins who give themselves a funny name now have their data show up in the plugins page (where, before they'de be there, but the info on them would be blank).
Unfortunately, this removes a hack for URL shorteners. However, this is minor, and I think my plugin system may have broken it anyway. (maybe)
Diffstat (limited to 'lib/pluginlist.php')
-rw-r--r-- | lib/pluginlist.php | 28 |
1 files changed, 1 insertions, 27 deletions
diff --git a/lib/pluginlist.php b/lib/pluginlist.php index 0e1a81249..1e15aea64 100644 --- a/lib/pluginlist.php +++ b/lib/pluginlist.php @@ -166,37 +166,11 @@ class PluginListItem extends Widget /** * Grab metadata about this plugin... - * Warning: horribly inefficient and may explode! - * Doesn't work for disabled plugins either. - * - * @fixme pull structured data from plugin source */ function metaInfo() { $versions = self::getPluginVersions(); - $found = false; - - foreach ($versions as $info) { - // hack for URL shorteners... "LilUrl (ur1.ca)" etc - list($name, ) = explode(' ', $info['name']); - - if ($name == $this->plugin) { - if ($found) { - // hack for URL shorteners... - $found['rawdescription'] .= "<br />\n" . $info['rawdescription']; - } else { - $found = $info; - } - } - } - - if ($found) { - return $found; - } else { - return array('name' => $this->plugin, - 'rawdescription' => _m('plugin-description', - '(Plugin descriptions unavailable when disabled.)')); - } + return $versions[$this->plugin]; } /** |