summaryrefslogtreecommitdiff
path: root/inc/pageutils.php
diff options
context:
space:
mode:
authorAndreas Gohr <andi@splitbrain.org>2012-04-20 21:44:48 +0200
committerAndreas Gohr <andi@splitbrain.org>2012-04-20 21:44:48 +0200
commit73d2d14ce0b465ec7117c8dc6ab39a59f6ed7b5a (patch)
tree6f051c557dd65b39b71a77e47dca695d31c9c4df /inc/pageutils.php
parentf64856ce8e8057c67c211aadd41ff22ec10f2bb0 (diff)
parent8a803cae76e430dc0f358986db3420ef45049370 (diff)
downloadrpg-73d2d14ce0b465ec7117c8dc6ab39a59f6ed7b5a.tar.gz
rpg-73d2d14ce0b465ec7117c8dc6ab39a59f6ed7b5a.tar.bz2
Merge branch 'master' into phpunit
* master: (29 commits) some edge case checking in search result highlighting Resolve empty page ID to configured start page Added more detail error code for unauthorized calls in xmlrpc interface. 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 ...
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;