@@ -33,8 +33,7 @@ discard block |
||
| 33 | 33 | if ($pos === false) { |
| 34 | 34 | $user = $domainuser; |
| 35 | 35 | $domain = ''; |
| 36 | - } |
|
| 37 | - else { |
|
| 36 | + } else { |
|
| 38 | 37 | $domain = substr($domainuser, 0, $pos); |
| 39 | 38 | $user = substr($domainuser, $pos + 1); |
| 40 | 39 | } |
@@ -105,12 +104,10 @@ discard block |
||
| 105 | 104 | if (strlen($names) > 0) { |
| 106 | 105 | $lastfirst .= ", {$names}"; |
| 107 | 106 | $firstlast = "{$names} {$lastname}"; |
| 108 | - } |
|
| 109 | - else { |
|
| 107 | + } else { |
|
| 110 | 108 | $firstlast = $lastname; |
| 111 | 109 | } |
| 112 | - } |
|
| 113 | - elseif (strlen($names) > 0) { |
|
| 110 | + } elseif (strlen($names) > 0) { |
|
| 114 | 111 | $lastfirst = $firstlast = $names; |
| 115 | 112 | } |
| 116 | 113 | |
@@ -122,8 +119,7 @@ discard block |
||
| 122 | 119 | case SYNC_FILEAS_COMPANYONLY: |
| 123 | 120 | if (strlen($company) > 0) { |
| 124 | 121 | $fileas = $company; |
| 125 | - } |
|
| 126 | - elseif (strlen($firstlast) > 0) { |
|
| 122 | + } elseif (strlen($firstlast) > 0) { |
|
| 127 | 123 | $fileas = $lastfirst; |
| 128 | 124 | } |
| 129 | 125 | break; |
@@ -134,8 +130,7 @@ discard block |
||
| 134 | 130 | if (strlen($lastfirst) > 0) { |
| 135 | 131 | $fileas .= "({$lastfirst})"; |
| 136 | 132 | } |
| 137 | - } |
|
| 138 | - elseif (strlen($lastfirst) > 0) { |
|
| 133 | + } elseif (strlen($lastfirst) > 0) { |
|
| 139 | 134 | $fileas = $lastfirst; |
| 140 | 135 | } |
| 141 | 136 | break; |
@@ -146,8 +141,7 @@ discard block |
||
| 146 | 141 | if (strlen($firstlast) > 0) { |
| 147 | 142 | $fileas .= " ({$firstlast})"; |
| 148 | 143 | } |
| 149 | - } |
|
| 150 | - elseif (strlen($firstlast) > 0) { |
|
| 144 | + } elseif (strlen($firstlast) > 0) { |
|
| 151 | 145 | $fileas = $firstlast; |
| 152 | 146 | } |
| 153 | 147 | break; |
@@ -158,8 +152,7 @@ discard block |
||
| 158 | 152 | if (strlen($company) > 0) { |
| 159 | 153 | $fileas .= " ({$company})"; |
| 160 | 154 | } |
| 161 | - } |
|
| 162 | - elseif (strlen($company) > 0) { |
|
| 155 | + } elseif (strlen($company) > 0) { |
|
| 163 | 156 | $fileas = $company; |
| 164 | 157 | } |
| 165 | 158 | break; |
@@ -170,8 +163,7 @@ discard block |
||
| 170 | 163 | if (strlen($company) > 0) { |
| 171 | 164 | $fileas .= " ({$company})"; |
| 172 | 165 | } |
| 173 | - } |
|
| 174 | - elseif (strlen($company) > 0) { |
|
| 166 | + } elseif (strlen($company) > 0) { |
|
| 175 | 167 | $fileas = $company; |
| 176 | 168 | } |
| 177 | 169 | break; |
@@ -150,15 +150,13 @@ discard block |
||
| 150 | 150 | |
| 151 | 151 | // destruct backend after all data is on the stream |
| 152 | 152 | $backend->Logoff(); |
| 153 | - } |
|
| 154 | - catch (NoPostRequestException $nopostex) { |
|
| 153 | + } catch (NoPostRequestException $nopostex) { |
|
| 155 | 154 | if ($nopostex->getCode() == NoPostRequestException::OPTIONS_REQUEST) { |
| 156 | 155 | header(GSync::GetServerHeader()); |
| 157 | 156 | header(GSync::GetSupportedProtocolVersions()); |
| 158 | 157 | header(GSync::GetSupportedCommands()); |
| 159 | 158 | SLog::Write(LOGLEVEL_INFO, $nopostex->getMessage()); |
| 160 | - } |
|
| 161 | - elseif ($nopostex->getCode() == NoPostRequestException::GET_REQUEST) { |
|
| 159 | + } elseif ($nopostex->getCode() == NoPostRequestException::GET_REQUEST) { |
|
| 162 | 160 | if (Request::GetUserAgent()) { |
| 163 | 161 | SLog::Write(LOGLEVEL_INFO, sprintf("User-agent: '%s'", Request::GetUserAgent())); |
| 164 | 162 | } |
@@ -166,8 +164,7 @@ discard block |
||
| 166 | 164 | GSync::PrintGrommunioSyncLegal('GET not supported', $nopostex->getMessage()); |
| 167 | 165 | } |
| 168 | 166 | } |
| 169 | - } |
|
| 170 | - catch (Exception $ex) { |
|
| 167 | + } catch (Exception $ex) { |
|
| 171 | 168 | // Extract any previous exception message for logging purpose. |
| 172 | 169 | $exclass = get_class($ex); |
| 173 | 170 | $exception_message = $ex->getMessage(); |