@@ -23,7 +23,7 @@ |
||
| 23 | 23 | $sessionFactory = new Session\SessionFactory(); |
| 24 | 24 | $session = $sessionFactory->newInstance($_COOKIE); |
| 25 | 25 | |
| 26 | - if (! $session->isStarted()) { |
|
| 26 | + if (!$session->isStarted()) { |
|
| 27 | 27 | $session->setName('EBB_SESSION_ID'); |
| 28 | 28 | $session->setCookieParams( |
| 29 | 29 | [ |
@@ -57,7 +57,7 @@ discard block |
||
| 57 | 57 | { |
| 58 | 58 | $url = getHomeURL($format); |
| 59 | 59 | |
| 60 | - if (! empty($path)) { |
|
| 60 | + if (!empty($path)) { |
|
| 61 | 61 | $url = trimTrailingSlash($url) . '/' . ltrim($path, '/'); |
| 62 | 62 | } |
| 63 | 63 | |
@@ -81,7 +81,7 @@ discard block |
||
| 81 | 81 | |
| 82 | 82 | $args['atts']['href'] = getHomeURL(); |
| 83 | 83 | |
| 84 | - if (! isset($args['atts']['class'])) { |
|
| 84 | + if (!isset($args['atts']['class'])) { |
|
| 85 | 85 | $args['atts']['class'] = 'home-link'; |
| 86 | 86 | } |
| 87 | 87 | |
@@ -105,7 +105,7 @@ discard block |
||
| 105 | 105 | $theme = Themes::findTheme($theme); |
| 106 | 106 | } |
| 107 | 107 | |
| 108 | - if (empty($theme) || ! $theme instanceof Theme) { |
|
| 108 | + if (empty($theme) || !$theme instanceof Theme) { |
|
| 109 | 109 | return $url; |
| 110 | 110 | } |
| 111 | 111 | |
@@ -163,7 +163,7 @@ discard block |
||
| 163 | 163 | |
| 164 | 164 | $args['atts']['href'] = getLoginURL(); |
| 165 | 165 | |
| 166 | - if (! isset($args['atts']['class'])) { |
|
| 166 | + if (!isset($args['atts']['class'])) { |
|
| 167 | 167 | $args['atts']['class'] = 'login-link'; |
| 168 | 168 | } |
| 169 | 169 | |
@@ -200,14 +200,14 @@ discard block |
||
| 200 | 200 | ], $args); |
| 201 | 201 | |
| 202 | 202 | if ($context) { |
| 203 | - if (! $context->get('currentUser')) { |
|
| 203 | + if (!$context->get('currentUser')) { |
|
| 204 | 204 | return $link; |
| 205 | 205 | } |
| 206 | 206 | } |
| 207 | 207 | |
| 208 | 208 | $args['atts']['href'] = getLogoutURL(); |
| 209 | 209 | |
| 210 | - if (! isset($args['atts']['class'])) { |
|
| 210 | + if (!isset($args['atts']['class'])) { |
|
| 211 | 211 | $args['atts']['class'] = 'logout-link'; |
| 212 | 212 | } |
| 213 | 213 | |
@@ -246,7 +246,7 @@ discard block |
||
| 246 | 246 | |
| 247 | 247 | $args['atts']['href'] = getSignupURL(); |
| 248 | 248 | |
| 249 | - if (! isset($args['atts']['class'])) { |
|
| 249 | + if (!isset($args['atts']['class'])) { |
|
| 250 | 250 | $args['atts']['class'] = 'signup-link'; |
| 251 | 251 | } |
| 252 | 252 | |
@@ -295,7 +295,7 @@ discard block |
||
| 295 | 295 | $url = ''; |
| 296 | 296 | $id = (int) $id; |
| 297 | 297 | |
| 298 | - if (! isValidID($id)) { |
|
| 298 | + if (!isValidID($id)) { |
|
| 299 | 299 | return $url; |
| 300 | 300 | } |
| 301 | 301 | |
@@ -312,7 +312,7 @@ discard block |
||
| 312 | 312 | $url = ''; |
| 313 | 313 | $id = (int) $id; |
| 314 | 314 | |
| 315 | - if (! isValidID($id)) { |
|
| 315 | + if (!isValidID($id)) { |
|
| 316 | 316 | return $url; |
| 317 | 317 | } |
| 318 | 318 | |
@@ -329,7 +329,7 @@ discard block |
||
| 329 | 329 | $url = ''; |
| 330 | 330 | $id = (int) $id; |
| 331 | 331 | |
| 332 | - if (! isValidID($id)) { |
|
| 332 | + if (!isValidID($id)) { |
|
| 333 | 333 | return $url; |
| 334 | 334 | } |
| 335 | 335 | |
@@ -356,14 +356,14 @@ discard block |
||
| 356 | 356 | if ($context) { |
| 357 | 357 | $currentUser = $context->get('currentUser'); |
| 358 | 358 | |
| 359 | - if (! $currentUser || ! $context->getAcl()->isUserAllowed($currentUser, 'User', 'read')) { |
|
| 359 | + if (!$currentUser || !$context->getAcl()->isUserAllowed($currentUser, 'User', 'read')) { |
|
| 360 | 360 | return $link; |
| 361 | 361 | } |
| 362 | 362 | } |
| 363 | 363 | |
| 364 | 364 | $args['atts']['href'] = getUsersURL(); |
| 365 | 365 | |
| 366 | - if (! isset($args['atts']['class'])) { |
|
| 366 | + if (!isset($args['atts']['class'])) { |
|
| 367 | 367 | $args['atts']['class'] = 'view-link view-users-link'; |
| 368 | 368 | } |
| 369 | 369 | |
@@ -389,14 +389,14 @@ discard block |
||
| 389 | 389 | if ($context) { |
| 390 | 390 | $currentUser = $context->get('currentUser'); |
| 391 | 391 | |
| 392 | - if (! $currentUser || ! $context->getAcl()->isUserAllowed($currentUser, 'User', 'add')) { |
|
| 392 | + if (!$currentUser || !$context->getAcl()->isUserAllowed($currentUser, 'User', 'add')) { |
|
| 393 | 393 | return $link; |
| 394 | 394 | } |
| 395 | 395 | } |
| 396 | 396 | |
| 397 | 397 | $args['atts']['href'] = getAddUserURL(); |
| 398 | 398 | |
| 399 | - if (! isset($args['atts']['class'])) { |
|
| 399 | + if (!isset($args['atts']['class'])) { |
|
| 400 | 400 | $args['atts']['class'] = 'add-link add-user-link'; |
| 401 | 401 | } |
| 402 | 402 | |
@@ -422,14 +422,14 @@ discard block |
||
| 422 | 422 | if ($context) { |
| 423 | 423 | $currentUser = $context->get('currentUser'); |
| 424 | 424 | |
| 425 | - if (! $currentUser || ! $context->getAcl()->isUserAllowed($currentUser, 'User', 'edit')) { |
|
| 425 | + if (!$currentUser || !$context->getAcl()->isUserAllowed($currentUser, 'User', 'edit')) { |
|
| 426 | 426 | return $link; |
| 427 | 427 | } |
| 428 | 428 | } |
| 429 | 429 | |
| 430 | 430 | $args['atts']['href'] = getEditUsersURL(); |
| 431 | 431 | |
| 432 | - if (! isset($args['atts']['class'])) { |
|
| 432 | + if (!isset($args['atts']['class'])) { |
|
| 433 | 433 | $args['atts']['class'] = 'edit-link edit-users-link'; |
| 434 | 434 | } |
| 435 | 435 | |
@@ -454,21 +454,21 @@ discard block |
||
| 454 | 454 | 'user' => null, |
| 455 | 455 | ], $args); |
| 456 | 456 | |
| 457 | - if (! $args['user'] instanceof User) { |
|
| 457 | + if (!$args['user'] instanceof User) { |
|
| 458 | 458 | return $args['fallbackContent'] ? $args['content'] : $link; |
| 459 | 459 | } |
| 460 | 460 | |
| 461 | 461 | if ($context) { |
| 462 | 462 | $currentUser = $context->get('currentUser'); |
| 463 | 463 | |
| 464 | - if (! $currentUser || ! $context->getAcl()->canEditEntity($currentUser, $args['user'])) { |
|
| 464 | + if (!$currentUser || !$context->getAcl()->canEditEntity($currentUser, $args['user'])) { |
|
| 465 | 465 | return $args['fallbackContent'] ? $args['content'] : $link; |
| 466 | 466 | } |
| 467 | 467 | } |
| 468 | 468 | |
| 469 | 469 | $args['atts']['href'] = getEditUserURL($args['user']->get('id')); |
| 470 | 470 | |
| 471 | - if (! isset($args['atts']['class'])) { |
|
| 471 | + if (!isset($args['atts']['class'])) { |
|
| 472 | 472 | $args['atts']['class'] = 'edit-link edit-user-link'; |
| 473 | 473 | } |
| 474 | 474 | |
@@ -492,21 +492,21 @@ discard block |
||
| 492 | 492 | 'user' => null, |
| 493 | 493 | ], $args); |
| 494 | 494 | |
| 495 | - if (! $args['user'] instanceof User) { |
|
| 495 | + if (!$args['user'] instanceof User) { |
|
| 496 | 496 | return $link; |
| 497 | 497 | } |
| 498 | 498 | |
| 499 | 499 | if ($context) { |
| 500 | 500 | $currentUser = $context->get('currentUser'); |
| 501 | 501 | |
| 502 | - if (! $currentUser || ! $context->getAcl()->canDeleteEntity($currentUser, $args['user'])) { |
|
| 502 | + if (!$currentUser || !$context->getAcl()->canDeleteEntity($currentUser, $args['user'])) { |
|
| 503 | 503 | return $link; |
| 504 | 504 | } |
| 505 | 505 | } |
| 506 | 506 | |
| 507 | 507 | $args['atts']['href'] = getDeleteUserURL($args['user']->get('id')); |
| 508 | 508 | |
| 509 | - if (! isset($args['atts']['class'])) { |
|
| 509 | + if (!isset($args['atts']['class'])) { |
|
| 510 | 510 | $args['atts']['class'] = 'delete-link delete-user-link'; |
| 511 | 511 | } |
| 512 | 512 | |
@@ -530,21 +530,21 @@ discard block |
||
| 530 | 530 | 'user' => null, |
| 531 | 531 | ], $args); |
| 532 | 532 | |
| 533 | - if (! $args['user'] instanceof User || ! $args['user']->isPending()) { |
|
| 533 | + if (!$args['user'] instanceof User || !$args['user']->isPending()) { |
|
| 534 | 534 | return $link; |
| 535 | 535 | } |
| 536 | 536 | |
| 537 | 537 | if ($context) { |
| 538 | 538 | $currentUser = $context->get('currentUser'); |
| 539 | 539 | |
| 540 | - if (! $currentUser || ! $context->getAcl()->canActivateUser($currentUser, $args['user'])) { |
|
| 540 | + if (!$currentUser || !$context->getAcl()->canActivateUser($currentUser, $args['user'])) { |
|
| 541 | 541 | return $link; |
| 542 | 542 | } |
| 543 | 543 | } |
| 544 | 544 | |
| 545 | 545 | $args['atts']['href'] = getActivateUserURL($args['user']->get('id')); |
| 546 | 546 | |
| 547 | - if (! isset($args['atts']['class'])) { |
|
| 547 | + if (!isset($args['atts']['class'])) { |
|
| 548 | 548 | $args['atts']['class'] = 'activate-link activate-user-link'; |
| 549 | 549 | } |
| 550 | 550 | |
@@ -573,7 +573,7 @@ discard block |
||
| 573 | 573 | $url = ''; |
| 574 | 574 | $id = (int) $id; |
| 575 | 575 | |
| 576 | - if (! isValidID($id)) { |
|
| 576 | + if (!isValidID($id)) { |
|
| 577 | 577 | return $url; |
| 578 | 578 | } |
| 579 | 579 | |
@@ -610,7 +610,7 @@ discard block |
||
| 610 | 610 | $url = ''; |
| 611 | 611 | $id = (int) $id; |
| 612 | 612 | |
| 613 | - if (! isValidID($id)) { |
|
| 613 | + if (!isValidID($id)) { |
|
| 614 | 614 | return $url; |
| 615 | 615 | } |
| 616 | 616 | |
@@ -627,7 +627,7 @@ discard block |
||
| 627 | 627 | $url = ''; |
| 628 | 628 | $id = (int) $id; |
| 629 | 629 | |
| 630 | - if (! isValidID($id)) { |
|
| 630 | + if (!isValidID($id)) { |
|
| 631 | 631 | return $url; |
| 632 | 632 | } |
| 633 | 633 | |
@@ -644,7 +644,7 @@ discard block |
||
| 644 | 644 | $url = ''; |
| 645 | 645 | $id = (int) $id; |
| 646 | 646 | |
| 647 | - if (! isValidID($id)) { |
|
| 647 | + if (!isValidID($id)) { |
|
| 648 | 648 | return $url; |
| 649 | 649 | } |
| 650 | 650 | |
@@ -671,14 +671,14 @@ discard block |
||
| 671 | 671 | if ($context) { |
| 672 | 672 | $currentUser = $context->get('currentUser'); |
| 673 | 673 | |
| 674 | - if ('on' !== Options::getOption('site_publication') && (! $currentUser || ! $context->getAcl()->isUserAllowed($currentUser, 'Donor', 'read'))) { |
|
| 674 | + if ('on' !== Options::getOption('site_publication') && (!$currentUser || !$context->getAcl()->isUserAllowed($currentUser, 'Donor', 'read'))) { |
|
| 675 | 675 | return $link; |
| 676 | 676 | } |
| 677 | 677 | } |
| 678 | 678 | |
| 679 | 679 | $args['atts']['href'] = getDonorsURL(); |
| 680 | 680 | |
| 681 | - if (! isset($args['atts']['class'])) { |
|
| 681 | + if (!isset($args['atts']['class'])) { |
|
| 682 | 682 | $args['atts']['class'] = 'view-link view-donors-link'; |
| 683 | 683 | } |
| 684 | 684 | |
@@ -702,14 +702,14 @@ discard block |
||
| 702 | 702 | 'donor' => null, |
| 703 | 703 | ], $args); |
| 704 | 704 | |
| 705 | - if (! $args['donor'] instanceof Donor) { |
|
| 705 | + if (!$args['donor'] instanceof Donor) { |
|
| 706 | 706 | return $link; |
| 707 | 707 | } |
| 708 | 708 | |
| 709 | 709 | if ($context) { |
| 710 | 710 | $currentUser = $context->get('currentUser'); |
| 711 | 711 | |
| 712 | - if ('on' !== Options::getOption('site_publication') && (! $currentUser || ! $context->getAcl()->canReadEntity($currentUser, $args['donor']))) { |
|
| 712 | + if ('on' !== Options::getOption('site_publication') && (!$currentUser || !$context->getAcl()->canReadEntity($currentUser, $args['donor']))) { |
|
| 713 | 713 | return $link; |
| 714 | 714 | } |
| 715 | 715 | } |
@@ -720,7 +720,7 @@ discard block |
||
| 720 | 720 | |
| 721 | 721 | $args['atts']['href'] = getDonorURL($args['donor']->get('id')); |
| 722 | 722 | |
| 723 | - if (! isset($args['atts']['class'])) { |
|
| 723 | + if (!isset($args['atts']['class'])) { |
|
| 724 | 724 | $args['atts']['class'] = 'view-link view-donor-link'; |
| 725 | 725 | } |
| 726 | 726 | |
@@ -746,14 +746,14 @@ discard block |
||
| 746 | 746 | if ($context) { |
| 747 | 747 | $currentUser = $context->get('currentUser'); |
| 748 | 748 | |
| 749 | - if (! $currentUser || ! $context->getAcl()->isUserAllowed($currentUser, 'Donor', 'add')) { |
|
| 749 | + if (!$currentUser || !$context->getAcl()->isUserAllowed($currentUser, 'Donor', 'add')) { |
|
| 750 | 750 | return $link; |
| 751 | 751 | } |
| 752 | 752 | } |
| 753 | 753 | |
| 754 | 754 | $args['atts']['href'] = getAddDonorURL(); |
| 755 | 755 | |
| 756 | - if (! isset($args['atts']['class'])) { |
|
| 756 | + if (!isset($args['atts']['class'])) { |
|
| 757 | 757 | $args['atts']['class'] = 'add-link add-donor-link'; |
| 758 | 758 | } |
| 759 | 759 | |
@@ -779,14 +779,14 @@ discard block |
||
| 779 | 779 | if ($context) { |
| 780 | 780 | $currentUser = $context->get('currentUser'); |
| 781 | 781 | |
| 782 | - if (! $currentUser || ! $context->getAcl()->isUserAllowed($currentUser, 'Donor', 'edit')) { |
|
| 782 | + if (!$currentUser || !$context->getAcl()->isUserAllowed($currentUser, 'Donor', 'edit')) { |
|
| 783 | 783 | return $link; |
| 784 | 784 | } |
| 785 | 785 | } |
| 786 | 786 | |
| 787 | 787 | $args['atts']['href'] = getEditDonorsURL(); |
| 788 | 788 | |
| 789 | - if (! isset($args['atts']['class'])) { |
|
| 789 | + if (!isset($args['atts']['class'])) { |
|
| 790 | 790 | $args['atts']['class'] = 'edit-link edit-donors-link'; |
| 791 | 791 | } |
| 792 | 792 | |
@@ -811,21 +811,21 @@ discard block |
||
| 811 | 811 | 'donor' => null, |
| 812 | 812 | ], $args); |
| 813 | 813 | |
| 814 | - if (! $args['donor'] instanceof Donor) { |
|
| 814 | + if (!$args['donor'] instanceof Donor) { |
|
| 815 | 815 | return $args['fallbackContent'] ? $args['content'] : $link; |
| 816 | 816 | } |
| 817 | 817 | |
| 818 | 818 | if ($context) { |
| 819 | 819 | $currentUser = $context->get('currentUser'); |
| 820 | 820 | |
| 821 | - if (! $currentUser || ! $context->getAcl()->canEditEntity($currentUser, $args['donor'])) { |
|
| 821 | + if (!$currentUser || !$context->getAcl()->canEditEntity($currentUser, $args['donor'])) { |
|
| 822 | 822 | return $args['fallbackContent'] ? $args['content'] : $link; |
| 823 | 823 | } |
| 824 | 824 | } |
| 825 | 825 | |
| 826 | 826 | $args['atts']['href'] = getEditDonorURL($args['donor']->get('id')); |
| 827 | 827 | |
| 828 | - if (! isset($args['atts']['class'])) { |
|
| 828 | + if (!isset($args['atts']['class'])) { |
|
| 829 | 829 | $args['atts']['class'] = 'edit-link edit-donor-link'; |
| 830 | 830 | } |
| 831 | 831 | |
@@ -849,21 +849,21 @@ discard block |
||
| 849 | 849 | 'donor' => null, |
| 850 | 850 | ], $args); |
| 851 | 851 | |
| 852 | - if (! $args['donor'] instanceof Donor) { |
|
| 852 | + if (!$args['donor'] instanceof Donor) { |
|
| 853 | 853 | return $link; |
| 854 | 854 | } |
| 855 | 855 | |
| 856 | 856 | if ($context) { |
| 857 | 857 | $currentUser = $context->get('currentUser'); |
| 858 | 858 | |
| 859 | - if (! $currentUser || ! $context->getAcl()->canDeleteEntity($currentUser, $args['donor'])) { |
|
| 859 | + if (!$currentUser || !$context->getAcl()->canDeleteEntity($currentUser, $args['donor'])) { |
|
| 860 | 860 | return $link; |
| 861 | 861 | } |
| 862 | 862 | } |
| 863 | 863 | |
| 864 | 864 | $args['atts']['href'] = getDeleteDonorURL($args['donor']->get('id')); |
| 865 | 865 | |
| 866 | - if (! isset($args['atts']['class'])) { |
|
| 866 | + if (!isset($args['atts']['class'])) { |
|
| 867 | 867 | $args['atts']['class'] = 'delete-link delete-donor-link'; |
| 868 | 868 | } |
| 869 | 869 | |
@@ -887,21 +887,21 @@ discard block |
||
| 887 | 887 | 'donor' => null, |
| 888 | 888 | ], $args); |
| 889 | 889 | |
| 890 | - if (! $args['donor'] instanceof Donor || ! $args['donor']->isPending()) { |
|
| 890 | + if (!$args['donor'] instanceof Donor || !$args['donor']->isPending()) { |
|
| 891 | 891 | return $link; |
| 892 | 892 | } |
| 893 | 893 | |
| 894 | 894 | if ($context) { |
| 895 | 895 | $currentUser = $context->get('currentUser'); |
| 896 | 896 | |
| 897 | - if (! $currentUser || ! $context->getAcl()->canApproveDonor($currentUser, $args['donor'])) { |
|
| 897 | + if (!$currentUser || !$context->getAcl()->canApproveDonor($currentUser, $args['donor'])) { |
|
| 898 | 898 | return $link; |
| 899 | 899 | } |
| 900 | 900 | } |
| 901 | 901 | |
| 902 | 902 | $args['atts']['href'] = getApproveDonorURL($args['donor']->get('id')); |
| 903 | 903 | |
| 904 | - if (! isset($args['atts']['class'])) { |
|
| 904 | + if (!isset($args['atts']['class'])) { |
|
| 905 | 905 | $args['atts']['class'] = 'approve-link approve-donor-link'; |
| 906 | 906 | } |
| 907 | 907 | |
@@ -950,7 +950,7 @@ discard block |
||
| 950 | 950 | $url = ''; |
| 951 | 951 | $id = (int) $id; |
| 952 | 952 | |
| 953 | - if (! isValidID($id)) { |
|
| 953 | + if (!isValidID($id)) { |
|
| 954 | 954 | return $url; |
| 955 | 955 | } |
| 956 | 956 | |
@@ -967,7 +967,7 @@ discard block |
||
| 967 | 967 | $url = ''; |
| 968 | 968 | $id = (int) $id; |
| 969 | 969 | |
| 970 | - if (! isValidID($id)) { |
|
| 970 | + if (!isValidID($id)) { |
|
| 971 | 971 | return $url; |
| 972 | 972 | } |
| 973 | 973 | |
@@ -993,14 +993,14 @@ discard block |
||
| 993 | 993 | if ($context) { |
| 994 | 994 | $currentUser = $context->get('currentUser'); |
| 995 | 995 | |
| 996 | - if ('on' !== Options::getOption('site_publication') && (! $currentUser || ! $context->getAcl()->isUserAllowed($currentUser, 'City', 'read'))) { |
|
| 996 | + if ('on' !== Options::getOption('site_publication') && (!$currentUser || !$context->getAcl()->isUserAllowed($currentUser, 'City', 'read'))) { |
|
| 997 | 997 | return $link; |
| 998 | 998 | } |
| 999 | 999 | } |
| 1000 | 1000 | |
| 1001 | 1001 | $args['atts']['href'] = getCitiesURL(); |
| 1002 | 1002 | |
| 1003 | - if (! isset($args['atts']['class'])) { |
|
| 1003 | + if (!isset($args['atts']['class'])) { |
|
| 1004 | 1004 | $args['atts']['class'] = 'view-link view-cities-link'; |
| 1005 | 1005 | } |
| 1006 | 1006 | |
@@ -1026,14 +1026,14 @@ discard block |
||
| 1026 | 1026 | if ($context) { |
| 1027 | 1027 | $currentUser = $context->get('currentUser'); |
| 1028 | 1028 | |
| 1029 | - if (! $currentUser || ! $context->getAcl()->isUserAllowed($currentUser, 'City', 'add')) { |
|
| 1029 | + if (!$currentUser || !$context->getAcl()->isUserAllowed($currentUser, 'City', 'add')) { |
|
| 1030 | 1030 | return $link; |
| 1031 | 1031 | } |
| 1032 | 1032 | } |
| 1033 | 1033 | |
| 1034 | 1034 | $args['atts']['href'] = getAddCityURL(); |
| 1035 | 1035 | |
| 1036 | - if (! isset($args['atts']['class'])) { |
|
| 1036 | + if (!isset($args['atts']['class'])) { |
|
| 1037 | 1037 | $args['atts']['class'] = 'add-link add-city-link'; |
| 1038 | 1038 | } |
| 1039 | 1039 | |
@@ -1059,14 +1059,14 @@ discard block |
||
| 1059 | 1059 | if ($context) { |
| 1060 | 1060 | $currentUser = $context->get('currentUser'); |
| 1061 | 1061 | |
| 1062 | - if (! $currentUser || ! $context->getAcl()->isUserAllowed($currentUser, 'City', 'edit')) { |
|
| 1062 | + if (!$currentUser || !$context->getAcl()->isUserAllowed($currentUser, 'City', 'edit')) { |
|
| 1063 | 1063 | return $link; |
| 1064 | 1064 | } |
| 1065 | 1065 | } |
| 1066 | 1066 | |
| 1067 | 1067 | $args['atts']['href'] = getEditCitiesURL(); |
| 1068 | 1068 | |
| 1069 | - if (! isset($args['atts']['class'])) { |
|
| 1069 | + if (!isset($args['atts']['class'])) { |
|
| 1070 | 1070 | $args['atts']['class'] = 'edit-link edit-cities-link'; |
| 1071 | 1071 | } |
| 1072 | 1072 | |
@@ -1091,21 +1091,21 @@ discard block |
||
| 1091 | 1091 | 'city' => null, |
| 1092 | 1092 | ], $args); |
| 1093 | 1093 | |
| 1094 | - if (! $args['city'] instanceof City) { |
|
| 1094 | + if (!$args['city'] instanceof City) { |
|
| 1095 | 1095 | return $args['fallbackContent'] ? $args['content'] : $link; |
| 1096 | 1096 | } |
| 1097 | 1097 | |
| 1098 | 1098 | if ($context) { |
| 1099 | 1099 | $currentUser = $context->get('currentUser'); |
| 1100 | 1100 | |
| 1101 | - if (! $currentUser || ! $context->getAcl()->canEditEntity($currentUser, $args['city'])) { |
|
| 1101 | + if (!$currentUser || !$context->getAcl()->canEditEntity($currentUser, $args['city'])) { |
|
| 1102 | 1102 | return $args['fallbackContent'] ? $args['content'] : $link; |
| 1103 | 1103 | } |
| 1104 | 1104 | } |
| 1105 | 1105 | |
| 1106 | 1106 | $args['atts']['href'] = getEditCityURL($args['city']->get('id')); |
| 1107 | 1107 | |
| 1108 | - if (! isset($args['atts']['class'])) { |
|
| 1108 | + if (!isset($args['atts']['class'])) { |
|
| 1109 | 1109 | $args['atts']['class'] = 'edit-link edit-city-link'; |
| 1110 | 1110 | } |
| 1111 | 1111 | |
@@ -1129,21 +1129,21 @@ discard block |
||
| 1129 | 1129 | 'city' => null, |
| 1130 | 1130 | ], $args); |
| 1131 | 1131 | |
| 1132 | - if (! $args['city'] instanceof City) { |
|
| 1132 | + if (!$args['city'] instanceof City) { |
|
| 1133 | 1133 | return $link; |
| 1134 | 1134 | } |
| 1135 | 1135 | |
| 1136 | 1136 | if ($context) { |
| 1137 | 1137 | $currentUser = $context->get('currentUser'); |
| 1138 | 1138 | |
| 1139 | - if (! $currentUser || ! $context->getAcl()->canDeleteEntity($currentUser, $args['city'])) { |
|
| 1139 | + if (!$currentUser || !$context->getAcl()->canDeleteEntity($currentUser, $args['city'])) { |
|
| 1140 | 1140 | return $link; |
| 1141 | 1141 | } |
| 1142 | 1142 | } |
| 1143 | 1143 | |
| 1144 | 1144 | $args['atts']['href'] = getDeleteCityURL($args['city']->get('id')); |
| 1145 | 1145 | |
| 1146 | - if (! isset($args['atts']['class'])) { |
|
| 1146 | + if (!isset($args['atts']['class'])) { |
|
| 1147 | 1147 | $args['atts']['class'] = 'delete-link delete-city-link'; |
| 1148 | 1148 | } |
| 1149 | 1149 | |
@@ -1192,7 +1192,7 @@ discard block |
||
| 1192 | 1192 | $url = ''; |
| 1193 | 1193 | $id = (int) $id; |
| 1194 | 1194 | |
| 1195 | - if (! isValidID($id)) { |
|
| 1195 | + if (!isValidID($id)) { |
|
| 1196 | 1196 | return $url; |
| 1197 | 1197 | } |
| 1198 | 1198 | |
@@ -1209,7 +1209,7 @@ discard block |
||
| 1209 | 1209 | $url = ''; |
| 1210 | 1210 | $id = (int) $id; |
| 1211 | 1211 | |
| 1212 | - if (! isValidID($id)) { |
|
| 1212 | + if (!isValidID($id)) { |
|
| 1213 | 1213 | return $url; |
| 1214 | 1214 | } |
| 1215 | 1215 | |
@@ -1235,14 +1235,14 @@ discard block |
||
| 1235 | 1235 | if ($context) { |
| 1236 | 1236 | $currentUser = $context->get('currentUser'); |
| 1237 | 1237 | |
| 1238 | - if ('on' !== Options::getOption('site_publication') && (! $currentUser || ! $context->getAcl()->isUserAllowed($currentUser, 'District', 'read'))) { |
|
| 1238 | + if ('on' !== Options::getOption('site_publication') && (!$currentUser || !$context->getAcl()->isUserAllowed($currentUser, 'District', 'read'))) { |
|
| 1239 | 1239 | return $link; |
| 1240 | 1240 | } |
| 1241 | 1241 | } |
| 1242 | 1242 | |
| 1243 | 1243 | $args['atts']['href'] = getDistrictsURL(); |
| 1244 | 1244 | |
| 1245 | - if (! isset($args['atts']['class'])) { |
|
| 1245 | + if (!isset($args['atts']['class'])) { |
|
| 1246 | 1246 | $args['atts']['class'] = 'view-link view-districts-link'; |
| 1247 | 1247 | } |
| 1248 | 1248 | |
@@ -1268,14 +1268,14 @@ discard block |
||
| 1268 | 1268 | if ($context) { |
| 1269 | 1269 | $currentUser = $context->get('currentUser'); |
| 1270 | 1270 | |
| 1271 | - if (! $currentUser || ! $context->getAcl()->isUserAllowed($currentUser, 'District', 'add')) { |
|
| 1271 | + if (!$currentUser || !$context->getAcl()->isUserAllowed($currentUser, 'District', 'add')) { |
|
| 1272 | 1272 | return $link; |
| 1273 | 1273 | } |
| 1274 | 1274 | } |
| 1275 | 1275 | |
| 1276 | 1276 | $args['atts']['href'] = getAddDistrictURL(); |
| 1277 | 1277 | |
| 1278 | - if (! isset($args['atts']['class'])) { |
|
| 1278 | + if (!isset($args['atts']['class'])) { |
|
| 1279 | 1279 | $args['atts']['class'] = 'add-link add-district-link'; |
| 1280 | 1280 | } |
| 1281 | 1281 | |
@@ -1301,14 +1301,14 @@ discard block |
||
| 1301 | 1301 | if ($context) { |
| 1302 | 1302 | $currentUser = $context->get('currentUser'); |
| 1303 | 1303 | |
| 1304 | - if (! $currentUser || ! $context->getAcl()->isUserAllowed($currentUser, 'District', 'edit')) { |
|
| 1304 | + if (!$currentUser || !$context->getAcl()->isUserAllowed($currentUser, 'District', 'edit')) { |
|
| 1305 | 1305 | return $link; |
| 1306 | 1306 | } |
| 1307 | 1307 | } |
| 1308 | 1308 | |
| 1309 | 1309 | $args['atts']['href'] = getEditDistrictsURL(); |
| 1310 | 1310 | |
| 1311 | - if (! isset($args['atts']['class'])) { |
|
| 1311 | + if (!isset($args['atts']['class'])) { |
|
| 1312 | 1312 | $args['atts']['class'] = 'edit-link edit-districts-link'; |
| 1313 | 1313 | } |
| 1314 | 1314 | |
@@ -1333,21 +1333,21 @@ discard block |
||
| 1333 | 1333 | 'district' => null, |
| 1334 | 1334 | ], $args); |
| 1335 | 1335 | |
| 1336 | - if (! $args['district'] instanceof District) { |
|
| 1336 | + if (!$args['district'] instanceof District) { |
|
| 1337 | 1337 | return $args['fallbackContent'] ? $args['content'] : $link; |
| 1338 | 1338 | } |
| 1339 | 1339 | |
| 1340 | 1340 | if ($context) { |
| 1341 | 1341 | $currentUser = $context->get('currentUser'); |
| 1342 | 1342 | |
| 1343 | - if (! $currentUser || ! $context->getAcl()->canEditEntity($currentUser, $args['district'])) { |
|
| 1343 | + if (!$currentUser || !$context->getAcl()->canEditEntity($currentUser, $args['district'])) { |
|
| 1344 | 1344 | return $args['fallbackContent'] ? $args['content'] : $link; |
| 1345 | 1345 | } |
| 1346 | 1346 | } |
| 1347 | 1347 | |
| 1348 | 1348 | $args['atts']['href'] = getEditDistrictURL($args['district']->get('id')); |
| 1349 | 1349 | |
| 1350 | - if (! isset($args['atts']['class'])) { |
|
| 1350 | + if (!isset($args['atts']['class'])) { |
|
| 1351 | 1351 | $args['atts']['class'] = 'edit-link edit-district-link'; |
| 1352 | 1352 | } |
| 1353 | 1353 | |
@@ -1371,21 +1371,21 @@ discard block |
||
| 1371 | 1371 | 'district' => null, |
| 1372 | 1372 | ], $args); |
| 1373 | 1373 | |
| 1374 | - if (! $args['district'] instanceof District) { |
|
| 1374 | + if (!$args['district'] instanceof District) { |
|
| 1375 | 1375 | return $link; |
| 1376 | 1376 | } |
| 1377 | 1377 | |
| 1378 | 1378 | if ($context) { |
| 1379 | 1379 | $currentUser = $context->get('currentUser'); |
| 1380 | 1380 | |
| 1381 | - if (! $currentUser || ! $context->getAcl()->canDeleteEntity($currentUser, $args['district'])) { |
|
| 1381 | + if (!$currentUser || !$context->getAcl()->canDeleteEntity($currentUser, $args['district'])) { |
|
| 1382 | 1382 | return $link; |
| 1383 | 1383 | } |
| 1384 | 1384 | } |
| 1385 | 1385 | |
| 1386 | 1386 | $args['atts']['href'] = getDeleteDistrictURL($args['district']->get('id')); |
| 1387 | 1387 | |
| 1388 | - if (! isset($args['atts']['class'])) { |
|
| 1388 | + if (!isset($args['atts']['class'])) { |
|
| 1389 | 1389 | $args['atts']['class'] = 'delete-link delete-district-link'; |
| 1390 | 1390 | } |
| 1391 | 1391 | |
@@ -1423,14 +1423,14 @@ discard block |
||
| 1423 | 1423 | if ($context) { |
| 1424 | 1424 | $currentUser = $context->get('currentUser'); |
| 1425 | 1425 | |
| 1426 | - if (! $currentUser || ! $context->getAcl()->isUserAllowed($currentUser, 'Setting', 'edit')) { |
|
| 1426 | + if (!$currentUser || !$context->getAcl()->isUserAllowed($currentUser, 'Setting', 'edit')) { |
|
| 1427 | 1427 | return $link; |
| 1428 | 1428 | } |
| 1429 | 1429 | } |
| 1430 | 1430 | |
| 1431 | 1431 | $args['atts']['href'] = getSettingsURL(); |
| 1432 | 1432 | |
| 1433 | - if (! isset($args['atts']['class'])) { |
|
| 1433 | + if (!isset($args['atts']['class'])) { |
|
| 1434 | 1434 | $args['atts']['class'] = 'settings-link'; |
| 1435 | 1435 | } |
| 1436 | 1436 | |
@@ -77,7 +77,7 @@ |
||
| 77 | 77 | $output .= $key . '="' . escAttr($value) . '" '; |
| 78 | 78 | } |
| 79 | 79 | |
| 80 | - if (! empty($output)) { |
|
| 80 | + if (!empty($output)) { |
|
| 81 | 81 | $output = $args['before'] . trim($output) . $args['after']; |
| 82 | 82 | } |
| 83 | 83 | |
@@ -81,7 +81,7 @@ discard block |
||
| 81 | 81 | protected function canEditUser(User $subject, User $user) |
| 82 | 82 | { |
| 83 | 83 | $can = $subject->get('id') === $user->get('id'); |
| 84 | - if (! $can) { |
|
| 84 | + if (!$can) { |
|
| 85 | 85 | $can = $this->isUserAllowed($subject, 'User', 'edit'); |
| 86 | 86 | } |
| 87 | 87 | |
@@ -158,7 +158,7 @@ discard block |
||
| 158 | 158 | public function isUserAllowed(User $subject, $resource = null, $privilege = null) |
| 159 | 159 | { |
| 160 | 160 | $accountRole = $subject->get('role'); |
| 161 | - if (! $accountRole || ! $this->isAllowed($accountRole, $resource, $privilege)) { |
|
| 161 | + if (!$accountRole || !$this->isAllowed($accountRole, $resource, $privilege)) { |
|
| 162 | 162 | return false; |
| 163 | 163 | } |
| 164 | 164 | |
@@ -13,7 +13,7 @@ discard block |
||
| 13 | 13 | */ |
| 14 | 14 | function isHTTPS() |
| 15 | 15 | { |
| 16 | - return (! empty($_SERVER['HTTPS']) && $_SERVER['HTTPS'] !== 'off'); |
|
| 16 | + return (!empty($_SERVER['HTTPS']) && $_SERVER['HTTPS'] !== 'off'); |
|
| 17 | 17 | } |
| 18 | 18 | |
| 19 | 19 | /** |
@@ -61,7 +61,7 @@ discard block |
||
| 61 | 61 | } |
| 62 | 62 | |
| 63 | 63 | $fragment = strstr($uri, '#'); |
| 64 | - if (! empty($fragment)) { |
|
| 64 | + if (!empty($fragment)) { |
|
| 65 | 65 | $uri = substr($uri, 0, -strlen($fragment)); |
| 66 | 66 | } |
| 67 | 67 | |
@@ -75,15 +75,15 @@ |
||
| 75 | 75 | */ |
| 76 | 76 | public function __wakeup() |
| 77 | 77 | { |
| 78 | - if ( ! $this->__isInitialized__) { |
|
| 79 | - $this->__initializer__ = function (Variable $proxy) { |
|
| 78 | + if (!$this->__isInitialized__) { |
|
| 79 | + $this->__initializer__ = function(Variable $proxy) { |
|
| 80 | 80 | $proxy->__setInitializer(null); |
| 81 | 81 | $proxy->__setCloner(null); |
| 82 | 82 | |
| 83 | 83 | $existingProperties = get_object_vars($proxy); |
| 84 | 84 | |
| 85 | 85 | foreach ($proxy->__getLazyProperties() as $property => $defaultValue) { |
| 86 | - if ( ! array_key_exists($property, $existingProperties)) { |
|
| 86 | + if (!array_key_exists($property, $existingProperties)) { |
|
| 87 | 87 | $proxy->$property = $defaultValue; |
| 88 | 88 | } |
| 89 | 89 | } |
@@ -75,15 +75,15 @@ |
||
| 75 | 75 | */ |
| 76 | 76 | public function __wakeup() |
| 77 | 77 | { |
| 78 | - if ( ! $this->__isInitialized__) { |
|
| 79 | - $this->__initializer__ = function (City $proxy) { |
|
| 78 | + if (!$this->__isInitialized__) { |
|
| 79 | + $this->__initializer__ = function(City $proxy) { |
|
| 80 | 80 | $proxy->__setInitializer(null); |
| 81 | 81 | $proxy->__setCloner(null); |
| 82 | 82 | |
| 83 | 83 | $existingProperties = get_object_vars($proxy); |
| 84 | 84 | |
| 85 | 85 | foreach ($proxy->__getLazyProperties() as $property => $defaultValue) { |
| 86 | - if ( ! array_key_exists($property, $existingProperties)) { |
|
| 86 | + if (!array_key_exists($property, $existingProperties)) { |
|
| 87 | 87 | $proxy->$property = $defaultValue; |
| 88 | 88 | } |
| 89 | 89 | } |
@@ -75,15 +75,15 @@ |
||
| 75 | 75 | */ |
| 76 | 76 | public function __wakeup() |
| 77 | 77 | { |
| 78 | - if ( ! $this->__isInitialized__) { |
|
| 79 | - $this->__initializer__ = function (District $proxy) { |
|
| 78 | + if (!$this->__isInitialized__) { |
|
| 79 | + $this->__initializer__ = function(District $proxy) { |
|
| 80 | 80 | $proxy->__setInitializer(null); |
| 81 | 81 | $proxy->__setCloner(null); |
| 82 | 82 | |
| 83 | 83 | $existingProperties = get_object_vars($proxy); |
| 84 | 84 | |
| 85 | 85 | foreach ($proxy->__getLazyProperties() as $property => $defaultValue) { |
| 86 | - if ( ! array_key_exists($property, $existingProperties)) { |
|
| 86 | + if (!array_key_exists($property, $existingProperties)) { |
|
| 87 | 87 | $proxy->$property = $defaultValue; |
| 88 | 88 | } |
| 89 | 89 | } |
@@ -75,15 +75,15 @@ |
||
| 75 | 75 | */ |
| 76 | 76 | public function __wakeup() |
| 77 | 77 | { |
| 78 | - if ( ! $this->__isInitialized__) { |
|
| 79 | - $this->__initializer__ = function (Donor $proxy) { |
|
| 78 | + if (!$this->__isInitialized__) { |
|
| 79 | + $this->__initializer__ = function(Donor $proxy) { |
|
| 80 | 80 | $proxy->__setInitializer(null); |
| 81 | 81 | $proxy->__setCloner(null); |
| 82 | 82 | |
| 83 | 83 | $existingProperties = get_object_vars($proxy); |
| 84 | 84 | |
| 85 | 85 | foreach ($proxy->__getLazyProperties() as $property => $defaultValue) { |
| 86 | - if ( ! array_key_exists($property, $existingProperties)) { |
|
| 86 | + if (!array_key_exists($property, $existingProperties)) { |
|
| 87 | 87 | $proxy->$property = $defaultValue; |
| 88 | 88 | } |
| 89 | 89 | } |