summaryrefslogtreecommitdiff
path: root/plugins
diff options
context:
space:
mode:
authoralec <alec@208e9e7b-5314-0410-a742-e7e81cd9613c>2010-07-25 08:35:21 +0000
committeralec <alec@208e9e7b-5314-0410-a742-e7e81cd9613c>2010-07-25 08:35:21 +0000
commit2258750f7f650f0b8d3c144710a3389f09705474 (patch)
treeb5d928ce0bb464bfc5be2f99cca9eb05e5f7b6b8 /plugins
parent21aff21d1e19e72a83e2ffcc1d441151527e333c (diff)
- Fixed identation, removed closing PHP tags
git-svn-id: https://svn.roundcube.net/trunk@3823 208e9e7b-5314-0410-a742-e7e81cd9613c
Diffstat (limited to 'plugins')
-rw-r--r--plugins/help/config.inc.php.dist3
-rw-r--r--plugins/help/help.php106
2 files changed, 52 insertions, 57 deletions
diff --git a/plugins/help/config.inc.php.dist b/plugins/help/config.inc.php.dist
index 6b27227b0..d440dbbcc 100644
--- a/plugins/help/config.inc.php.dist
+++ b/plugins/help/config.inc.php.dist
@@ -3,6 +3,3 @@
// Help content iframe source
// $rcmail_config['help_source'] = 'http://trac.roundcube.net/wiki';
$rcmail_config['help_source'] = '';
-
-?>
- \ No newline at end of file
diff --git a/plugins/help/help.php b/plugins/help/help.php
index a7b3d5793..2606b27c5 100644
--- a/plugins/help/help.php
+++ b/plugins/help/help.php
@@ -17,80 +17,78 @@ class help extends rcube_plugin
function init()
{
- $rcmail = rcmail::get_instance();
-
- $this->add_texts('localization/', false);
-
- // register actions
- $this->register_action('plugin.help', array($this, 'action'));
- $this->register_action('plugin.helpabout', array($this, 'action'));
- $this->register_action('plugin.helplicense', array($this, 'action'));
+ $rcmail = rcmail::get_instance();
- // add taskbar button
- $this->add_button(array(
- 'name' => 'helptask',
- 'class' => 'button-help',
- 'label' => 'help.help',
- 'href' => './?_task=dummy&_action=plugin.help',
- ), 'taskbar');
+ $this->add_texts('localization/', false);
- $skin = $rcmail->config->get('skin');
- if (!file_exists($this->home."/skins/$skin/help.css"))
- $skin = 'default';
+ // register actions
+ $this->register_action('plugin.help', array($this, 'action'));
+ $this->register_action('plugin.helpabout', array($this, 'action'));
+ $this->register_action('plugin.helplicense', array($this, 'action'));
- // add style for taskbar button (must be here) and Help UI
- $this->include_stylesheet("skins/$skin/help.css");
+ // add taskbar button
+ $this->add_button(array(
+ 'name' => 'helptask',
+ 'class' => 'button-help',
+ 'label' => 'help.help',
+ 'href' => './?_task=dummy&_action=plugin.help',
+ ), 'taskbar');
+
+ $skin = $rcmail->config->get('skin');
+ if (!file_exists($this->home."/skins/$skin/help.css"))
+ $skin = 'default';
+
+ // add style for taskbar button (must be here) and Help UI
+ $this->include_stylesheet("skins/$skin/help.css");
}
function action()
{
- $rcmail = rcmail::get_instance();
+ $rcmail = rcmail::get_instance();
- $this->load_config();
+ $this->load_config();
- // register UI objects
- $rcmail->output->add_handlers(array(
- 'helpcontent' => array($this, 'content'),
- ));
+ // register UI objects
+ $rcmail->output->add_handlers(array(
+ 'helpcontent' => array($this, 'content'),
+ ));
- if ($rcmail->action == 'plugin.helpabout')
- $rcmail->output->set_pagetitle($this->gettext('about'));
- else if ($rcmail->action == 'plugin.helplicense')
- $rcmail->output->set_pagetitle($this->gettext('license'));
- else
- $rcmail->output->set_pagetitle($this->gettext('help'));
+ if ($rcmail->action == 'plugin.helpabout')
+ $rcmail->output->set_pagetitle($this->gettext('about'));
+ else if ($rcmail->action == 'plugin.helplicense')
+ $rcmail->output->set_pagetitle($this->gettext('license'));
+ else
+ $rcmail->output->set_pagetitle($this->gettext('help'));
- $rcmail->output->send('help.help');
+ $rcmail->output->send('help.help');
}
-
+
function content($attrib)
{
- $rcmail = rcmail::get_instance();
+ $rcmail = rcmail::get_instance();
- if ($rcmail->action == 'plugin.helpabout') {
- return @file_get_contents($this->home.'/content/about.html');
- }
- else if ($rcmail->action == 'plugin.helplicense') {
- return @file_get_contents($this->home.'/content/license.html');
- }
+ if ($rcmail->action == 'plugin.helpabout') {
+ return @file_get_contents($this->home.'/content/about.html');
+ }
+ else if ($rcmail->action == 'plugin.helplicense') {
+ return @file_get_contents($this->home.'/content/license.html');
+ }
- // default content: iframe
+ // default content: iframe
- if ($src = $rcmail->config->get('help_source'))
- $attrib['src'] = $src;
+ if ($src = $rcmail->config->get('help_source'))
+ $attrib['src'] = $src;
- if (empty($attrib['id']))
- $attrib['id'] = 'rcmailhelpcontent';
+ if (empty($attrib['id']))
+ $attrib['id'] = 'rcmailhelpcontent';
- // allow the following attributes to be added to the <iframe> tag
- $attrib_str = create_attrib_string($attrib, array('id', 'class', 'style', 'src', 'width', 'height', 'frameborder'));
- $framename = $attrib['id'];
+ // allow the following attributes to be added to the <iframe> tag
+ $attrib_str = create_attrib_string($attrib, array(
+ 'id', 'class', 'style', 'src', 'width', 'height', 'frameborder'));
- $out = sprintf('<iframe name="%s"%s></iframe>'."\n", $framename, $attrib_str);
+ $out = sprintf('<iframe name="%s"%s></iframe>'."\n", $attrib['id'], $attrib_str);
- return $out;
+ return $out;
}
-
-}
-?>
+}