mirror of
https://github.com/nuxsmin/sysPass.git
synced 2026-03-10 02:16:58 +01:00
* [FIX] Fixed typo
* [FIX] Fixed user filter to detect null values
This commit is contained in:
@@ -19,14 +19,14 @@
|
||||
<div class="label-row-up">
|
||||
<div class="field-customer label-field">
|
||||
<div class="field-name-hidden"><?php echo __('Cliente'); ?></div>
|
||||
<?php if (!empty($accountSearchItem->getCustomerLink())): ?>
|
||||
<a href="<?php echo $accountSearchItem->getCustomerLink(); ?>" target="blank"
|
||||
<?php if (!empty($accountSearchItem->getClientLink())): ?>
|
||||
<a href="<?php echo $accountSearchItem->getClientLink(); ?>" target="blank"
|
||||
title="<?php echo __('Buscar en Wiki'); ?>">
|
||||
<span class="mdl-chip mdl-chip--contact">
|
||||
<span style="background-color: <?php echo $accountSearchItem->getColor(); ?>;"
|
||||
class="mdl-chip__contact mdl-color-text--white"><?php echo mb_ucfirst($accountSearchData->getClientName()); ?></span>
|
||||
<span class="mdl-chip__text"
|
||||
title="<?php echo $accountSearchData->getClientName(); ?>"><?php echo $accountSearchItem->getShortCustomerName(); ?></span>
|
||||
title="<?php echo $accountSearchData->getClientName(); ?>"><?php echo $accountSearchItem->getShortClientName(); ?></span>
|
||||
</span>
|
||||
</a>
|
||||
<?php else: ?>
|
||||
@@ -34,7 +34,7 @@
|
||||
<span style="background-color: <?php echo $accountSearchItem->getColor(); ?>;"
|
||||
class="mdl-chip__contact mdl-color-text--white"><?php echo mb_ucfirst($accountSearchData->getClientName()); ?></span>
|
||||
<span class="mdl-chip__text"
|
||||
title="<?php echo $accountSearchData->getClientName(); ?>"><?php echo $accountSearchItem->getShortCustomerName(); ?></span>
|
||||
title="<?php echo $accountSearchData->getClientName(); ?>"><?php echo $accountSearchItem->getShortClientName(); ?></span>
|
||||
</span>
|
||||
<?php endif; ?>
|
||||
</div>
|
||||
|
||||
@@ -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() : '';
|
||||
}
|
||||
|
||||
@@ -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;
|
||||
}
|
||||
|
||||
@@ -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 */;
|
||||
|
||||
Reference in New Issue
Block a user