@@ -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 | } |
@@ -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) { |
@@ -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']) . ' - ' |
@@ -191,18 +191,27 @@ |
||
191 | 191 | define("SECUREPATH", "' . str_replace('\\', '\\\\', SECUREPATH) . '");'; |
192 | 192 | define("SECUREFILE", "' . SECUREFILE. '"); |
193 | 193 | |
194 | - if (defined('IKEY') === true) $settingsTxt .= ' |
|
194 | + if (defined('IKEY') === true) { |
|
195 | + $settingsTxt .= ' |
|
195 | 196 | define("IKEY", "' . IKEY . '");'; |
196 | - else $settingsTxt .= ' |
|
197 | + } else { |
|
198 | + $settingsTxt .= ' |
|
197 | 199 | define("IKEY", "");'; |
198 | - if (defined('SKEY') === true) $settingsTxt .= ' |
|
200 | + } |
|
201 | + if (defined('SKEY') === true) { |
|
202 | + $settingsTxt .= ' |
|
199 | 203 | define("SKEY", "' . SKEY . '");'; |
200 | - else $settingsTxt .= ' |
|
204 | + } else { |
|
205 | + $settingsTxt .= ' |
|
201 | 206 | define("SKEY", "");'; |
202 | - if (defined('HOST') === true) $settingsTxt .= ' |
|
207 | + } |
|
208 | + if (defined('HOST') === true) { |
|
209 | + $settingsTxt .= ' |
|
203 | 210 | define("HOST", "' . HOST . '");'; |
204 | - else $settingsTxt .= ' |
|
211 | + } else { |
|
212 | + $settingsTxt .= ' |
|
205 | 213 | define("HOST", "");'; |
214 | + } |
|
206 | 215 | |
207 | 216 | |
208 | 217 | $settingsTxt .= ' |
@@ -73,18 +73,27 @@ |
||
73 | 73 | define("SECUREPATH", "' . str_replace('\\', '\\\\', SECUREPATH) . '"); |
74 | 74 | define("SECUREFILE", "' . SECUREFILE. '");'; |
75 | 75 | |
76 | - if (defined('IKEY') === true) $settingsTxt .= ' |
|
76 | + if (defined('IKEY') === true) { |
|
77 | + $settingsTxt .= ' |
|
77 | 78 | define("IKEY", "' . IKEY . '");'; |
78 | - else $settingsTxt .= ' |
|
79 | + } else { |
|
80 | + $settingsTxt .= ' |
|
79 | 81 | define("IKEY", "");'; |
80 | - if (defined('SKEY') === true) $settingsTxt .= ' |
|
82 | + } |
|
83 | + if (defined('SKEY') === true) { |
|
84 | + $settingsTxt .= ' |
|
81 | 85 | define("SKEY", "' . SKEY . '");'; |
82 | - else $settingsTxt .= ' |
|
86 | + } else { |
|
87 | + $settingsTxt .= ' |
|
83 | 88 | define("SKEY", "");'; |
84 | - if (defined('HOST') === true) $settingsTxt .= ' |
|
89 | + } |
|
90 | + if (defined('HOST') === true) { |
|
91 | + $settingsTxt .= ' |
|
85 | 92 | define("HOST", "' . HOST . '");'; |
86 | - else $settingsTxt .= ' |
|
93 | + } else { |
|
94 | + $settingsTxt .= ' |
|
87 | 95 | define("HOST", "");'; |
96 | + } |
|
88 | 97 | |
89 | 98 | |
90 | 99 | $settingsTxt .= ' |
@@ -130,7 +130,9 @@ discard block |
||
130 | 130 | $TPIsBranch3 === true ? '' : array('admin', 'ldap_mode', 0, 1), // only disable if migrating from branch 2 |
131 | 131 | ); |
132 | 132 | foreach ($val as $elem) { |
133 | - if ($elem === '') continue; |
|
133 | + if ($elem === '') { |
|
134 | + continue; |
|
135 | + } |
|
134 | 136 | //Check if exists before inserting |
135 | 137 | $queryRes = mysqli_query( |
136 | 138 | $db_link, |
@@ -700,24 +702,21 @@ discard block |
||
700 | 702 | SET valeur = '".TP_PW_STRENGTH_2."' |
701 | 703 | WHERE increment_id = ".$data['increment_id'] |
702 | 704 | ); |
703 | - } |
|
704 | - elseif ((int) $data['valeur'] > TP_PW_STRENGTH_2 && (int) $data['valeur'] <= TP_PW_STRENGTH_3) { |
|
705 | + } elseif ((int) $data['valeur'] > TP_PW_STRENGTH_2 && (int) $data['valeur'] <= TP_PW_STRENGTH_3) { |
|
705 | 706 | mysqli_query( |
706 | 707 | $db_link, |
707 | 708 | "UPDATE ".$pre."misc |
708 | 709 | SET valeur = '".TP_PW_STRENGTH_3."' |
709 | 710 | WHERE increment_id = ".$data['increment_id'] |
710 | 711 | ); |
711 | - } |
|
712 | - elseif ((int) $data['valeur'] > TP_PW_STRENGTH_3 && (int) $data['valeur'] <= TP_PW_STRENGTH_4) { |
|
712 | + } elseif ((int) $data['valeur'] > TP_PW_STRENGTH_3 && (int) $data['valeur'] <= TP_PW_STRENGTH_4) { |
|
713 | 713 | mysqli_query( |
714 | 714 | $db_link, |
715 | 715 | "UPDATE ".$pre."misc |
716 | 716 | SET valeur = '".TP_PW_STRENGTH_4."' |
717 | 717 | WHERE increment_id = ".$data['increment_id'] |
718 | 718 | ); |
719 | - } |
|
720 | - elseif ((int) $data['valeur'] > TP_PW_STRENGTH_4) { |
|
719 | + } elseif ((int) $data['valeur'] > TP_PW_STRENGTH_4) { |
|
721 | 720 | mysqli_query( |
722 | 721 | $db_link, |
723 | 722 | "UPDATE ".$pre."misc |
@@ -741,24 +740,21 @@ discard block |
||
741 | 740 | SET complexity = '".TP_PW_STRENGTH_2."' |
742 | 741 | WHERE id = ".$data['id'] |
743 | 742 | ); |
744 | - } |
|
745 | - elseif ((int) $data['complexity'] > TP_PW_STRENGTH_2 && (int) $data['complexity'] <= TP_PW_STRENGTH_3) { |
|
743 | + } elseif ((int) $data['complexity'] > TP_PW_STRENGTH_2 && (int) $data['complexity'] <= TP_PW_STRENGTH_3) { |
|
746 | 744 | mysqli_query( |
747 | 745 | $db_link, |
748 | 746 | "UPDATE ".$pre."roles_title |
749 | 747 | SET complexity = '".TP_PW_STRENGTH_3."' |
750 | 748 | WHERE id = ".$data['id'] |
751 | 749 | ); |
752 | - } |
|
753 | - elseif ((int) $data['complexity'] > TP_PW_STRENGTH_3 && (int) $data['complexity'] <= TP_PW_STRENGTH_4) { |
|
750 | + } elseif ((int) $data['complexity'] > TP_PW_STRENGTH_3 && (int) $data['complexity'] <= TP_PW_STRENGTH_4) { |
|
754 | 751 | mysqli_query( |
755 | 752 | $db_link, |
756 | 753 | "UPDATE ".$pre."roles_title |
757 | 754 | SET complexity = '".TP_PW_STRENGTH_4."' |
758 | 755 | WHERE id = ".$data['id'] |
759 | 756 | ); |
760 | - } |
|
761 | - elseif ((int) $data['complexity'] > TP_PW_STRENGTH_4) { |
|
757 | + } elseif ((int) $data['complexity'] > TP_PW_STRENGTH_4) { |
|
762 | 758 | mysqli_query( |
763 | 759 | $db_link, |
764 | 760 | "UPDATE ".$pre."roles_title |