summaryrefslogtreecommitdiff
path: root/inc/pageutils.php
diff options
context:
space:
mode:
authorAndreas Gohr <andi@splitbrain.org>2012-04-20 12:03:03 +0200
committerAndreas Gohr <andi@splitbrain.org>2012-04-20 12:03:03 +0200
commitc67addf8c8a91cb62cdadb0f39683cdf0e2ea9fd (patch)
treeb583681b3898684590af39a2fc0a0446169e3cad /inc/pageutils.php
parent2f85287ef7aafab72cec14c85c1ab4cd1d7facc9 (diff)
parent8aea63819532f5f49c22a3a225e18eb2640f1d71 (diff)
downloadrpg-c67addf8c8a91cb62cdadb0f39683cdf0e2ea9fd.tar.gz
rpg-c67addf8c8a91cb62cdadb0f39683cdf0e2ea9fd.tar.bz2
Merge branch 'htmlmail'
* htmlmail: (26 commits) changed internal Mailer members from private to protected made it possible to disable HTML mails in the config removed commented code left from the quoted_printable days add missing table tags for HTML diff mails fixed subscriber mail signatures use real HRs in HTML mails Add various headers to the mails FS#2247. pull request #83 closed removed footer image from HTML mails use inlinestyles for diffs in HTML mails fixed signature stripping fixed mailprefix handling fixed missing replacement for HTML notify mails allow image embeds in HTML mail templates Added HTML wrapper for mails allow non-txt extensions when accessing locales added Mailer class to autoloader Replaced mail_send calls with new Mailer class Make use of new Mailer class in notify() Copy all text replacements to HTML replacements in Mailer Added setBody() to Mailer class ...
Diffstat (limited to 'inc/pageutils.php')
-rw-r--r--inc/pageutils.php12
1 files changed, 7 insertions, 5 deletions
diff --git a/inc/pageutils.php b/inc/pageutils.php
index db00258e2..c94d14624 100644
--- a/inc/pageutils.php
+++ b/inc/pageutils.php
@@ -355,19 +355,21 @@ function mediaFN($id, $rev=''){
}
/**
- * Returns the full filepath to a localized textfile if local
+ * Returns the full filepath to a localized file if local
* version isn't found the english one is returned
*
+ * @param string $id The id of the local file
+ * @param string $ext The file extension (usually txt)
* @author Andreas Gohr <andi@splitbrain.org>
*/
-function localeFN($id){
+function localeFN($id,$ext='txt'){
global $conf;
- $file = DOKU_CONF.'/lang/'.$conf['lang'].'/'.$id.'.txt';
+ $file = DOKU_CONF.'/lang/'.$conf['lang'].'/'.$id.'.'.$ext;
if(!@file_exists($file)){
- $file = DOKU_INC.'inc/lang/'.$conf['lang'].'/'.$id.'.txt';
+ $file = DOKU_INC.'inc/lang/'.$conf['lang'].'/'.$id.'.'.$ext;
if(!@file_exists($file)){
//fall back to english
- $file = DOKU_INC.'inc/lang/en/'.$id.'.txt';
+ $file = DOKU_INC.'inc/lang/en/'.$id.'.'.$ext;
}
}
return $file;