summaryrefslogtreecommitdiff
path: root/plugins/help/help.php
diff options
context:
space:
mode:
authorthomasb <thomasb@208e9e7b-5314-0410-a742-e7e81cd9613c>2012-01-18 12:47:38 +0000
committerthomasb <thomasb@208e9e7b-5314-0410-a742-e7e81cd9613c>2012-01-18 12:47:38 +0000
commit8da6900a3ded088e183dceed03cdca92d0080818 (patch)
tree1abe135b912949f409a1a925f3e6316c7e9c5c58 /plugins/help/help.php
parent8f652cd3b47e8fdf2c7a872a892be989c4d88c82 (diff)
Update license information in plugins
git-svn-id: https://svn.roundcube.net/trunk@5791 208e9e7b-5314-0410-a742-e7e81cd9613c
Diffstat (limited to 'plugins/help/help.php')
-rw-r--r--plugins/help/help.php41
1 files changed, 16 insertions, 25 deletions
diff --git a/plugins/help/help.php b/plugins/help/help.php
index d59ea4b0c..ad7dbf0ba 100644
--- a/plugins/help/help.php
+++ b/plugins/help/help.php
@@ -4,7 +4,7 @@
* Help Plugin
*
* @author Aleksander 'A.L.E.C' Machniak
- * @licence GNU GPL
+ * @license GNU GPLv3+
*
* Configuration (see config.inc.php.dist)
*
@@ -35,21 +35,16 @@ class help extends rcube_plugin
// add taskbar button
$this->add_button(array(
- 'name' => 'helptask',
- 'class' => 'button-help',
- 'label' => 'help.help',
- 'href' => './?_task=help',
- 'onclick' => sprintf("return %s.command('help')", JS_OBJECT_NAME)
- ), 'taskbar');
-
- $rcmail->output->add_script(
- JS_OBJECT_NAME . ".enable_command('help', true);\n" .
- JS_OBJECT_NAME . ".help = function () { location.href = './?_task=help'; }",
- 'head');
+ 'command' => 'help',
+ 'class' => 'button-help',
+ 'classsel' => 'button-help button-selected',
+ 'innerclass' => 'button-inner',
+ 'label' => 'help.help',
+ ), 'taskbar');
$skin = $rcmail->config->get('skin');
if (!file_exists($this->home."/skins/$skin/help.css"))
- $skin = 'default';
+ $skin = 'default';
// add style for taskbar button (must be here) and Help UI
$this->include_stylesheet("skins/$skin/help.css");
@@ -63,11 +58,11 @@ class help extends rcube_plugin
// register UI objects
$rcmail->output->add_handlers(array(
- 'helpcontent' => array($this, 'content'),
+ 'helpcontent' => array($this, 'content'),
));
if ($rcmail->action == 'about')
- $rcmail->output->set_pagetitle($this->gettext('about'));
+ $rcmail->output->set_pagetitle($this->gettext('about'));
else if ($rcmail->action == 'license')
$rcmail->output->set_pagetitle($this->gettext('license'));
else
@@ -81,27 +76,23 @@ class help extends rcube_plugin
$rcmail = rcmail::get_instance();
if ($rcmail->action == 'about') {
- return @file_get_contents($this->home.'/content/about.html');
+ return @file_get_contents($this->home.'/content/about.html');
}
else if ($rcmail->action == 'license') {
- return @file_get_contents($this->home.'/content/license.html');
+ return @file_get_contents($this->home.'/content/license.html');
}
// default content: iframe
-
if ($src = $rcmail->config->get('help_source'))
- $attrib['src'] = $src;
+ $attrib['src'] = $src;
if (empty($attrib['id']))
$attrib['id'] = 'rcmailhelpcontent';
- // allow the following attributes to be added to the <iframe> tag
- $attrib_str = html::attrib_string($attrib, array(
- 'id', 'class', 'style', 'src', 'width', 'height', 'frameborder'));
+ $attrib['name'] = $attrib['id'];
- $out = sprintf('<iframe name="%s"%s></iframe>'."\n", $attrib['id'], $attrib_str);
-
- return $out;
+ return html::tag('iframe', $attrib, '', array(
+ 'id', 'class', 'style', 'src', 'width', 'height', 'frameborder'));
}
}