@@ 145-167 (lines=23) @@ | ||
142 | } |
|
143 | ||
144 | ////////////////////////////////////////////////////////////////////////////////////// |
|
145 | if (!function_exists('f_owc')) { |
|
146 | /** |
|
147 | * @param $path |
|
148 | * @param $data |
|
149 | * @param null|int $mode |
|
150 | */ |
|
151 | function f_owc($path, $data, $mode = null) |
|
152 | { |
|
153 | try { |
|
154 | // make an attempt to create the file |
|
155 | $hnd = fopen($path, 'w'); |
|
156 | fwrite($hnd, $data); |
|
157 | fclose($hnd); |
|
158 | ||
159 | if (null !== $mode) { |
|
160 | chmod($path, $mode); |
|
161 | } |
|
162 | } catch (Exception $e) { |
|
163 | // Nothing, this is NOT normal |
|
164 | unset($e); |
|
165 | } |
|
166 | } |
|
167 | } |
|
168 | ||
169 | // check PHP version |
|
170 | define('PHP_MIN_VERSION', '5.4.0'); |
@@ 2-21 (lines=20) @@ | ||
1 | <?php |
|
2 | if( ! function_exists('f_owc')){ |
|
3 | /** |
|
4 | * @param $path |
|
5 | * @param $data |
|
6 | * @param null|int $mode |
|
7 | */ |
|
8 | function f_owc($path, $data, $mode = null){ |
|
9 | try { |
|
10 | // make an attempt to create the file |
|
11 | $hnd = fopen($path, 'w'); |
|
12 | fwrite($hnd, $data); |
|
13 | fclose($hnd); |
|
14 | ||
15 | if(null !== $mode) chmod($path, $mode); |
|
16 | }catch(Exception $e){ |
|
17 | // Nothing, this is NOT normal |
|
18 | unset($e); |
|
19 | } |
|
20 | } |
|
21 | } |
|
22 | ||
23 | $installMode = isset($_POST['installmode']) ? (int)$_POST['installmode'] : 0; |
|
24 | if( ! isset($_lang)) $_lang = array(); |