Code Duplication    Length = 20-20 lines in 2 locations

install/actions/action_summary.php 1 location

@@ 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();

install/cli-install.php 1 location

@@ 102-121 (lines=20) @@
99
# load setup information file
100
//include('setup.info.php');
101
//////////////////////////////////////////////////////////////////////////////////////
102
if( ! function_exists('f_owc')){
103
    /**
104
     * @param $path
105
     * @param $data
106
     * @param null|int $mode
107
     */
108
    function f_owc($path, $data, $mode = null){
109
        try {
110
            // make an attempt to create the file
111
            $hnd = fopen($path, 'w');
112
            fwrite($hnd, $data);
113
            fclose($hnd);
114
115
            if(null !== $mode) chmod($path, $mode);
116
        }catch(Exception $e){
117
            // Nothing, this is NOT normal
118
            unset($e);
119
        }
120
    }
121
}
122
123
// check PHP version
124
define('PHP_MIN_VERSION', '5.4.0');