class PluginListItem extends Widget
{
/** Current plugin. */
- var $plugin = null;
+ private $pluginName = null;
/** Local cache for plugin version info */
protected static $versions = false;
- function __construct($plugin, Action $out=null)
+ function __construct($pluginName, Action $out=null)
{
parent::__construct($out);
- $this->plugin = $plugin;
+ $this->pluginName = $pluginName;
}
function show()
{
$meta = $this->metaInfo();
- $this->out->elementStart('tr', array('id' => 'plugin-' . $this->plugin));
+ $this->out->elementStart('tr', array('id' => 'plugin-' . $this->pluginName));
// Name and controls
$this->out->elementStart('td');
if (!empty($meta['homepage'])) {
$this->out->elementStart('a', array('href' => $meta['homepage']));
}
- $this->out->text($this->plugin);
+ $this->out->text($this->pluginName);
if (!empty($meta['homepage'])) {
$this->out->elementEnd('a');
}
*/
protected function getControlForm()
{
- $key = 'disable-' . $this->plugin;
+ $key = 'disable-' . $this->pluginName;
if (common_config('plugins', $key)) {
- return new PluginEnableForm($this->out, $this->plugin);
+ return new PluginEnableForm($this->out, $this->pluginName);
} else {
- return new PluginDisableForm($this->out, $this->plugin);
+ return new PluginDisableForm($this->out, $this->pluginName);
}
}
// hack for URL shorteners... "LilUrl (ur1.ca)" etc
list($name, ) = explode(' ', $info['name']);
- if ($name == $this->plugin) {
+ if ($name == $this->pluginName) {
if ($found) {
// hack for URL shorteners...
$found['rawdescription'] .= "<br />\n" . $info['rawdescription'];
if ($found) {
return $found;
} else {
- return array('name' => $this->plugin,
+ return array('name' => $this->pluginName,
// TRANS: Plugin description for a disabled plugin.
'rawdescription' => _m('plugin-description','(The plugin description is unavailable when a plugin has been disabled.)'));
}