| @@ -224,7 +224,7 @@ | ||
| 224 | 224 | Circle::$DEF_SOURCE[$circle->getSource()], | 
| 225 | 225 | $displayName ? $owner->getDisplayName() : $owner->getUserId(), | 
| 226 | 226 | $this->configService->displayInstance($owner->getInstance()), | 
| 227 | -					$circle->getPopulation() . '/' . $this->getInt('members_limit', $circle->getSettings(), -1), | |
| 227 | +					$circle->getPopulation().'/'.$this->getInt('members_limit', $circle->getSettings(), -1), | |
| 228 | 228 |  					substr(str_replace("\n", ' ', $circle->getDescription()), 0, 30) | 
| 229 | 229 | ] | 
| 230 | 230 | ); | 
| @@ -377,7 +377,7 @@ discard block | ||
| 377 | 377 | } | 
| 378 | 378 | |
| 379 | 379 |  		if ($circle->getDisplayName() !== '') { | 
| 380 | -			$this->searchInDBField('display_name', '%' . $circle->getDisplayName() . '%'); | |
| 380 | +			$this->searchInDBField('display_name', '%'.$circle->getDisplayName().'%'); | |
| 381 | 381 | } | 
| 382 | 382 |  		if ($circle->getConfig() > 0) { | 
| 383 | 383 |  			$this->limitBitwise('config', $circle->getConfig()); | 
| @@ -396,7 +396,7 @@ discard block | ||
| 396 | 396 | $this->generateRemoteInstanceSelectAlias($aliasRemoteInstance) | 
| 397 | 397 | ->leftJoin( | 
| 398 | 398 | $alias, CoreRequestBuilder::TABLE_REMOTE, $aliasRemoteInstance, | 
| 399 | - $expr->eq($alias . '.instance', $aliasRemoteInstance . '.instance') | |
| 399 | + $expr->eq($alias.'.instance', $aliasRemoteInstance.'.instance') | |
| 400 | 400 | ); | 
| 401 | 401 |  		} catch (RequestBuilderException $e) { | 
| 402 | 402 | } | 
| @@ -449,7 +449,7 @@ discard block | ||
| 449 | 449 | $expr = $this->expr(); | 
| 450 | 450 | $this->leftJoin( | 
| 451 | 451 | $this->getDefaultSelectAlias(), CoreRequestBuilder::TABLE_REMOTE, $aliasRemote, | 
| 452 | - $expr->eq($aliasRemote . '.instance', $this->createNamedParameter($remoteInstance->getInstance())) | |
| 452 | + $expr->eq($aliasRemote.'.instance', $this->createNamedParameter($remoteInstance->getInstance())) | |
| 453 | 453 | ); | 
| 454 | 454 | } | 
| 455 | 455 | |
| @@ -477,12 +477,12 @@ discard block | ||
| 477 | 477 | $this->leftJoin( | 
| 478 | 478 | $this->getDefaultSelectAlias(), CoreRequestBuilder::TABLE_MEMBER, $aliasRemoteMember, | 
| 479 | 479 | $expr->andX( | 
| 480 | - $expr->eq($aliasRemoteMember . '.circle_id', $aliasCircle . '.unique_id'), | |
| 480 | + $expr->eq($aliasRemoteMember.'.circle_id', $aliasCircle.'.unique_id'), | |
| 481 | 481 | $expr->eq( | 
| 482 | - $aliasRemoteMember . '.instance', | |
| 482 | + $aliasRemoteMember.'.instance', | |
| 483 | 483 | $this->createNamedParameter($remoteInstance->getInstance()) | 
| 484 | 484 | ), | 
| 485 | - $expr->gte($aliasRemoteMember . '.level', $this->createNamedParameter(Member::LEVEL_MEMBER)) | |
| 485 | + $expr->gte($aliasRemoteMember.'.level', $this->createNamedParameter(Member::LEVEL_MEMBER)) | |
| 486 | 486 | ) | 
| 487 | 487 | ); | 
| 488 | 488 | } | 
| @@ -514,21 +514,21 @@ discard block | ||
| 514 | 514 | $this->leftJoin( | 
| 515 | 515 | $this->getDefaultSelectAlias(), CoreRequestBuilder::TABLE_MEMBER, $aliasRemoteCircle, | 
| 516 | 516 | $expr->andX( | 
| 517 | - $expr->eq($aliasRemoteCircle . '.single_id', $aliasCircle . '.unique_id'), | |
| 518 | - $expr->emptyString($aliasRemoteCircle . '.instance'), | |
| 519 | - $expr->gte($aliasRemoteCircle . '.level', $this->createNamedParameter(Member::LEVEL_MEMBER)) | |
| 517 | + $expr->eq($aliasRemoteCircle.'.single_id', $aliasCircle.'.unique_id'), | |
| 518 | + $expr->emptyString($aliasRemoteCircle.'.instance'), | |
| 519 | + $expr->gte($aliasRemoteCircle.'.level', $this->createNamedParameter(Member::LEVEL_MEMBER)) | |
| 520 | 520 | ) | 
| 521 | 521 | ); | 
| 522 | 522 | $this->leftJoin( | 
| 523 | 523 | $this->getDefaultSelectAlias(), CoreRequestBuilder::TABLE_MEMBER, $aliasRemoteCircleOwner, | 
| 524 | 524 | $expr->andX( | 
| 525 | - $expr->eq($aliasRemoteCircle . '.circle_id', $aliasRemoteCircleOwner . '.circle_id'), | |
| 525 | + $expr->eq($aliasRemoteCircle.'.circle_id', $aliasRemoteCircleOwner.'.circle_id'), | |
| 526 | 526 | $expr->eq( | 
| 527 | - $aliasRemoteCircleOwner . '.instance', | |
| 527 | + $aliasRemoteCircleOwner.'.instance', | |
| 528 | 528 | $this->createNamedParameter($remoteInstance->getInstance()) | 
| 529 | 529 | ), | 
| 530 | 530 | $expr->eq( | 
| 531 | - $aliasRemoteCircleOwner . '.level', $this->createNamedParameter(Member::LEVEL_OWNER) | |
| 531 | + $aliasRemoteCircleOwner.'.level', $this->createNamedParameter(Member::LEVEL_OWNER) | |
| 532 | 532 | ) | 
| 533 | 533 | ) | 
| 534 | 534 | ); | 
| @@ -561,16 +561,16 @@ discard block | ||
| 561 | 561 | $expr = $this->expr(); | 
| 562 | 562 | $orX = $expr->orX(); | 
| 563 | 563 | $orX->add( | 
| 564 | - $expr->eq($aliasRemote . '.type', $this->createNamedParameter(RemoteInstance::TYPE_GLOBALSCALE)) | |
| 564 | + $expr->eq($aliasRemote.'.type', $this->createNamedParameter(RemoteInstance::TYPE_GLOBALSCALE)) | |
| 565 | 565 | ); | 
| 566 | 566 | |
| 567 | 567 | $orExtOrPassive = $expr->orX(); | 
| 568 | 568 | $orExtOrPassive->add( | 
| 569 | - $expr->eq($aliasRemote . '.type', $this->createNamedParameter(RemoteInstance::TYPE_EXTERNAL)) | |
| 569 | + $expr->eq($aliasRemote.'.type', $this->createNamedParameter(RemoteInstance::TYPE_EXTERNAL)) | |
| 570 | 570 | ); | 
| 571 | 571 |  		if (!$sensitive) { | 
| 572 | 572 | $orExtOrPassive->add( | 
| 573 | - $expr->eq($aliasRemote . '.type', $this->createNamedParameter(RemoteInstance::TYPE_PASSIVE)) | |
| 573 | + $expr->eq($aliasRemote.'.type', $this->createNamedParameter(RemoteInstance::TYPE_PASSIVE)) | |
| 574 | 574 | ); | 
| 575 | 575 |  		} else { | 
| 576 | 576 |  			if ($this->getDefaultSelectAlias() === CoreQueryBuilder::MEMBER) { | 
| @@ -579,8 +579,8 @@ discard block | ||
| 579 | 579 | } | 
| 580 | 580 | |
| 581 | 581 | $orInstance = $expr->orX(); | 
| 582 | - $orInstance->add($expr->isNotNull($aliasRemoteMember . '.instance')); | |
| 583 | - $orInstance->add($expr->isNotNull($aliasRemoteCircleOwner . '.instance')); | |
| 582 | + $orInstance->add($expr->isNotNull($aliasRemoteMember.'.instance')); | |
| 583 | + $orInstance->add($expr->isNotNull($aliasRemoteCircleOwner.'.instance')); | |
| 584 | 584 | |
| 585 | 585 | $andExternal = $expr->andX(); | 
| 586 | 586 | $andExternal->add($orExtOrPassive); | 
| @@ -589,13 +589,13 @@ discard block | ||
| 589 | 589 | $orExtOrTrusted = $expr->orX(); | 
| 590 | 590 | $orExtOrTrusted->add($andExternal); | 
| 591 | 591 | $orExtOrTrusted->add( | 
| 592 | - $expr->eq($aliasRemote . '.type', $this->createNamedParameter(RemoteInstance::TYPE_TRUSTED)) | |
| 592 | + $expr->eq($aliasRemote.'.type', $this->createNamedParameter(RemoteInstance::TYPE_TRUSTED)) | |
| 593 | 593 | ); | 
| 594 | 594 | |
| 595 | 595 | $andTrusted = $expr->andX(); | 
| 596 | 596 | $andTrusted->add($orExtOrTrusted); | 
| 597 | 597 |  		$andTrusted->add($this->exprLimitBitwise('config', Circle::CFG_FEDERATED, $aliasCircle)); | 
| 598 | - $andTrusted->add($expr->emptyString($aliasOwner . '.instance')); | |
| 598 | + $andTrusted->add($expr->emptyString($aliasOwner.'.instance')); | |
| 599 | 599 | $orX->add($andTrusted); | 
| 600 | 600 | |
| 601 | 601 | $this->andWhere($orX); | 
| @@ -622,7 +622,7 @@ discard block | ||
| 622 | 622 | } | 
| 623 | 623 | $this->leftJoin( | 
| 624 | 624 | $this->getDefaultSelectAlias(), CoreRequestBuilder::TABLE_MEMBER, $aliasMember, | 
| 625 | - $expr->eq($aliasMember . '.circle_id', $alias . '.unique_id') | |
| 625 | + $expr->eq($aliasMember.'.circle_id', $alias.'.unique_id') | |
| 626 | 626 | ); | 
| 627 | 627 | |
| 628 | 628 | $this->filterDirectMembership($aliasMember, $member); | 
| @@ -643,30 +643,30 @@ discard block | ||
| 643 | 643 | |
| 644 | 644 |  		if ($member->getUserId() !== '') { | 
| 645 | 645 | $andX->add( | 
| 646 | - $expr->eq($aliasMember . '.user_id', $this->createNamedParameter($member->getUserId())) | |
| 646 | + $expr->eq($aliasMember.'.user_id', $this->createNamedParameter($member->getUserId())) | |
| 647 | 647 | ); | 
| 648 | 648 | } | 
| 649 | 649 | |
| 650 | 650 |  		if ($member->getSingleId() !== '') { | 
| 651 | 651 | $andX->add( | 
| 652 | - $expr->eq($aliasMember . '.single_id', $this->createNamedParameter($member->getSingleId())) | |
| 652 | + $expr->eq($aliasMember.'.single_id', $this->createNamedParameter($member->getSingleId())) | |
| 653 | 653 | ); | 
| 654 | 654 | } | 
| 655 | 655 | |
| 656 | 656 |  		if ($member->getUserType() > 0) { | 
| 657 | 657 | $andX->add( | 
| 658 | - $expr->eq($aliasMember . '.user_type', $this->createNamedParameter($member->getUserType())) | |
| 658 | + $expr->eq($aliasMember.'.user_type', $this->createNamedParameter($member->getUserType())) | |
| 659 | 659 | ); | 
| 660 | 660 | } | 
| 661 | 661 | |
| 662 | 662 | $andX->add( | 
| 663 | - $expr->eq($aliasMember . '.instance', $this->createNamedParameter($this->getInstance($member))) | |
| 663 | + $expr->eq($aliasMember.'.instance', $this->createNamedParameter($this->getInstance($member))) | |
| 664 | 664 | ); | 
| 665 | 665 | |
| 666 | 666 |  		if ($member->getLevel() > 0) { | 
| 667 | 667 | $andX->add( | 
| 668 | 668 | $expr->gte( | 
| 669 | - $aliasMember . '.level', | |
| 669 | + $aliasMember.'.level', | |
| 670 | 670 | $this->createNamedParameter($member->getLevel(), IQueryBuilder::PARAM_INT) | 
| 671 | 671 | ) | 
| 672 | 672 | ); | 
| @@ -694,12 +694,12 @@ discard block | ||
| 694 | 694 | |
| 695 | 695 | $expr = $this->expr(); | 
| 696 | 696 | $this->selectAlias( | 
| 697 | -			$this->createFunction('COUNT(`' . $aliasMemberCount . '`.`member_id`)'), | |
| 698 | - (($alias !== $this->getDefaultSelectAlias()) ? $alias . '_' : '') . 'population' | |
| 697 | +			$this->createFunction('COUNT(`'.$aliasMemberCount.'`.`member_id`)'), | |
| 698 | + (($alias !== $this->getDefaultSelectAlias()) ? $alias.'_' : '').'population' | |
| 699 | 699 | ); | 
| 700 | 700 | $this->leftJoin( | 
| 701 | 701 | $alias, CoreRequestBuilder::TABLE_MEMBER, $aliasMemberCount, | 
| 702 | - $expr->eq($alias . '.unique_id', $aliasMemberCount . '.circle_id') | |
| 702 | + $expr->eq($alias.'.unique_id', $aliasMemberCount.'.circle_id') | |
| 703 | 703 | ); | 
| 704 | 704 | } | 
| 705 | 705 | |
| @@ -735,7 +735,7 @@ discard block | ||
| 735 | 735 | $helperAlias, | 
| 736 | 736 | CoreRequestBuilder::TABLE_CIRCLE, | 
| 737 | 737 | $aliasCircle, | 
| 738 | - $expr->eq($aliasCircle . '.unique_id', $helperAlias . '.' . $field) | |
| 738 | + $expr->eq($aliasCircle.'.unique_id', $helperAlias.'.'.$field) | |
| 739 | 739 | ); | 
| 740 | 740 | |
| 741 | 741 |  		if (!is_null($initiator)) { | 
| @@ -766,7 +766,7 @@ discard block | ||
| 766 | 766 | $this->generateCircleSelectAlias($aliasInvitedBy) | 
| 767 | 767 | ->leftJoin( | 
| 768 | 768 | $aliasMember, CoreRequestBuilder::TABLE_CIRCLE, $aliasInvitedBy, | 
| 769 | - $expr->eq($aliasMember . '.invited_by', $aliasInvitedBy . '.unique_id') | |
| 769 | + $expr->eq($aliasMember.'.invited_by', $aliasInvitedBy.'.unique_id') | |
| 770 | 770 | ); | 
| 771 | 771 | |
| 772 | 772 | $this->leftJoinOwner($aliasInvitedBy); | 
| @@ -797,7 +797,7 @@ discard block | ||
| 797 | 797 | $this->generateCircleSelectAlias($aliasBasedOn) | 
| 798 | 798 | ->leftJoin( | 
| 799 | 799 | $aliasMember, CoreRequestBuilder::TABLE_CIRCLE, $aliasBasedOn, | 
| 800 | - $expr->eq($aliasBasedOn . '.unique_id', $aliasMember . '.single_id') | |
| 800 | + $expr->eq($aliasBasedOn.'.unique_id', $aliasMember.'.single_id') | |
| 801 | 801 | ); | 
| 802 | 802 | |
| 803 | 803 |  		if (!is_null($initiator)) { | 
| @@ -830,9 +830,9 @@ discard block | ||
| 830 | 830 | ->leftJoin( | 
| 831 | 831 | $alias, CoreRequestBuilder::TABLE_MEMBER, $aliasMember, | 
| 832 | 832 | $expr->andX( | 
| 833 | - $expr->eq($aliasMember . '.circle_id', $alias . '.' . $field), | |
| 833 | + $expr->eq($aliasMember.'.circle_id', $alias.'.'.$field), | |
| 834 | 834 | $expr->eq( | 
| 835 | - $aliasMember . '.level', | |
| 835 | + $aliasMember.'.level', | |
| 836 | 836 | $this->createNamedParameter(Member::LEVEL_OWNER, self::PARAM_INT) | 
| 837 | 837 | ) | 
| 838 | 838 | ) | 
| @@ -870,10 +870,10 @@ discard block | ||
| 870 | 870 | ->leftJoin( | 
| 871 | 871 | $alias, CoreRequestBuilder::TABLE_MEMBER, $aliasMember, | 
| 872 | 872 | $expr->andX( | 
| 873 | - $expr->eq($aliasMember . '.circle_id', $alias . '.' . $fieldCircleId), | |
| 874 | - $expr->eq($aliasMember . '.single_id', $alias . '.' . $fieldSingleId), | |
| 873 | + $expr->eq($aliasMember.'.circle_id', $alias.'.'.$fieldCircleId), | |
| 874 | + $expr->eq($aliasMember.'.single_id', $alias.'.'.$fieldSingleId), | |
| 875 | 875 | $expr->gte( | 
| 876 | - $aliasMember . '.level', | |
| 876 | + $aliasMember.'.level', | |
| 877 | 877 | $this->createNamedParameter(Member::LEVEL_MEMBER, self::PARAM_INT) | 
| 878 | 878 | ) | 
| 879 | 879 | ) | 
| @@ -906,7 +906,7 @@ discard block | ||
| 906 | 906 | |
| 907 | 907 | $this->leftJoin( | 
| 908 | 908 | $alias, CoreRequestBuilder::TABLE_MEMBERSHIP, $aliasMembership, | 
| 909 | - $expr->eq($aliasMembership . '.circle_id', $alias . '.' . $field) | |
| 909 | + $expr->eq($aliasMembership.'.circle_id', $alias.'.'.$field) | |
| 910 | 910 | ); | 
| 911 | 911 | |
| 912 | 912 |  //		if (!$this->getBool('getData', $options, false)) { | 
| @@ -920,8 +920,8 @@ discard block | ||
| 920 | 920 | ->leftJoin( | 
| 921 | 921 | $alias, CoreRequestBuilder::TABLE_MEMBER, $aliasInheritedBy, | 
| 922 | 922 | $expr->andX( | 
| 923 | - $expr->eq($aliasMembership . '.inheritance_last', $aliasInheritedBy . '.circle_id'), | |
| 924 | - $expr->eq($aliasMembership . '.single_id', $aliasInheritedBy . '.single_id') | |
| 923 | + $expr->eq($aliasMembership.'.inheritance_last', $aliasInheritedBy.'.circle_id'), | |
| 924 | + $expr->eq($aliasMembership.'.single_id', $aliasInheritedBy.'.single_id') | |
| 925 | 925 | ) | 
| 926 | 926 | ); | 
| 927 | 927 | |
| @@ -938,12 +938,12 @@ discard block | ||
| 938 | 938 | $aliasUpstreamMembership = $this->generateAlias($alias, self::UPSTREAM_MEMBERSHIPS, $options); | 
| 939 | 939 | $this->leftJoin( | 
| 940 | 940 | $alias, CoreRequestBuilder::TABLE_MEMBERSHIP, $aliasUpstreamMembership, | 
| 941 | - $expr->eq($aliasUpstreamMembership . '.single_id', $this->createNamedParameter($singleId)) | |
| 941 | + $expr->eq($aliasUpstreamMembership.'.single_id', $this->createNamedParameter($singleId)) | |
| 942 | 942 | ); | 
| 943 | 943 | |
| 944 | 944 | $orX = $expr->orX( | 
| 945 | - $expr->eq($aliasUpstreamMembership . '.circle_id', $alias . '.' . $field), | |
| 946 | - $expr->eq($alias . '.' . $field, $this->createNamedParameter($singleId)) | |
| 945 | + $expr->eq($aliasUpstreamMembership.'.circle_id', $alias.'.'.$field), | |
| 946 | + $expr->eq($alias.'.'.$field, $this->createNamedParameter($singleId)) | |
| 947 | 947 | ); | 
| 948 | 948 | |
| 949 | 949 | $this->andWhere($orX); | 
| @@ -964,11 +964,11 @@ discard block | ||
| 964 | 964 | |
| 965 | 965 | $expr = $this->expr(); | 
| 966 | 966 | $aliasMembership = $this->generateAlias($alias, self::MEMBERSHIPS); | 
| 967 | - $this->andWhere($expr->eq($aliasMembership . '.circle_id', $this->createNamedParameter($singleId))); | |
| 967 | + $this->andWhere($expr->eq($aliasMembership.'.circle_id', $this->createNamedParameter($singleId))); | |
| 968 | 968 |  		if ($level > 1) { | 
| 969 | 969 | $this->andWhere( | 
| 970 | 970 | $expr->gte( | 
| 971 | - $aliasMembership . '.level', | |
| 971 | + $aliasMembership.'.level', | |
| 972 | 972 | $this->createNamedParameter($level, IQueryBuilder::PARAM_INT) | 
| 973 | 973 | ) | 
| 974 | 974 | ); | 
| @@ -996,8 +996,8 @@ discard block | ||
| 996 | 996 | $this->leftJoin( | 
| 997 | 997 | $alias, CoreRequestBuilder::TABLE_MEMBERSHIP, $aliasMembership, | 
| 998 | 998 | $expr->andX( | 
| 999 | - $expr->eq($aliasMembership . '.inheritance_last', $alias . '.' . $field), | |
| 1000 | - $expr->eq($aliasMembership . '.single_id', $alias . '.single_id') | |
| 999 | + $expr->eq($aliasMembership.'.inheritance_last', $alias.'.'.$field), | |
| 1000 | + $expr->eq($aliasMembership.'.single_id', $alias.'.single_id') | |
| 1001 | 1001 | ) | 
| 1002 | 1002 | ); | 
| 1003 | 1003 | |
| @@ -1010,8 +1010,8 @@ discard block | ||
| 1010 | 1010 | ->leftJoin( | 
| 1011 | 1011 | $aliasMembership, CoreRequestBuilder::TABLE_MEMBER, $aliasInheritanceFrom, | 
| 1012 | 1012 | $expr->andX( | 
| 1013 | - $expr->eq($aliasMembership . '.circle_id', $aliasInheritanceFrom . '.circle_id'), | |
| 1014 | - $expr->eq($aliasMembership . '.inheritance_first', $aliasInheritanceFrom . '.single_id') | |
| 1013 | + $expr->eq($aliasMembership.'.circle_id', $aliasInheritanceFrom.'.circle_id'), | |
| 1014 | + $expr->eq($aliasMembership.'.inheritance_first', $aliasInheritanceFrom.'.single_id') | |
| 1015 | 1015 | ) | 
| 1016 | 1016 | ); | 
| 1017 | 1017 | } | 
| @@ -1077,7 +1077,7 @@ discard block | ||
| 1077 | 1077 | $aliasMembership, | 
| 1078 | 1078 | $expr->andX( | 
| 1079 | 1079 |  				$this->exprLimit('single_id', $initiator->getSingleId(), $aliasMembership), | 
| 1080 | - $expr->eq($aliasMembership . '.circle_id', $helperAlias . '.' . $field) | |
| 1080 | + $expr->eq($aliasMembership.'.circle_id', $helperAlias.'.'.$field) | |
| 1081 | 1081 | ) | 
| 1082 | 1082 | ); | 
| 1083 | 1083 | |
| @@ -1090,8 +1090,8 @@ discard block | ||
| 1090 | 1090 | $this->leftJoin( | 
| 1091 | 1091 | $aliasMembership, CoreRequestBuilder::TABLE_MEMBER, $aliasInitiator, | 
| 1092 | 1092 | $expr->andX( | 
| 1093 | - $expr->eq($aliasMembership . '.inheritance_first', $aliasInitiator . '.single_id'), | |
| 1094 | - $expr->eq($aliasMembership . '.circle_id', $aliasInitiator . '.circle_id') | |
| 1093 | + $expr->eq($aliasMembership.'.inheritance_first', $aliasInitiator.'.single_id'), | |
| 1094 | + $expr->eq($aliasMembership.'.circle_id', $aliasInitiator.'.circle_id') | |
| 1095 | 1095 | ) | 
| 1096 | 1096 | ); | 
| 1097 | 1097 | |
| @@ -1099,8 +1099,8 @@ discard block | ||
| 1099 | 1099 | $this->leftJoin( | 
| 1100 | 1100 | $aliasInitiator, CoreRequestBuilder::TABLE_MEMBER, $aliasInheritedBy, | 
| 1101 | 1101 | $expr->andX( | 
| 1102 | - $expr->eq($aliasMembership . '.single_id', $aliasInheritedBy . '.single_id'), | |
| 1103 | - $expr->eq($aliasMembership . '.inheritance_last', $aliasInheritedBy . '.circle_id') | |
| 1102 | + $expr->eq($aliasMembership.'.single_id', $aliasInheritedBy.'.single_id'), | |
| 1103 | + $expr->eq($aliasMembership.'.inheritance_last', $aliasInheritedBy.'.circle_id') | |
| 1104 | 1104 | ) | 
| 1105 | 1105 | ); | 
| 1106 | 1106 | |
| @@ -1120,7 +1120,7 @@ discard block | ||
| 1120 | 1120 | $aliasInheritedByMembership = $this->generateAlias($aliasInheritedBy, self::MEMBERSHIPS); | 
| 1121 | 1121 | $this->generateMembershipSelectAlias($aliasMembership, $aliasInheritedByMembership); | 
| 1122 | 1122 |  		} catch (RequestBuilderException $e) { | 
| 1123 | - \OC::$server->getLogger()->log(3, '-- ' . $e->getMessage()); | |
| 1123 | + \OC::$server->getLogger()->log(3, '-- '.$e->getMessage()); | |
| 1124 | 1124 | } | 
| 1125 | 1125 | } | 
| 1126 | 1126 | |
| @@ -1144,7 +1144,7 @@ discard block | ||
| 1144 | 1144 | $orX = $expr->orX(); | 
| 1145 | 1145 | $orX->add( | 
| 1146 | 1146 | $expr->andX( | 
| 1147 | - $expr->gte($aliasMembership . '.level', $this->createNamedParameter(Member::LEVEL_MEMBER)) | |
| 1147 | + $expr->gte($aliasMembership.'.level', $this->createNamedParameter(Member::LEVEL_MEMBER)) | |
| 1148 | 1148 | ) | 
| 1149 | 1149 | ); | 
| 1150 | 1150 | |
| @@ -1152,7 +1152,7 @@ discard block | ||
| 1152 | 1152 | $orX->add( | 
| 1153 | 1153 | $expr->andX( | 
| 1154 | 1154 |  					$this->exprLimitBitwise('config', Circle::CFG_PERSONAL, $alias), | 
| 1155 | - $expr->eq($aliasMembership . '.level', $this->createNamedParameter(Member::LEVEL_OWNER)) | |
| 1155 | + $expr->eq($aliasMembership.'.level', $this->createNamedParameter(Member::LEVEL_OWNER)) | |
| 1156 | 1156 | ) | 
| 1157 | 1157 | ); | 
| 1158 | 1158 | } | 
| @@ -1161,7 +1161,7 @@ discard block | ||
| 1161 | 1161 | } | 
| 1162 | 1162 |  		if ($this->getBool('canBeVisitor', $options, false)) { | 
| 1163 | 1163 | // TODO: should find a better way, also filter on remote initiator on non-federated ? | 
| 1164 | - $orX->add($expr->gte($alias . '.config', $this->createNamedParameter(0))); | |
| 1164 | + $orX->add($expr->gte($alias.'.config', $this->createNamedParameter(0))); | |
| 1165 | 1165 | } | 
| 1166 | 1166 |  		if ($this->getBool('canBeVisitorOnOpen', $options, false)) { | 
| 1167 | 1167 | $andOpen = $expr->andX(); | 
| @@ -1229,21 +1229,21 @@ discard block | ||
| 1229 | 1229 | $expr = $this->expr(); | 
| 1230 | 1230 | $andPassive = $expr->andX(); | 
| 1231 | 1231 | $andPassive->add( | 
| 1232 | - $expr->eq($alias . '.type', $this->createNamedParameter(RemoteInstance::TYPE_PASSIVE)) | |
| 1232 | + $expr->eq($alias.'.type', $this->createNamedParameter(RemoteInstance::TYPE_PASSIVE)) | |
| 1233 | 1233 | ); | 
| 1234 | 1234 | |
| 1235 | 1235 | $orMemberOrLevel = $expr->orX(); | 
| 1236 | 1236 | $orMemberOrLevel->add( | 
| 1237 | - $expr->eq($this->getDefaultSelectAlias() . '.instance', $alias . '.instance') | |
| 1237 | + $expr->eq($this->getDefaultSelectAlias().'.instance', $alias.'.instance') | |
| 1238 | 1238 | ); | 
| 1239 | 1239 | // TODO: do we need this ? (display members from the local instance) | 
| 1240 | 1240 | $orMemberOrLevel->add( | 
| 1241 | - $expr->emptyString($this->getDefaultSelectAlias() . '.instance') | |
| 1241 | + $expr->emptyString($this->getDefaultSelectAlias().'.instance') | |
| 1242 | 1242 | ); | 
| 1243 | 1243 | |
| 1244 | 1244 | $orMemberOrLevel->add( | 
| 1245 | 1245 | $expr->eq( | 
| 1246 | - $this->getDefaultSelectAlias() . '.level', | |
| 1246 | + $this->getDefaultSelectAlias().'.level', | |
| 1247 | 1247 | $this->createNamedParameter(Member::LEVEL_OWNER) | 
| 1248 | 1248 | ) | 
| 1249 | 1249 | ); | 
| @@ -1280,11 +1280,11 @@ discard block | ||
| 1280 | 1280 | ) | 
| 1281 | 1281 | ->leftJoin( | 
| 1282 | 1282 | $aliasShare, CoreRequestBuilder::TABLE_FILE_CACHE, $aliasFileCache, | 
| 1283 | - $expr->eq($aliasShare . '.file_source', $aliasFileCache . '.fileid') | |
| 1283 | + $expr->eq($aliasShare.'.file_source', $aliasFileCache.'.fileid') | |
| 1284 | 1284 | ) | 
| 1285 | 1285 | ->leftJoin( | 
| 1286 | 1286 | $aliasFileCache, CoreRequestBuilder::TABLE_STORAGES, $aliasStorages, | 
| 1287 | - $expr->eq($aliasFileCache . '.storage', $aliasStorages . '.numeric_id') | |
| 1287 | + $expr->eq($aliasFileCache.'.storage', $aliasStorages.'.numeric_id') | |
| 1288 | 1288 | ); | 
| 1289 | 1289 | } | 
| 1290 | 1290 | |
| @@ -1306,8 +1306,8 @@ discard block | ||
| 1306 | 1306 | $this->leftJoin( | 
| 1307 | 1307 | $aliasShareMemberships, CoreRequestBuilder::TABLE_SHARE, $aliasShareChild, | 
| 1308 | 1308 | $expr->andX( | 
| 1309 | - $expr->eq($aliasShareChild . '.parent', $aliasShare . '.id'), | |
| 1310 | - $expr->eq($aliasShareChild . '.share_with', $aliasShareMemberships . '.single_id') | |
| 1309 | + $expr->eq($aliasShareChild.'.parent', $aliasShare.'.id'), | |
| 1310 | + $expr->eq($aliasShareChild.'.share_with', $aliasShareMemberships.'.single_id') | |
| 1311 | 1311 | ) | 
| 1312 | 1312 | ); | 
| 1313 | 1313 | |
| @@ -1357,13 +1357,13 @@ discard block | ||
| 1357 | 1357 | $this->leftJoin( | 
| 1358 | 1358 | $aliasMountMemberships, CoreRequestBuilder::TABLE_MOUNTPOINT, $aliasMountpoint, | 
| 1359 | 1359 | $expr->andX( | 
| 1360 | - $expr->eq($aliasMountpoint . '.mount_id', $aliasMount . '.mount_id'), | |
| 1361 | - $expr->eq($aliasMountpoint . '.single_id', $aliasMountMemberships . '.single_id') | |
| 1360 | + $expr->eq($aliasMountpoint.'.mount_id', $aliasMount.'.mount_id'), | |
| 1361 | + $expr->eq($aliasMountpoint.'.single_id', $aliasMountMemberships.'.single_id') | |
| 1362 | 1362 | ) | 
| 1363 | 1363 | ); | 
| 1364 | 1364 | |
| 1365 | - $this->selectAlias($aliasMountpoint . '.mountpoint', $aliasMountpoint . '_mountpoint'); | |
| 1366 | - $this->selectAlias($aliasMountpoint . '.mountpoint_hash', $aliasMountpoint . '_mountpoint_hash'); | |
| 1365 | + $this->selectAlias($aliasMountpoint.'.mountpoint', $aliasMountpoint.'_mountpoint'); | |
| 1366 | + $this->selectAlias($aliasMountpoint.'.mountpoint_hash', $aliasMountpoint.'_mountpoint_hash'); | |
| 1367 | 1367 | } | 
| 1368 | 1368 | |
| 1369 | 1369 | |
| @@ -1467,10 +1467,10 @@ discard block | ||
| 1467 | 1467 | */ | 
| 1468 | 1468 |  	public function generateAlias(string $base, string $extension, ?array &$options = []): string { | 
| 1469 | 1469 |  		$search = str_replace('_', '.', $base); | 
| 1470 | - $path = $search . '.' . $extension; | |
| 1470 | + $path = $search.'.'.$extension; | |
| 1471 | 1471 | if (!$this->validKey($path, self::$SQL_PATH) | 
| 1472 | 1472 |  			&& !in_array($extension, $this->getArray($search, self::$SQL_PATH))) { | 
| 1473 | - throw new RequestBuilderException($extension . ' not found in ' . $search); | |
| 1473 | + throw new RequestBuilderException($extension.' not found in '.$search); | |
| 1474 | 1474 | } | 
| 1475 | 1475 | |
| 1476 | 1476 |  		if (!is_array($options)) { | 
| @@ -1479,15 +1479,15 @@ discard block | ||
| 1479 | 1479 | |
| 1480 | 1480 | $optionPath = ''; | 
| 1481 | 1481 |  		foreach (explode('.', $path) as $p) { | 
| 1482 | - $optionPath = trim($optionPath . '.' . $p, '.'); | |
| 1482 | + $optionPath = trim($optionPath.'.'.$p, '.'); | |
| 1483 | 1483 | $options = array_merge( | 
| 1484 | 1484 | $options, | 
| 1485 | - $this->getArray($optionPath . '.' . self::OPTIONS, self::$SQL_PATH), | |
| 1486 | - $this->getArray($optionPath . '.' . self::OPTIONS, $this->options) | |
| 1485 | + $this->getArray($optionPath.'.'.self::OPTIONS, self::$SQL_PATH), | |
| 1486 | + $this->getArray($optionPath.'.'.self::OPTIONS, $this->options) | |
| 1487 | 1487 | ); | 
| 1488 | 1488 | } | 
| 1489 | 1489 | |
| 1490 | - return $base . '_' . $extension; | |
| 1490 | + return $base.'_'.$extension; | |
| 1491 | 1491 | } | 
| 1492 | 1492 | |
| 1493 | 1493 | |
| @@ -1507,7 +1507,7 @@ discard block | ||
| 1507 | 1507 |  			} else { | 
| 1508 | 1508 | $k = $arr; | 
| 1509 | 1509 | } | 
| 1510 | - $path[$k] = $prefix . '_' . $k . '_'; | |
| 1510 | + $path[$k] = $prefix.'_'.$k.'_'; | |
| 1511 | 1511 | } | 
| 1512 | 1512 | |
| 1513 | 1513 | return $path; | 
| @@ -84,26 +84,26 @@ discard block | ||
| 84 | 84 | |
| 85 | 85 | |
| 86 | 86 | // specific value | 
| 87 | - const CFG_CIRCLE = 0; // only for code readability. Circle is locked by default. | |
| 88 | - const CFG_SINGLE = 1; // Circle with only one single member. | |
| 89 | - const CFG_PERSONAL = 2; // Personal circle, only the owner can see it. | |
| 87 | + const CFG_CIRCLE = 0; // only for code readability. Circle is locked by default. | |
| 88 | + const CFG_SINGLE = 1; // Circle with only one single member. | |
| 89 | + const CFG_PERSONAL = 2; // Personal circle, only the owner can see it. | |
| 90 | 90 | |
| 91 | 91 | // bitwise | 
| 92 | - const CFG_SYSTEM = 4; // System Circle (not managed by the official front-end). Meaning some config are limited | |
| 93 | - const CFG_VISIBLE = 8; // Visible to everyone, if not visible, people have to know its name to be able to find it | |
| 94 | - const CFG_OPEN = 16; // Circle is open, people can join | |
| 95 | - const CFG_INVITE = 32; // Adding a member generate an invitation that needs to be accepted | |
| 96 | - const CFG_REQUEST = 64; // Request to join Circles needs to be confirmed by a moderator | |
| 97 | - const CFG_FRIEND = 128; // Members of the circle can invite their friends | |
| 98 | - const CFG_PROTECTED = 256; // Password protected to join/request | |
| 99 | - const CFG_NO_OWNER = 512; // no owner, only members | |
| 100 | - const CFG_HIDDEN = 1024; // hidden from listing, but available as a share entity | |
| 101 | - const CFG_BACKEND = 2048; // Fully hidden, only backend Circles | |
| 102 | - const CFG_LOCAL = 4096; // Local even on GlobalScale | |
| 103 | - const CFG_ROOT = 8192; // Circle cannot be inside another Circle | |
| 104 | - const CFG_CIRCLE_INVITE = 16384; // Circle must confirm when invited in another circle | |
| 105 | - const CFG_FEDERATED = 32768; // Federated | |
| 106 | - const CFG_MOUNTPOINT = 65536; // Generate a Files folder for this Circle | |
| 92 | + const CFG_SYSTEM = 4; // System Circle (not managed by the official front-end). Meaning some config are limited | |
| 93 | + const CFG_VISIBLE = 8; // Visible to everyone, if not visible, people have to know its name to be able to find it | |
| 94 | + const CFG_OPEN = 16; // Circle is open, people can join | |
| 95 | + const CFG_INVITE = 32; // Adding a member generate an invitation that needs to be accepted | |
| 96 | + const CFG_REQUEST = 64; // Request to join Circles needs to be confirmed by a moderator | |
| 97 | + const CFG_FRIEND = 128; // Members of the circle can invite their friends | |
| 98 | + const CFG_PROTECTED = 256; // Password protected to join/request | |
| 99 | + const CFG_NO_OWNER = 512; // no owner, only members | |
| 100 | + const CFG_HIDDEN = 1024; // hidden from listing, but available as a share entity | |
| 101 | + const CFG_BACKEND = 2048; // Fully hidden, only backend Circles | |
| 102 | + const CFG_LOCAL = 4096; // Local even on GlobalScale | |
| 103 | + const CFG_ROOT = 8192; // Circle cannot be inside another Circle | |
| 104 | + const CFG_CIRCLE_INVITE = 16384; // Circle must confirm when invited in another circle | |
| 105 | + const CFG_FEDERATED = 32768; // Federated | |
| 106 | + const CFG_MOUNTPOINT = 65536; // Generate a Files folder for this Circle | |
| 107 | 107 | |
| 108 | 108 | public static $DEF_CFG_MAX = 131071; | 
| 109 | 109 | |
| @@ -763,24 +763,24 @@ discard block | ||
| 763 | 763 | * @throws CircleNotFoundException | 
| 764 | 764 | */ | 
| 765 | 765 |  	public function importFromDatabase(array $data, string $prefix = ''): INC22QueryRow { | 
| 766 | -		if ($this->get($prefix . 'unique_id', $data) === '') { | |
| 766 | +		if ($this->get($prefix.'unique_id', $data) === '') { | |
| 767 | 767 | throw new CircleNotFoundException(); | 
| 768 | 768 | } | 
| 769 | 769 | |
| 770 | - $this->setSingleId($this->get($prefix . 'unique_id', $data)) | |
| 771 | - ->setName($this->get($prefix . 'name', $data)) | |
| 772 | - ->setDisplayName($this->get($prefix . 'display_name', $data)) | |
| 773 | - ->setSanitizedName($this->get($prefix . 'sanitized_name', $data)) | |
| 774 | - ->setConfig($this->getInt($prefix . 'config', $data)) | |
| 775 | - ->setSource($this->getInt($prefix . 'source', $data)) | |
| 776 | - ->setInstance($this->get($prefix . 'instance', $data)) | |
| 777 | - ->setPopulation($this->getInt($prefix . 'population', $data)) | |
| 778 | - ->setSettings($this->getArray($prefix . 'settings', $data)) | |
| 779 | - ->setContactAddressBook($this->getInt($prefix . 'contact_addressbook', $data)) | |
| 780 | - ->setContactGroupName($this->get($prefix . 'contact_groupname', $data)) | |
| 781 | - ->setDescription($this->get($prefix . 'description', $data)); | |
| 782 | - | |
| 783 | - $creation = $this->get($prefix . 'creation', $data); | |
| 770 | + $this->setSingleId($this->get($prefix.'unique_id', $data)) | |
| 771 | + ->setName($this->get($prefix.'name', $data)) | |
| 772 | + ->setDisplayName($this->get($prefix.'display_name', $data)) | |
| 773 | + ->setSanitizedName($this->get($prefix.'sanitized_name', $data)) | |
| 774 | + ->setConfig($this->getInt($prefix.'config', $data)) | |
| 775 | + ->setSource($this->getInt($prefix.'source', $data)) | |
| 776 | + ->setInstance($this->get($prefix.'instance', $data)) | |
| 777 | + ->setPopulation($this->getInt($prefix.'population', $data)) | |
| 778 | + ->setSettings($this->getArray($prefix.'settings', $data)) | |
| 779 | + ->setContactAddressBook($this->getInt($prefix.'contact_addressbook', $data)) | |
| 780 | + ->setContactGroupName($this->get($prefix.'contact_groupname', $data)) | |
| 781 | + ->setDescription($this->get($prefix.'description', $data)); | |
| 782 | + | |
| 783 | + $creation = $this->get($prefix.'creation', $data); | |
| 784 | 784 |  		$this->setCreation(DateTime::createFromFormat('Y-m-d H:i:s', $creation)->getTimestamp()); | 
| 785 | 785 | |
| 786 | 786 | $this->getManager()->manageImportFromDatabase($this, $data, $prefix); |