summaryrefslogtreecommitdiff
path: root/program/steps/settings/about.inc
diff options
context:
space:
mode:
Diffstat (limited to 'program/steps/settings/about.inc')
-rw-r--r--program/steps/settings/about.inc127
1 files changed, 66 insertions, 61 deletions
diff --git a/program/steps/settings/about.inc b/program/steps/settings/about.inc
index 0fdefddda..026bfc1a2 100644
--- a/program/steps/settings/about.inc
+++ b/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,78 +21,83 @@
*/
+$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;
+ global $RCMAIL;
+
+ if ($url = $RCMAIL->config->get('support_url')) {
+ $label = $attrib['label'] ? $attrib['label'] : 'support';
+ $attrib['href'] = $url;
- if ($url = $RCMAIL->config->get('support_url')) {
- $label = $attrib['label'] ? $attrib['label'] : 'support';
- $attrib['href'] = $url;
- return html::a($attrib, rcube_label($label));
- }
+ return html::a($attrib, $RCMAIL->gettext($label));
+ }
}
function rcmail_plugins_list($attrib)
{
- global $RCMAIL;
-
- 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))
- $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)))
- $plugin_info[$req_name] = $req_info;
- }
- }
- }
+ global $RCMAIL;
- if (empty($plugin_info)) {
- return '';
- }
+ if (!$attrib['id']) {
+ $attrib['id'] = 'rcmpluginlist';
+ }
- ksort($plugin_info, SORT_LOCALE_STRING);
+ $plugins = array_filter((array) $RCMAIL->config->get('plugins'));
+ $plugin_info = array();
- $table = new html_table($attrib);
+ foreach ($plugins as $name) {
+ if ($info = $RCMAIL->plugins->get_info($name)) {
+ $plugin_info[$name] = $info;
+ }
+ }
- // add table header
- $table->add_header('name', rcube_label('plugin'));
- $table->add_header('version', rcube_label('version'));
- $table->add_header('license', rcube_label('license'));
- $table->add_header('source', rcube_label('source'));
+ // 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))) {
+ $plugin_info[$req_name] = $req_info;
+ }
+ }
+ }
+ }
- foreach ($plugin_info as $name => $data) {
- $uri = $data['src_uri'] ? $data['src_uri'] : $data['uri'];
- if ($uri && stripos($uri, 'http') !== 0) {
- $uri = 'http://' . $uri;
+ if (empty($plugin_info)) {
+ return '';
}
- $table->add_row();
- $table->add('name', Q($data['name'] ? $data['name'] : $name));
- $table->add('version', Q($data['version']));
- $table->add('license', $data['license_uri'] ? html::a(array('target' => '_blank', href=> Q($data['license_uri'])),
- Q($data['license'])) : $data['license']);
- $table->add('source', $uri ? html::a(array('target' => '_blank', href=> Q($uri)),
- Q(rcube_label('download'))) : '');
- }
+ ksort($plugin_info, SORT_LOCALE_STRING);
+
+ $table = new html_table($attrib);
+
+ // add table header
+ $table->add_header('name', $RCMAIL->gettext('plugin'));
+ $table->add_header('version', $RCMAIL->gettext('version'));
+ $table->add_header('license', $RCMAIL->gettext('license'));
+ $table->add_header('source', $RCMAIL->gettext('source'));
+
+ foreach ($plugin_info as $name => $data) {
+ $uri = $data['src_uri'] ? $data['src_uri'] : $data['uri'];
+ if ($uri && stripos($uri, 'http') !== 0) {
+ $uri = 'http://' . $uri;
+ }
+
+ $table->add_row();
+ $table->add('name', rcube::Q($data['name'] ? $data['name'] : $name));
+ $table->add('version', rcube::Q($data['version']));
+ $table->add('license', $data['license_uri'] ? html::a(array('target' => '_blank', href=> rcube::Q($data['license_uri'])),
+ rcube::Q($data['license'])) : $data['license']);
+ $table->add('source', $uri ? html::a(array('target' => '_blank', href=> rcube::Q($uri)),
+ rcube::Q($RCMAIL->gettext('download'))) : '');
+ }
- return $table->show();
+ return $table->show();
}
-
-
-$OUTPUT->set_pagetitle(rcube_label('about'));
-
-$OUTPUT->add_handler('supportlink', 'rcmail_supportlink');
-$OUTPUT->add_handler('pluginlist', 'rcmail_plugins_list');
-
-$OUTPUT->send('about');