diff --git a/app/modules/web/themes/material-blue/views/account/search-rows.inc b/app/modules/web/themes/material-blue/views/account/search-rows.inc
index 5bcb70c7..9d8090e3 100644
--- a/app/modules/web/themes/material-blue/views/account/search-rows.inc
+++ b/app/modules/web/themes/material-blue/views/account/search-rows.inc
@@ -19,14 +19,14 @@
diff --git a/lib/SP/Account/AccountSearchItem.php b/lib/SP/Account/AccountSearchItem.php
index fd95739d..dbbedd54 100644
--- a/lib/SP/Account/AccountSearchItem.php
+++ b/lib/SP/Account/AccountSearchItem.php
@@ -211,7 +211,7 @@ class AccountSearchItem
/**
* @return string
*/
- public function getShortCustomerName()
+ public function getShortClientName()
{
return Html::truncate($this->accountSearchVData->getClientName(), $this->textMaxLength / 3);
}
@@ -219,7 +219,7 @@ class AccountSearchItem
/**
* @return string
*/
- public function getCustomerLink()
+ public function getClientLink()
{
return self::$wikiEnabled ? $this->configData->getWikiSearchurl() . $this->accountSearchVData->getClientName() : '';
}
diff --git a/lib/SP/Account/AccountUtil.php b/lib/SP/Account/AccountUtil.php
index e8413ff6..5b83fb2a 100644
--- a/lib/SP/Account/AccountUtil.php
+++ b/lib/SP/Account/AccountUtil.php
@@ -274,7 +274,7 @@ class AccountUtil
}
$queryFilter->addFilter(/** @lang SQL */
- '(A.isPrivate = 0 OR (A.isPrivate = 1 AND A.userId = ?)) AND (A.isPrivateGroup = 0 OR (A.isPrivateGroup = 1 AND A.userGroupId = ?))', [$userData->getId(), $userData->getUserGroupId()]);
+ '(A.isPrivate IS NULL OR A.isPrivate = 0 OR (A.isPrivate = 1 AND A.userId = ?)) AND (A.isPrivateGroup IS NULL OR A.isPrivateGroup = 0 OR (A.isPrivateGroup = 1 AND A.userGroupId = ?))', [$userData->getId(), $userData->getUserGroupId()]);
return $queryFilter;
}
@@ -318,7 +318,7 @@ class AccountUtil
}
$queryFilter->addFilter(/** @lang SQL */
- '(AH.isPrivate = 0 OR (AH.isPrivate = 1 AND AH.userId = ?)) AND (AH.isPrivateGroup = 0 OR (AH.isPrivateGroup = 1 AND AH.userGroupId = ?))', [$userData->getId(), $userData->getUserGroupId()]);
+ '(AH.isPrivate IS NULL OR AH.isPrivate = 0 OR (AH.isPrivate = 1 AND AH.userId = ?)) AND (AH.isPrivateGroup IS NULL OR AH.isPrivateGroup = 0 OR (AH.isPrivateGroup = 1 AND AH.userGroupId = ?))', [$userData->getId(), $userData->getUserGroupId()]);
return $queryFilter;
}
diff --git a/schemas/dbstructure.sql b/schemas/dbstructure.sql
index 4de488b1..a4c52fc6 100644
--- a/schemas/dbstructure.sql
+++ b/schemas/dbstructure.sql
@@ -39,7 +39,7 @@ CREATE TABLE `Account` (
PRIMARY KEY (`id`),
KEY `IDX_categoryId` (`categoryId`),
KEY `IDX_userId` (`userGroupId`,`userId`),
- KEY `IDX_customerId` (`clientId`),
+ KEY `IDX_clientId` (`clientId`),
KEY `fk_Account_userId` (`userId`),
KEY `fk_Account_userEditId` (`userEditId`),
CONSTRAINT `fk_Account_categoryId` FOREIGN KEY (`categoryId`) REFERENCES `Category` (`id`),
@@ -539,7 +539,7 @@ SET character_set_client = utf8;
`countView` tinyint NOT NULL,
`userGroupName` tinyint NOT NULL,
`categoryName` tinyint NOT NULL,
- `customerName` tinyint NOT NULL,
+ `clientName` tinyint NOT NULL,
`num_files` tinyint NOT NULL
) ENGINE=MyISAM */;
SET character_set_client = @saved_cs_client;
@@ -569,7 +569,7 @@ SET character_set_client = @saved_cs_client;
/*!50001 SET collation_connection = utf8_general_ci */;
/*!50001 CREATE ALGORITHM=UNDEFINED */
/*!50013 SQL SECURITY DEFINER */
-/*!50001 VIEW `account_search_v` AS select distinct `Account`.`id` AS `id`,`Account`.`clientId` AS `clientId`,`Account`.`categoryId` AS `categoryId`,`Account`.`name` AS `name`,`Account`.`login` AS `login`,`Account`.`url` AS `url`,`Account`.`notes` AS `notes`,`Account`.`userId` AS `userId`,`Account`.`userGroupId` AS `userGroupId`,`Account`.`otherUserEdit` AS `otherUserEdit`,`Account`.`otherUserGroupEdit` AS `otherUserGroupEdit`,`Account`.`isPrivate` AS `isPrivate`,`Account`.`isPrivateGroup` AS `isPrivateGroup`,`Account`.`passDate` AS `passDate`,`Account`.`passDateChange` AS `passDateChange`,`Account`.`parentId` AS `parentId`,`Account`.`countView` AS `countView`,`ug`.`name` AS `userGroupName`,`Category`.`name` AS `categoryName`,`Client`.`name` AS `customerName`,(select count(0) from `AccountFile` where `AccountFile`.`accountId` = `Account`.`id`) AS `num_files` from (((`Account` join `Category` on(`Account`.`categoryId` = `Category`.`id`)) join `UserGroup` `ug` on(`Account`.`userGroupId` = `ug`.`id`)) join `Client` on(`Client`.`id` = `Account`.`clientId`)) */;
+/*!50001 VIEW `account_search_v` AS select distinct `Account`.`id` AS `id`,`Account`.`clientId` AS `clientId`,`Account`.`categoryId` AS `categoryId`,`Account`.`name` AS `name`,`Account`.`login` AS `login`,`Account`.`url` AS `url`,`Account`.`notes` AS `notes`,`Account`.`userId` AS `userId`,`Account`.`userGroupId` AS `userGroupId`,`Account`.`otherUserEdit` AS `otherUserEdit`,`Account`.`otherUserGroupEdit` AS `otherUserGroupEdit`,`Account`.`isPrivate` AS `isPrivate`,`Account`.`isPrivateGroup` AS `isPrivateGroup`,`Account`.`passDate` AS `passDate`,`Account`.`passDateChange` AS `passDateChange`,`Account`.`parentId` AS `parentId`,`Account`.`countView` AS `countView`,`ug`.`name` AS `userGroupName`,`Category`.`name` AS `categoryName`,`Client`.`name` AS `clientName`,(select count(0) from `AccountFile` where `AccountFile`.`accountId` = `Account`.`id`) AS `num_files` from (((`Account` join `Category` on(`Account`.`categoryId` = `Category`.`id`)) join `UserGroup` `ug` on(`Account`.`userGroupId` = `ug`.`id`)) join `Client` on(`Client`.`id` = `Account`.`clientId`)) */;
/*!50001 SET character_set_client = @saved_cs_client */;
/*!50001 SET character_set_results = @saved_cs_results */;
/*!50001 SET collation_connection = @saved_col_connection */;