From 1d82c8d343dd1d6c413eb117d8658b78c367df91 Mon Sep 17 00:00:00 2001
From: Christopher Smith <chris@jalakai.co.uk>
Date: Wed, 16 Oct 2013 18:00:46 +0100
Subject: Ensure language strings are reloaded for each unit test

---
 inc/init.php | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

(limited to 'inc/init.php')

diff --git a/inc/init.php b/inc/init.php
index 30eb1b251..248d27b9c 100644
--- a/inc/init.php
+++ b/inc/init.php
@@ -267,10 +267,10 @@ function init_lang($langCode) {
     $lang = array();
 
     //load the language files
-    require_once(DOKU_INC.'inc/lang/en/lang.php');
+    require(DOKU_INC.'inc/lang/en/lang.php');
     if ($langCode && $langCode != 'en') {
         if (file_exists(DOKU_INC."inc/lang/$langCode/lang.php")) {
-            require_once(DOKU_INC."inc/lang/$langCode/lang.php");
+            require(DOKU_INC."inc/lang/$langCode/lang.php");
         }
     }
 }
-- 
cgit v1.2.3


From 443e135d59e9d227eec818dabf9ee64d7a73d474 Mon Sep 17 00:00:00 2001
From: Christopher Smith <chris@jalakai.co.uk>
Date: Wed, 16 Oct 2013 22:04:01 +0100
Subject: replace boolean conditional checks on possibly uninitialized vars
 with \!empty/empty/isset as appropriate

---
 inc/init.php | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

(limited to 'inc/init.php')

diff --git a/inc/init.php b/inc/init.php
index 30eb1b251..d96860e10 100644
--- a/inc/init.php
+++ b/inc/init.php
@@ -288,7 +288,7 @@ function init_files(){
             $fh = @fopen($file,'a');
             if($fh){
                 fclose($fh);
-                if($conf['fperm']) chmod($file, $conf['fperm']);
+                if(!empty($conf['fperm'])) chmod($file, $conf['fperm']);
             }else{
                 nice_die("$file is not writable. Check your permissions settings!");
             }
-- 
cgit v1.2.3