summaryrefslogtreecommitdiff
path: root/roundcubemail/program/include/rcube_template.php
diff options
context:
space:
mode:
authorthomasb <thomasb@208e9e7b-5314-0410-a742-e7e81cd9613c>2011-12-09 09:38:34 +0000
committerthomasb <thomasb@208e9e7b-5314-0410-a742-e7e81cd9613c>2011-12-09 09:38:34 +0000
commitc128c8732160f47d871785350d03b7580f0a062a (patch)
treedbb120d72f99da2ca68bf5d0100e2cc6a97146a6 /roundcubemail/program/include/rcube_template.php
parentac80b17dc615f4ddea06fa8ceafee0fad419688e (diff)
Allow custom content (from config dir) showing up on the about page
git-svn-id: https://svn.roundcube.net/trunk@5583 208e9e7b-5314-0410-a742-e7e81cd9613c
Diffstat (limited to 'roundcubemail/program/include/rcube_template.php')
-rwxr-xr-xroundcubemail/program/include/rcube_template.php25
1 files changed, 25 insertions, 0 deletions
diff --git a/roundcubemail/program/include/rcube_template.php b/roundcubemail/program/include/rcube_template.php
index 433b22ac7..06503f2f5 100755
--- a/roundcubemail/program/include/rcube_template.php
+++ b/roundcubemail/program/include/rcube_template.php
@@ -94,6 +94,7 @@ class rcube_template extends rcube_html_page
'username' => array($this, 'current_username'),
'message' => array($this, 'message_container'),
'charsetselector' => array($this, 'charset_selector'),
+ 'aboutcontent' => array($this, 'about_content'),
));
}
@@ -1335,6 +1336,30 @@ class rcube_template extends rcube_html_page
return $select->show($set);
}
+ /**
+ * Include content from config/about.<LANG>.html if available
+ */
+ private function about_content($attrib)
+ {
+ $content = '';
+ $filenames = array(
+ 'about.' . $_SESSION['language'] . '.html',
+ 'about.' . substr($_SESSION['language'], 0, 2) . '.html',
+ 'about.html',
+ );
+ foreach ($filenames as $file) {
+ $fn = RCMAIL_CONFIG_DIR . '/' . $file;
+ if (is_readable($fn)) {
+ $content = file_get_contents($fn);
+ $content = $this->parse_conditions($content);
+ $content = $this->parse_xml($content);
+ break;
+ }
+ }
+
+ return $content;
+ }
+
} // end class rcube_template