@@ -19,6 +19,6 @@ |
||
| 19 | 19 | '[?]', '[?]', '[?]', '[?]', '[?]', '[?]', '[?]', '[?]', '[?]', '[?]', '[?]', '[?]', '[?]', '[?]', '[?]', |
| 20 | 20 | ); |
| 21 | 21 | |
| 22 | -$result =& $data; |
|
| 22 | +$result = & $data; |
|
| 23 | 23 | unset($data); |
| 24 | 24 | return $result; |
@@ -19,6 +19,6 @@ |
||
| 19 | 19 | '[?]', '[?]', '[?]', '[?]', '[?]', '[?]', '[?]', '[?]', '[?]', '[?]', '[?]', '[?]', '[?]', '[?]', '[?]', |
| 20 | 20 | ); |
| 21 | 21 | |
| 22 | -$result =& $data; |
|
| 22 | +$result = & $data; |
|
| 23 | 23 | unset($data); |
| 24 | 24 | return $result; |
@@ -19,6 +19,6 @@ |
||
| 19 | 19 | '[?]', '[?]', '[?]', '[?]', '[?]', '[?]', '[?]', '[?]', '[?]', '[?]', '[?]', '[?]', '[?]', '[?]', '[?]', '[?]', |
| 20 | 20 | ); |
| 21 | 21 | |
| 22 | -$result =& $data; |
|
| 22 | +$result = & $data; |
|
| 23 | 23 | unset($data); |
| 24 | 24 | return $result; |
@@ -19,6 +19,6 @@ |
||
| 19 | 19 | '[?]', '[?]', '[?]', '[?]', '[?]', '[?]', '[?]', '[?]', '[?]', '[?]', '[?]', '[?]', '[?]', '[?]', '[?]', '[?]', |
| 20 | 20 | ); |
| 21 | 21 | |
| 22 | -$result =& $data; |
|
| 22 | +$result = & $data; |
|
| 23 | 23 | unset($data); |
| 24 | 24 | return $result; |
@@ -19,6 +19,6 @@ |
||
| 19 | 19 | '[?]', '[?]', '[?]', '[?]', '[?]', '[?]', '[?]', '[?]', '[?]', '[?]', '[?]', '[?]', '[?]', '[?]', '[?]', '[?]', |
| 20 | 20 | ); |
| 21 | 21 | |
| 22 | -$result =& $data; |
|
| 22 | +$result = & $data; |
|
| 23 | 23 | unset($data); |
| 24 | 24 | return $result; |
@@ -19,6 +19,6 @@ |
||
| 19 | 19 | '[?]', '[?]', '[?]', '[?]', '[?]', '[?]', '[?]', '[?]', '[?]', '[?]', '[?]', '[?]', '[?]', '[?]', '[?]', '[?]', |
| 20 | 20 | ); |
| 21 | 21 | |
| 22 | -$result =& $data; |
|
| 22 | +$result = & $data; |
|
| 23 | 23 | unset($data); |
| 24 | 24 | return $result; |
@@ -19,6 +19,6 @@ |
||
| 19 | 19 | '[?]', '[?]', '[?]', '[?]', '[?]', '[?]', '[?]', '[?]', '[?]', '[?]', '[?]', '[?]', '[?]', '[?]', '[?]', '[?]', |
| 20 | 20 | ); |
| 21 | 21 | |
| 22 | -$result =& $data; |
|
| 22 | +$result = & $data; |
|
| 23 | 23 | unset($data); |
| 24 | 24 | return $result; |
@@ -1805,7 +1805,7 @@ discard block |
||
| 1805 | 1805 | $antiXss = new protect\AntiXSS\AntiXSS(); |
| 1806 | 1806 | |
| 1807 | 1807 | // Protect against bad inputs |
| 1808 | - if (is_array($source_file) ||is_array($target_file)) { |
|
| 1808 | + if (is_array($source_file) || is_array($target_file)) { |
|
| 1809 | 1809 | return 'error_cannot_be_array'; |
| 1810 | 1810 | } |
| 1811 | 1811 | |
@@ -1958,7 +1958,7 @@ discard block |
||
| 1958 | 1958 | $newArr = array(); |
| 1959 | 1959 | |
| 1960 | 1960 | foreach ($arr as $key => $value) { |
| 1961 | - $newArr[ $key ] = (is_array($value) ? array_map_r($func, $value) : ( is_array($func) ? call_user_func_array($func, $value) : $func( $value ))); |
|
| 1961 | + $newArr[$key] = (is_array($value) ? array_map_r($func, $value) : (is_array($func) ? call_user_func_array($func, $value) : $func($value))); |
|
| 1962 | 1962 | } |
| 1963 | 1963 | |
| 1964 | 1964 | return $newArr; |
@@ -505,6 +505,7 @@ discard block |
||
| 505 | 505 | * |
| 506 | 506 | * trim a string depending on a specific string |
| 507 | 507 | * @param string $element |
| 508 | + * @param string $chaine |
|
| 508 | 509 | * @return string |
| 509 | 510 | */ |
| 510 | 511 | function trimElement($chaine, $element) |
@@ -1562,6 +1563,9 @@ discard block |
||
| 1562 | 1563 | * |
| 1563 | 1564 | * permits to handle the Teampass config file |
| 1564 | 1565 | * $action accepts "rebuild" and "update" |
| 1566 | + * @param string $action |
|
| 1567 | + * @param string $field |
|
| 1568 | + * @param integer $value |
|
| 1565 | 1569 | */ |
| 1566 | 1570 | function handleConfigFile($action, $field = null, $value = null) |
| 1567 | 1571 | { |
@@ -2056,7 +2060,6 @@ discard block |
||
| 2056 | 2060 | |
| 2057 | 2061 | /** |
| 2058 | 2062 | * Permits to clean and sanitize text to be displayed |
| 2059 | - * @param string $text text to clean |
|
| 2060 | 2063 | * @param string $type what clean to perform |
| 2061 | 2064 | * @return string text cleaned up |
| 2062 | 2065 | */ |
@@ -137,7 +137,7 @@ discard block |
||
| 137 | 137 | $config->setIgnoreHeaderLine("true"); |
| 138 | 138 | // extract data from CSV file |
| 139 | 139 | $interpreter = new Interpreter(); |
| 140 | - $interpreter->addObserver(function (array $row) use (&$valuesToImport) { |
|
| 140 | + $interpreter->addObserver(function(array $row) use (&$valuesToImport) { |
|
| 141 | 141 | $valuesToImport[] = array( |
| 142 | 142 | 'Label' => $row[0], |
| 143 | 143 | 'Login' => $row[1], |
@@ -966,7 +966,7 @@ discard block |
||
| 966 | 966 | break; |
| 967 | 967 | } |
| 968 | 968 | |
| 969 | -spl_autoload_register(function ($class) { |
|
| 969 | +spl_autoload_register(function($class) { |
|
| 970 | 970 | $prefix = 'League\\Csv\\'; |
| 971 | 971 | $base_dir = __DIR__.'/src/'; |
| 972 | 972 | $len = strlen($prefix); |
@@ -105,7 +105,7 @@ |
||
| 105 | 105 | //load full tree |
| 106 | 106 | $tree->rebuild(); |
| 107 | 107 | $tree = $tree->getDescendants(); |
| 108 | - // Init post variable |
|
| 108 | + // Init post variable |
|
| 109 | 109 | $post_operation_id = filter_input(INPUT_POST, 'file', FILTER_SANITIZE_NUMBER_INT); |
| 110 | 110 | |
| 111 | 111 | // Get filename from database |