@@ -98,8 +98,7 @@ discard block |
||
| 98 | 98 | if ( !$this->config->getItem('remote_config_user') || !$this->config->getItem('remote_config_password') ){ |
| 99 | 99 | $this->error('ERROR: Remote config mode enabled, but no username or no password provided'); |
| 100 | 100 | } |
| 101 | - } |
|
| 102 | - else { |
|
| 101 | + } else { |
|
| 103 | 102 | $this->config->setItem('old_remote_config_user', null); |
| 104 | 103 | $this->config->setItem('old_remote_config_password', null); |
| 105 | 104 | } |
@@ -133,8 +132,7 @@ discard block |
||
| 133 | 132 | { |
| 134 | 133 | curl_setopt($ch, CURLOPT_URL, $this->config->getItem('fritzbox_url') . $formfields['getpage'] . '?sid=' . $this->sid); |
| 135 | 134 | unset($formfields['getpage']); |
| 136 | - } |
|
| 137 | - else |
|
| 135 | + } else |
|
| 138 | 136 | { |
| 139 | 137 | // add the sid, if it is already set |
| 140 | 138 | if ($this->sid != '0000000000000000') |
@@ -293,8 +291,7 @@ discard block |
||
| 293 | 291 | { |
| 294 | 292 | $getpage = $params['getpage'] . '?'; |
| 295 | 293 | unset($params['getpage']); |
| 296 | - } |
|
| 297 | - else |
|
| 294 | + } else |
|
| 298 | 295 | { |
| 299 | 296 | $getpage = '/cgi-bin/webcm?'; |
| 300 | 297 | } |
@@ -331,8 +328,7 @@ discard block |
||
| 331 | 328 | if ( $this->config->getItem('use_lua_login_method') == true ) |
| 332 | 329 | { |
| 333 | 330 | $loginpage = '/login_sid.lua'; |
| 334 | - } |
|
| 335 | - else |
|
| 331 | + } else |
|
| 336 | 332 | { |
| 337 | 333 | $loginpage = '../html/login_sid.xml'; |
| 338 | 334 | } |
@@ -366,8 +362,7 @@ discard block |
||
| 366 | 362 | { |
| 367 | 363 | $formfields['username'] = $this->config->getItem('remote_config_user'); |
| 368 | 364 | $response = $challenge . '-' . md5(mb_convert_encoding($challenge . '-' . $this->config->getItem('remote_config_password'), "UCS-2LE", "UTF-8")); |
| 369 | - } |
|
| 370 | - else |
|
| 365 | + } else |
|
| 371 | 366 | { |
| 372 | 367 | if ( $this->config->getItem('username') ) |
| 373 | 368 | { |
@@ -376,8 +371,7 @@ discard block |
||
| 376 | 371 | $response = $challenge . '-' . md5(mb_convert_encoding($challenge . '-' . $this->config->getItem('password'), "UCS-2LE", "UTF-8")); |
| 377 | 372 | } |
| 378 | 373 | $formfields['response'] = $response; |
| 379 | - } |
|
| 380 | - else |
|
| 374 | + } else |
|
| 381 | 375 | { |
| 382 | 376 | $response = $challenge . '-' . md5(mb_convert_encoding($challenge . '-' . $this->config->getItem('password'), "UCS-2LE", "UTF-8")); |
| 383 | 377 | $formfields['login:command/response'] = $response; |
@@ -394,8 +388,7 @@ discard block |
||
| 394 | 388 | if ( $session_status_simplexml->SID != '0000000000000000' ) |
| 395 | 389 | { |
| 396 | 390 | return (string)$session_status_simplexml->SID; |
| 397 | - } |
|
| 398 | - else |
|
| 391 | + } else |
|
| 399 | 392 | { |
| 400 | 393 | $this->error('ERROR: Login failed with an unknown response.'); |
| 401 | 394 | } |
@@ -412,8 +405,7 @@ discard block |
||
| 412 | 405 | if ( $this->config->getItem('use_lua_login_method') == true ) |
| 413 | 406 | { |
| 414 | 407 | $this->doGetRequest(array('getpage' => '/home/home.lua', 'logout' => '1')); |
| 415 | - } |
|
| 416 | - else |
|
| 408 | + } else |
|
| 417 | 409 | { |
| 418 | 410 | $formfields = array( |
| 419 | 411 | 'getpage' => '../html/de/menus/menu2.html', |
@@ -460,18 +452,15 @@ discard block |
||
| 460 | 452 | if ( $this->config->getItem('logging') == 'console' ) |
| 461 | 453 | { |
| 462 | 454 | echo $message; |
| 463 | - } |
|
| 464 | - else if ( $this->config->getItem('logging') == 'silent' || $this->config->getItem('logging') == false ) |
|
| 455 | + } else if ( $this->config->getItem('logging') == 'silent' || $this->config->getItem('logging') == false ) |
|
| 465 | 456 | { |
| 466 | 457 | // do nothing |
| 467 | - } |
|
| 468 | - else |
|
| 458 | + } else |
|
| 469 | 459 | { |
| 470 | 460 | if ( is_writable($this->config->getItem('logging')) || is_writable(dirname($this->config->getItem('logging'))) ) |
| 471 | 461 | { |
| 472 | 462 | file_put_contents($this->config->getItem('logging'), $message . $this->config->getItem('newline'), FILE_APPEND); |
| 473 | - } |
|
| 474 | - else |
|
| 463 | + } else |
|
| 475 | 464 | { |
| 476 | 465 | echo('Error: Cannot log to non-writeable file or dir: ' . $this->config->getItem('logging')); |
| 477 | 466 | } |
@@ -520,8 +509,7 @@ discard block |
||
| 520 | 509 | if ( $item == 'all' ) |
| 521 | 510 | { |
| 522 | 511 | return $this->config; |
| 523 | - } |
|
| 524 | - elseif ( isset($this->config[$item]) ) |
|
| 512 | + } elseif ( isset($this->config[$item]) ) |
|
| 525 | 513 | { |
| 526 | 514 | return $this->config[$item]; |
| 527 | 515 | } |
@@ -25,8 +25,7 @@ discard block |
||
| 25 | 25 | if (isset($argv[1]) && ($argv[1] == 0 || $argv[1] == 1) ) |
| 26 | 26 | { |
| 27 | 27 | $mode = (bool)$argv[1]; |
| 28 | - } |
|
| 29 | - else |
|
| 28 | + } else |
|
| 30 | 29 | { |
| 31 | 30 | if ( $fritz->config->getItem('logging') == 'console' ) |
| 32 | 31 | { |
@@ -45,8 +44,7 @@ discard block |
||
| 45 | 44 | The optional argument PASSWORD sets a new guest access password (min 8 chars) |
| 46 | 45 | Defaults to false, so the current password is kept. |
| 47 | 46 | '; |
| 48 | - } |
|
| 49 | - else |
|
| 47 | + } else |
|
| 50 | 48 | { |
| 51 | 49 | $fritz->logMessage($message . 'ERROR: Script was called without or with an invalid argument'); |
| 52 | 50 | } |
@@ -111,21 +109,17 @@ discard block |
||
| 111 | 109 | { |
| 112 | 110 | $message .= 'WLAN guest access is now active. WPA-Key is "' . $matches[1] . '"'; |
| 113 | 111 | } |
| 114 | - } |
|
| 115 | - else if ( !isset($matches[1]) && $mode == false ) |
|
| 112 | + } else if ( !isset($matches[1]) && $mode == false ) |
|
| 116 | 113 | { |
| 117 | 114 | $message .= 'WLAN guest access is now inactive.'; |
| 118 | - } |
|
| 119 | - else if ( isset($matches[1]) && $mode == false ) |
|
| 115 | + } else if ( isset($matches[1]) && $mode == false ) |
|
| 120 | 116 | { |
| 121 | 117 | $message .= 'ERROR: WLAN guest access status change failed, should be inactive, but is still active.'; |
| 122 | - } |
|
| 123 | - else if ( !isset($matches[1]) && $mode == true ) |
|
| 118 | + } else if ( !isset($matches[1]) && $mode == true ) |
|
| 124 | 119 | { |
| 125 | 120 | $message .= 'ERROR: WLAN guest access status change failed, should be active, but is still inactive.'; |
| 126 | 121 | } |
| 127 | -} |
|
| 128 | -catch (Exception $e) |
|
| 122 | +} catch (Exception $e) |
|
| 129 | 123 | { |
| 130 | 124 | $message .= $e->getMessage(); |
| 131 | 125 | } |
@@ -134,8 +128,7 @@ discard block |
||
| 134 | 128 | if ( isset($fritz) && is_object($fritz) && get_class($fritz) == 'fritzbox_api' ) |
| 135 | 129 | { |
| 136 | 130 | $fritz->logMessage($message); |
| 137 | -} |
|
| 138 | -else |
|
| 131 | +} else |
|
| 139 | 132 | { |
| 140 | 133 | echo($message); |
| 141 | 134 | } |
@@ -28,8 +28,7 @@ discard block |
||
| 28 | 28 | if (isset($argv[1]) && ($argv[1] == 0 || $argv[1] == 1) ) |
| 29 | 29 | { |
| 30 | 30 | $mode = (int)$argv[1]; |
| 31 | - } |
|
| 32 | - else |
|
| 31 | + } else |
|
| 33 | 32 | { |
| 34 | 33 | if ( $fritz->config->getItem('logging') == 'console' ) |
| 35 | 34 | { |
@@ -51,8 +50,7 @@ discard block |
||
| 51 | 50 | Warning: A non existent TAM will not lead to an error message but adds a |
| 52 | 51 | new TAM to the Fritz!Box, which will answer all incoming calls by default! |
| 53 | 52 | '; |
| 54 | - } |
|
| 55 | - else |
|
| 53 | + } else |
|
| 56 | 54 | { |
| 57 | 55 | $fritz->logMessage($message . 'ERROR: Script was called without or with an invalid argument'); |
| 58 | 56 | } |
@@ -81,17 +79,14 @@ discard block |
||
| 81 | 79 | if (isset($matches[1]) && $matches[1] == $mode) |
| 82 | 80 | { |
| 83 | 81 | $message .= $mode == 1 ? 'TAM' . $tam . ' enabled' : 'TAM' . $tam . ' disabled'; |
| 84 | - } |
|
| 85 | - else if (isset($matches[1])) |
|
| 82 | + } else if (isset($matches[1])) |
|
| 86 | 83 | { |
| 87 | 84 | $message .= 'ERROR: TAM' . $tam . ' status change failed, should be ' . $mode . ', but is ' . $matches[1]; |
| 88 | - } |
|
| 89 | - else |
|
| 85 | + } else |
|
| 90 | 86 | { |
| 91 | 87 | $message .= 'NOTICE: TAM' . $tam . ' status change could have failed, should be ' . $mode . ' now, but I don\'t now if it actually is. Check your check section in the script.'; |
| 92 | 88 | } |
| 93 | -} |
|
| 94 | -catch (Exception $e) |
|
| 89 | +} catch (Exception $e) |
|
| 95 | 90 | { |
| 96 | 91 | $message .= $e->getMessage(); |
| 97 | 92 | } |
@@ -100,8 +95,7 @@ discard block |
||
| 100 | 95 | if ( isset($fritz) && is_object($fritz) && get_class($fritz) == 'fritzbox_api' ) |
| 101 | 96 | { |
| 102 | 97 | $fritz->logMessage($message); |
| 103 | -} |
|
| 104 | -else |
|
| 98 | +} else |
|
| 105 | 99 | { |
| 106 | 100 | echo($message); |
| 107 | 101 | } |
@@ -54,8 +54,7 @@ discard block |
||
| 54 | 54 | |
| 55 | 55 | // set a log message |
| 56 | 56 | $message .= 'Call list sucessfully downloaded'; |
| 57 | -} |
|
| 58 | -catch (Exception $e) |
|
| 57 | +} catch (Exception $e) |
|
| 59 | 58 | { |
| 60 | 59 | $message .= $e->getMessage(); |
| 61 | 60 | } |
@@ -64,8 +63,7 @@ discard block |
||
| 64 | 63 | if ( isset($fritz) && is_object($fritz) && get_class($fritz) == 'fritzbox_api' ) |
| 65 | 64 | { |
| 66 | 65 | $fritz->logMessage($message); |
| 67 | -} |
|
| 68 | -else |
|
| 66 | +} else |
|
| 69 | 67 | { |
| 70 | 68 | echo($message); |
| 71 | 69 | } |
@@ -84,12 +84,10 @@ discard block |
||
| 84 | 84 | |
| 85 | 85 | $this -> Path = $Path; |
| 86 | 86 | $this -> RawData = file_get_contents($this -> Path); |
| 87 | - } |
|
| 88 | - elseif ($RawData) |
|
| 87 | + } elseif ($RawData) |
|
| 89 | 88 | { |
| 90 | 89 | $this -> RawData = $RawData; |
| 91 | - } |
|
| 92 | - else |
|
| 90 | + } else |
|
| 93 | 91 | { |
| 94 | 92 | //throw new Exception('vCard: No content provided'); |
| 95 | 93 | // Not necessary anymore as possibility to create vCards is added |
@@ -139,8 +137,7 @@ discard block |
||
| 139 | 137 | $ClassName = get_class($this); |
| 140 | 138 | $this -> Data[] = new $ClassName(false, $SinglevCardRawData); |
| 141 | 139 | } |
| 142 | - } |
|
| 143 | - else |
|
| 140 | + } else |
|
| 144 | 141 | { |
| 145 | 142 | // Protect the BASE64 final = sign (detected by the line beginning with whitespace), otherwise the next replace will get rid of it |
| 146 | 143 | $this -> RawData = preg_replace('{(\n\s.+)=(\n)}', '$1-base64=-$2', $this -> RawData); |
@@ -190,8 +187,7 @@ discard block |
||
| 190 | 187 | } |
| 191 | 188 | $this -> Data[$Key][] = $Value; |
| 192 | 189 | continue; |
| 193 | - } |
|
| 194 | - else |
|
| 190 | + } else |
|
| 195 | 191 | { |
| 196 | 192 | $Value = str_replace('-wrap-', '', $Value); |
| 197 | 193 | } |
@@ -224,11 +220,12 @@ discard block |
||
| 224 | 220 | if (in_array($ParamValue, array('b', 'base64'))) |
| 225 | 221 | { |
| 226 | 222 | //$Value = base64_decode($Value); |
| 227 | - } |
|
| 228 | - elseif ($ParamValue == 'quoted-printable') // v2.1 |
|
| 223 | + } elseif ($ParamValue == 'quoted-printable') { |
|
| 224 | + // v2.1 |
|
| 229 | 225 | { |
| 230 | 226 | $Value = quoted_printable_decode($Value); |
| 231 | 227 | } |
| 228 | + } |
|
| 232 | 229 | break; |
| 233 | 230 | case 'charset': // v2.1 |
| 234 | 231 | if ($ParamValue != 'utf-8' && $ParamValue != 'utf8') |
@@ -263,8 +260,7 @@ discard block |
||
| 263 | 260 | { |
| 264 | 261 | $Value['type'] = $Type; |
| 265 | 262 | } |
| 266 | - } |
|
| 267 | - else |
|
| 263 | + } else |
|
| 268 | 264 | { |
| 269 | 265 | if (in_array($Key, self::$Spec_MultipleValueElements)) |
| 270 | 266 | { |
@@ -311,8 +307,7 @@ discard block |
||
| 311 | 307 | if ($Key == 'agent') |
| 312 | 308 | { |
| 313 | 309 | return $this -> Data[$Key]; |
| 314 | - } |
|
| 315 | - elseif (in_array($Key, self::$Spec_FileElements)) |
|
| 310 | + } elseif (in_array($Key, self::$Spec_FileElements)) |
|
| 316 | 311 | { |
| 317 | 312 | $Value = $this -> Data[$Key]; |
| 318 | 313 | foreach ($Value as $K => $V) |
@@ -331,8 +326,7 @@ discard block |
||
| 331 | 326 | return $this -> Data[$Key][0]; |
| 332 | 327 | } |
| 333 | 328 | return $this -> Data[$Key]; |
| 334 | - } |
|
| 335 | - elseif ($Key == 'Mode') |
|
| 329 | + } elseif ($Key == 'Mode') |
|
| 336 | 330 | { |
| 337 | 331 | return $this -> Mode; |
| 338 | 332 | } |
@@ -374,8 +368,7 @@ discard block |
||
| 374 | 368 | } |
| 375 | 369 | $Status = file_put_contents($TargetPath, $RawContent); |
| 376 | 370 | return (bool)$Status; |
| 377 | - } |
|
| 378 | - else |
|
| 371 | + } else |
|
| 379 | 372 | { |
| 380 | 373 | throw new Exception('vCard: Cannot save file ('.$Key.'), target path not writable ('.$TargetPath.')'); |
| 381 | 374 | } |
@@ -421,8 +414,7 @@ discard block |
||
| 421 | 414 | if (empty($this -> Data[$Key][$LastElementIndex][$Types[0]])) |
| 422 | 415 | { |
| 423 | 416 | $this -> Data[$Key][$LastElementIndex][$Types[0]] = $Value; |
| 424 | - } |
|
| 425 | - else |
|
| 417 | + } else |
|
| 426 | 418 | { |
| 427 | 419 | $LastElementIndex++; |
| 428 | 420 | } |
@@ -434,16 +426,14 @@ discard block |
||
| 434 | 426 | $Types[0] => $Value |
| 435 | 427 | ); |
| 436 | 428 | } |
| 437 | - } |
|
| 438 | - elseif (isset(self::$Spec_ElementTypes[$Key])) |
|
| 429 | + } elseif (isset(self::$Spec_ElementTypes[$Key])) |
|
| 439 | 430 | { |
| 440 | 431 | $this -> Data[$Key][] = array( |
| 441 | 432 | 'value' => $Value, |
| 442 | 433 | 'type' => $Types |
| 443 | 434 | ); |
| 444 | 435 | } |
| 445 | - } |
|
| 446 | - elseif ($Value) |
|
| 436 | + } elseif ($Value) |
|
| 447 | 437 | { |
| 448 | 438 | $this -> Data[$Key][] = $Value; |
| 449 | 439 | } |
@@ -488,12 +478,10 @@ discard block |
||
| 488 | 478 | $PartArray[] = isset($Value[$Part]) ? $Value[$Part] : ''; |
| 489 | 479 | } |
| 490 | 480 | $Text .= implode(';', $PartArray); |
| 491 | - } |
|
| 492 | - elseif (is_array($Value) && isset(self::$Spec_ElementTypes[$Key])) |
|
| 481 | + } elseif (is_array($Value) && isset(self::$Spec_ElementTypes[$Key])) |
|
| 493 | 482 | { |
| 494 | 483 | $Text .= $Value['value']; |
| 495 | - } |
|
| 496 | - else |
|
| 484 | + } else |
|
| 497 | 485 | { |
| 498 | 486 | $Text .= $Value; |
| 499 | 487 | } |
@@ -600,8 +588,7 @@ discard block |
||
| 600 | 588 | { |
| 601 | 589 | $Type[] = $Parameter[0]; |
| 602 | 590 | } |
| 603 | - } |
|
| 604 | - elseif (count($Parameter) > 2) |
|
| 591 | + } elseif (count($Parameter) > 2) |
|
| 605 | 592 | { |
| 606 | 593 | if(count(explode(',', $RawParams[$Index], -1)) > 0) |
| 607 | 594 | { |
@@ -611,8 +598,7 @@ discard block |
||
| 611 | 598 | $Type = array_merge($Type, $TempTypeParams['type']); |
| 612 | 599 | } |
| 613 | 600 | } |
| 614 | - } |
|
| 615 | - else |
|
| 601 | + } else |
|
| 616 | 602 | { |
| 617 | 603 | switch ($Parameter[0]) |
| 618 | 604 | { |
@@ -43,8 +43,7 @@ discard block |
||
| 43 | 43 | if ($Photo['encoding'] == 'b') |
| 44 | 44 | { |
| 45 | 45 | echo '<img src="data:image/'.$Photo['type'][0].';base64,'.$Photo['value'].'" /><br />'; |
| 46 | - } |
|
| 47 | - else |
|
| 46 | + } else |
|
| 48 | 47 | { |
| 49 | 48 | echo '<img src="'.$Photo['value'].'" /><br />'; |
| 50 | 49 | } |
@@ -89,8 +88,7 @@ discard block |
||
| 89 | 88 | if (is_scalar($Tel)) |
| 90 | 89 | { |
| 91 | 90 | echo $Tel.'<br />'; |
| 92 | - } |
|
| 93 | - else |
|
| 91 | + } else |
|
| 94 | 92 | { |
| 95 | 93 | echo $Tel['value'].' ('.implode(', ', $Tel['type']).')<br />'; |
| 96 | 94 | } |
@@ -106,8 +104,7 @@ discard block |
||
| 106 | 104 | if (is_scalar($Email)) |
| 107 | 105 | { |
| 108 | 106 | echo $Email; |
| 109 | - } |
|
| 110 | - else |
|
| 107 | + } else |
|
| 111 | 108 | { |
| 112 | 109 | echo $Email['value'].' ('.implode(', ', $Email['type']).')<br />'; |
| 113 | 110 | } |
@@ -123,8 +120,7 @@ discard block |
||
| 123 | 120 | if (is_scalar($URL)) |
| 124 | 121 | { |
| 125 | 122 | echo $URL.'<br />'; |
| 126 | - } |
|
| 127 | - else |
|
| 123 | + } else |
|
| 128 | 124 | { |
| 129 | 125 | echo $URL['value'].'<br />'; |
| 130 | 126 | } |
@@ -140,8 +136,7 @@ discard block |
||
| 140 | 136 | if (is_scalar($IMPP)) |
| 141 | 137 | { |
| 142 | 138 | echo $IMPP.'<br />'; |
| 143 | - } |
|
| 144 | - else |
|
| 139 | + } else |
|
| 145 | 140 | { |
| 146 | 141 | echo $IMPP['value'].'<br/ >'; |
| 147 | 142 | } |
@@ -173,8 +168,7 @@ discard block |
||
| 173 | 168 | if (is_scalar($Agent)) |
| 174 | 169 | { |
| 175 | 170 | echo '<div class="Agent">'.$Agent.'</div>'; |
| 176 | - } |
|
| 177 | - elseif (is_a($Agent, 'vCard')) |
|
| 171 | + } elseif (is_a($Agent, 'vCard')) |
|
| 178 | 172 | { |
| 179 | 173 | echo '<div class="Agent">'; |
| 180 | 174 | OutputvCard($Agent); |
@@ -25,8 +25,7 @@ discard block |
||
| 25 | 25 | if (isset($argv[1]) && ($argv[1] == 0 || $argv[1] == 1) ) |
| 26 | 26 | { |
| 27 | 27 | $mode = (bool)$argv[1]; |
| 28 | - } |
|
| 29 | - else |
|
| 28 | + } else |
|
| 30 | 29 | { |
| 31 | 30 | if ( $fritz->config->getItem('logging') == 'console' ) |
| 32 | 31 | { |
@@ -45,8 +44,7 @@ discard block |
||
| 45 | 44 | The optional argument PASSWORD sets a new guest access password (min 8 chars) |
| 46 | 45 | Defaults to false, so the current password is kept. |
| 47 | 46 | '; |
| 48 | - } |
|
| 49 | - else |
|
| 47 | + } else |
|
| 50 | 48 | { |
| 51 | 49 | $fritz->logMessage($message . 'ERROR: Script was called without or with an invalid argument'); |
| 52 | 50 | } |
@@ -111,21 +109,17 @@ discard block |
||
| 111 | 109 | { |
| 112 | 110 | $message .= 'WLAN guest access is now active. WPA-Key is "' . $matches[1] . '"'; |
| 113 | 111 | } |
| 114 | - } |
|
| 115 | - else if ( !isset($matches[1]) && $mode == false ) |
|
| 112 | + } else if ( !isset($matches[1]) && $mode == false ) |
|
| 116 | 113 | { |
| 117 | 114 | $message .= 'WLAN guest access is now inactive.'; |
| 118 | - } |
|
| 119 | - else if ( isset($matches[1]) && $mode == false ) |
|
| 115 | + } else if ( isset($matches[1]) && $mode == false ) |
|
| 120 | 116 | { |
| 121 | 117 | $message .= 'ERROR: WLAN guest access status change failed, should be inactive, but is still active.'; |
| 122 | - } |
|
| 123 | - else if ( !isset($matches[1]) && $mode == true ) |
|
| 118 | + } else if ( !isset($matches[1]) && $mode == true ) |
|
| 124 | 119 | { |
| 125 | 120 | $message .= 'ERROR: WLAN guest access status change failed, should be active, but is still inactive.'; |
| 126 | 121 | } |
| 127 | -} |
|
| 128 | -catch (Exception $e) |
|
| 122 | +} catch (Exception $e) |
|
| 129 | 123 | { |
| 130 | 124 | $message .= $e->getMessage(); |
| 131 | 125 | } |
@@ -134,8 +128,7 @@ discard block |
||
| 134 | 128 | if ( isset($fritz) && is_object($fritz) && get_class($fritz) == 'fritzbox_api' ) |
| 135 | 129 | { |
| 136 | 130 | $fritz->logMessage($message); |
| 137 | -} |
|
| 138 | -else |
|
| 131 | +} else |
|
| 139 | 132 | { |
| 140 | 133 | echo($message); |
| 141 | 134 | } |
@@ -54,8 +54,7 @@ discard block |
||
| 54 | 54 | |
| 55 | 55 | // set a log message |
| 56 | 56 | $message .= 'Call list sucessfully downloaded'; |
| 57 | -} |
|
| 58 | -catch (Exception $e) |
|
| 57 | +} catch (Exception $e) |
|
| 59 | 58 | { |
| 60 | 59 | $message .= $e->getMessage(); |
| 61 | 60 | } |
@@ -64,8 +63,7 @@ discard block |
||
| 64 | 63 | if ( isset($fritz) && is_object($fritz) && get_class($fritz) == 'fritzbox_api' ) |
| 65 | 64 | { |
| 66 | 65 | $fritz->logMessage($message); |
| 67 | -} |
|
| 68 | -else |
|
| 66 | +} else |
|
| 69 | 67 | { |
| 70 | 68 | echo($message); |
| 71 | 69 | } |
@@ -54,8 +54,7 @@ discard block |
||
| 54 | 54 | |
| 55 | 55 | // set a log message |
| 56 | 56 | $message .= 'Call list sucessfully downloaded'; |
| 57 | -} |
|
| 58 | -catch (Exception $e) |
|
| 57 | +} catch (Exception $e) |
|
| 59 | 58 | { |
| 60 | 59 | $message .= $e->getMessage(); |
| 61 | 60 | } |
@@ -64,8 +63,7 @@ discard block |
||
| 64 | 63 | if ( isset($fritz) && is_object($fritz) && get_class($fritz) == 'fritzbox_api' ) |
| 65 | 64 | { |
| 66 | 65 | $fritz->logMessage($message); |
| 67 | -} |
|
| 68 | -else |
|
| 66 | +} else |
|
| 69 | 67 | { |
| 70 | 68 | echo($message); |
| 71 | 69 | } |