@@ -86,7 +86,7 @@ |
||
| 86 | 86 | self::$tables[self::TABLE_MEMBER], |
| 87 | 87 | CoreQueryBuilder::MEMBER |
| 88 | 88 | ) |
| 89 | - ->orderBy(CoreQueryBuilder::MEMBER . '.joined'); |
|
| 89 | + ->orderBy(CoreQueryBuilder::MEMBER.'.joined'); |
|
| 90 | 90 | |
| 91 | 91 | if ($getBasedOn) { |
| 92 | 92 | $qb->leftJoinBasedOn(CoreQueryBuilder::MEMBER, $initiator); |
@@ -394,7 +394,7 @@ discard block |
||
| 394 | 394 | } |
| 395 | 395 | |
| 396 | 396 | if ($circle->getDisplayName() !== '') { |
| 397 | - $this->searchInDBField('display_name', '%' . $circle->getDisplayName() . '%'); |
|
| 397 | + $this->searchInDBField('display_name', '%'.$circle->getDisplayName().'%'); |
|
| 398 | 398 | } |
| 399 | 399 | if ($circle->getSource() > 0) { |
| 400 | 400 | $this->limitInt('source', $circle->getSource()); |
@@ -416,7 +416,7 @@ discard block |
||
| 416 | 416 | $this->generateRemoteInstanceSelectAlias($aliasRemoteInstance) |
| 417 | 417 | ->leftJoin( |
| 418 | 418 | $alias, CoreRequestBuilder::TABLE_REMOTE, $aliasRemoteInstance, |
| 419 | - $expr->eq($alias . '.instance', $aliasRemoteInstance . '.instance') |
|
| 419 | + $expr->eq($alias.'.instance', $aliasRemoteInstance.'.instance') |
|
| 420 | 420 | ); |
| 421 | 421 | } catch (RequestBuilderException $e) { |
| 422 | 422 | } |
@@ -468,7 +468,7 @@ discard block |
||
| 468 | 468 | $expr = $this->expr(); |
| 469 | 469 | $this->leftJoin( |
| 470 | 470 | $this->getDefaultSelectAlias(), CoreRequestBuilder::TABLE_REMOTE, $aliasRemote, |
| 471 | - $expr->eq($aliasRemote . '.instance', $this->createNamedParameter($remoteInstance->getInstance())) |
|
| 471 | + $expr->eq($aliasRemote.'.instance', $this->createNamedParameter($remoteInstance->getInstance())) |
|
| 472 | 472 | ); |
| 473 | 473 | } |
| 474 | 474 | |
@@ -496,12 +496,12 @@ discard block |
||
| 496 | 496 | $this->leftJoin( |
| 497 | 497 | $this->getDefaultSelectAlias(), CoreRequestBuilder::TABLE_MEMBER, $aliasRemoteMember, |
| 498 | 498 | $expr->andX( |
| 499 | - $expr->eq($aliasRemoteMember . '.circle_id', $aliasCircle . '.unique_id'), |
|
| 499 | + $expr->eq($aliasRemoteMember.'.circle_id', $aliasCircle.'.unique_id'), |
|
| 500 | 500 | $expr->eq( |
| 501 | - $aliasRemoteMember . '.instance', |
|
| 501 | + $aliasRemoteMember.'.instance', |
|
| 502 | 502 | $this->createNamedParameter($remoteInstance->getInstance()) |
| 503 | 503 | ), |
| 504 | - $expr->gte($aliasRemoteMember . '.level', $this->createNamedParameter(Member::LEVEL_MEMBER)) |
|
| 504 | + $expr->gte($aliasRemoteMember.'.level', $this->createNamedParameter(Member::LEVEL_MEMBER)) |
|
| 505 | 505 | ) |
| 506 | 506 | ); |
| 507 | 507 | } |
@@ -533,21 +533,21 @@ discard block |
||
| 533 | 533 | $this->leftJoin( |
| 534 | 534 | $this->getDefaultSelectAlias(), CoreRequestBuilder::TABLE_MEMBER, $aliasRemoteCircle, |
| 535 | 535 | $expr->andX( |
| 536 | - $expr->eq($aliasRemoteCircle . '.single_id', $aliasCircle . '.unique_id'), |
|
| 537 | - $expr->emptyString($aliasRemoteCircle . '.instance'), |
|
| 538 | - $expr->gte($aliasRemoteCircle . '.level', $this->createNamedParameter(Member::LEVEL_MEMBER)) |
|
| 536 | + $expr->eq($aliasRemoteCircle.'.single_id', $aliasCircle.'.unique_id'), |
|
| 537 | + $expr->emptyString($aliasRemoteCircle.'.instance'), |
|
| 538 | + $expr->gte($aliasRemoteCircle.'.level', $this->createNamedParameter(Member::LEVEL_MEMBER)) |
|
| 539 | 539 | ) |
| 540 | 540 | ); |
| 541 | 541 | $this->leftJoin( |
| 542 | 542 | $this->getDefaultSelectAlias(), CoreRequestBuilder::TABLE_MEMBER, $aliasRemoteCircleOwner, |
| 543 | 543 | $expr->andX( |
| 544 | - $expr->eq($aliasRemoteCircle . '.circle_id', $aliasRemoteCircleOwner . '.circle_id'), |
|
| 544 | + $expr->eq($aliasRemoteCircle.'.circle_id', $aliasRemoteCircleOwner.'.circle_id'), |
|
| 545 | 545 | $expr->eq( |
| 546 | - $aliasRemoteCircleOwner . '.instance', |
|
| 546 | + $aliasRemoteCircleOwner.'.instance', |
|
| 547 | 547 | $this->createNamedParameter($remoteInstance->getInstance()) |
| 548 | 548 | ), |
| 549 | 549 | $expr->eq( |
| 550 | - $aliasRemoteCircleOwner . '.level', $this->createNamedParameter(Member::LEVEL_OWNER) |
|
| 550 | + $aliasRemoteCircleOwner.'.level', $this->createNamedParameter(Member::LEVEL_OWNER) |
|
| 551 | 551 | ) |
| 552 | 552 | ) |
| 553 | 553 | ); |
@@ -580,16 +580,16 @@ discard block |
||
| 580 | 580 | $expr = $this->expr(); |
| 581 | 581 | $orX = $expr->orX(); |
| 582 | 582 | $orX->add( |
| 583 | - $expr->eq($aliasRemote . '.type', $this->createNamedParameter(RemoteInstance::TYPE_GLOBALSCALE)) |
|
| 583 | + $expr->eq($aliasRemote.'.type', $this->createNamedParameter(RemoteInstance::TYPE_GLOBALSCALE)) |
|
| 584 | 584 | ); |
| 585 | 585 | |
| 586 | 586 | $orExtOrPassive = $expr->orX(); |
| 587 | 587 | $orExtOrPassive->add( |
| 588 | - $expr->eq($aliasRemote . '.type', $this->createNamedParameter(RemoteInstance::TYPE_EXTERNAL)) |
|
| 588 | + $expr->eq($aliasRemote.'.type', $this->createNamedParameter(RemoteInstance::TYPE_EXTERNAL)) |
|
| 589 | 589 | ); |
| 590 | 590 | if (!$sensitive) { |
| 591 | 591 | $orExtOrPassive->add( |
| 592 | - $expr->eq($aliasRemote . '.type', $this->createNamedParameter(RemoteInstance::TYPE_PASSIVE)) |
|
| 592 | + $expr->eq($aliasRemote.'.type', $this->createNamedParameter(RemoteInstance::TYPE_PASSIVE)) |
|
| 593 | 593 | ); |
| 594 | 594 | } else { |
| 595 | 595 | if ($this->getDefaultSelectAlias() === CoreQueryBuilder::MEMBER) { |
@@ -598,8 +598,8 @@ discard block |
||
| 598 | 598 | } |
| 599 | 599 | |
| 600 | 600 | $orInstance = $expr->orX(); |
| 601 | - $orInstance->add($expr->isNotNull($aliasRemoteMember . '.instance')); |
|
| 602 | - $orInstance->add($expr->isNotNull($aliasRemoteCircleOwner . '.instance')); |
|
| 601 | + $orInstance->add($expr->isNotNull($aliasRemoteMember.'.instance')); |
|
| 602 | + $orInstance->add($expr->isNotNull($aliasRemoteCircleOwner.'.instance')); |
|
| 603 | 603 | |
| 604 | 604 | $andExternal = $expr->andX(); |
| 605 | 605 | $andExternal->add($orExtOrPassive); |
@@ -608,13 +608,13 @@ discard block |
||
| 608 | 608 | $orExtOrTrusted = $expr->orX(); |
| 609 | 609 | $orExtOrTrusted->add($andExternal); |
| 610 | 610 | $orExtOrTrusted->add( |
| 611 | - $expr->eq($aliasRemote . '.type', $this->createNamedParameter(RemoteInstance::TYPE_TRUSTED)) |
|
| 611 | + $expr->eq($aliasRemote.'.type', $this->createNamedParameter(RemoteInstance::TYPE_TRUSTED)) |
|
| 612 | 612 | ); |
| 613 | 613 | |
| 614 | 614 | $andTrusted = $expr->andX(); |
| 615 | 615 | $andTrusted->add($orExtOrTrusted); |
| 616 | 616 | $andTrusted->add($this->exprLimitBitwise('config', Circle::CFG_FEDERATED, $aliasCircle)); |
| 617 | - $andTrusted->add($expr->emptyString($aliasOwner . '.instance')); |
|
| 617 | + $andTrusted->add($expr->emptyString($aliasOwner.'.instance')); |
|
| 618 | 618 | $orX->add($andTrusted); |
| 619 | 619 | |
| 620 | 620 | $this->andWhere($orX); |
@@ -641,7 +641,7 @@ discard block |
||
| 641 | 641 | } |
| 642 | 642 | $this->innerJoin( |
| 643 | 643 | $this->getDefaultSelectAlias(), CoreRequestBuilder::TABLE_MEMBER, $aliasMember, |
| 644 | - $expr->eq($aliasMember . '.circle_id', $alias . '.unique_id') |
|
| 644 | + $expr->eq($aliasMember.'.circle_id', $alias.'.unique_id') |
|
| 645 | 645 | ); |
| 646 | 646 | |
| 647 | 647 | $this->filterDirectMembership($aliasMember, $member); |
@@ -662,19 +662,19 @@ discard block |
||
| 662 | 662 | |
| 663 | 663 | if ($member->getUserId() !== '') { |
| 664 | 664 | $andX->add( |
| 665 | - $expr->eq($aliasMember . '.user_id', $this->createNamedParameter($member->getUserId())) |
|
| 665 | + $expr->eq($aliasMember.'.user_id', $this->createNamedParameter($member->getUserId())) |
|
| 666 | 666 | ); |
| 667 | 667 | } |
| 668 | 668 | |
| 669 | 669 | if ($member->getSingleId() !== '') { |
| 670 | 670 | $andX->add( |
| 671 | - $expr->eq($aliasMember . '.single_id', $this->createNamedParameter($member->getSingleId())) |
|
| 671 | + $expr->eq($aliasMember.'.single_id', $this->createNamedParameter($member->getSingleId())) |
|
| 672 | 672 | ); |
| 673 | 673 | } |
| 674 | 674 | |
| 675 | 675 | if ($member->getUserType() > 0) { |
| 676 | 676 | $andX->add( |
| 677 | - $expr->eq($aliasMember . '.user_type', $this->createNamedParameter($member->getUserType())) |
|
| 677 | + $expr->eq($aliasMember.'.user_type', $this->createNamedParameter($member->getUserType())) |
|
| 678 | 678 | ); |
| 679 | 679 | } |
| 680 | 680 | |
@@ -683,7 +683,7 @@ discard block |
||
| 683 | 683 | if ($member->getLevel() > 0) { |
| 684 | 684 | $andX->add( |
| 685 | 685 | $expr->gte( |
| 686 | - $aliasMember . '.level', |
|
| 686 | + $aliasMember.'.level', |
|
| 687 | 687 | $this->createNamedParameter($member->getLevel(), IQueryBuilder::PARAM_INT) |
| 688 | 688 | ) |
| 689 | 689 | ); |
@@ -724,7 +724,7 @@ discard block |
||
| 724 | 724 | $helperAlias, |
| 725 | 725 | CoreRequestBuilder::TABLE_CIRCLE, |
| 726 | 726 | $aliasCircle, |
| 727 | - $expr->eq($aliasCircle . '.unique_id', $helperAlias . '.' . $field) |
|
| 727 | + $expr->eq($aliasCircle.'.unique_id', $helperAlias.'.'.$field) |
|
| 728 | 728 | ); |
| 729 | 729 | |
| 730 | 730 | if (!is_null($initiator)) { |
@@ -755,7 +755,7 @@ discard block |
||
| 755 | 755 | $this->generateCircleSelectAlias($aliasInvitedBy) |
| 756 | 756 | ->leftJoin( |
| 757 | 757 | $aliasMember, CoreRequestBuilder::TABLE_CIRCLE, $aliasInvitedBy, |
| 758 | - $expr->eq($aliasMember . '.invited_by', $aliasInvitedBy . '.unique_id') |
|
| 758 | + $expr->eq($aliasMember.'.invited_by', $aliasInvitedBy.'.unique_id') |
|
| 759 | 759 | ); |
| 760 | 760 | |
| 761 | 761 | $this->leftJoinOwner($aliasInvitedBy); |
@@ -786,7 +786,7 @@ discard block |
||
| 786 | 786 | $this->generateCircleSelectAlias($aliasBasedOn) |
| 787 | 787 | ->leftJoin( |
| 788 | 788 | $aliasMember, CoreRequestBuilder::TABLE_CIRCLE, $aliasBasedOn, |
| 789 | - $expr->eq($aliasBasedOn . '.unique_id', $aliasMember . '.single_id') |
|
| 789 | + $expr->eq($aliasBasedOn.'.unique_id', $aliasMember.'.single_id') |
|
| 790 | 790 | ); |
| 791 | 791 | |
| 792 | 792 | if (!is_null($initiator)) { |
@@ -819,9 +819,9 @@ discard block |
||
| 819 | 819 | ->leftJoin( |
| 820 | 820 | $alias, CoreRequestBuilder::TABLE_MEMBER, $aliasMember, |
| 821 | 821 | $expr->andX( |
| 822 | - $expr->eq($aliasMember . '.circle_id', $alias . '.' . $field), |
|
| 822 | + $expr->eq($aliasMember.'.circle_id', $alias.'.'.$field), |
|
| 823 | 823 | $expr->eq( |
| 824 | - $aliasMember . '.level', |
|
| 824 | + $aliasMember.'.level', |
|
| 825 | 825 | $this->createNamedParameter(Member::LEVEL_OWNER, self::PARAM_INT) |
| 826 | 826 | ) |
| 827 | 827 | ) |
@@ -859,10 +859,10 @@ discard block |
||
| 859 | 859 | ->leftJoin( |
| 860 | 860 | $alias, CoreRequestBuilder::TABLE_MEMBER, $aliasMember, |
| 861 | 861 | $expr->andX( |
| 862 | - $expr->eq($aliasMember . '.circle_id', $alias . '.' . $fieldCircleId), |
|
| 863 | - $expr->eq($aliasMember . '.single_id', $alias . '.' . $fieldSingleId), |
|
| 862 | + $expr->eq($aliasMember.'.circle_id', $alias.'.'.$fieldCircleId), |
|
| 863 | + $expr->eq($aliasMember.'.single_id', $alias.'.'.$fieldSingleId), |
|
| 864 | 864 | $expr->gte( |
| 865 | - $aliasMember . '.level', |
|
| 865 | + $aliasMember.'.level', |
|
| 866 | 866 | $this->createNamedParameter(Member::LEVEL_MEMBER, self::PARAM_INT) |
| 867 | 867 | ) |
| 868 | 868 | ) |
@@ -895,7 +895,7 @@ discard block |
||
| 895 | 895 | |
| 896 | 896 | $this->leftJoin( |
| 897 | 897 | $alias, CoreRequestBuilder::TABLE_MEMBERSHIP, $aliasMembership, |
| 898 | - $expr->eq($aliasMembership . '.circle_id', $alias . '.' . $field) |
|
| 898 | + $expr->eq($aliasMembership.'.circle_id', $alias.'.'.$field) |
|
| 899 | 899 | ); |
| 900 | 900 | |
| 901 | 901 | // if (!$this->getBool('getData', $options, false)) { |
@@ -909,8 +909,8 @@ discard block |
||
| 909 | 909 | ->leftJoin( |
| 910 | 910 | $alias, CoreRequestBuilder::TABLE_MEMBER, $aliasInheritedBy, |
| 911 | 911 | $expr->andX( |
| 912 | - $expr->eq($aliasMembership . '.inheritance_last', $aliasInheritedBy . '.circle_id'), |
|
| 913 | - $expr->eq($aliasMembership . '.single_id', $aliasInheritedBy . '.single_id') |
|
| 912 | + $expr->eq($aliasMembership.'.inheritance_last', $aliasInheritedBy.'.circle_id'), |
|
| 913 | + $expr->eq($aliasMembership.'.single_id', $aliasInheritedBy.'.single_id') |
|
| 914 | 914 | ) |
| 915 | 915 | ); |
| 916 | 916 | |
@@ -927,12 +927,12 @@ discard block |
||
| 927 | 927 | $aliasUpstreamMembership = $this->generateAlias($alias, self::UPSTREAM_MEMBERSHIPS, $options); |
| 928 | 928 | $this->leftJoin( |
| 929 | 929 | $alias, CoreRequestBuilder::TABLE_MEMBERSHIP, $aliasUpstreamMembership, |
| 930 | - $expr->eq($aliasUpstreamMembership . '.single_id', $this->createNamedParameter($singleId)) |
|
| 930 | + $expr->eq($aliasUpstreamMembership.'.single_id', $this->createNamedParameter($singleId)) |
|
| 931 | 931 | ); |
| 932 | 932 | |
| 933 | 933 | $orX = $expr->orX( |
| 934 | - $expr->eq($aliasUpstreamMembership . '.circle_id', $alias . '.' . $field), |
|
| 935 | - $expr->eq($alias . '.' . $field, $this->createNamedParameter($singleId)) |
|
| 934 | + $expr->eq($aliasUpstreamMembership.'.circle_id', $alias.'.'.$field), |
|
| 935 | + $expr->eq($alias.'.'.$field, $this->createNamedParameter($singleId)) |
|
| 936 | 936 | ); |
| 937 | 937 | |
| 938 | 938 | $this->andWhere($orX); |
@@ -953,11 +953,11 @@ discard block |
||
| 953 | 953 | |
| 954 | 954 | $expr = $this->expr(); |
| 955 | 955 | $aliasMembership = $this->generateAlias($alias, self::MEMBERSHIPS); |
| 956 | - $this->andWhere($expr->eq($aliasMembership . '.circle_id', $this->createNamedParameter($singleId))); |
|
| 956 | + $this->andWhere($expr->eq($aliasMembership.'.circle_id', $this->createNamedParameter($singleId))); |
|
| 957 | 957 | if ($level > 1) { |
| 958 | 958 | $this->andWhere( |
| 959 | 959 | $expr->gte( |
| 960 | - $aliasMembership . '.level', |
|
| 960 | + $aliasMembership.'.level', |
|
| 961 | 961 | $this->createNamedParameter($level, IQueryBuilder::PARAM_INT) |
| 962 | 962 | ) |
| 963 | 963 | ); |
@@ -985,8 +985,8 @@ discard block |
||
| 985 | 985 | $this->leftJoin( |
| 986 | 986 | $alias, CoreRequestBuilder::TABLE_MEMBERSHIP, $aliasMembership, |
| 987 | 987 | $expr->andX( |
| 988 | - $expr->eq($aliasMembership . '.inheritance_last', $alias . '.' . $field), |
|
| 989 | - $expr->eq($aliasMembership . '.single_id', $alias . '.single_id') |
|
| 988 | + $expr->eq($aliasMembership.'.inheritance_last', $alias.'.'.$field), |
|
| 989 | + $expr->eq($aliasMembership.'.single_id', $alias.'.single_id') |
|
| 990 | 990 | ) |
| 991 | 991 | ); |
| 992 | 992 | |
@@ -999,8 +999,8 @@ discard block |
||
| 999 | 999 | ->leftJoin( |
| 1000 | 1000 | $aliasMembership, CoreRequestBuilder::TABLE_MEMBER, $aliasInheritanceFrom, |
| 1001 | 1001 | $expr->andX( |
| 1002 | - $expr->eq($aliasMembership . '.circle_id', $aliasInheritanceFrom . '.circle_id'), |
|
| 1003 | - $expr->eq($aliasMembership . '.inheritance_first', $aliasInheritanceFrom . '.single_id') |
|
| 1002 | + $expr->eq($aliasMembership.'.circle_id', $aliasInheritanceFrom.'.circle_id'), |
|
| 1003 | + $expr->eq($aliasMembership.'.inheritance_first', $aliasInheritanceFrom.'.single_id') |
|
| 1004 | 1004 | ) |
| 1005 | 1005 | ); |
| 1006 | 1006 | } |
@@ -1040,7 +1040,7 @@ discard block |
||
| 1040 | 1040 | |
| 1041 | 1041 | $this->leftJoin( |
| 1042 | 1042 | $alias, CoreRequestBuilder::TABLE_TOKEN, $aliasShareToken, |
| 1043 | - $expr->eq($aliasShareToken . '.share_id', $alias . '.' . $field) |
|
| 1043 | + $expr->eq($aliasShareToken.'.share_id', $alias.'.'.$field) |
|
| 1044 | 1044 | ); |
| 1045 | 1045 | } |
| 1046 | 1046 | |
@@ -1082,14 +1082,14 @@ discard block |
||
| 1082 | 1082 | try { |
| 1083 | 1083 | $aliasConfig = $this->generateAlias($alias, self::CONFIG, $options); |
| 1084 | 1084 | $this->selectAlias( |
| 1085 | - $aliasConfig . '.config', |
|
| 1086 | - (($alias !== $this->getDefaultSelectAlias()) ? $alias . '_' : '') . 'circle_config' |
|
| 1085 | + $aliasConfig.'.config', |
|
| 1086 | + (($alias !== $this->getDefaultSelectAlias()) ? $alias.'_' : '').'circle_config' |
|
| 1087 | 1087 | ); |
| 1088 | 1088 | $this->leftJoin( |
| 1089 | 1089 | $alias, |
| 1090 | 1090 | CoreRequestBuilder::TABLE_CIRCLE, |
| 1091 | 1091 | $aliasConfig, |
| 1092 | - $expr->eq($alias . '.circle_id', $aliasConfig . '.unique_id') |
|
| 1092 | + $expr->eq($alias.'.circle_id', $aliasConfig.'.unique_id') |
|
| 1093 | 1093 | ); |
| 1094 | 1094 | } catch (RequestBuilderException $e) { |
| 1095 | 1095 | } |
@@ -1127,7 +1127,7 @@ discard block |
||
| 1127 | 1127 | $aliasMembership, |
| 1128 | 1128 | $expr->andX( |
| 1129 | 1129 | $this->exprLimit('single_id', $initiator->getSingleId(), $aliasMembership), |
| 1130 | - $expr->eq($aliasMembership . '.circle_id', $helperAlias . '.' . $field) |
|
| 1130 | + $expr->eq($aliasMembership.'.circle_id', $helperAlias.'.'.$field) |
|
| 1131 | 1131 | ) |
| 1132 | 1132 | ); |
| 1133 | 1133 | |
@@ -1146,11 +1146,11 @@ discard block |
||
| 1146 | 1146 | $aliasMembershipCircle = $this->generateAlias($aliasMembership, self::CONFIG, $options); |
| 1147 | 1147 | $orXMembershipCircle = $expr->orX(); |
| 1148 | 1148 | array_map( |
| 1149 | - function (string $alias) use ($orXMembershipCircle, $aliasMembershipCircle) { |
|
| 1149 | + function(string $alias) use ($orXMembershipCircle, $aliasMembershipCircle) { |
|
| 1150 | 1150 | $orXMembershipCircle->add( |
| 1151 | 1151 | $this->expr()->eq( |
| 1152 | - $alias . '.circle_id', |
|
| 1153 | - $aliasMembershipCircle . '.unique_id' |
|
| 1152 | + $alias.'.circle_id', |
|
| 1153 | + $aliasMembershipCircle.'.unique_id' |
|
| 1154 | 1154 | ) |
| 1155 | 1155 | ); |
| 1156 | 1156 | }, |
@@ -1182,7 +1182,7 @@ discard block |
||
| 1182 | 1182 | $aliasDirectInitiator, |
| 1183 | 1183 | $expr->andX( |
| 1184 | 1184 | $this->exprLimit('single_id', $initiator->getSingleId(), $aliasDirectInitiator), |
| 1185 | - $expr->eq($aliasDirectInitiator . '.circle_id', $helperAlias . '.' . $field) |
|
| 1185 | + $expr->eq($aliasDirectInitiator.'.circle_id', $helperAlias.'.'.$field) |
|
| 1186 | 1186 | ) |
| 1187 | 1187 | ); |
| 1188 | 1188 | } catch (RequestBuilderException $e) { |
@@ -1196,8 +1196,8 @@ discard block |
||
| 1196 | 1196 | $this->leftJoin( |
| 1197 | 1197 | $aliasMembership, CoreRequestBuilder::TABLE_MEMBER, $aliasInitiator, |
| 1198 | 1198 | $expr->andX( |
| 1199 | - $expr->eq($aliasMembership . '.inheritance_first', $aliasInitiator . '.single_id'), |
|
| 1200 | - $expr->eq($aliasMembership . '.circle_id', $aliasInitiator . '.circle_id') |
|
| 1199 | + $expr->eq($aliasMembership.'.inheritance_first', $aliasInitiator.'.single_id'), |
|
| 1200 | + $expr->eq($aliasMembership.'.circle_id', $aliasInitiator.'.circle_id') |
|
| 1201 | 1201 | ) |
| 1202 | 1202 | ); |
| 1203 | 1203 | |
@@ -1205,8 +1205,8 @@ discard block |
||
| 1205 | 1205 | $this->leftJoin( |
| 1206 | 1206 | $aliasInitiator, CoreRequestBuilder::TABLE_MEMBER, $aliasInheritedBy, |
| 1207 | 1207 | $expr->andX( |
| 1208 | - $expr->eq($aliasMembership . '.single_id', $aliasInheritedBy . '.single_id'), |
|
| 1209 | - $expr->eq($aliasMembership . '.inheritance_last', $aliasInheritedBy . '.circle_id') |
|
| 1208 | + $expr->eq($aliasMembership.'.single_id', $aliasInheritedBy.'.single_id'), |
|
| 1209 | + $expr->eq($aliasMembership.'.inheritance_last', $aliasInheritedBy.'.circle_id') |
|
| 1210 | 1210 | ) |
| 1211 | 1211 | ); |
| 1212 | 1212 | |
@@ -1257,7 +1257,7 @@ discard block |
||
| 1257 | 1257 | $orX->add( |
| 1258 | 1258 | $expr->andX( |
| 1259 | 1259 | $this->exprLimitBitwise('config', Circle::CFG_PERSONAL, $aliasMembershipCircle), |
| 1260 | - $expr->eq($aliasMembership . '.level', $this->createNamedParameter(Member::LEVEL_OWNER)) |
|
| 1260 | + $expr->eq($aliasMembership.'.level', $this->createNamedParameter(Member::LEVEL_OWNER)) |
|
| 1261 | 1261 | ) |
| 1262 | 1262 | ); |
| 1263 | 1263 | } |
@@ -1267,10 +1267,10 @@ discard block |
||
| 1267 | 1267 | $orXLevelCheck = $expr->orX(); |
| 1268 | 1268 | |
| 1269 | 1269 | array_map( |
| 1270 | - function (string $alias) use ($orXLevelCheck, $minimumLevel) { |
|
| 1270 | + function(string $alias) use ($orXLevelCheck, $minimumLevel) { |
|
| 1271 | 1271 | $orXLevelCheck->add( |
| 1272 | 1272 | $this->expr()->gte( |
| 1273 | - $alias . '.level', |
|
| 1273 | + $alias.'.level', |
|
| 1274 | 1274 | $this->createNamedParameter($minimumLevel) |
| 1275 | 1275 | ) |
| 1276 | 1276 | ); |
@@ -1360,21 +1360,21 @@ discard block |
||
| 1360 | 1360 | $expr = $this->expr(); |
| 1361 | 1361 | $andPassive = $expr->andX(); |
| 1362 | 1362 | $andPassive->add( |
| 1363 | - $expr->eq($alias . '.type', $this->createNamedParameter(RemoteInstance::TYPE_PASSIVE)) |
|
| 1363 | + $expr->eq($alias.'.type', $this->createNamedParameter(RemoteInstance::TYPE_PASSIVE)) |
|
| 1364 | 1364 | ); |
| 1365 | 1365 | |
| 1366 | 1366 | $orMemberOrLevel = $expr->orX(); |
| 1367 | 1367 | $orMemberOrLevel->add( |
| 1368 | - $expr->eq($this->getDefaultSelectAlias() . '.instance', $alias . '.instance') |
|
| 1368 | + $expr->eq($this->getDefaultSelectAlias().'.instance', $alias.'.instance') |
|
| 1369 | 1369 | ); |
| 1370 | 1370 | // TODO: do we need this ? (display members from the local instance) |
| 1371 | 1371 | $orMemberOrLevel->add( |
| 1372 | - $expr->emptyString($this->getDefaultSelectAlias() . '.instance') |
|
| 1372 | + $expr->emptyString($this->getDefaultSelectAlias().'.instance') |
|
| 1373 | 1373 | ); |
| 1374 | 1374 | |
| 1375 | 1375 | $orMemberOrLevel->add( |
| 1376 | 1376 | $expr->eq( |
| 1377 | - $this->getDefaultSelectAlias() . '.level', |
|
| 1377 | + $this->getDefaultSelectAlias().'.level', |
|
| 1378 | 1378 | $this->createNamedParameter(Member::LEVEL_OWNER) |
| 1379 | 1379 | ) |
| 1380 | 1380 | ); |
@@ -1411,11 +1411,11 @@ discard block |
||
| 1411 | 1411 | ) |
| 1412 | 1412 | ->leftJoin( |
| 1413 | 1413 | $aliasShare, CoreRequestBuilder::TABLE_FILE_CACHE, $aliasFileCache, |
| 1414 | - $expr->eq($aliasShare . '.file_source', $aliasFileCache . '.fileid') |
|
| 1414 | + $expr->eq($aliasShare.'.file_source', $aliasFileCache.'.fileid') |
|
| 1415 | 1415 | ) |
| 1416 | 1416 | ->leftJoin( |
| 1417 | 1417 | $aliasFileCache, CoreRequestBuilder::TABLE_STORAGES, $aliasStorages, |
| 1418 | - $expr->eq($aliasFileCache . '.storage', $aliasStorages . '.numeric_id') |
|
| 1418 | + $expr->eq($aliasFileCache.'.storage', $aliasStorages.'.numeric_id') |
|
| 1419 | 1419 | ); |
| 1420 | 1420 | } |
| 1421 | 1421 | |
@@ -1437,8 +1437,8 @@ discard block |
||
| 1437 | 1437 | $this->leftJoin( |
| 1438 | 1438 | $aliasShareMemberships, CoreRequestBuilder::TABLE_SHARE, $aliasShareChild, |
| 1439 | 1439 | $expr->andX( |
| 1440 | - $expr->eq($aliasShareChild . '.parent', $aliasShare . '.id'), |
|
| 1441 | - $expr->eq($aliasShareChild . '.share_with', $aliasShareMemberships . '.single_id') |
|
| 1440 | + $expr->eq($aliasShareChild.'.parent', $aliasShare.'.id'), |
|
| 1441 | + $expr->eq($aliasShareChild.'.share_with', $aliasShareMemberships.'.single_id') |
|
| 1442 | 1442 | ) |
| 1443 | 1443 | ); |
| 1444 | 1444 | |
@@ -1488,13 +1488,13 @@ discard block |
||
| 1488 | 1488 | $this->leftJoin( |
| 1489 | 1489 | $aliasMountMemberships, CoreRequestBuilder::TABLE_MOUNTPOINT, $aliasMountpoint, |
| 1490 | 1490 | $expr->andX( |
| 1491 | - $expr->eq($aliasMountpoint . '.mount_id', $aliasMount . '.mount_id'), |
|
| 1492 | - $expr->eq($aliasMountpoint . '.single_id', $aliasMountMemberships . '.single_id') |
|
| 1491 | + $expr->eq($aliasMountpoint.'.mount_id', $aliasMount.'.mount_id'), |
|
| 1492 | + $expr->eq($aliasMountpoint.'.single_id', $aliasMountMemberships.'.single_id') |
|
| 1493 | 1493 | ) |
| 1494 | 1494 | ); |
| 1495 | 1495 | |
| 1496 | - $this->selectAlias($aliasMountpoint . '.mountpoint', $aliasMountpoint . '_mountpoint'); |
|
| 1497 | - $this->selectAlias($aliasMountpoint . '.mountpoint_hash', $aliasMountpoint . '_mountpoint_hash'); |
|
| 1496 | + $this->selectAlias($aliasMountpoint.'.mountpoint', $aliasMountpoint.'_mountpoint'); |
|
| 1497 | + $this->selectAlias($aliasMountpoint.'.mountpoint_hash', $aliasMountpoint.'_mountpoint_hash'); |
|
| 1498 | 1498 | } |
| 1499 | 1499 | |
| 1500 | 1500 | |
@@ -1598,10 +1598,10 @@ discard block |
||
| 1598 | 1598 | */ |
| 1599 | 1599 | public function generateAlias(string $base, string $extension, ?array &$options = []): string { |
| 1600 | 1600 | $search = str_replace('_', '.', $base); |
| 1601 | - $path = $search . '.' . $extension; |
|
| 1601 | + $path = $search.'.'.$extension; |
|
| 1602 | 1602 | if (!$this->validKey($path, self::$SQL_PATH) |
| 1603 | 1603 | && !in_array($extension, $this->getArray($search, self::$SQL_PATH))) { |
| 1604 | - throw new RequestBuilderException($extension . ' not found in ' . $search); |
|
| 1604 | + throw new RequestBuilderException($extension.' not found in '.$search); |
|
| 1605 | 1605 | } |
| 1606 | 1606 | |
| 1607 | 1607 | if (!is_array($options)) { |
@@ -1610,15 +1610,15 @@ discard block |
||
| 1610 | 1610 | |
| 1611 | 1611 | $optionPath = ''; |
| 1612 | 1612 | foreach (explode('.', $path) as $p) { |
| 1613 | - $optionPath = trim($optionPath . '.' . $p, '.'); |
|
| 1613 | + $optionPath = trim($optionPath.'.'.$p, '.'); |
|
| 1614 | 1614 | $options = array_merge( |
| 1615 | 1615 | $options, |
| 1616 | - $this->getArray($optionPath . '.' . self::OPTIONS, self::$SQL_PATH), |
|
| 1617 | - $this->getArray($optionPath . '.' . self::OPTIONS, $this->options) |
|
| 1616 | + $this->getArray($optionPath.'.'.self::OPTIONS, self::$SQL_PATH), |
|
| 1617 | + $this->getArray($optionPath.'.'.self::OPTIONS, $this->options) |
|
| 1618 | 1618 | ); |
| 1619 | 1619 | } |
| 1620 | 1620 | |
| 1621 | - return $base . '_' . $extension; |
|
| 1621 | + return $base.'_'.$extension; |
|
| 1622 | 1622 | } |
| 1623 | 1623 | |
| 1624 | 1624 | |
@@ -1638,7 +1638,7 @@ discard block |
||
| 1638 | 1638 | } else { |
| 1639 | 1639 | $k = $arr; |
| 1640 | 1640 | } |
| 1641 | - $path[$k] = $prefix . '_' . $k . '_'; |
|
| 1641 | + $path[$k] = $prefix.'_'.$k.'_'; |
|
| 1642 | 1642 | } |
| 1643 | 1643 | |
| 1644 | 1644 | return $path; |
@@ -187,11 +187,11 @@ discard block |
||
| 187 | 187 | $this->federatedUserService->commandLineInitiator($initiator, $initiatorType, $circleId, true); |
| 188 | 188 | $circle = $this->circleService->getCircle($circleId); |
| 189 | 189 | |
| 190 | - $output->writeln('<info>Name</info>: ' . $circle->getName()); |
|
| 190 | + $output->writeln('<info>Name</info>: '.$circle->getName()); |
|
| 191 | 191 | $owner = $circle->getOwner(); |
| 192 | - $output->writeln('<info>Owner</info>: ' . $owner->getUserId() . '@' . $owner->getInstance()); |
|
| 192 | + $output->writeln('<info>Owner</info>: '.$owner->getUserId().'@'.$owner->getInstance()); |
|
| 193 | 193 | $type = implode(", ", Circle::getCircleFlags($circle, Circle::FLAGS_LONG)); |
| 194 | - $output->writeln('<info>Config</info>: ' . $type); |
|
| 194 | + $output->writeln('<info>Config</info>: '.$type); |
|
| 195 | 195 | $output->writeln(' '); |
| 196 | 196 | |
| 197 | 197 | $tree = new TreeNode(null, new SimpleDataStore(['circle' => $circle])); |
@@ -256,8 +256,7 @@ discard block |
||
| 256 | 256 | $member, |
| 257 | 257 | $this->input->getOption('display-name') |
| 258 | 258 | ), |
| 259 | - ($level > 0) ? Member::$DEF_LEVEL[$level] : |
|
| 260 | - '(' . strtolower($member->getStatus()) . ')', |
|
| 259 | + ($level > 0) ? Member::$DEF_LEVEL[$level] : '('.strtolower($member->getStatus()).')', |
|
| 261 | 260 | ($member->hasInvitedBy()) ? $this->configService->displayFederatedUser( |
| 262 | 261 | $member->getInvitedBy(), |
| 263 | 262 | $this->input->getOption('display-name') |
@@ -423,14 +422,14 @@ discard block |
||
| 423 | 422 | $member = $data->gObj('member', Member::class); |
| 424 | 423 | |
| 425 | 424 | if ($lineNumber === 1) { |
| 426 | - $line .= '<info>' . $member->getSingleId() . '</info>'; |
|
| 425 | + $line .= '<info>'.$member->getSingleId().'</info>'; |
|
| 427 | 426 | if (!$this->configService->isLocalInstance($member->getInstance())) { |
| 428 | - $line .= '@' . $member->getInstance(); |
|
| 427 | + $line .= '@'.$member->getInstance(); |
|
| 429 | 428 | } |
| 430 | - $line .= ' (' . Member::$DEF_LEVEL[$member->getLevel()] . ')'; |
|
| 429 | + $line .= ' ('.Member::$DEF_LEVEL[$member->getLevel()].')'; |
|
| 431 | 430 | |
| 432 | - $line .= ' <info>MemberId</info>: ' . $member->getId(); |
|
| 433 | - $line .= ' <info>Name</info>: ' . $this->configService->displayFederatedUser( |
|
| 431 | + $line .= ' <info>MemberId</info>: '.$member->getId(); |
|
| 432 | + $line .= ' <info>Name</info>: '.$this->configService->displayFederatedUser( |
|
| 434 | 433 | $member, |
| 435 | 434 | $this->input->getOption('display-name') |
| 436 | 435 | ); |
@@ -438,7 +437,7 @@ discard block |
||
| 438 | 437 | $line .= ' <info>Source</info>: ' |
| 439 | 438 | . Circle::$DEF_SOURCE[$member->getBasedOn()->getSource()]; |
| 440 | 439 | } else { |
| 441 | - $line .= ' <info>Type</info>: ' . Member::$TYPE[$member->getUserType()]; |
|
| 440 | + $line .= ' <info>Type</info>: '.Member::$TYPE[$member->getUserType()]; |
|
| 442 | 441 | } |
| 443 | 442 | } |
| 444 | 443 | |
@@ -451,15 +450,15 @@ discard block |
||
| 451 | 450 | return $line; |
| 452 | 451 | } |
| 453 | 452 | $owner = $circle->getOwner(); |
| 454 | - $line .= '<info>Owner</info>: ' . $owner->getUserId() . '@' . $owner->getInstance(); |
|
| 453 | + $line .= '<info>Owner</info>: '.$owner->getUserId().'@'.$owner->getInstance(); |
|
| 455 | 454 | $type = implode(", ", Circle::getCircleFlags($circle, Circle::FLAGS_LONG)); |
| 456 | - $line .= ($type === '') ? '' : ' <info>Config</info>: ' . $type; |
|
| 455 | + $line .= ($type === '') ? '' : ' <info>Config</info>: '.$type; |
|
| 457 | 456 | } |
| 458 | 457 | } else { |
| 459 | 458 | if ($lineNumber === 1 && !is_null($circle)) { |
| 460 | - $line .= '<info>' . $circle->getSingleId() . '</info>'; |
|
| 459 | + $line .= '<info>'.$circle->getSingleId().'</info>'; |
|
| 461 | 460 | if (!$this->configService->isLocalInstance($circle->getInstance())) { |
| 462 | - $line .= '@' . $circle->getInstance(); |
|
| 461 | + $line .= '@'.$circle->getInstance(); |
|
| 463 | 462 | } |
| 464 | 463 | } |
| 465 | 464 | } |
@@ -257,7 +257,7 @@ discard block |
||
| 257 | 257 | public function getInstance(): string { |
| 258 | 258 | $instance = $this->getHost(); |
| 259 | 259 | if ($this->getPort() > 0) { |
| 260 | - $instance .= ':' . $this->getPort(); |
|
| 260 | + $instance .= ':'.$this->getPort(); |
|
| 261 | 261 | } |
| 262 | 262 | |
| 263 | 263 | return $instance; |
@@ -281,7 +281,7 @@ discard block |
||
| 281 | 281 | if ($protocol === null) { |
| 282 | 282 | if (strpos($url, '/') > -1) { |
| 283 | 283 | [$address, $baseUrl] = explode('/', $url, 2); |
| 284 | - $this->setBaseUrl('/' . $baseUrl); |
|
| 284 | + $this->setBaseUrl('/'.$baseUrl); |
|
| 285 | 285 | } else { |
| 286 | 286 | $address = $url; |
| 287 | 287 | } |
@@ -391,7 +391,7 @@ discard block |
||
| 391 | 391 | continue; |
| 392 | 392 | } |
| 393 | 393 | |
| 394 | - $url = str_replace(':' . $k, $this->data[$k], $url); |
|
| 394 | + $url = str_replace(':'.$k, $this->data[$k], $url); |
|
| 395 | 395 | } |
| 396 | 396 | |
| 397 | 397 | return $url; |
@@ -408,7 +408,7 @@ discard block |
||
| 408 | 408 | continue; |
| 409 | 409 | } |
| 410 | 410 | |
| 411 | - $url = str_replace(':' . $k, $this->params[$k], $url); |
|
| 411 | + $url = str_replace(':'.$k, $this->params[$k], $url); |
|
| 412 | 412 | } |
| 413 | 413 | |
| 414 | 414 | return $url; |
@@ -419,7 +419,7 @@ discard block |
||
| 419 | 419 | * @return string |
| 420 | 420 | */ |
| 421 | 421 | public function getPath(): string { |
| 422 | - return $this->baseUrl . $this->url; |
|
| 422 | + return $this->baseUrl.$this->url; |
|
| 423 | 423 | } |
| 424 | 424 | |
| 425 | 425 | |
@@ -436,9 +436,9 @@ discard block |
||
| 436 | 436 | * @return string |
| 437 | 437 | */ |
| 438 | 438 | public function getCompleteUrl(): string { |
| 439 | - $port = ($this->getPort() > 0) ? ':' . $this->getPort() : ''; |
|
| 439 | + $port = ($this->getPort() > 0) ? ':'.$this->getPort() : ''; |
|
| 440 | 440 | |
| 441 | - return $this->getUsedProtocol() . '://' . $this->getHost() . $port . $this->getParametersUrl(); |
|
| 441 | + return $this->getUsedProtocol().'://'.$this->getHost().$port.$this->getParametersUrl(); |
|
| 442 | 442 | } |
| 443 | 443 | |
| 444 | 444 | |
@@ -453,7 +453,7 @@ discard block |
||
| 453 | 453 | public function addHeader($key, $value): Request { |
| 454 | 454 | $header = $this->get($key, $this->headers); |
| 455 | 455 | if ($header !== '') { |
| 456 | - $header .= ', ' . $value; |
|
| 456 | + $header .= ', '.$value; |
|
| 457 | 457 | } else { |
| 458 | 458 | $header = $value; |
| 459 | 459 | } |
@@ -683,11 +683,11 @@ discard block |
||
| 683 | 683 | |
| 684 | 684 | switch ($this->getQueryStringType()) { |
| 685 | 685 | case self::QS_VAR_ARRAY: |
| 686 | - return '?' . http_build_query($this->getParams()); |
|
| 686 | + return '?'.http_build_query($this->getParams()); |
|
| 687 | 687 | |
| 688 | 688 | case self::QS_VAR_DUPLICATE: |
| 689 | 689 | default: |
| 690 | - return '?' . preg_replace( |
|
| 690 | + return '?'.preg_replace( |
|
| 691 | 691 | '/%5B(?:[0-9]|[1-9][0-9]+)%5D=/', '=', http_build_query($this->getParams()) |
| 692 | 692 | ); |
| 693 | 693 | } |
@@ -169,10 +169,10 @@ |
||
| 169 | 169 | return $client->delete($request->getCompleteUrl(), $request->getClientOptions()); |
| 170 | 170 | case Request::TYPE_GET: |
| 171 | 171 | return $client->get( |
| 172 | - $request->getCompleteUrl() . $request->getQueryString(), $request->getClientOptions() |
|
| 172 | + $request->getCompleteUrl().$request->getQueryString(), $request->getClientOptions() |
|
| 173 | 173 | ); |
| 174 | 174 | default: |
| 175 | - throw new Exception('unknown request type ' . json_encode($request)); |
|
| 175 | + throw new Exception('unknown request type '.json_encode($request)); |
|
| 176 | 176 | } |
| 177 | 177 | } |
| 178 | 178 | } |
@@ -177,7 +177,7 @@ |
||
| 177 | 177 | // It seems that AccountManager use deprecated dispatcher, let's use a deprecated listener |
| 178 | 178 | $dispatcher = OC::$server->getEventDispatcher(); |
| 179 | 179 | $dispatcher->addListener( |
| 180 | - 'OC\AccountManager::userUpdated', function (GenericEvent $event) { |
|
| 180 | + 'OC\AccountManager::userUpdated', function(GenericEvent $event) { |
|
| 181 | 181 | /** @var IUser $user */ |
| 182 | 182 | $user = $event->getSubject(); |
| 183 | 183 | /** @var DeprecatedListener $deprecatedListener */ |
@@ -92,27 +92,27 @@ discard block |
||
| 92 | 92 | |
| 93 | 93 | |
| 94 | 94 | // specific value |
| 95 | - public const CFG_CIRCLE = 0; // only for code readability. Circle is locked by default. |
|
| 96 | - public const CFG_SINGLE = 1; // Circle with only one single member. |
|
| 97 | - public const CFG_PERSONAL = 2; // Personal circle, only the owner can see it. |
|
| 95 | + public const CFG_CIRCLE = 0; // only for code readability. Circle is locked by default. |
|
| 96 | + public const CFG_SINGLE = 1; // Circle with only one single member. |
|
| 97 | + public const CFG_PERSONAL = 2; // Personal circle, only the owner can see it. |
|
| 98 | 98 | |
| 99 | 99 | // bitwise |
| 100 | - public const CFG_SYSTEM = 4; // System Circle (not managed by the official front-end). Meaning some config are limited |
|
| 101 | - public const CFG_VISIBLE = 8; // Visible to everyone, if not visible, people have to know its name to be able to find it |
|
| 102 | - public const CFG_OPEN = 16; // Circle is open, people can join |
|
| 103 | - public const CFG_INVITE = 32; // Adding a member generate an invitation that needs to be accepted |
|
| 104 | - public const CFG_REQUEST = 64; // Request to join Circles needs to be confirmed by a moderator |
|
| 105 | - public const CFG_FRIEND = 128; // Members of the circle can invite their friends |
|
| 106 | - public const CFG_PROTECTED = 256; // Password protected to join/request |
|
| 107 | - public const CFG_NO_OWNER = 512; // no owner, only members |
|
| 108 | - public const CFG_HIDDEN = 1024; // hidden from listing, but available as a share entity |
|
| 109 | - public const CFG_BACKEND = 2048; // Fully hidden, only backend Circles |
|
| 110 | - public const CFG_LOCAL = 4096; // Local even on GlobalScale |
|
| 111 | - public const CFG_ROOT = 8192; // Circle cannot be inside another Circle |
|
| 112 | - public const CFG_CIRCLE_INVITE = 16384; // Circle must confirm when invited in another circle |
|
| 113 | - public const CFG_FEDERATED = 32768; // Federated |
|
| 114 | - public const CFG_MOUNTPOINT = 65536; // Generate a Files folder for this Circle |
|
| 115 | - public const CFG_APP = 131072; // Some features are not available to the OCS API (ie. destroying Circle) |
|
| 100 | + public const CFG_SYSTEM = 4; // System Circle (not managed by the official front-end). Meaning some config are limited |
|
| 101 | + public const CFG_VISIBLE = 8; // Visible to everyone, if not visible, people have to know its name to be able to find it |
|
| 102 | + public const CFG_OPEN = 16; // Circle is open, people can join |
|
| 103 | + public const CFG_INVITE = 32; // Adding a member generate an invitation that needs to be accepted |
|
| 104 | + public const CFG_REQUEST = 64; // Request to join Circles needs to be confirmed by a moderator |
|
| 105 | + public const CFG_FRIEND = 128; // Members of the circle can invite their friends |
|
| 106 | + public const CFG_PROTECTED = 256; // Password protected to join/request |
|
| 107 | + public const CFG_NO_OWNER = 512; // no owner, only members |
|
| 108 | + public const CFG_HIDDEN = 1024; // hidden from listing, but available as a share entity |
|
| 109 | + public const CFG_BACKEND = 2048; // Fully hidden, only backend Circles |
|
| 110 | + public const CFG_LOCAL = 4096; // Local even on GlobalScale |
|
| 111 | + public const CFG_ROOT = 8192; // Circle cannot be inside another Circle |
|
| 112 | + public const CFG_CIRCLE_INVITE = 16384; // Circle must confirm when invited in another circle |
|
| 113 | + public const CFG_FEDERATED = 32768; // Federated |
|
| 114 | + public const CFG_MOUNTPOINT = 65536; // Generate a Files folder for this Circle |
|
| 115 | + public const CFG_APP = 131072; // Some features are not available to the OCS API (ie. destroying Circle) |
|
| 116 | 116 | public static $DEF_CFG_MAX = 262143; |
| 117 | 117 | |
| 118 | 118 | |
@@ -481,7 +481,7 @@ discard block |
||
| 481 | 481 | */ |
| 482 | 482 | public function addInheritedMembers(array $members): self { |
| 483 | 483 | $knownIds = array_map( |
| 484 | - function (Member $member): string { |
|
| 484 | + function(Member $member): string { |
|
| 485 | 485 | return $member->getId(); |
| 486 | 486 | }, $this->inheritedMembers |
| 487 | 487 | ); |
@@ -895,23 +895,23 @@ discard block |
||
| 895 | 895 | * @throws CircleNotFoundException |
| 896 | 896 | */ |
| 897 | 897 | public function importFromDatabase(array $data, string $prefix = ''): IQueryRow { |
| 898 | - if ($this->get($prefix . 'unique_id', $data) === '') { |
|
| 898 | + if ($this->get($prefix.'unique_id', $data) === '') { |
|
| 899 | 899 | throw new CircleNotFoundException(); |
| 900 | 900 | } |
| 901 | 901 | |
| 902 | - $this->setSingleId($this->get($prefix . 'unique_id', $data)) |
|
| 903 | - ->setName($this->get($prefix . 'name', $data)) |
|
| 904 | - ->setDisplayName($this->get($prefix . 'display_name', $data)) |
|
| 905 | - ->setSanitizedName($this->get($prefix . 'sanitized_name', $data)) |
|
| 906 | - ->setConfig($this->getInt($prefix . 'config', $data)) |
|
| 907 | - ->setSource($this->getInt($prefix . 'source', $data)) |
|
| 908 | - ->setInstance($this->get($prefix . 'instance', $data)) |
|
| 909 | - ->setSettings($this->getArray($prefix . 'settings', $data)) |
|
| 910 | - ->setContactAddressBook($this->getInt($prefix . 'contact_addressbook', $data)) |
|
| 911 | - ->setContactGroupName($this->get($prefix . 'contact_groupname', $data)) |
|
| 912 | - ->setDescription($this->get($prefix . 'description', $data)); |
|
| 913 | - |
|
| 914 | - $creation = $this->get($prefix . 'creation', $data); |
|
| 902 | + $this->setSingleId($this->get($prefix.'unique_id', $data)) |
|
| 903 | + ->setName($this->get($prefix.'name', $data)) |
|
| 904 | + ->setDisplayName($this->get($prefix.'display_name', $data)) |
|
| 905 | + ->setSanitizedName($this->get($prefix.'sanitized_name', $data)) |
|
| 906 | + ->setConfig($this->getInt($prefix.'config', $data)) |
|
| 907 | + ->setSource($this->getInt($prefix.'source', $data)) |
|
| 908 | + ->setInstance($this->get($prefix.'instance', $data)) |
|
| 909 | + ->setSettings($this->getArray($prefix.'settings', $data)) |
|
| 910 | + ->setContactAddressBook($this->getInt($prefix.'contact_addressbook', $data)) |
|
| 911 | + ->setContactGroupName($this->get($prefix.'contact_groupname', $data)) |
|
| 912 | + ->setDescription($this->get($prefix.'description', $data)); |
|
| 913 | + |
|
| 914 | + $creation = $this->get($prefix.'creation', $data); |
|
| 915 | 915 | $this->setCreation(DateTime::createFromFormat('Y-m-d H:i:s', $creation)->getTimestamp()); |
| 916 | 916 | |
| 917 | 917 | $this->setPopulation($this->getInt('population', $this->getSettings())); |