Aleksander Machniak
2013-12-31 d575e46067c06f1165adb249865f3812e270df12
program/steps/settings/about.inc
@@ -5,8 +5,8 @@
 | program/steps/settings/about.inc                                      |
 |                                                                       |
 | This file is part of the Roundcube Webmail client                     |
 | Copyright (C) 2005-2011, The Roundcube Dev Team                       |
 | Copyright (C) 2011, Kolab Systems AG                                  |
 | Copyright (C) 2005-2013, The Roundcube Dev Team                       |
 | Copyright (C) 2011-2013, Kolab Systems AG                             |
 |                                                                       |
 | Licensed under the GNU General Public License version 3 or            |
 | any later version with exceptions for skins & plugins.                |
@@ -21,6 +21,15 @@
*/
$OUTPUT->set_pagetitle($RCMAIL->gettext('about'));
$OUTPUT->add_handler('supportlink', 'rcmail_supportlink');
$OUTPUT->add_handler('pluginlist', 'rcmail_plugins_list');
$OUTPUT->send('about');
function rcmail_supportlink($attrib)
{
  global $RCMAIL;
@@ -28,6 +37,7 @@
  if ($url = $RCMAIL->config->get('support_url')) {
    $label = $attrib['label'] ? $attrib['label'] : 'support';
    $attrib['href'] = $url;
    return html::a($attrib, $RCMAIL->gettext($label));
  }
}
@@ -36,23 +46,26 @@
{
  global $RCMAIL;
  if (!$attrib['id'])
    if (!$attrib['id']) {
    $attrib['id'] = 'rcmpluginlist';
    }
  $plugins = array_filter((array) $RCMAIL->config->get('plugins'));
  $plugin_info = array();
  foreach ($plugins as $name) {
    if ($info = $RCMAIL->plugins->get_info($name))
        if ($info = $RCMAIL->plugins->get_info($name)) {
      $plugin_info[$name] = $info;
        }
  }
  // load info from required plugins, too
  foreach ($plugin_info as $name => $info) {
    if (is_array($info['required']) && !empty($info['required'])) {
      foreach ($info['required'] as $req_name) {
        if (!isset($plugin_info[$req_name]) && ($req_info = $RCMAIL->plugins->get_info($req_name)))
                if (!isset($plugin_info[$req_name]) && ($req_info = $RCMAIL->plugins->get_info($req_name))) {
          $plugin_info[$req_name] = $req_info;
                }
      }
    }
  }
@@ -88,11 +101,3 @@
  return $table->show();
}
$OUTPUT->set_pagetitle($RCMAIL->gettext('about'));
$OUTPUT->add_handler('supportlink', 'rcmail_supportlink');
$OUTPUT->add_handler('pluginlist', 'rcmail_plugins_list');
$OUTPUT->send('about');