Skip to content

Commit

Permalink
Merge pull request #668 from nishizoe/t-4556
Browse files Browse the repository at this point in the history
(fixed #4556, BP from #4190) 公開設定デフォルト値=公開しないに設定されている場合でも、管理画面のメンバー検索の検索項目となるように修正
  • Loading branch information
nishizoe committed Sep 7, 2022
2 parents e02e797 + d647d65 commit 6a564f0
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 3 deletions.
4 changes: 3 additions & 1 deletion lib/form/searchForm/opMemberProfileSearchForm.class.php
Original file line number Diff line number Diff line change
Expand Up @@ -47,7 +47,9 @@ public function configure()

foreach ($this->getProfiles() as $profile)
{
if (ProfileTable::PUBLIC_FLAG_PRIVATE == $profile->default_public_flag && !$profile->is_edit_public_flag)
if ($this->getOption('is_check_public_flag', true)
&& ProfileTable::PUBLIC_FLAG_PRIVATE == $profile->default_public_flag
&& !$profile->is_edit_public_flag)
{
continue;
}
Expand Down
5 changes: 3 additions & 2 deletions lib/model/doctrine/MemberProfileTable.class.php
Original file line number Diff line number Diff line change
Expand Up @@ -210,6 +210,7 @@ public function searchMemberIds($profile = array(), $ids = null, $isCheckPublicF

public function filterMemberIdByProfile($ids, $column, $value, Profile $item, $publicFlag = 1)
{

$_result = array();
$q = Doctrine::getTable('MemberProfile')->createQuery('m');
$q = opFormItemGenerator::filterSearchQuery($q, 'm.'.$column, $value, $item->toArray())
Expand All @@ -219,8 +220,8 @@ public function filterMemberIdByProfile($ids, $column, $value, Profile $item, $p
$isCheckPublicFlag = is_integer($publicFlag);
if (!$item->getIsEditPublicFlag())
{
if (
ProfileTable::PUBLIC_FLAG_SNS == $item->getDefaultPublicFlag()
if (!$isCheckPublicFlag
|| ProfileTable::PUBLIC_FLAG_SNS == $item->getDefaultPublicFlag()
|| ProfileTable::PUBLIC_FLAG_WEB == $item->getDefaultPublicFlag()
)
{
Expand Down

0 comments on commit 6a564f0

Please sign in to comment.