@@ -2226,7 +2226,7 @@ |
||
| 2226 | 2226 | * <tt>exec("find ".$path." -type d -exec chmod 755 {} \;");</tt> |
| 2227 | 2227 | * |
| 2228 | 2228 | * @author Jeppe Toustrup (tenzer at tenzer dot dk) |
| 2229 | - * |
|
| 2229 | + * |
|
| 2230 | 2230 | * @param string $path An either relative or absolute path to a file or directory which should be processed. |
| 2231 | 2231 | * @param int $filePerm The permissions any found files should get. |
| 2232 | 2232 | * @param int $dirPerm The permissions any found folder should get. |
@@ -3886,7 +3886,9 @@ |
||
| 3886 | 3886 | ); |
| 3887 | 3887 | |
| 3888 | 3888 | // if not exists then error |
| 3889 | - if (is_null($val) === true || count($val) === 0 || defined('UPGRADE_MIN_DATE') === false) return true; |
|
| 3889 | + if (is_null($val) === true || count($val) === 0 || defined('UPGRADE_MIN_DATE') === false) { |
|
| 3890 | + return true; |
|
| 3891 | + } |
|
| 3890 | 3892 | |
| 3891 | 3893 | // if empty or too old then error |
| 3892 | 3894 | if (empty($val['valeur']) === true || (int) $val['valeur'] < (int) UPGRADE_MIN_DATE) { |
@@ -38,7 +38,7 @@ |
||
| 38 | 38 | "error" => '', |
| 39 | 39 | ); |
| 40 | 40 | |
| 41 | - }catch (Exception $e) { |
|
| 41 | + } catch (Exception $e) { |
|
| 42 | 42 | return false; |
| 43 | 43 | } |
| 44 | 44 | } |
@@ -94,7 +94,7 @@ discard block |
||
| 94 | 94 | { |
| 95 | 95 | require API_ROOT_PATH . '/../includes/config/tp.config.php'; |
| 96 | 96 | $headers = ['alg'=>'HS256','typ'=>'JWT']; |
| 97 | - $payload = [ |
|
| 97 | + $payload = [ |
|
| 98 | 98 | 'username' => $login, |
| 99 | 99 | 'id' => $id, |
| 100 | 100 | 'exp' => (time() + $SETTINGS['api_token_duration'] + 600), |
@@ -105,7 +105,7 @@ discard block |
||
| 105 | 105 | ]; |
| 106 | 106 | |
| 107 | 107 | include_once API_ROOT_PATH . '/inc/jwt_utils.php'; |
| 108 | - return ['token' => generate_jwt($headers, $payload)]; |
|
| 108 | + return ['token' => generate_jwt($headers, $payload)]; |
|
| 109 | 109 | } |
| 110 | 110 | |
| 111 | 111 | //end createUserJWT |
@@ -34,7 +34,7 @@ discard block |
||
| 34 | 34 | $ret = []; |
| 35 | 35 | |
| 36 | 36 | foreach ($rows as $row) { |
| 37 | - $isVisible = in_array((int) $row['id'], $foldersId); |
|
| 37 | + $isVisible = in_array((int) $row['id'], $foldersId); |
|
| 38 | 38 | $childrens = $this->getFoldersChildren($row['id'], $foldersId); |
| 39 | 39 | |
| 40 | 40 | if ($isVisible || count($childrens) > 0) { |
@@ -43,7 +43,7 @@ discard block |
||
| 43 | 43 | [ |
| 44 | 44 | 'id' => (int) $row['id'], |
| 45 | 45 | 'title' => $row['title'], |
| 46 | - 'isVisible' => $isVisible, |
|
| 46 | + 'isVisible' => $isVisible, |
|
| 47 | 47 | 'childrens' => $childrens |
| 48 | 48 | ] |
| 49 | 49 | ); |
@@ -63,7 +63,7 @@ discard block |
||
| 63 | 63 | |
| 64 | 64 | if ( count($childrens) > 0) { |
| 65 | 65 | foreach ($childrens as $children) { |
| 66 | - $isVisible = in_array((int) $children['id'], $foldersId); |
|
| 66 | + $isVisible = in_array((int) $children['id'], $foldersId); |
|
| 67 | 67 | $childs = $this->getFoldersChildren($children['id'], $foldersId); |
| 68 | 68 | |
| 69 | 69 | if (in_array((int) $children['id'], $foldersId) || count($childs) > 0) { |
@@ -72,7 +72,7 @@ discard block |
||
| 72 | 72 | [ |
| 73 | 73 | 'id' => (int) $children['id'], |
| 74 | 74 | 'title' => $children['title'], |
| 75 | - 'isVisible' => $isVisible, |
|
| 75 | + 'isVisible' => $isVisible, |
|
| 76 | 76 | 'childrens' => $childs |
| 77 | 77 | ] |
| 78 | 78 | ); |
@@ -128,8 +128,7 @@ |
||
| 128 | 128 | </div> |
| 129 | 129 | <?php |
| 130 | 130 | } |
| 131 | -} |
|
| 132 | -catch (Exception $e) { |
|
| 131 | +} catch (Exception $e) { |
|
| 133 | 132 | echo $e->getMessage(); |
| 134 | 133 | }?> |
| 135 | 134 | </div> |
@@ -207,8 +207,7 @@ |
||
| 207 | 207 | </div> |
| 208 | 208 | <?php |
| 209 | 209 | } |
| 210 | -} |
|
| 211 | -catch (Exception $e) { |
|
| 210 | +} catch (Exception $e) { |
|
| 212 | 211 | echo $e->getMessage(); |
| 213 | 212 | } |
| 214 | 213 | ?> |
@@ -2603,7 +2603,9 @@ |
||
| 2603 | 2603 | } |
| 2604 | 2604 | |
| 2605 | 2605 | foreach ($results as $adUser) { |
| 2606 | - if (isset($adUser[$SETTINGS['ldap_user_attribute']][0]) === false) continue; |
|
| 2606 | + if (isset($adUser[$SETTINGS['ldap_user_attribute']][0]) === false) { |
|
| 2607 | + continue; |
|
| 2608 | + } |
|
| 2607 | 2609 | // Build the list of all groups in AD |
| 2608 | 2610 | if (isset($adUser['memberof']) === true) { |
| 2609 | 2611 | foreach($adUser['memberof'] as $j => $adUserGroup) { |
@@ -1822,7 +1822,9 @@ |
||
| 1822 | 1822 | $inputData['itemId'] |
| 1823 | 1823 | ); |
| 1824 | 1824 | foreach ($rows as $record) { |
| 1825 | - if ($record['raison'] === NULL) continue; |
|
| 1825 | + if ($record['raison'] === NULL) { |
|
| 1826 | + continue; |
|
| 1827 | + } |
|
| 1826 | 1828 | $reason = explode(':', $record['raison']); |
| 1827 | 1829 | if (count($reason) > 0) { |
| 1828 | 1830 | $sentence = date($SETTINGS['date_format'] . ' ' . $SETTINGS['time_format'], (int) $record['date']) . ' - ' |
@@ -2,28 +2,28 @@ |
||
| 2 | 2 | |
| 3 | 3 | declare(strict_types=1); |
| 4 | 4 | |
| 5 | - /** |
|
| 6 | - * Teampass - a collaborative passwords manager. |
|
| 7 | - * --- |
|
| 8 | - * This library is distributed in the hope that it will be useful, |
|
| 9 | - * but WITHOUT ANY WARRANTY; without even the implied warranty of |
|
| 10 | - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. |
|
| 11 | - * --- |
|
| 12 | - * |
|
| 13 | - * @project Teampass |
|
| 14 | - * |
|
| 15 | - * @file search.js.php |
|
| 16 | - * --- |
|
| 17 | - * |
|
| 18 | - * @author Nils Laumaillé ([email protected]) |
|
| 19 | - * |
|
| 20 | - * @copyright 2009-2023 Teampass.net |
|
| 21 | - * |
|
| 22 | - * @license https://spdx.org/licenses/GPL-3.0-only.html#licenseText GPL-3.0 |
|
| 23 | - * --- |
|
| 24 | - * |
|
| 25 | - * @see https://www.teampass.net |
|
| 26 | - */ |
|
| 5 | + /** |
|
| 6 | + * Teampass - a collaborative passwords manager. |
|
| 7 | + * --- |
|
| 8 | + * This library is distributed in the hope that it will be useful, |
|
| 9 | + * but WITHOUT ANY WARRANTY; without even the implied warranty of |
|
| 10 | + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. |
|
| 11 | + * --- |
|
| 12 | + * |
|
| 13 | + * @project Teampass |
|
| 14 | + * |
|
| 15 | + * @file search.js.php |
|
| 16 | + * --- |
|
| 17 | + * |
|
| 18 | + * @author Nils Laumaillé ([email protected]) |
|
| 19 | + * |
|
| 20 | + * @copyright 2009-2023 Teampass.net |
|
| 21 | + * |
|
| 22 | + * @license https://spdx.org/licenses/GPL-3.0-only.html#licenseText GPL-3.0 |
|
| 23 | + * --- |
|
| 24 | + * |
|
| 25 | + * @see https://www.teampass.net |
|
| 26 | + */ |
|
| 27 | 27 | |
| 28 | 28 | Use TeampassClasses\PerformChecks\PerformChecks; |
| 29 | 29 | |