diff --git a/ajax/ajax_accSave.php b/ajax/ajax_accSave.php
index a74e9d24..09f993f5 100644
--- a/ajax/ajax_accSave.php
+++ b/ajax/ajax_accSave.php
@@ -24,14 +24,13 @@
*/
use SP\Account\Account;
-use SP\Account\AccountTags;
-use SP\DataModel\AccountData;
use SP\Core\ActionsInterface;
use SP\Core\Crypt;
use SP\Core\Init;
use SP\Core\Session;
use SP\Core\SessionUtil;
use SP\Core\Exceptions\SPException;
+use SP\DataModel\AccountExtData;
use SP\DataModel\CustomerData;
use SP\DataModel\CustomFieldData;
use SP\Http\Request;
@@ -73,7 +72,6 @@ $accountUrl = Request::analyze('url');
$accountGroupEditEnabled = Request::analyze('geditenabled', 0, false, 1);
$accountUserEditEnabled = Request::analyze('ueditenabled', 0, false, 1);
$accountMainGroupId = Request::analyze('mainGroupId', 0);
-$accountChangesHash = Request::analyze('hash');
$customFieldsHash = Request::analyze('hashcf');
$customFields = Request::analyze('customfield');
$tags = Request::analyze('tags');
@@ -115,12 +113,12 @@ if ($actionId === ActionsInterface::ACTION_ACC_NEW
if (!$accountId) {
Response::printJson(_('Id inválido'));
}
-} elseif ($actionId == ActionsInterface::ACTION_ACC_EDIT_PASS) {
+} elseif ($actionId === ActionsInterface::ACTION_ACC_EDIT_PASS) {
// Comprobaciones para modficación de clave
if (!$accountPassword || !$accountPasswordR) {
Response::printJson(_('Es necesaria una clave'));
}
-} elseif ($actionId == ActionsInterface::ACTION_ACC_EDIT_RESTORE) {
+} elseif ($actionId === ActionsInterface::ACTION_ACC_EDIT_RESTORE) {
if (!$accountId) {
Response::printJson(_('Id inválido'));
}
@@ -128,11 +126,11 @@ if ($actionId === ActionsInterface::ACTION_ACC_NEW
Response::printJson(_('Acción Inválida'));
}
-if ($actionId == ActionsInterface::ACTION_ACC_NEW
- || $actionId == ActionsInterface::ACTION_ACC_COPY
+if ($actionId === ActionsInterface::ACTION_ACC_NEW
+ || $actionId === ActionsInterface::ACTION_ACC_COPY
|| $actionId === ActionsInterface::ACTION_ACC_EDIT_PASS
) {
- if ($accountPassword != $accountPasswordR) {
+ if ($accountPassword !== $accountPasswordR) {
Response::printJson(_('Las claves no coinciden'));
}
@@ -144,19 +142,26 @@ if ($actionId == ActionsInterface::ACTION_ACC_NEW
}
}
-$AccountData = new AccountData();
+$AccountData = new AccountExtData();
$AccountData->setAccountId($accountId);
$AccountData->setAccountName($accountName);
+$AccountData->setAccountCustomerId($customerId);
$AccountData->setAccountCategoryId($categoryId);
$AccountData->setAccountLogin($accountLogin);
$AccountData->setAccountUrl($accountUrl);
$AccountData->setAccountNotes($accountNotes);
$AccountData->setAccountUserEditId($currentUserId);
-$AccountData->setAccountUsersId($accountOtherUsers);
-$AccountData->setAccountUserGroupsId($accountOtherGroups);
$AccountData->setAccountOtherUserEdit($accountUserEditEnabled);
$AccountData->setAccountOtherGroupEdit($accountGroupEditEnabled);
+if (is_array($accountOtherUsers)) {
+ $AccountData->setUsersId($accountOtherUsers);
+}
+
+if (is_array($accountOtherGroups)) {
+ $AccountData->setUserGroupsId($accountOtherGroups);
+}
+
if (is_array($tags)) {
$AccountData->setTags($tags);
}
@@ -165,21 +170,11 @@ $Account = new Account($AccountData);
$CustomFieldData = new CustomFieldData();
$CustomFieldData->setId($accountId);
-$CustomFieldData->setModule(ActionsInterface::ACTION_ACC_NEW);
+$CustomFieldData->setModule(ActionsInterface::ACTION_ACC);
switch ($actionId) {
case ActionsInterface::ACTION_ACC_NEW:
case ActionsInterface::ACTION_ACC_COPY:
- // Comprobar si se ha introducido un nuevo cliente
- if ($customerId === 0 && $newCustomer) {
- try {
- $customerId = Customer::getItem(new CustomerData(null, $newCustomer))->add()->getItemData()->getCustomerId();
- } catch (SPException $e) {
- Response::printJson($e->getMessage());
- }
- }
-
- $AccountData->setAccountCustomerId($customerId);
$AccountData->setAccountPass($accountEncPass['data']);
$AccountData->setAccountIV($accountEncPass['iv']);
$AccountData->setAccountUserId($currentUserId);
@@ -198,29 +193,11 @@ switch ($actionId) {
Response::printJson(_('Error al crear la cuenta'), 0);
break;
case ActionsInterface::ACTION_ACC_EDIT:
- // Comprobar si se ha introducido un nuevo cliente
- if ($customerId === 0 && $newCustomer) {
- try {
- $customerId = Customer::getItem(new CustomerData(null, $newCustomer))->add()->getItemData()->getCustomerId();
- } catch (SPException $e) {
- Response::printJson($e->getMessage());
- }
- }
-
- $AccountData->setAccountCustomerId($customerId);
-
// Cambiar el grupo principal si el usuario es Admin
if (Session::getUserIsAdminApp() || Session::getUserIsAdminAcc()) {
$AccountData->setAccountUserGroupId($accountMainGroupId);
}
- // Comprobar si han habido cambios
- if ($accountChangesHash == $Account->calcChangesHash()
- && CustomFieldsUtil::checkHash($customFields, $customFieldsHash)
- ) {
- Response::printJson(_('Sin cambios'), 0);
- }
-
// Actualizar cuenta
if ($Account->updateAccount()) {
if (is_array($customFields)) {
@@ -237,7 +214,7 @@ switch ($actionId) {
if ($Account->deleteAccount()
&& CustomField::getItem($CustomFieldData)->delete($accountId)
) {
- Response::printJson(_('Cuenta eliminada'), 0, "sysPassUtil.Common.doAction('" . ActionsInterface::ACTION_ACC_SEARCH . "');");
+ Response::printJson(_('Cuenta eliminada'), 0);
}
Response::printJson(_('Error al eliminar la cuenta'));
diff --git a/inc/SP/Account/Account.class.php b/inc/SP/Account/Account.class.php
index e8201270..357f7e1e 100644
--- a/inc/SP/Account/Account.class.php
+++ b/inc/SP/Account/Account.class.php
@@ -26,6 +26,7 @@
namespace SP\Account;
use SP\Core\Crypt;
+use SP\DataModel\AccountExtData;
use SP\DataModel\GroupAccountsData;
use SP\Mgmt\Files\FileUtil;
use SP\Mgmt\Groups\GroupAccounts;
@@ -73,7 +74,7 @@ class Account extends AccountBase implements AccountInterface
$GroupAccountsData = new GroupAccountsData();
$GroupAccountsData->setAccgroupAccountId($this->accountData->getAccountId());
- $GroupAccountsData->setGroups($this->accountData->getAccountUserGroupsId());
+ $GroupAccountsData->setGroups($this->accountData->getUserGroupsId());
try {
GroupAccounts::getItem($GroupAccountsData)->update();
@@ -83,7 +84,7 @@ class Account extends AccountBase implements AccountInterface
$Log->resetDescription();
}
- if (!UserAccounts::updateUsersForAccount($this->accountData->getAccountId(), $this->accountData->getAccountUsersId())) {
+ if (!UserAccounts::updateUsersForAccount($this->accountData->getAccountId(), $this->accountData->getUsersId())) {
$Log->addDescription(_('Error al actualizar los usuarios de la cuenta'));
$Log->writeLog();
$Log->resetDescription();
@@ -97,7 +98,8 @@ class Account extends AccountBase implements AccountInterface
$Data = new QueryData();
if ($this->accountData->getAccountUserGroupId()) {
- $query = 'UPDATE accounts SET '
+ $query = /** @lang SQL */
+ 'UPDATE accounts SET '
. 'account_customerId = :accountCustomerId,'
. 'account_categoryId = :accountCategoryId,'
. 'account_name = :accountName,'
@@ -113,7 +115,8 @@ class Account extends AccountBase implements AccountInterface
$Data->addParam($this->accountData->getAccountUserGroupId(), 'accountUserGroupId');
} else {
- $query = 'UPDATE accounts SET '
+ $query = /** @lang SQL */
+ 'UPDATE accounts SET '
. 'account_customerId = :accountCustomerId,'
. 'account_categoryId = :accountCategoryId,'
. 'account_name = :accountName,'
@@ -144,7 +147,7 @@ class Account extends AccountBase implements AccountInterface
return false;
}
- $accountInfo = array('customer_name');
+ $accountInfo = ['customer_name'];
$this->getAccountInfoById($accountInfo);
$Log->addDetails(Html::strongText(_('Cliente')), $this->cacheParams['customer_name']);
@@ -184,7 +187,8 @@ class Account extends AccountBase implements AccountInterface
}
}
- $query = 'SELECT ' . implode(',', $params) . ' '
+ $query = /** @lang SQL */
+ 'SELECT ' . implode(',', $params) . ' '
. 'FROM accounts '
. 'LEFT JOIN usrGroups ug ON account_userGroupId = usergroup_id '
. 'LEFT JOIN usrData u1 ON account_userId = u1.user_id '
@@ -227,7 +231,8 @@ class Account extends AccountBase implements AccountInterface
return false;
}
- $query = 'UPDATE accounts dst, '
+ $query = /** @lang SQL */
+ 'UPDATE accounts dst, '
. '(SELECT * FROM accHistory WHERE acchistory_id = :id) src SET '
. 'dst.account_customerId = src.acchistory_customerId,'
. 'dst.account_categoryId = src.acchistory_categoryId,'
@@ -276,7 +281,8 @@ class Account extends AccountBase implements AccountInterface
*/
public function getData()
{
- $query = 'SELECT account_id,'
+ $query = /** @lang SQL */
+ 'SELECT account_id,'
. 'account_name,'
. 'account_categoryId,'
. 'account_userId,'
@@ -311,36 +317,22 @@ class Account extends AccountBase implements AccountInterface
$Data = new QueryData();
$Data->setQuery($query);
+ $Data->setMapClass($this->accountData);
$Data->addParam($this->accountData->getAccountId(), 'id');
+ /** @var AccountExtData $queryRes */
$queryRes = DB::getResults($Data);
if ($queryRes === false) {
throw new SPException(SPException::SP_CRITICAL, _('No se pudieron obtener los datos de la cuenta'));
}
- // Obtener los usuarios y grupos secundarios
- $this->accountData->setAccountUsersId(UserAccounts::getUsersForAccount($this->accountData->getAccountId()));
- $this->accountData->setAccountUserGroupsId(GroupAccountsUtil::getGroupsForAccount($this->accountData->getAccountId()));
+ // Obtener los usuarios y grupos secundarios y las etiquetas
+ $this->accountData->setUsersId(UserAccounts::getUsersForAccount($queryRes->getAccountId()));
+ $this->accountData->setUserGroupsId(GroupAccountsUtil::getGroupsForAccount($queryRes->getAccountId()));
+ $this->accountData->setTags(AccountTags::getTags($queryRes));
- $this->accountData->setAccountName($queryRes->account_name);
- $this->accountData->setAccountCategoryId($queryRes->account_categoryId);
- $this->accountData->setAccountCustomerId($queryRes->account_customerId);
- $this->accountData->setAccountUserGroupId($queryRes->account_userGroupId);
- $this->accountData->setAccountUserEditId($queryRes->account_userEditId);
- $this->accountData->setAccountLogin($queryRes->account_login);
- $this->accountData->setAccountUrl($queryRes->account_url);
- $this->accountData->setAccountUrl($queryRes->account_url);
- $this->accountData->setAccountNotes($queryRes->account_notes);
- $this->accountData->setAccountUserId($queryRes->account_userId);
- $this->accountData->setAccountUserGroupId($queryRes->account_userGroupId);
- $this->accountData->setAccountOtherUserEdit($queryRes->account_otherUserEdit);
- $this->accountData->setAccountOtherGroupEdit($queryRes->account_otherGroupEdit);
- $this->accountData->setTags(AccountTags::getTags($this->accountData));
-
- $this->setAccountModHash($this->calcChangesHash());
-
- return $queryRes;
+ return $this->accountData;
}
/**
@@ -350,7 +342,8 @@ class Account extends AccountBase implements AccountInterface
*/
public function createAccount()
{
- $query = 'INSERT INTO accounts SET '
+ $query = /** @lang SQL */
+ 'INSERT INTO accounts SET '
. 'account_customerId = :accountCustomerId,'
. 'account_categoryId = :accountCategoryId,'
. 'account_name = :accountName,'
@@ -402,12 +395,12 @@ class Account extends AccountBase implements AccountInterface
$Log->resetDescription();
}
- if (is_array($this->accountData->getAccountUsersId())) {
- if (!UserAccounts::addUsersForAccount($this->accountData->getAccountId(), $this->accountData->getAccountUsersId())) {
- $Log->addDescription(_('Error al actualizar los usuarios de la cuenta'));
- $Log->writeLog();
- $Log->resetDescription();
- }
+ if (is_array($this->accountData->getAccountUsersId())
+ && !UserAccounts::addUsersForAccount($this->accountData->getAccountId(), $this->accountData->getAccountUsersId())
+ ) {
+ $Log->addDescription(_('Error al actualizar los usuarios de la cuenta'));
+ $Log->writeLog();
+ $Log->resetDescription();
}
if (is_array($this->accountData->getTags())) {
@@ -415,12 +408,12 @@ class Account extends AccountBase implements AccountInterface
$AccountTags->addTags($this->accountData);
}
- $accountInfo = array('customer_name');
+ $accountInfo = ['customer_name'];
$this->getAccountInfoById($accountInfo);
$Log->setAction(_('Nueva Cuenta'));
$Log->addDetails(Html::strongText(_('Cliente')), $this->cacheParams['customer_name']);
- $Log->addDetails(Html::strongText(_('Cuenta')), $this->accountData->getAccountName() . " (" . $this->accountData->getAccountId() . ")");
+ $Log->addDetails(Html::strongText(_('Cuenta')), sprintf('%s (%s)', $this->accountData->getAccountName(), $this->accountData->getAccountId()));
$Log->writeLog();
Email::sendEmail($Log);
@@ -444,9 +437,10 @@ class Account extends AccountBase implements AccountInterface
$Log = new Log(_('Eliminar Cuenta'));
$Log->addDetails(Html::strongText(_('Cliente')), $this->cacheParams['customer_name']);
- $Log->addDetails(Html::strongText(_('Cuenta')), $this->cacheParams['account_name'] . " (" . $this->accountData->getAccountId() . ")");
+ $Log->addDetails(Html::strongText(_('Cuenta')), sprintf('%s (%s)', $this->accountData->getAccountName(), $this->accountData->getAccountId()));
- $query = 'DELETE FROM accounts WHERE account_id = :id LIMIT 1';
+ $query = /** @lang SQL */
+ 'DELETE FROM accounts WHERE account_id = :id LIMIT 1';
$Data = new QueryData();
$Data->setQuery($query);
@@ -483,7 +477,8 @@ class Account extends AccountBase implements AccountInterface
*/
public function incrementViewCounter()
{
- $query = 'UPDATE accounts SET account_countView = (account_countView + 1) WHERE account_id = :id LIMIT 1';
+ $query = /** @lang SQL */
+ 'UPDATE accounts SET account_countView = (account_countView + 1) WHERE account_id = :id LIMIT 1';
$Data = new QueryData();
$Data->setQuery($query);
@@ -499,7 +494,8 @@ class Account extends AccountBase implements AccountInterface
*/
public function incrementDecryptCounter()
{
- $query = 'UPDATE accounts SET account_countDecrypt = (account_countDecrypt + 1) WHERE account_id = :id LIMIT 1';
+ $query = /** @lang SQL */
+ 'UPDATE accounts SET account_countDecrypt = (account_countDecrypt + 1) WHERE account_id = :id LIMIT 1';
$Data = new QueryData();
$Data->setQuery($query);
@@ -555,12 +551,12 @@ class Account extends AccountBase implements AccountInterface
}
if (strlen($account->account_pass) === 0) {
- $Log->addDescription(_('Clave de cuenta vacía') . ' (' . $account->account_id . ') ' . $account->account_name);
+ $Log->addDescription(sprintf('%s: (%s) %s', _('Clave de cuenta vacía'), $account->account_id, $account->account_name));
continue;
}
if (strlen($account->account_IV) < 32) {
- $Log->addDescription(_('IV de encriptación incorrecto') . ' (' . $account->account_id . ') ' . $account->account_name);
+ $Log->addDescription(sprintf('%s: (%s) %s', _('IV de encriptación incorrecto'), $account->account_id, $account->account_name));
}
$decryptedPass = Crypt::getDecrypt($account->account_pass, $account->account_IV);
@@ -569,13 +565,13 @@ class Account extends AccountBase implements AccountInterface
if ($this->accountData->getAccountPass() === false) {
$errorCount++;
- $Log->addDescription(_('No es posible desencriptar la clave de la cuenta') . ' (' . $account->account_id . ') ' . $account->account_name);
+ $Log->addDescription(sprintf('%s: (%s) %s', _('No es posible desencriptar la clave de la cuenta'), $account->account_id, $account->account_name));
continue;
}
if (!$this->updateAccountPass(true)) {
$errorCount++;
- $Log->addDescription(_('Fallo al actualizar la clave de la cuenta') . ' (' . $this->getAccountId() . ') ' . $account->acchistory_name);
+ $Log->addDescription(sprintf('%s: (%s) %s', _('Fallo al actualizar la clave de la cuenta'), $account->account_id, $account->acchistory_name));
continue;
}
@@ -609,7 +605,8 @@ class Account extends AccountBase implements AccountInterface
*/
protected function getAccountsPassData()
{
- $query = 'SELECT account_id, account_name, account_pass, account_IV FROM accounts';
+ $query = /** @lang SQL */
+ 'SELECT account_id, account_name, account_pass, account_IV FROM accounts';
DB::setReturnArray();
@@ -631,16 +628,18 @@ class Account extends AccountBase implements AccountInterface
$Log = new Log(__FUNCTION__);
// No actualizar el histórico si es por cambio de clave maestra o restauración
- if (!$isMassive && !$isRestore) {
+ if (!$isMassive
+ && !$isRestore
+ && !AccountHistory::addHistory($this->accountData->getAccountId(), false)
+ ) {
// Guardamos una copia de la cuenta en el histórico
- if (!AccountHistory::addHistory($this->accountData->getAccountId(), false)) {
- $Log->addDescription(_('Error al actualizar el historial'));
- $Log->writeLog();
- return false;
- }
+ $Log->addDescription(_('Error al actualizar el historial'));
+ $Log->writeLog();
+ return false;
}
- $query = 'UPDATE accounts SET '
+ $query = /** @lang SQL */
+ 'UPDATE accounts SET '
. 'account_pass = :accountPass,'
. 'account_IV = :accountIV,'
. 'account_userEditId = :accountUserEditId,'
@@ -684,7 +683,8 @@ class Account extends AccountBase implements AccountInterface
*/
public function getAccountPassData()
{
- $query = 'SELECT account_name AS name,'
+ $query = /** @lang SQL */
+ 'SELECT account_name AS name,'
. 'account_userId AS userId,'
. 'account_userGroupId AS groupId,'
. 'account_login AS login,'
@@ -705,11 +705,6 @@ class Account extends AccountBase implements AccountInterface
return false;
}
- $this->accountData->setAccountUserId($queryRes->userId);
- $this->accountData->setAccountUserGroupId($queryRes->groupId);
- $this->accountData->setAccountPass($queryRes->pass);
- $this->accountData->setAccountIV($queryRes->iv);
-
return $queryRes;
}
}
\ No newline at end of file
diff --git a/inc/SP/Account/AccountBase.class.php b/inc/SP/Account/AccountBase.class.php
index be6c8949..5d6d8d92 100644
--- a/inc/SP/Account/AccountBase.class.php
+++ b/inc/SP/Account/AccountBase.class.php
@@ -26,7 +26,8 @@
namespace SP\Account;
use SP\DataModel\AccountData;
-use SP\Mgmt\Groups\Group;
+use SP\DataModel\AccountExtData;
+use SP\DataModel\AccountHistoryData;
use SP\Mgmt\Groups\GroupAccountsUtil;
defined('APP_ROOT') || die(_('No es posible acceder directamente a este archivo'));
@@ -41,7 +42,7 @@ abstract class AccountBase
*/
const CACHE_EXPIRE_TIME = 300;
/**
- * @var AccountData
+ * @var AccountData|AccountExtData|AccountHistoryData
*/
protected $accountData;
/**
@@ -49,21 +50,9 @@ abstract class AccountBase
*/
private $accountParentId;
/**
- * @var string Hash con los datos de la cuenta para verificación de cambios.
- */
- private $accountModHash;
- /**
- * @var int Indica si la cuenta es un registro del hitórico.
+ * @var int Indica si la cuenta es un registro del histórico.
*/
private $accountIsHistory = 0;
- /**
- * @var array Los Ids de los grupos con acceso a la cuenta
- */
- private $cacheUserGroupsId;
- /**
- * @var array Los Ids de los usuarios con acceso a la cuenta
- */
- private $cacheUsersId;
/**
* Constructor
@@ -173,81 +162,8 @@ abstract class AccountBase
return $cacheUserGroups[$accId];
}
-
/**
- * Calcular el hash de los datos de una cuenta.
- * Esta función se utiliza para verificar si los datos de un formulario han sido cambiados
- * con respecto a los guardados
- *
- * @return string con el hash
- */
- public function calcChangesHash()
- {
- $groups = 0;
- $users = 0;
-
- if (is_array($this->accountData->getAccountUserGroupsId())) {
- $groups = implode($this->accountData->getAccountUserGroupsId());
- } elseif (is_array($this->cacheUserGroupsId)) {
- foreach ($this->cacheUserGroupsId as $group) {
- if (is_array($group)) {
- // Ordenar el array para que el hash sea igual
- sort($group, SORT_NUMERIC);
- $groups = implode($group);
- }
- }
- }
-
- if (is_array($this->accountData->getAccountUsersId())) {
- $users = implode($this->accountData->getAccountUsersId());
- } elseif (is_array($this->cacheUsersId)) {
- foreach ($this->cacheUsersId as $user) {
- if (is_array($user)) {
- // Ordenar el array para que el hash sea igual
- sort($user, SORT_NUMERIC);
- $users = implode($user);
- }
- }
- }
-
- if ($this->getAccountModHash()) {
- $hashItems = $this->getAccountModHash() . (int)$users . (int)$groups;
- } else {
- $hashItems = $this->accountData->getAccountName() .
- $this->accountData->getAccountCategoryId() .
- $this->accountData->getAccountCustomerId() .
- $this->accountData->getAccountLogin() .
- $this->accountData->getAccountUrl() .
- $this->accountData->getAccountNotes() .
- implode('', array_keys($this->accountData->getTags())) .
- (int)$this->accountData->getAccountOtherUserEdit() .
- (int)$this->accountData->getAccountOtherGroupEdit() .
- (int)$users .
- (int)$groups;
- }
-
- return md5($hashItems);
- }
-
-
- /**
- * @return string
- */
- public function getAccountModHash()
- {
- return $this->accountModHash;
- }
-
- /**
- * @param string $accountModHash
- */
- public function setAccountModHash($accountModHash)
- {
- $this->accountModHash = $accountModHash;
- }
-
- /**
- * @return AccountData
+ * @return AccountData|AccountExtData
*/
public function getAccountData()
{
diff --git a/inc/SP/Account/AccountHistory.class.php b/inc/SP/Account/AccountHistory.class.php
index 9ddfcae2..a34bcfc0 100644
--- a/inc/SP/Account/AccountHistory.class.php
+++ b/inc/SP/Account/AccountHistory.class.php
@@ -49,11 +49,13 @@ class AccountHistory extends AccountBase implements AccountInterface
/**
* Obtiene el listado del histórico de una cuenta.
*
- * @return false|array Con los registros con id como clave y fecha - usuario como valor
+ * @param $accountId
+ * @return array|false Con los registros con id como clave y fecha - usuario como valor
*/
public static function getAccountList($accountId)
{
- $query = 'SELECT acchistory_id,'
+ $query = /** @lang SQL */
+ 'SELECT acchistory_id,'
. 'acchistory_dateEdit,'
. 'u1.user_login as user_edit,'
. 'u2.user_login as user_add,'
@@ -226,7 +228,8 @@ class AccountHistory extends AccountBase implements AccountInterface
*/
protected function getAccountsPassData()
{
- $query = 'SELECT acchistory_id, acchistory_name, acchistory_pass, acchistory_IV FROM accHistory';
+ $query = /** @lang SQL */
+ 'SELECT acchistory_id, acchistory_name, acchistory_pass, acchistory_IV FROM accHistory';
$Data = new QueryData();
$Data->setQuery($query);
@@ -244,7 +247,8 @@ class AccountHistory extends AccountBase implements AccountInterface
*/
public function checkAccountMPass($id = null)
{
- $query = 'SELECT acchistory_mPassHash ' .
+ $query = /** @lang SQL */
+ 'SELECT acchistory_mPassHash ' .
'FROM accHistory ' .
'WHERE acchistory_id = :id ' .
'AND acchistory_mPassHash = :mPassHash';
@@ -265,7 +269,8 @@ class AccountHistory extends AccountBase implements AccountInterface
*/
public function getAccountPassData()
{
- $query = 'SELECT acchistory_name AS name,'
+ $query = /** @lang SQL */
+ 'SELECT acchistory_name AS name,'
. 'acchistory_userId AS userId,'
. 'acchistory_userGroupId AS groupId,'
. 'acchistory_login AS login,'
@@ -276,7 +281,7 @@ class AccountHistory extends AccountBase implements AccountInterface
$Data = new QueryData();
$Data->setQuery($query);
- $Data->addParam($this->getAccountId(), 'id');
+ $Data->addParam($this->accountData->getAccountId(), 'id');
$queryRes = DB::getResults($Data);
@@ -284,10 +289,10 @@ class AccountHistory extends AccountBase implements AccountInterface
return false;
}
- $this->setAccountUserId($queryRes->userId);
- $this->setAccountUserGroupId($queryRes->groupId);
- $this->setAccountPass($queryRes->pass);
- $this->setAccountIV($queryRes->iv);
+ $this->accountData->setAccountUserId($queryRes->userId);
+ $this->accountData->setAccountUserGroupId($queryRes->groupId);
+ $this->accountData->setAccountPass($queryRes->pass);
+ $this->accountData->setAccountIV($queryRes->iv);
return $queryRes;
}
@@ -301,7 +306,8 @@ class AccountHistory extends AccountBase implements AccountInterface
*/
public function updateAccountPass($id, $newHash)
{
- $query = 'UPDATE accHistory SET '
+ $query = /** @lang SQL */
+ 'UPDATE accHistory SET '
. 'acchistory_pass = :accountPass,'
. 'acchistory_IV = :accountIV,'
. 'acchistory_mPassHash = :newHash '
@@ -327,7 +333,8 @@ class AccountHistory extends AccountBase implements AccountInterface
*/
public function getData()
{
- $query = 'SELECT acchistory_accountId as account_id,'
+ $query = /** @lang SQL */
+ 'SELECT acchistory_accountId as account_id,'
. 'acchistory_customerId as account_customerId,'
. 'acchistory_categoryId as account_categoryId,'
. 'acchistory_name as account_name,'
@@ -363,6 +370,7 @@ class AccountHistory extends AccountBase implements AccountInterface
$Data = new QueryData();
$Data->setQuery($query);
+ $Data->setMapClassName('SP\DataModel\AccountExtData');
$Data->addParam($this->accountData->getAccountId(), 'id');
$queryRes = DB::getResults($Data);
@@ -371,10 +379,7 @@ class AccountHistory extends AccountBase implements AccountInterface
throw new SPException(SPException::SP_CRITICAL, _('No se pudieron obtener los datos de la cuenta'));
}
- $this->accountData->setAccountUserId($queryRes->account_userId);
- $this->accountData->setAccountUserGroupId($queryRes->account_userGroupId);
- $this->accountData->setAccountOtherUserEdit($queryRes->account_otherUserEdit);
- $this->accountData->setAccountOtherGroupEdit($queryRes->account_otherGroupEdit);
+ $this->accountData = $queryRes;
return $queryRes;
}
@@ -386,7 +391,8 @@ class AccountHistory extends AccountBase implements AccountInterface
*/
public function createAccount()
{
- $query = 'INSERT INTO accHistory SET '
+ $query = /** @lang SQL */
+ 'INSERT INTO accHistory SET '
. 'acchistory_accountId = :account_id,'
. 'acchistory_customerId = :accountCustomerId,'
. 'acchistory_categoryId = :accountCategoryId,'
@@ -441,7 +447,8 @@ class AccountHistory extends AccountBase implements AccountInterface
*/
public function deleteAccount()
{
- $query = 'DELETE FROM accHistory WHERE acchistory_id = :id LIMIT 1';
+ $query = /** @lang SQL */
+ 'DELETE FROM accHistory WHERE acchistory_id = :id LIMIT 1';
$Data = new QueryData();
$Data->setQuery($query);
@@ -463,7 +470,8 @@ class AccountHistory extends AccountBase implements AccountInterface
*/
public static function addHistory($id, $isDelete = false)
{
- $query = 'INSERT INTO accHistory '
+ $query = /** @lang SQL */
+ 'INSERT INTO accHistory '
. '(acchistory_accountId,'
. 'acchistory_categoryId,'
. 'acchistory_customerId,'
@@ -527,7 +535,8 @@ class AccountHistory extends AccountBase implements AccountInterface
*/
public static function getAccountIdFromId($historyId)
{
- $query = 'SELECT acchistory_accountId FROM accHistory WHERE acchistory_id = :id LIMIT 1';
+ $query = /** @lang SQL */
+ 'SELECT acchistory_accountId FROM accHistory WHERE acchistory_id = :id LIMIT 1';
$Data = new QueryData();
$Data->setQuery($query);
@@ -550,7 +559,8 @@ class AccountHistory extends AccountBase implements AccountInterface
*/
public static function updateAccountsMPassHash($newHash)
{
- $query = 'UPDATE accHistory SET '
+ $query = /** @lang SQL */
+ 'UPDATE accHistory SET '
. 'acchistory_mPassHash = :newHash '
. 'WHERE acchistory_mPassHash = :oldHash';
diff --git a/inc/SP/Account/AccountSearch.class.php b/inc/SP/Account/AccountSearch.class.php
index ece5702e..01e55416 100644
--- a/inc/SP/Account/AccountSearch.class.php
+++ b/inc/SP/Account/AccountSearch.class.php
@@ -29,6 +29,8 @@ use SP\Config\Config;
use SP\Core\Acl;
use SP\Core\ActionsInterface;
use SP\DataModel\AccountData;
+use SP\DataModel\AccountExtData;
+use SP\DataModel\AccountSearchData;
use SP\Mgmt\Groups\GroupAccountsUtil;
use SP\Mgmt\Groups\GroupUtil;
use SP\Mgmt\Users\User;
@@ -66,7 +68,7 @@ class AccountSearch
*
* @var array
*/
- private $colors = [
+ private static $colors = [
'2196F3',
'03A9F4',
'00BCD4',
@@ -85,6 +87,7 @@ class AccountSearch
'673AB7',
'3F51B5',
];
+
/**
* @var bool
*/
@@ -289,41 +292,6 @@ class AccountSearch
return $this;
}
- /**
- * Obtiene el número de cuentas que un usuario puede ver.
- *
- * @return false|int con el número de registros
- */
- public function getAccountMax()
- {
- $Data = new QueryData();
-
- if (!Session::getUserIsAdminApp() && !Session::getUserIsAdminAcc()) {
- $query = 'SELECT COUNT(DISTINCT account_id) as numacc '
- . 'FROM accounts '
- . 'LEFT JOIN accGroups ON account_id = accgroup_accountId '
- . 'WHERE account_userGroupId = :userGroupId '
- . 'OR account_userId = :userId '
- . 'OR accgroup_groupId = :groupId';
-
- $Data->addParam(Session::getUserGroupId(), 'userGroupId');
- $Data->addParam(Session::getUserGroupId(), 'groupId');
- $Data->addParam(Session::getUserId(), 'userId');
- } else {
- $query = 'SELECT COUNT(*) as numacc FROM accounts';
- }
-
- $Data->setQuery($query);
-
- $queryRes = DB::getResults($Data);
-
- if ($queryRes === false) {
- return false;
- }
-
- return $queryRes->numacc;
- }
-
/**
* Procesar los resultados de la búsqueda y crear la variable que contiene los datos de cada cuenta
* a mostrar.
@@ -339,70 +307,29 @@ class AccountSearch
// Variables de configuración
$maxTextLength = Checks::resultsCardsIsEnabled() ? 40 : 60;
- $favorites = AccountFavorites::getFavorites(Session::getUserId());
-
$accountsData['count'] = self::$queryNumRows;
- foreach ($results as $account) {
+ foreach ($results as $AccountSearchData) {
// Establecer los datos de la cuenta
- $Account = new Account();
- $AccountData = $Account->getAccountData();
- $AccountData->setAccountId($account->account_id);
- $AccountData->setAccountUserId($account->account_userId);
- $AccountData->setAccountUsersId($Account->getUsersAccount());
- $AccountData->setAccountUserGroupId($account->account_userGroupId);
- $AccountData->setAccountUserGroupsId($Account->getGroupsAccount());
- $AccountData->setAccountOtherUserEdit($account->account_otherUserEdit);
- $AccountData->setAccountOtherGroupEdit($account->account_otherGroupEdit);
+ $Account = new Account($AccountSearchData);
+ $AccountSearchData->setUsersId($Account->getUsersAccount());
+ $AccountSearchData->setUserGroupsId($Account->getGroupsAccount());
+ $AccountSearchData->setTags(AccountTags::getTags($Account->getAccountData()));
// Obtener la ACL de la cuenta
$AccountAcl = new AccountAcl();
$AccountAcl->getAcl($Account, Acl::ACTION_ACC_SEARCH);
- $AccountSearchData = new AccountsSearchData();
- $AccountSearchData->setTextMaxLength($maxTextLength);
- $AccountSearchData->setId($account->account_id);
- $AccountSearchData->setName($account->account_name);
- $AccountSearchData->setLogin($account->account_login);
- $AccountSearchData->setCategoryName($account->category_name);
- $AccountSearchData->setCustomerName($account->customer_name);
- $AccountSearchData->setCustomerLink(AccountsSearchData::$wikiEnabled ? Config::getConfig()->getWikiSearchurl() . $account->customer_name : '');
- $AccountSearchData->setColor($this->pickAccountColor($account->account_customerId));
- $AccountSearchData->setUrl($account->account_url);
- $AccountSearchData->setFavorite(in_array($account->account_id, $favorites));
- $AccountSearchData->setTags(AccountTags::getTags($Account->getAccountData()));
- $AccountSearchData->setNumFiles(Checks::fileIsEnabled() ? $account->num_files : 0);
- $AccountSearchData->setShowView($AccountAcl->isShowView());
- $AccountSearchData->setShowViewPass($AccountAcl->isShowViewPass());
- $AccountSearchData->setShowEdit($AccountAcl->isShowEdit());
- $AccountSearchData->setShowCopy($AccountAcl->isShowCopy());
- $AccountSearchData->setShowDelete($AccountAcl->isShowDelete());
+ $AccountSearchItems = new AccountsSearchItem($AccountSearchData);
+ $AccountSearchItems->setTextMaxLength($maxTextLength);
+ $AccountSearchItems->setColor($this->pickAccountColor($AccountSearchData->getAccountCustomerId()));
+ $AccountSearchItems->setShowView($AccountAcl->isShowView());
+ $AccountSearchItems->setShowViewPass($AccountAcl->isShowViewPass());
+ $AccountSearchItems->setShowEdit($AccountAcl->isShowEdit());
+ $AccountSearchItems->setShowCopy($AccountAcl->isShowCopy());
+ $AccountSearchItems->setShowDelete($AccountAcl->isShowDelete());
- // Obtenemos datos si el usuario tiene acceso a los datos de la cuenta
- if ($AccountSearchData->isShow()) {
- $secondaryAccesses = sprintf('(G) %s*
', $account->usergroup_name);
-
- foreach (GroupAccountsUtil::getGroupsInfoForAccount($account->account_id) as $group) {
- $secondaryAccesses .= sprintf('(G) %s
', $group->getUsergroupName());
- }
-
- foreach (UserAccounts::getUsersInfoForAccount($account->account_id) as $user) {
- $secondaryAccesses .= sprintf('(U) %s
', $user->getUserLogin());
- }
-
- $AccountSearchData->setAccesses($secondaryAccesses);
-
- $accountNotes = '';
-
- if ($account->account_notes) {
- $accountNotes = (strlen($account->account_notes) > 300) ? substr($account->account_notes, 0, 300) . "..." : $account->account_notes;
- $accountNotes = nl2br(wordwrap(htmlspecialchars($accountNotes), 50, '
', true));
- }
-
- $AccountSearchData->setNotes($accountNotes);
- }
-
- $accountsData[] = $AccountSearchData;
+ $accountsData[] = $AccountSearchItems;
}
return $accountsData;
@@ -411,7 +338,7 @@ class AccountSearch
/**
* Obtener las cuentas de una búsqueda.
*
- * @return mixed Resultado de la consulta
+ * @return AccountSearchData[] Resultado de la consulta
*/
public function getAccounts()
{
@@ -462,19 +389,16 @@ class AccountSearch
if ($this->categoryId !== 0) {
$arrFilterSelect[] = 'category_id = ?';
-
$Data->addParam($this->categoryId);
}
if ($this->customerId !== 0) {
$arrFilterSelect[] = 'account_customerId = ?';
-
$Data->addParam($this->customerId);
}
if ($this->searchFavorites === true) {
$arrFilterSelect[] = 'accFavorites.accfavorite_userId = ?';
-
$Data->addParam(Session::getUserId());
}
@@ -525,35 +449,11 @@ class AccountSearch
$queryWhere = '';
}
- $query = 'SELECT DISTINCT account_id,
- account_customerId,
- category_name,
- account_name,
- account_login,
- account_url,
- account_notes,
- account_userId,
- account_userGroupId,
- BIN(account_otherUserEdit) AS account_otherUserEdit,
- BIN(account_otherGroupEdit) AS account_otherGroupEdit,
- usergroup_name,
- customer_name,
- count(accfile_id) as num_files
- FROM accounts
- LEFT JOIN accFiles ON account_id = accfile_accountId
- LEFT JOIN categories ON account_categoryId = category_id
- LEFT JOIN usrGroups ug ON account_userGroupId = usergroup_id
- LEFT JOIN customers ON customer_id = account_customerId
- LEFT JOIN accUsers ON accuser_accountId = account_id
- LEFT JOIN accGroups ON accgroup_accountId = account_id
- LEFT JOIN accFavorites ON accfavorite_accountId = account_id
- LEFT JOIN accTags ON acctag_accountId = account_id
- LEFT JOIN tags ON tag_id = acctag_tagId
- ' . $queryWhere . '
- GROUP BY account_id
- ' . $this->getOrderString() . ' ' . $queryLimit;
+ $query = /** @lang SQL */
+ 'SELECT * FROM account_search_v ' . $queryWhere . ' GROUP BY account_id ' . $this->getOrderString() . ' ' . $queryLimit;
$Data->setQuery($query);
+ $Data->setMapClassName('SP\DataModel\AccountSearchData');
// Obtener el número total de cuentas visibles por el usuario
DB::setFullRowCount();
@@ -712,9 +612,9 @@ class AccountSearch
|| !isset($accountColor[$id])
) {
// Se asigna el color de forma aleatoria a cada id
- $color = array_rand($this->colors);
+ $color = array_rand(self::$colors);
- $accountColor[$id] = '#' . $this->colors[$color];
+ $accountColor[$id] = '#' . self::$colors[$color];
Session::setAccountColor($accountColor);
}
diff --git a/inc/SP/Account/AccountTags.class.php b/inc/SP/Account/AccountTags.class.php
index 48e9799d..f49c014c 100644
--- a/inc/SP/Account/AccountTags.class.php
+++ b/inc/SP/Account/AccountTags.class.php
@@ -27,6 +27,7 @@ namespace SP\Account;
use SP\Core\Exceptions\SPException;
use SP\DataModel\AccountData;
+use SP\DataModel\AccountExtData;
use SP\Storage\DB;
use SP\Storage\QueryData;
@@ -47,7 +48,8 @@ class AccountTags
*/
public static function getTags(AccountData $accountData)
{
- $query = 'SELECT tag_id, tag_name
+ $query = /** @lang SQL */
+ 'SELECT tag_id, tag_name
FROM accTags
JOIN tags ON tag_id = acctag_tagId
WHERE acctag_accountId = :id
@@ -55,27 +57,22 @@ class AccountTags
$Data = new QueryData();
$Data->setQuery($query);
+ $Data->setUseKeyPair(true);
$Data->addParam($accountData->getAccountId(), 'id');
DB::setReturnArray();
- $tags = [];
-
- foreach (DB::getResults($Data) as $tag) {
- $tags[$tag->tag_id] = $tag->tag_name;
- }
-
- return $tags;
+ return DB::getResults($Data);
}
/**
* Actualizar las etiquetas de una cuenta
*
- * @param AccountData $accountData
+ * @param AccountExtData $accountData
* @return bool
- * @throws \SP\Core\Exceptions\SPException
+ * @throws SPException
*/
- public function addTags(AccountData $accountData)
+ public function addTags(AccountExtData $accountData)
{
if (!$this->deleteTags($accountData)) {
throw new SPException(SPException::SP_WARNING, _('Error al eliminar las etiquetas de la cuenta'));
@@ -96,7 +93,8 @@ class AccountTags
$values[] = '(?, ?)';
}
- $query = 'INSERT INTO accTags (acctag_accountId, acctag_tagId) VALUES ' . implode(',', $values);
+ $query = /** @lang SQL */
+ 'INSERT INTO accTags (acctag_accountId, acctag_tagId) VALUES ' . implode(',', $values);
$Data->setQuery($query);
@@ -111,7 +109,8 @@ class AccountTags
*/
public function deleteTags(AccountData $accountData)
{
- $query = 'DELETE FROM accTags WHERE acctag_accountId = :id';
+ $query = /** @lang SQL */
+ 'DELETE FROM accTags WHERE acctag_accountId = :id';
$Data = new QueryData();
$Data->setQuery($query);
diff --git a/inc/SP/Account/AccountsSearchData.class.php b/inc/SP/Account/AccountsSearchItem.class.php
similarity index 61%
rename from inc/SP/Account/AccountsSearchData.class.php
rename to inc/SP/Account/AccountsSearchItem.class.php
index b47bcbdf..fd185563 100644
--- a/inc/SP/Account/AccountsSearchData.class.php
+++ b/inc/SP/Account/AccountsSearchItem.class.php
@@ -27,7 +27,11 @@ namespace SP\Account;
defined('APP_ROOT') || die(_('No es posible acceder directamente a este archivo'));
+use SP\Config\Config;
+use SP\Core\Session;
+use SP\DataModel\AccountSearchData;
use SP\Html\Html;
+use SP\Mgmt\Groups\GroupAccountsUtil;
use SP\Util\Checks;
/**
@@ -35,7 +39,7 @@ use SP\Util\Checks;
*
* @package SP\Controller
*/
-class AccountsSearchData
+class AccountsSearchItem
{
/** @var bool */
public static $accountLink = false;
@@ -52,57 +56,51 @@ class AccountsSearchData
/** @var bool */
public static $isDemoMode = false;
- /** @var int */
- private $id = 0;
+ /**
+ * @var AccountSearchData
+ */
+ protected $AccountSearchData;
/** @var string */
- private $name;
+ protected $color;
/** @var string */
- private $login;
- /** @var string */
- private $category_name;
- /** @var string */
- private $customer_name;
- /** @var string */
- private $customer_link;
- /** @var string */
- private $color;
- /** @var string */
- private $link;
- /** @var string */
- private $url;
- /** @var string */
- private $url_short;
+ protected $link;
/** @var bool */
- private $url_islink = false;
- /** @var string */
- private $notes;
- /** @var string */
- private $accesses;
+ protected $url_islink = false;
/** @var string */
- private $numFiles;
+ protected $numFiles;
/** @var bool */
- private $favorite = false;
+ protected $favorite = false;
/** @var bool */
- private $showView = false;
+ protected $showView = false;
/** @var bool */
- private $showViewPass = false;
+ protected $showViewPass = false;
/** @var bool */
- private $showEdit = false;
+ protected $showEdit = false;
/** @var bool */
- private $showCopy = false;
+ protected $showCopy = false;
/** @var bool */
- private $showDelete = false;
+ protected $showDelete = false;
/** @var int */
- private $textMaxLength = 60;
- /** @var array */
- private $tags =[];
+ protected $textMaxLength = 60;
+
+ /**
+ * AccountsSearchItem constructor.
+ *
+ * @param AccountSearchData $AccountSearchData
+ */
+ public function __construct(AccountSearchData $AccountSearchData)
+ {
+ $this->AccountSearchData = $AccountSearchData;
+ }
/**
* @return boolean
*/
public function isFavorite()
{
- return $this->favorite;
+ $favorites = AccountFavorites::getFavorites(Session::getUserId());
+
+ return in_array($this->AccountSearchData->getAccountId(), $favorites);
}
/**
@@ -119,7 +117,7 @@ class AccountsSearchData
public function isShowRequest()
{
return (!$this->isShow()
- && (AccountsSearchData::$requestEnabled || AccountsSearchData::$isDemoMode));
+ && (AccountsSearchItem::$requestEnabled || AccountsSearchItem::$isDemoMode));
}
/**
@@ -159,7 +157,7 @@ class AccountsSearchData
*/
public function isShowOptional()
{
- return (!AccountsSearchData::$optionalActions
+ return (!AccountsSearchItem::$optionalActions
&& ($this->showEdit || $this->showViewPass || $this->showCopy || $this->showDelete));
}
@@ -174,9 +172,9 @@ class AccountsSearchData
/**
* @return string
*/
- public function getUrlShort()
+ public function getShortUrl()
{
- return $this->url_short;
+ return Html::truncate($this->AccountSearchData->getAccountUrl(), $this->textMaxLength);
}
/**
@@ -184,87 +182,23 @@ class AccountsSearchData
*/
public function isUrlIslink()
{
- return $this->url_islink;
- }
-
- /**
- * @return int
- */
- public function getId()
- {
- return $this->id;
- }
-
- /**
- * @param int $id
- */
- public function setId($id)
- {
- $this->id = $id;
+ return preg_match('#^https?://#i', $this->AccountSearchData->getAccountUrl());
}
/**
* @return string
*/
- public function getName()
+ public function getShortLogin()
{
- return $this->name;
- }
-
- /**
- * @param string $name
- */
- public function setName($name)
- {
- $this->name = $name;
+ return Html::truncate($this->AccountSearchData->getAccountLogin(), $this->textMaxLength);
}
/**
* @return string
*/
- public function getLogin()
+ public function getShortCustomerName()
{
- return $this->login;
- }
-
- /**
- * @param string $login
- */
- public function setLogin($login)
- {
- $this->login = Html::truncate($login, $this->textMaxLength);
- }
-
- /**
- * @return string
- */
- public function getCategoryName()
- {
- return $this->category_name;
- }
-
- /**
- * @param string $category_name
- */
- public function setCategoryName($category_name)
- {
- $this->category_name = $category_name;
- }
-
- /**
- * @return string
- */
- public function getCustomerName()
- {
- return $this->customer_name;
- }
-
- /**
- * @param string $customer_name
- */
- public function setCustomerName($customer_name)
- {
- $this->customer_name = Html::truncate($customer_name, $this->textMaxLength);
+ return Html::truncate($this->AccountSearchData->getCustomerName(), $this->textMaxLength);
}
/**
@@ -272,15 +206,7 @@ class AccountsSearchData
*/
public function getCustomerLink()
{
- return $this->customer_link;
- }
-
- /**
- * @param string $customer_link
- */
- public function setCustomerLink($customer_link)
- {
- $this->customer_link = $customer_link;
+ return self::$wikiEnabled ? Config::getConfig()->getWikiSearchurl() . $this->AccountSearchData->getCustomerName() : '';
}
/**
@@ -315,54 +241,22 @@ class AccountsSearchData
$this->link = $link;
}
- /**
- * @return string
- */
- public function getUrl()
- {
- return $this->url;
- }
-
- /**
- * @param string $url
- */
- public function setUrl($url)
- {
- $this->url = $url;
- $this->url_short = Html::truncate($url, $this->textMaxLength);
- $this->url_islink = preg_match('#^https?://#i', $url);
- }
-
- /**
- * @return string
- */
- public function getNotes()
- {
- return $this->notes;
- }
-
- /**
- * @param string $notes
- */
- public function setNotes($notes)
- {
- $this->notes = $notes;
- }
-
/**
* @return string
*/
public function getAccesses()
{
- return $this->accesses;
- }
+ $accesses = sprintf('(G) %s*
', $this->AccountSearchData->getUsergroupName());
- /**
- * @param string $accesses
- */
- public function setAccesses($accesses)
- {
- $this->accesses = $accesses;
+ foreach (GroupAccountsUtil::getGroupsInfoForAccount($this->AccountSearchData->getAccountId()) as $group) {
+ $accesses .= sprintf('(G) %s
', $group->getUsergroupName());
+ }
+
+ foreach (UserAccounts::getUsersInfoForAccount($this->AccountSearchData->getAccountId()) as $user) {
+ $accesses .= sprintf('(U) %s
', $user->getUserLogin());
+ }
+
+ return $accesses;
}
/**
@@ -370,7 +264,7 @@ class AccountsSearchData
*/
public function getNumFiles()
{
- return $this->numFiles;
+ return Checks::fileIsEnabled() ? $this->AccountSearchData->getNumFiles() : 0;
}
/**
@@ -446,18 +340,33 @@ class AccountsSearchData
}
/**
- * @return array
+ * @return AccountSearchData
*/
- public function getTags()
+ public function getAccountSearchData()
{
- return $this->tags;
+ return $this->AccountSearchData;
}
/**
- * @param array $tags
+ * @param AccountSearchData $AccountSearchData
*/
- public function setTags($tags)
+ public function setAccountSearchData($AccountSearchData)
{
- $this->tags = $tags;
+ $this->AccountSearchData = $AccountSearchData;
+ }
+
+ /**
+ * @return string
+ */
+ public function getShortNotes()
+ {
+ $accountNotes = '';
+
+ if ($this->AccountSearchData->getAccountNotes()) {
+ $accountNotes = (strlen($this->AccountSearchData->getAccountNotes()) > 300) ? substr($this->AccountSearchData->getAccountNotes(), 0, 300) . '...' : $this->AccountSearchData->getAccountNotes();
+ $accountNotes = nl2br(wordwrap(htmlspecialchars($accountNotes), 50, '
', true));
+ }
+
+ return $accountNotes;
}
}
\ No newline at end of file
diff --git a/inc/SP/Account/UserAccounts.class.php b/inc/SP/Account/UserAccounts.class.php
index ca853b2d..9cec95a1 100644
--- a/inc/SP/Account/UserAccounts.class.php
+++ b/inc/SP/Account/UserAccounts.class.php
@@ -66,7 +66,7 @@ class UserAccounts
$queryExcluded = '';
// Excluimos los usuarios actuales
- if (is_array($usersId)) {
+ if ($usersId !== null && count($usersId) > 0) {
array_map('intval', $usersId);
$queryExcluded = 'AND accuser_userId NOT IN (' . implode(',', $usersId) . ')';
}
diff --git a/inc/SP/Controller/AccountController.class.php b/inc/SP/Controller/AccountController.class.php
index 909c1e22..a50864d7 100644
--- a/inc/SP/Controller/AccountController.class.php
+++ b/inc/SP/Controller/AccountController.class.php
@@ -37,6 +37,7 @@ use SP\Core\ActionsInterface;
use SP\Core\Crypt;
use SP\Core\Init;
use SP\Core\Template;
+use SP\DataModel\AccountExtData;
use SP\DataModel\CustomFieldData;
use SP\Mgmt\Categories\Category;
use SP\Mgmt\Customers\Customer;
@@ -67,14 +68,14 @@ class AccountController extends ControllerBase implements ActionsInterface
* @var \SP\Account\Account|AccountHistory instancia para el manejo de datos de una cuenta
*/
private $Account;
- /**
- * @var bool indica si se han obtenido datos de la cuenta
- */
- private $gotData = false;
/**
* @var int con el id de la cuenta
*/
private $id;
+ /**
+ * @var AccountExtData
+ */
+ private $AccountData;
/**
* Constructor
@@ -110,7 +111,7 @@ class AccountController extends ControllerBase implements ActionsInterface
*/
private function isGotData()
{
- return $this->gotData;
+ return $this->AccountData !== null;
}
/**
@@ -179,15 +180,14 @@ class AccountController extends ControllerBase implements ActionsInterface
$this->view->assign('accountOtherGroups', GroupAccountsUtil::getGroupsInfoForAccount($this->getId()));
$this->view->assign('accountTags', $this->getAccount()->getAccountData()->getTags());
$this->view->assign('accountTagsJson', Json::getJson(array_keys($this->getAccount()->getAccountData()->getTags())));
- $this->view->assign('changesHash', $this->getAccount()->getAccountModHash());
$this->view->assign('chkUserEdit', $this->getAccount()->getAccountData()->getAccountOtherUserEdit() ? 'checked' : '');
$this->view->assign('chkGroupEdit', $this->getAccount()->getAccountData()->getAccountOtherGroupEdit() ? 'checked' : '');
$this->view->assign('historyData', AccountHistory::getAccountList($this->getAccount()->getAccountParentId()));
- $this->view->assign('isModified', $this->view->accountData->account_dateEdit && $this->view->accountData->account_dateEdit !== '0000-00-00 00:00:00');
+ $this->view->assign('isModified', $this->AccountData->getAccountDateEdit() && $this->AccountData->getAccountDateEdit() !== '0000-00-00 00:00:00');
$this->view->assign('maxFileSize', round(Config::getConfig()->getFilesAllowedSize() / 1024, 1));
$this->view->assign('filesAllowedExts', implode(',', Config::getConfig()->getFilesAllowedExts()));
- $publicLinkUrl = (Checks::publicLinksIsEnabled() && isset($this->view->accountData->publicLink_hash)) ? Init::$WEBURI . '/?h=' . $this->view->accountData->publicLink_hash . '&a=link' : '';
+ $publicLinkUrl = (Checks::publicLinksIsEnabled() && $this->AccountData->getPublicLinkHash() ? Init::$WEBURI . '/?h=' . $this->AccountData->getPublicLinkHash() . '&a=link' : '');
$this->view->assign('publicLinkUrl', $publicLinkUrl);
}
@@ -271,16 +271,13 @@ class AccountController extends ControllerBase implements ActionsInterface
private function setAccountData()
{
try {
- $this->setAccount(new Account(new AccountData($this->getId())));
+ $this->setAccount(new Account(new AccountExtData($this->getId())));
$this->Account->setAccountParentId($this->getId());
+ $this->AccountData = $this->getAccount()->getData();
$this->view->assign('accountId', $this->getId());
- $this->view->assign('accountData', $this->getAccount()->getData());
- $this->view->assign('gotData', true);
-
- $this->setGotData(true);
-
- Session::setLastAcountId($this->getId());
+ $this->view->assign('accountData', $this->AccountData);
+ $this->view->assign('gotData', $this->isGotData());
} catch (SPException $e) {
return false;
}
@@ -295,14 +292,6 @@ class AccountController extends ControllerBase implements ActionsInterface
$this->Account = $account;
}
- /**
- * @param boolean $gotData
- */
- private function setGotData($gotData)
- {
- $this->gotData = $gotData;
- }
-
/**
* Obtener los datos para mostrar el interface para editar cuenta
*/
@@ -424,16 +413,13 @@ class AccountController extends ControllerBase implements ActionsInterface
private function setAccountDataHistory()
{
try {
- $this->setAccount(new AccountHistory(new AccountData($this->getId())));
+ $this->setAccount(new AccountHistory(new AccountExtData($this->getId())));
$this->Account->setAccountParentId(Session::getAccountParentId());
+ $this->AccountData = $this->getAccount()->getData();
$this->view->assign('accountId', $this->getId());
- $this->view->assign('accountData', $this->getAccount()->getData());
- $this->view->assign('gotData', true);
-
- $this->setGotData(true);
-
- Session::setLastAcountId(Session::getAccountParentId());
+ $this->view->assign('accountData', $this->AccountData);
+ $this->view->assign('gotData', $this->isGotData());
} catch (SPException $e) {
return false;
}
diff --git a/inc/SP/Controller/AccountSearchController.class.php b/inc/SP/Controller/AccountSearchController.class.php
index 68c48913..f5be27ff 100644
--- a/inc/SP/Controller/AccountSearchController.class.php
+++ b/inc/SP/Controller/AccountSearchController.class.php
@@ -28,7 +28,7 @@ namespace SP\Controller;
defined('APP_ROOT') || die(_('No es posible acceder directamente a este archivo'));
use SP\Account\AccountSearch;
-use SP\Account\AccountsSearchData;
+use SP\Account\AccountsSearchItem;
use SP\Config\Config;
use SP\Core\ActionsInterface;
use SP\Core\Session;
@@ -177,15 +177,15 @@ class AccountSearchController extends ControllerBase implements ActionsInterface
|| $this->view->searchFavorites
|| $Search->isSortViews());
- AccountsSearchData::$accountLink = Session::getUserPreferences()->isAccountLink();
- AccountsSearchData::$topNavbar = Session::getUserPreferences()->isTopNavbar();
- AccountsSearchData::$optionalActions = Session::getUserPreferences()->isOptionalActions();
- AccountsSearchData::$requestEnabled = Checks::mailrequestIsEnabled();
- AccountsSearchData::$wikiEnabled = Checks::wikiIsEnabled();
- AccountsSearchData::$dokuWikiEnabled = Checks::dokuWikiIsEnabled();
- AccountsSearchData::$isDemoMode = Checks::demoIsEnabled();
+ AccountsSearchItem::$accountLink = Session::getUserPreferences()->isAccountLink();
+ AccountsSearchItem::$topNavbar = Session::getUserPreferences()->isTopNavbar();
+ AccountsSearchItem::$optionalActions = Session::getUserPreferences()->isOptionalActions();
+ AccountsSearchItem::$requestEnabled = Checks::mailrequestIsEnabled();
+ AccountsSearchItem::$wikiEnabled = Checks::wikiIsEnabled();
+ AccountsSearchItem::$dokuWikiEnabled = Checks::dokuWikiIsEnabled();
+ AccountsSearchItem::$isDemoMode = Checks::demoIsEnabled();
- if (AccountsSearchData::$wikiEnabled) {
+ if (AccountsSearchItem::$wikiEnabled) {
$wikiFilter = array_map(function ($value) {
return preg_quote($value);
}, Config::getConfig()->getWikiFilter());
@@ -216,7 +216,7 @@ class AccountSearchController extends ControllerBase implements ActionsInterface
$GridActionView->setName(_('Detalles de Cuenta'));
$GridActionView->setTitle(_('Detalles de Cuenta'));
$GridActionView->setIcon($this->icons->getIconView());
- $GridActionView->setReflectionFilter('\\SP\\Account\\AccountsSearchData', 'isShowView');
+ $GridActionView->setReflectionFilter('\\SP\\Account\\AccountsSearchItem', 'isShowView');
$GridActionView->addData('action-id', self::ACTION_ACC_VIEW);
$GridActionView->addData('action-sk', $this->sk);
$GridActionView->addData('onclick', 'account/show');
@@ -227,7 +227,7 @@ class AccountSearchController extends ControllerBase implements ActionsInterface
$GridActionViewPass->setName(_('Ver Clave'));
$GridActionViewPass->setTitle(_('Ver Clave'));
$GridActionViewPass->setIcon($this->icons->getIconViewPass());
- $GridActionViewPass->setReflectionFilter('\\SP\\Account\\AccountsSearchData', 'isShowViewPass');
+ $GridActionViewPass->setReflectionFilter('\\SP\\Account\\AccountsSearchItem', 'isShowViewPass');
$GridActionViewPass->addData('action-id', self::ACTION_ACC_VIEW_PASS);
$GridActionViewPass->addData('action-sk', $this->sk);
$GridActionViewPass->addData('onclick', 'account/showpass');
@@ -241,7 +241,7 @@ class AccountSearchController extends ControllerBase implements ActionsInterface
$GridActionCopyPass->setName(_('Copiar Clave en Portapapeles'));
$GridActionCopyPass->setTitle(_('Copiar Clave en Portapapeles'));
$GridActionCopyPass->setIcon($ClipboardIcon);
- $GridActionCopyPass->setReflectionFilter('\\SP\\Account\\AccountsSearchData', 'isShowCopyPass');
+ $GridActionCopyPass->setReflectionFilter('\\SP\\Account\\AccountsSearchItem', 'isShowCopyPass');
$GridActionCopyPass->addData('action-id', self::ACTION_ACC_VIEW_PASS);
$GridActionCopyPass->addData('action-sk', $this->sk);
$GridActionCopyPass->addData('useclipboard', '1');
@@ -254,7 +254,7 @@ class AccountSearchController extends ControllerBase implements ActionsInterface
$GridActionEdit->setName(_('Editar Cuenta'));
$GridActionEdit->setTitle(_('Editar Cuenta'));
$GridActionEdit->setIcon($EditIcon);
- $GridActionEdit->setReflectionFilter('\\SP\\Account\\AccountsSearchData', 'isShowEdit');
+ $GridActionEdit->setReflectionFilter('\\SP\\Account\\AccountsSearchItem', 'isShowEdit');
$GridActionEdit->addData('action-id', self::ACTION_ACC_EDIT);
$GridActionEdit->addData('action-sk', $this->sk);
$GridActionEdit->addData('onclick', 'account/edit');
@@ -267,7 +267,7 @@ class AccountSearchController extends ControllerBase implements ActionsInterface
$GridActionCopy->setName(_('Copiar Cuenta'));
$GridActionCopy->setTitle(_('Copiar Cuenta'));
$GridActionCopy->setIcon($CopyIcon);
- $GridActionCopy->setReflectionFilter('\\SP\\Account\\AccountsSearchData', 'isShowCopy');
+ $GridActionCopy->setReflectionFilter('\\SP\\Account\\AccountsSearchItem', 'isShowCopy');
$GridActionCopy->addData('action-id', self::ACTION_ACC_COPY);
$GridActionCopy->addData('action-sk', $this->sk);
$GridActionCopy->addData('onclick', 'account/copy');
@@ -280,7 +280,7 @@ class AccountSearchController extends ControllerBase implements ActionsInterface
$GridActionDel->setName(_('Eliminar Cuenta'));
$GridActionDel->setTitle(_('Eliminar Cuenta'));
$GridActionDel->setIcon($DeleteIcon);
- $GridActionDel->setReflectionFilter('\\SP\\Account\\AccountsSearchData', 'isShowDelete');
+ $GridActionDel->setReflectionFilter('\\SP\\Account\\AccountsSearchItem', 'isShowDelete');
$GridActionDel->addData('action-id', self::ACTION_ACC_DELETE);
$GridActionDel->addData('action-sk', $this->sk);
$GridActionDel->addData('onclick', 'account/delete');
@@ -290,7 +290,7 @@ class AccountSearchController extends ControllerBase implements ActionsInterface
$GridActionRequest->setName(_('Solicitar Modificación'));
$GridActionRequest->setTitle(_('Solicitar Modificación'));
$GridActionRequest->setIcon($this->icons->getIconEmail());
- $GridActionRequest->setReflectionFilter('\\SP\\Account\\AccountsSearchData', 'isShowRequest');
+ $GridActionRequest->setReflectionFilter('\\SP\\Account\\AccountsSearchItem', 'isShowRequest');
$GridActionRequest->addData('action-id', self::ACTION_ACC_REQUEST);
$GridActionRequest->addData('action-sk', $this->sk);
$GridActionRequest->addData('onclick', 'account/request');
@@ -300,7 +300,7 @@ class AccountSearchController extends ControllerBase implements ActionsInterface
$GridActionOptional->setName(_('Más Acciones'));
$GridActionOptional->setTitle(_('Más Acciones'));
$GridActionOptional->setIcon($this->icons->getIconOptional());
- $GridActionOptional->setReflectionFilter('\\SP\\Account\\AccountsSearchData', 'isShowOptional');
+ $GridActionOptional->setReflectionFilter('\\SP\\Account\\AccountsSearchItem', 'isShowOptional');
$GridActionOptional->addData('onclick', 'account/menu');
$GridPager = new DataGridPager();
diff --git a/inc/SP/Controller/MainController.class.php b/inc/SP/Controller/MainController.class.php
index fc774b0f..a9a46b11 100644
--- a/inc/SP/Controller/MainController.class.php
+++ b/inc/SP/Controller/MainController.class.php
@@ -30,10 +30,8 @@ defined('APP_ROOT') || die(_('No es posible acceder directamente a este archivo'
use SP\Config\Config;
use SP\Core\ActionsInterface;
use SP\Core\Init;
-use SP\Core\Installer;
use SP\Core\DiFactory;
use SP\Core\Template;
-use SP\DataModel\InstallData;
use SP\Html\Html;
use SP\Mgmt\PublicLinks\PublicLink;
use SP\Http\Request;
@@ -54,41 +52,51 @@ class MainController extends ControllerBase implements ActionsInterface
/**
* Constructor
*
- * @param $template Template con instancia de plantilla
- * @param null $page El nombre de página para la clase del body
- * @param bool $initialize Si es una inicialización completa
+ * @param $template Template con instancia de plantilla
+ * @param string $page El nombre de página para la clase del body
+ * @param bool $initialize Si es una inicialización completa
*/
- public function __construct(Template $template = null, $page = null, $initialize = true)
+ public function __construct(Template $template = null, $page = '', $initialize = true)
{
parent::__construct($template);
if ($initialize) {
- $this->view->assign('startTime', microtime());
-
- $this->view->addTemplate('header');
- $this->view->addTemplate('body-start');
-
- $this->view->assign('isInstalled', Config::getConfig()->isInstalled());
- $this->view->assign('sk', SessionUtil::getSessionKey(true));
- $this->view->assign('appInfo', Util::getAppInfo());
- $this->view->assign('appVersion', Util::getVersionString());
- $this->view->assign('isDemoMode', Checks::demoIsEnabled());
- $this->view->assign('loggedIn', Init::isLoggedIn());
- $this->view->assign('page', $page);
- $this->view->assign('icons', DiFactory::getTheme()->getIcons());
- $this->view->assign('logoIcon', Init::$WEBURI . '/imgs/logo.png');
- $this->view->assign('logoNoText', Init::$WEBURI . '/imgs/logo.svg');
- $this->view->assign('logo', Init::$WEBURI . '/imgs/logo_full.svg');
- $this->view->assign('httpsEnabled', Checks::httpsEnabled());
-
- // Cargar la clave pública en la sesión
- SessionUtil::loadPublicKey();
-
- $this->getResourcesLinks();
- $this->setResponseHeaders();
+ $this->initialize($page);
}
}
+ /**
+ * Inicializar las variables para la vista principal de la aplicación
+ *
+ * @param string $page Nombre de la vista
+ */
+ protected function initialize($page = '')
+ {
+ $this->view->assign('startTime', microtime());
+
+ $this->view->addTemplate('header');
+ $this->view->addTemplate('body-start');
+
+ $this->view->assign('isInstalled', Config::getConfig()->isInstalled());
+ $this->view->assign('sk', SessionUtil::getSessionKey(true));
+ $this->view->assign('appInfo', Util::getAppInfo());
+ $this->view->assign('appVersion', Util::getVersionString());
+ $this->view->assign('isDemoMode', Checks::demoIsEnabled());
+ $this->view->assign('loggedIn', Init::isLoggedIn());
+ $this->view->assign('page', $page);
+ $this->view->assign('icons', DiFactory::getTheme()->getIcons());
+ $this->view->assign('logoIcon', Init::$WEBURI . '/imgs/logo.png');
+ $this->view->assign('logoNoText', Init::$WEBURI . '/imgs/logo.svg');
+ $this->view->assign('logo', Init::$WEBURI . '/imgs/logo_full.svg');
+ $this->view->assign('httpsEnabled', Checks::httpsEnabled());
+
+ // Cargar la clave pública en la sesión
+ SessionUtil::loadPublicKey();
+
+ $this->getResourcesLinks();
+ $this->setResponseHeaders();
+ }
+
/**
* Obtener los datos para la cabcera de la página
*/
@@ -314,7 +322,7 @@ class MainController extends ControllerBase implements ActionsInterface
$this->view->assign('hash', Request::analyze('h'));
$this->view->assign('time', Request::analyze('t'));
- $this->view->assign('passReset', ($this->view->action === 'passreset' && $this->view->hash && $this->view->time));
+ $this->view->assign('passReset', $this->view->action === 'passreset' && $this->view->hash && $this->view->time);
} else {
$this->view->assign('showLogo', true);
diff --git a/inc/SP/Core/Init.class.php b/inc/SP/Core/Init.class.php
index 63509570..9ea667f4 100644
--- a/inc/SP/Core/Init.class.php
+++ b/inc/SP/Core/Init.class.php
@@ -285,13 +285,13 @@ class Init
/**
* Devuelve un eror utilizando la plantilla de rror.
*
- * @param string $str con la descripción del error
+ * @param string $str con la descripción del error
* @param string $hint opcional, con una ayuda sobre el error
*/
public static function initError($str, $hint = '')
{
$Tpl = new Template();
- $Tpl->append('errors', array('type' => SPException::SP_CRITICAL, 'description' => $str, 'hint' => $hint));
+ $Tpl->append('errors', ['type' => SPException::SP_CRITICAL, 'description' => $str, 'hint' => $hint]);
$Controller = new MainController($Tpl);
$Controller->getError(true);
$Controller->view();
@@ -306,20 +306,20 @@ class Init
private static function setPaths()
{
// Calcular los directorios raíz
- $dir = (defined(__DIR__)) ? __DIR__ : dirname(__FILE__);
+ $dir = defined(__DIR__) ? __DIR__ : dirname(__FILE__);
$dir = substr($dir, 0, strpos($dir, str_replace('\\', '/', __NAMESPACE__)) - 1);
self::$SERVERROOT = substr($dir, 0, strripos($dir, DIRECTORY_SEPARATOR));
- self::$SUBURI = str_replace("\\", '/', substr(realpath($_SERVER["SCRIPT_FILENAME"]), strlen(self::$SERVERROOT)));
+ self::$SUBURI = str_replace("\\", '/', substr(realpath($_SERVER['SCRIPT_FILENAME']), strlen(self::$SERVERROOT)));
$scriptName = isset($_SERVER['REQUEST_URI']) ? $_SERVER['REQUEST_URI'] : '';
- if (substr($scriptName, -1) == '/') {
+ if (substr($scriptName, -1) === '/') {
$scriptName .= 'index.php';
// Asegurar que suburi sigue las mismas reglas que scriptName
- if (substr(self::$SUBURI, -9) != 'index.php') {
- if (substr(self::$SUBURI, -1) != '/') {
+ if (substr(self::$SUBURI, -9) !== 'index.php') {
+ if (substr(self::$SUBURI, -1) !== '/') {
self::$SUBURI .= '/';
}
self::$SUBURI .= 'index.php';
@@ -334,11 +334,11 @@ class Init
self::$WEBROOT = substr($scriptName, 0, $pos);
- if (self::$WEBROOT != '' && self::$WEBROOT[0] !== '/') {
+ if (self::$WEBROOT !== '' && self::$WEBROOT[0] !== '/') {
self::$WEBROOT = '/' . self::$WEBROOT;
}
- $protocol = (isset($_SERVER['HTTPS'])) ? 'https://' : 'http://';
+ $protocol = isset($_SERVER['HTTPS']) ? 'https://' : 'http://';
self::$WEBURI .= $protocol . $_SERVER['HTTP_HOST'] . self::$WEBROOT;
}
@@ -367,7 +367,7 @@ class Init
include_once CONFIG_FILE;
}
- $configVersion = ($oldConfigCheck) ? (int)$CONFIG['version'] : Config::getConfig()->getConfigVersion();
+ $configVersion = $oldConfigCheck ? (int)$CONFIG['version'] : Config::getConfig()->getConfigVersion();
if (Config::getConfig()->isInstalled()
@@ -413,7 +413,7 @@ class Init
$configPerms = decoct(fileperms(self::$SERVERROOT . DIRECTORY_SEPARATOR . 'config') & 0777);
- if (!Checks::checkIsWindows() && $configPerms != "750") {
+ if (!Checks::checkIsWindows() && $configPerms !== "750") {
clearstatcache();
self::initError(_('Los permisos del directorio "/config" son incorrectos'), _('Actual:') . ' ' . $configPerms . ' - ' . _('Necesario: 750'));
}
@@ -429,7 +429,7 @@ class Init
$srcScript = pathinfo($_SERVER['SCRIPT_NAME'], PATHINFO_BASENAME);
$skipInit = array('js.php', 'css.php', 'api.php', 'ajax_getEnvironment.php');
- return (in_array($srcScript, $skipInit));
+ return in_array($srcScript, $skipInit);
}
/**
@@ -438,7 +438,7 @@ class Init
private static function checkHttps()
{
if (Checks::forceHttpsIsEnabled() && !Checks::httpsEnabled()) {
- $port = ($_SERVER['SERVER_PORT'] != 443) ? ':' . $_SERVER['SERVER_PORT'] : '';
+ $port = ($_SERVER['SERVER_PORT'] !== 443) ? ':' . $_SERVER['SERVER_PORT'] : '';
$fullUrl = 'https://' . $_SERVER['SERVER_NAME'] . $port . $_SERVER['REQUEST_URI'];
header('Location: ' . $fullUrl);
}
@@ -526,8 +526,8 @@ class Init
*/
private static function wrLogoutInfo()
{
- $inactiveTime = round(((time() - Session::getLastActivity()) / 60), 2);
- $totalTime = round(((time() - Session::getStartActivity()) / 60), 2);
+ $inactiveTime = round((time() - Session::getLastActivity()) / 60, 2);
+ $totalTime = round((time() - Session::getStartActivity()) / 60, 2);
$ulogin = Session::getUserLogin();
$Log = new Log(_('Finalizar sesión'));
@@ -553,7 +553,7 @@ class Init
*/
private static function checkDbVersion()
{
- if (self::$SUBURI != '/index.php' || Request::analyze('logout', 0) === 1) {
+ if (self::$SUBURI !== '/index.php' || Request::analyze('logout', 0) === 1) {
return;
}
@@ -655,7 +655,7 @@ class Init
*/
private static function getSessionLifeTime()
{
- if (is_null(Session::getSessionTimeout())) {
+ if (null === Session::getSessionTimeout()) {
Session::setSessionTimeout(Config::getConfig()->getSessionTimeout());
}
@@ -679,20 +679,19 @@ class Init
switch ($action) {
case 'passreset':
$Controller->getPassReset();
- $Controller->view();
break;
case '2fa':
$Controller->get2FA();
- $Controller->view();
break;
case 'link':
$Controller->getPublicLink();
- $Controller->view();
break;
default:
return false;
}
+ $Controller->view();
+
exit();
}
@@ -703,13 +702,7 @@ class Init
*/
public static function isLoggedIn()
{
- if (Session::getUserLogin()
- && Session::get2FApassed()
- ) {
- return true;
- }
-
- return false;
+ return (Session::getUserLogin() && Session::get2FApassed());
}
/**
@@ -728,7 +721,7 @@ class Init
public static function loadClass($class)
{
// Eliminar \\ para las clases con namespace definido
- $class = (strripos($class, '\\')) ? substr($class, strripos($class, '\\') + 1) : $class;
+ $class = strrpos($class, '\\') ? substr($class, strrpos($class, '\\') + 1) : $class;
// Buscar la clase en los directorios de include
foreach (explode(':', get_include_path()) as $includePath) {
@@ -756,8 +749,8 @@ class Init
switch ($action) {
case 'accView':
$itemId = Request::analyze('i');
- $onLoad = 'doAction(' . ActionsInterface::ACTION_ACC_VIEW . ',' . ActionsInterface::ACTION_ACC_SEARCH . ',' . $itemId . ')';
- $Controller->getMain($onLoad);
+// $onLoad = 'doAction(' . ActionsInterface::ACTION_ACC_VIEW . ',' . ActionsInterface::ACTION_ACC_SEARCH . ',' . $itemId . ')';
+ $Controller->getMain();
$Controller->view();
break;
default:
@@ -774,7 +767,7 @@ class Init
*/
public static function microtime_float()
{
- list($usec, $sec) = explode(" ", microtime());
+ list($usec, $sec) = explode(' ', microtime());
return ((float)$usec + (float)$sec);
}
}
\ No newline at end of file
diff --git a/inc/SP/DataModel/AccountData.class.php b/inc/SP/DataModel/AccountData.class.php
index a5347489..60ac16bf 100644
--- a/inc/SP/DataModel/AccountData.class.php
+++ b/inc/SP/DataModel/AccountData.class.php
@@ -40,87 +40,75 @@ class AccountData extends DataModelBase implements JsonSerializable, DataModelIn
/**
* @var int Id de la cuenta.
*/
- private $accountId = 0;
+ public $account_id = 0;
/**
* @var int Id del usuario principal de la cuenta.
*/
- private $accountUserId = 0;
- /**
- * @var array Los Ids de los usuarios secundarios de la cuenta.
- */
- private $accountUsersId = [];
+ public $account_userId = 0;
/**
* @var int Id del grupo principal de la cuenta.
*/
- private $accountUserGroupId = 0;
- /**
- * @var array Los Ids de los grupos secundarios de la cuenta.
- */
- private $accountUserGroupsId = [];
+ public $account_userGroupId = 0;
/**
* @var int Id del usuario que editó la cuenta.
*/
- private $accountUserEditId = 0;
+ public $account_userEditId = 0;
/**
* @var string El nombre de la cuenta.
*/
- private $accountName = '';
+ public $account_name = '';
/**
* @var int Id del cliente de la cuenta.
*/
- private $accountCustomerId = 0;
+ public $account_customerId = 0;
/**
* @var int Id de la categoría de la cuenta.
*/
- private $accountCategoryId = 0;
+ public $account_categoryId = 0;
/**
* @var string El nombre de usuario de la cuenta.
*/
- private $accountLogin = '';
+ public $account_login = '';
/**
* @var string La URL de la cuenta.
*/
- private $accountUrl = '';
+ public $account_url = '';
/**
* @var string La clave de la cuenta.
*/
- private $accountPass = '';
+ public $account_pass = '';
/**
* @var string El vector de inicialización de la cuenta.
*/
- private $accountIV = '';
+ public $account_IV = '';
/**
* @var string Las nosta de la cuenta.
*/
- private $accountNotes = '';
+ public $account_notes = '';
/**
* @var bool Si se permite la edición por los usuarios secundarios.
*/
- private $accountOtherUserEdit = false;
+ public $account_otherUserEdit = false;
/**
* @var bool Si se permita la edición por los grupos secundarios.
*/
- private $accountOtherGroupEdit = false;
+ public $account_otherGroupEdit = false;
/**
* @var int
*/
- private $dateAdd = 0;
+ public $account_dateAdd = 0;
/**
* @var int
*/
- private $dateEdit = 0;
+ public $account_dateEdit = 0;
/**
- * @var bool
+ * @var int
*/
- private $isModify = false;
+ public $account_countView = 0;
/**
- * @var bool
+ * @var int
*/
- private $isDeleted = false;
- /**
- * @var array
- */
- private $tags = [];
+ public $account_countDecrypt = 0;
/**
* AccountData constructor.
@@ -129,71 +117,39 @@ class AccountData extends DataModelBase implements JsonSerializable, DataModelIn
*/
public function __construct($accountId = 0)
{
- $this->accountId = (int)$accountId;
+ $this->account_id = (int)$accountId;
}
/**
* @return int
*/
- public function getDateAdd()
+ public function getAccountDateAdd()
{
- return $this->dateAdd;
+ return $this->account_dateAdd;
}
/**
- * @param int $dateAdd
+ * @param int $account_dateAdd
*/
- public function setDateAdd($dateAdd)
+ public function setAccountDateAdd($account_dateAdd)
{
- $this->dateAdd = (int)$dateAdd;
+ $this->account_dateAdd = (int)$account_dateAdd;
}
/**
* @return int
*/
- public function getDateEdit()
+ public function getAccountDateEdit()
{
- return $this->dateEdit;
+ return $this->account_dateEdit;
}
/**
- * @param int $dateEdit
+ * @param int $account_dateEdit
*/
- public function setDateEdit($dateEdit)
+ public function setAccountDateEdit($account_dateEdit)
{
- $this->dateEdit = (int)$dateEdit;
- }
-
- /**
- * @return boolean
- */
- public function isIsModify()
- {
- return $this->isModify;
- }
-
- /**
- * @param boolean $isModify
- */
- public function setIsModify($isModify)
- {
- $this->isModify = (int)$isModify;
- }
-
- /**
- * @return boolean
- */
- public function isIsDeleted()
- {
- return $this->isDeleted;
- }
-
- /**
- * @param boolean $isDeleted
- */
- public function setIsDeleted($isDeleted)
- {
- $this->isDeleted = (int)$isDeleted;
+ $this->account_dateEdit = (int)$account_dateEdit;
}
/**
@@ -201,15 +157,15 @@ class AccountData extends DataModelBase implements JsonSerializable, DataModelIn
*/
public function getAccountUserEditId()
{
- return $this->accountUserEditId;
+ return $this->account_userEditId;
}
/**
- * @param int $accountUserEditId
+ * @param int $account_userEditId
*/
- public function setAccountUserEditId($accountUserEditId)
+ public function setAccountUserEditId($account_userEditId)
{
- $this->accountUserEditId = (int)$accountUserEditId;
+ $this->account_userEditId = (int)$account_userEditId;
}
/**
@@ -217,15 +173,15 @@ class AccountData extends DataModelBase implements JsonSerializable, DataModelIn
*/
public function getAccountPass()
{
- return $this->accountPass;
+ return $this->account_pass;
}
/**
- * @param string $accountPass
+ * @param string $account_pass
*/
- public function setAccountPass($accountPass)
+ public function setAccountPass($account_pass)
{
- $this->accountPass = $accountPass;
+ $this->account_pass = $account_pass;
}
/**
@@ -233,15 +189,15 @@ class AccountData extends DataModelBase implements JsonSerializable, DataModelIn
*/
public function getAccountIV()
{
- return $this->accountIV;
+ return $this->account_IV;
}
/**
- * @param string $accountIV
+ * @param string $account_IV
*/
- public function setAccountIV($accountIV)
+ public function setAccountIV($account_IV)
{
- $this->accountIV = $accountIV;
+ $this->account_IV = $account_IV;
}
/**
@@ -249,15 +205,15 @@ class AccountData extends DataModelBase implements JsonSerializable, DataModelIn
*/
public function getAccountId()
{
- return $this->accountId;
+ return $this->account_id;
}
/**
- * @param int $accountId
+ * @param int $account_id
*/
- public function setAccountId($accountId)
+ public function setAccountId($account_id)
{
- $this->accountId = (int)$accountId;
+ $this->account_id = (int)$account_id;
}
/**
@@ -265,15 +221,15 @@ class AccountData extends DataModelBase implements JsonSerializable, DataModelIn
*/
public function getAccountUserId()
{
- return $this->accountUserId;
+ return $this->account_userId;
}
/**
- * @param int $accountUserId
+ * @param int $account_userId
*/
- public function setAccountUserId($accountUserId)
+ public function setAccountUserId($account_userId)
{
- $this->accountUserId = (int)$accountUserId;
+ $this->account_userId = (int)$account_userId;
}
/**
@@ -281,15 +237,15 @@ class AccountData extends DataModelBase implements JsonSerializable, DataModelIn
*/
public function getAccountUserGroupId()
{
- return $this->accountUserGroupId;
+ return $this->account_userGroupId;
}
/**
- * @param int $accountUserGroupId
+ * @param int $account_userGroupId
*/
- public function setAccountUserGroupId($accountUserGroupId)
+ public function setAccountUserGroupId($account_userGroupId)
{
- $this->accountUserGroupId = (int)$accountUserGroupId;
+ $this->account_userGroupId = (int)$account_userGroupId;
}
/**
@@ -297,15 +253,15 @@ class AccountData extends DataModelBase implements JsonSerializable, DataModelIn
*/
public function getAccountOtherUserEdit()
{
- return $this->accountOtherUserEdit;
+ return $this->account_otherUserEdit;
}
/**
- * @param bool $accountOtherUserEdit
+ * @param bool $account_otherUserEdit
*/
- public function setAccountOtherUserEdit($accountOtherUserEdit)
+ public function setAccountOtherUserEdit($account_otherUserEdit)
{
- $this->accountOtherUserEdit = (int)$accountOtherUserEdit;
+ $this->account_otherUserEdit = (int)$account_otherUserEdit;
}
/**
@@ -313,47 +269,15 @@ class AccountData extends DataModelBase implements JsonSerializable, DataModelIn
*/
public function getAccountOtherGroupEdit()
{
- return $this->accountOtherGroupEdit;
+ return $this->account_otherGroupEdit;
}
/**
- * @param bool $accountOtherGroupEdit
+ * @param bool $account_otherGroupEdit
*/
- public function setAccountOtherGroupEdit($accountOtherGroupEdit)
+ public function setAccountOtherGroupEdit($account_otherGroupEdit)
{
- $this->accountOtherGroupEdit = (int)$accountOtherGroupEdit;
- }
-
- /**
- * @return array
- */
- public function getAccountUserGroupsId()
- {
- return is_array($this->accountUserGroupsId) ? $this->accountUserGroupsId : [];
- }
-
- /**
- * @param array $accountUserGroupsId
- */
- public function setAccountUserGroupsId($accountUserGroupsId)
- {
- $this->accountUserGroupsId = $accountUserGroupsId;
- }
-
- /**
- * @return array
- */
- public function getAccountUsersId()
- {
- return $this->accountUsersId;
- }
-
- /**
- * @param array $accountUsersId
- */
- public function setAccountUsersId($accountUsersId)
- {
- $this->accountUsersId = $accountUsersId;
+ $this->account_otherGroupEdit = (int)$account_otherGroupEdit;
}
/**
@@ -361,15 +285,15 @@ class AccountData extends DataModelBase implements JsonSerializable, DataModelIn
*/
public function getAccountName()
{
- return $this->accountName;
+ return $this->account_name;
}
/**
- * @param string $accountName
+ * @param string $account_name
*/
- public function setAccountName($accountName)
+ public function setAccountName($account_name)
{
- $this->accountName = $accountName;
+ $this->account_name = $account_name;
}
/**
@@ -377,15 +301,15 @@ class AccountData extends DataModelBase implements JsonSerializable, DataModelIn
*/
public function getAccountCategoryId()
{
- return $this->accountCategoryId;
+ return $this->account_categoryId;
}
/**
- * @param int $accountCategoryId
+ * @param int $account_categoryId
*/
- public function setAccountCategoryId($accountCategoryId)
+ public function setAccountCategoryId($account_categoryId)
{
- $this->accountCategoryId = (int)$accountCategoryId;
+ $this->account_categoryId = (int)$account_categoryId;
}
/**
@@ -393,15 +317,15 @@ class AccountData extends DataModelBase implements JsonSerializable, DataModelIn
*/
public function getAccountCustomerId()
{
- return $this->accountCustomerId;
+ return $this->account_customerId;
}
/**
- * @param int $accountCustomerId
+ * @param int $account_customerId
*/
- public function setAccountCustomerId($accountCustomerId)
+ public function setAccountCustomerId($account_customerId)
{
- $this->accountCustomerId = (int)$accountCustomerId;
+ $this->account_customerId = (int)$account_customerId;
}
/**
@@ -409,15 +333,15 @@ class AccountData extends DataModelBase implements JsonSerializable, DataModelIn
*/
public function getAccountLogin()
{
- return $this->accountLogin;
+ return $this->account_login;
}
/**
- * @param string $accountLogin
+ * @param string $account_login
*/
- public function setAccountLogin($accountLogin)
+ public function setAccountLogin($account_login)
{
- $this->accountLogin = $accountLogin;
+ $this->account_login = $account_login;
}
/**
@@ -425,15 +349,15 @@ class AccountData extends DataModelBase implements JsonSerializable, DataModelIn
*/
public function getAccountUrl()
{
- return $this->accountUrl;
+ return $this->account_url;
}
/**
- * @param string $accountUrl
+ * @param string $account_url
*/
- public function setAccountUrl($accountUrl)
+ public function setAccountUrl($account_url)
{
- $this->accountUrl = $accountUrl;
+ $this->account_url = $account_url;
}
/**
@@ -441,15 +365,15 @@ class AccountData extends DataModelBase implements JsonSerializable, DataModelIn
*/
public function getAccountNotes()
{
- return $this->accountNotes;
+ return $this->account_notes;
}
/**
- * @param string $accountNotes
+ * @param string $account_notes
*/
- public function setAccountNotes($accountNotes)
+ public function setAccountNotes($account_notes)
{
- $this->accountNotes = $accountNotes;
+ $this->account_notes = $account_notes;
}
/**
@@ -469,28 +393,12 @@ class AccountData extends DataModelBase implements JsonSerializable, DataModelIn
return Json::safeJson($data);
}
- /**
- * @return array
- */
- public function getTags()
- {
- return $this->tags;
- }
-
- /**
- * @param array $tags
- */
- public function setTags(array $tags)
- {
- $this->tags = $tags;
- }
-
/**
* @return int
*/
public function getId()
{
- return $this->accountId;
+ return $this->account_id;
}
/**
@@ -498,6 +406,38 @@ class AccountData extends DataModelBase implements JsonSerializable, DataModelIn
*/
public function getName()
{
- return $this->accountName;
+ return $this->account_name;
+ }
+
+ /**
+ * @return int
+ */
+ public function getAccountCountView()
+ {
+ return $this->account_countView;
+ }
+
+ /**
+ * @param int $account_countView
+ */
+ public function setAccountCountView($account_countView)
+ {
+ $this->account_countView = (int)$account_countView;
+ }
+
+ /**
+ * @return int
+ */
+ public function getAccountCountDecrypt()
+ {
+ return $this->account_countDecrypt;
+ }
+
+ /**
+ * @param int $account_countDecrypt
+ */
+ public function setAccountCountDecrypt($account_countDecrypt)
+ {
+ $this->account_countDecrypt = (int)$account_countDecrypt;
}
}
\ No newline at end of file
diff --git a/inc/SP/DataModel/AccountExtData.class.php b/inc/SP/DataModel/AccountExtData.class.php
new file mode 100644
index 00000000..a516b6ce
--- /dev/null
+++ b/inc/SP/DataModel/AccountExtData.class.php
@@ -0,0 +1,206 @@
+.
+ */
+
+namespace SP\DataModel;
+
+/**
+ * Class AccountExtData
+ *
+ * @package SP\DataModel
+ */
+class AccountExtData extends AccountData
+{
+ /**
+ * @var array Los Ids de los usuarios secundarios de la cuenta.
+ */
+ public $usersId = [];
+ /**
+ * @var array Los Ids de los grupos secundarios de la cuenta.
+ */
+ public $userGroupsId = [];
+ /**
+ * @var array
+ */
+ public $tags = [];
+ /**
+ * @var string
+ */
+ public $category_name = '';
+ /**
+ * @var string
+ */
+ public $customer_name = '';
+ /**
+ * @var string
+ */
+ public $usergroup_name = '';
+ /**
+ * @var string
+ */
+ public $user_name = '';
+ /**
+ * @var string
+ */
+ public $user_login = '';
+ /**
+ * @var string
+ */
+ public $user_editName = '';
+ /**
+ * @var string
+ */
+ public $user_editLogin = '';
+ /**
+ * @var string
+ */
+ public $publicLink_hash = '';
+
+ /**
+ * @return string
+ */
+ public function getUserEditName()
+ {
+ return $this->user_editName;
+ }
+
+ /**
+ * @return string
+ */
+ public function getUserEditLogin()
+ {
+ return $this->user_editLogin;
+ }
+
+ /**
+ * @return string
+ */
+ public function getPublicLinkHash()
+ {
+ return $this->publicLink_hash;
+ }
+
+ /**
+ * @return array
+ */
+ public function getAccountUsersId()
+ {
+ return $this->usersId;
+ }
+
+ /**
+ * @return array
+ */
+ public function getAccountUserGroupsId()
+ {
+ return $this->userGroupsId;
+ }
+
+ /**
+ * @return array
+ */
+ public function getTags()
+ {
+ return $this->tags;
+ }
+
+ /**
+ * @param array $tags
+ */
+ public function setTags(array $tags)
+ {
+ $this->tags = $tags;
+ }
+
+ /**
+ * @return string
+ */
+ public function getCategoryName()
+ {
+ return $this->category_name;
+ }
+
+ /**
+ * @return string
+ */
+ public function getCustomerName()
+ {
+ return $this->customer_name;
+ }
+
+ /**
+ * @return string
+ */
+ public function getUsergroupName()
+ {
+ return $this->usergroup_name;
+ }
+
+ /**
+ * @return string
+ */
+ public function getUserName()
+ {
+ return $this->user_name;
+ }
+
+ /**
+ * @return string
+ */
+ public function getUserLogin()
+ {
+ return $this->user_login;
+ }
+
+ /**
+ * @return array
+ */
+ public function getUsersId()
+ {
+ return $this->usersId;
+ }
+
+ /**
+ * @param array $usersId
+ */
+ public function setUsersId(array $usersId)
+ {
+ $this->usersId = $usersId;
+ }
+
+ /**
+ * @return array
+ */
+ public function getUserGroupsId()
+ {
+ return $this->userGroupsId;
+ }
+
+ /**
+ * @param array $userGroupsId
+ */
+ public function setUserGroupsId(array $userGroupsId)
+ {
+ $this->userGroupsId = $userGroupsId;
+ }
+}
\ No newline at end of file
diff --git a/inc/SP/DataModel/AccountHistoryData.class.php b/inc/SP/DataModel/AccountHistoryData.class.php
new file mode 100644
index 00000000..fbc8b309
--- /dev/null
+++ b/inc/SP/DataModel/AccountHistoryData.class.php
@@ -0,0 +1,74 @@
+.
+ */
+
+namespace SP\DataModel;
+
+/**
+ * Class AccountHistoryData
+ *
+ * @package SP\DataModel
+ */
+class AccountHistoryData extends AccountData
+{
+ /**
+ * @var bool
+ */
+ public $isModify = false;
+ /**
+ * @var bool
+ */
+ public $isDeleted = false;
+
+ /**
+ * @return boolean
+ */
+ public function isIsModify()
+ {
+ return $this->isModify;
+ }
+
+ /**
+ * @param boolean $isModify
+ */
+ public function setIsModify($isModify)
+ {
+ $this->isModify = (int)$isModify;
+ }
+
+ /**
+ * @return boolean
+ */
+ public function isIsDeleted()
+ {
+ return $this->isDeleted;
+ }
+
+ /**
+ * @param boolean $isDeleted
+ */
+ public function setIsDeleted($isDeleted)
+ {
+ $this->isDeleted = (int)$isDeleted;
+ }
+}
\ No newline at end of file
diff --git a/inc/SP/DataModel/AccountSearchData.class.php b/inc/SP/DataModel/AccountSearchData.class.php
new file mode 100644
index 00000000..78176e10
--- /dev/null
+++ b/inc/SP/DataModel/AccountSearchData.class.php
@@ -0,0 +1,54 @@
+.
+ */
+
+namespace SP\DataModel;
+
+/**
+ * Class AccountSearchData
+ *
+ * @package SP\DataModel
+ */
+class AccountSearchData extends AccountExtData
+{
+ /**
+ * @var int
+ */
+ public $num_files = 0;
+
+ /**
+ * @return int
+ */
+ public function getNumFiles()
+ {
+ return $this->num_files;
+ }
+
+ /**
+ * @param int $num_files
+ */
+ public function setNumFiles($num_files)
+ {
+ $this->num_files = (int)$num_files;
+ }
+}
\ No newline at end of file
diff --git a/inc/SP/DataModel/CustomFieldBaseData.class.php b/inc/SP/DataModel/CustomFieldBaseData.class.php
index 72e8ff04..502615eb 100644
--- a/inc/SP/DataModel/CustomFieldBaseData.class.php
+++ b/inc/SP/DataModel/CustomFieldBaseData.class.php
@@ -236,11 +236,11 @@ class CustomFieldBaseData extends DataModelBase
* @return void
* @link http://php.net/manual/en/language.oop5.magic.php#language.oop5.magic.sleep
*/
- function __wakeup()
+ public function __wakeup()
{
// Para realizar la conversión de nombre de propiedades que empiezan por _
foreach (get_object_vars($this) as $name => $value) {
- if (substr($name, 0, 1) === '_') {
+ if ($name[0] === '_') {
$newName = substr($name, 1);
$this->$newName = $value;
}
diff --git a/inc/SP/DataModel/CustomFieldDefData.class.php b/inc/SP/DataModel/CustomFieldDefData.class.php
index d33307bd..ed4fc4cb 100644
--- a/inc/SP/DataModel/CustomFieldDefData.class.php
+++ b/inc/SP/DataModel/CustomFieldDefData.class.php
@@ -172,7 +172,7 @@ class CustomFieldDefData extends CustomFieldBaseData
* @return void
* @link http://php.net/manual/en/language.oop5.magic.php#language.oop5.magic.sleep
*/
- function __wakeup()
+ public function __wakeup()
{
parent::__wakeup();
diff --git a/inc/SP/DataModel/ProfileData.class.php b/inc/SP/DataModel/ProfileData.class.php
index e50ca987..7aa88866 100644
--- a/inc/SP/DataModel/ProfileData.class.php
+++ b/inc/SP/DataModel/ProfileData.class.php
@@ -66,6 +66,10 @@ class ProfileData extends ProfileBaseData
* @var bool
*/
protected $accFiles = false;
+ /**
+ * @var bool
+ */
+ protected $accPrivate = false;
/**
* @var bool
*/
@@ -494,4 +498,20 @@ class ProfileData extends ProfileBaseData
}
}
}
+
+ /**
+ * @return boolean
+ */
+ public function isAccPrivate()
+ {
+ return $this->accPrivate;
+ }
+
+ /**
+ * @param boolean $accPrivate
+ */
+ public function setAccPrivate($accPrivate)
+ {
+ $this->accPrivate = $accPrivate;
+ }
}
\ No newline at end of file
diff --git a/inc/SP/Mgmt/CustomFields/CustomFieldTypes.class.php b/inc/SP/Mgmt/CustomFields/CustomFieldTypes.class.php
index d6f90a24..13a75ff2 100644
--- a/inc/SP/Mgmt/CustomFields/CustomFieldTypes.class.php
+++ b/inc/SP/Mgmt/CustomFields/CustomFieldTypes.class.php
@@ -70,7 +70,7 @@ class CustomFieldTypes
self::TYPE_COLOR => array('color', _('Color'))
);
- if (!is_null($typeId)) {
+ if (null !== $typeId) {
return ($nice === false) ? $types[$typeId][0] : $types[$typeId][1];
}
@@ -94,10 +94,6 @@ class CustomFieldTypes
);
- if (!is_null($moduleId)) {
- return $modules[$moduleId];
- }
-
- return $modules;
+ return (null !== $moduleId) ? $modules[$moduleId] : $modules;
}
}
\ No newline at end of file
diff --git a/inc/SP/Storage/DB.class.php b/inc/SP/Storage/DB.class.php
index e3275b84..d6a30e8b 100644
--- a/inc/SP/Storage/DB.class.php
+++ b/inc/SP/Storage/DB.class.php
@@ -123,7 +123,7 @@ class DB
) {
return $doQuery;
} elseif ($db->numRows === 0) {
- if (self::$retArray){
+ if (self::$retArray) {
self::resetVars();
return [];
} else {
@@ -173,11 +173,7 @@ class DB
if ($isSelect) {
if (!$getRawData) {
$this->numFields = $queryRes->columnCount();
- if ($queryData->getMapClassName()) {
- $this->lastResult = $queryRes->fetchAll(PDO::FETCH_CLASS | PDO::FETCH_PROPS_LATE, $queryData->getMapClassName());
- } else {
- $this->lastResult = $queryRes->fetchAll(PDO::FETCH_OBJ);
- }
+ $this->lastResult = $queryRes->fetchAll();
} else {
return $queryRes;
}
@@ -211,7 +207,7 @@ class DB
$db = DiFactory::getDBStorage()->getConnection();
if (is_array($queryData->getParams())) {
- $sth = $db->prepare($queryData->getQuery());
+ $stmt = $db->prepare($queryData->getQuery());
$paramIndex = 0;
foreach ($queryData->getParams() as $param => $value) {
@@ -221,31 +217,42 @@ class DB
if ($isCount === true
&& count($count) > 0
- && $paramIndex >= $paramMaxIndex) {
+ && $paramIndex >= $paramMaxIndex
+ ) {
continue;
}
if ($param === 'blobcontent') {
- $sth->bindValue($param, $value, PDO::PARAM_LOB);
+ $stmt->bindValue($param, $value, PDO::PARAM_LOB);
} elseif (is_int($value)) {
// error_log("INT: " . $param . " -> " . $value);
- $sth->bindValue($param, $value, PDO::PARAM_INT);
+ $stmt->bindValue($param, $value, PDO::PARAM_INT);
} else {
// error_log("STR: " . $param . " -> " . print_r($value, true));
- $sth->bindValue($param, $value, PDO::PARAM_STR);
+ $stmt->bindValue($param, $value, PDO::PARAM_STR);
}
$paramIndex++;
}
- $sth->execute();
+ $stmt->execute();
} else {
- $sth = $db->query($queryData->getQuery());
+ $stmt = $db->query($queryData->getQuery());
+ }
+
+ if ($queryData->isUseKeyPair() === true) {
+ $stmt->setFetchMode(PDO::FETCH_KEY_PAIR);
+ } elseif (null !== $queryData->getMapClass()) {
+ $stmt->setFetchMode(PDO::FETCH_INTO, $queryData->getMapClass());
+ } elseif ($queryData->getMapClassName()) {
+ $stmt->setFetchMode(PDO::FETCH_CLASS | PDO::FETCH_PROPS_LATE, $queryData->getMapClassName());
+ } else {
+ $stmt->setFetchMode(PDO::FETCH_OBJ);
}
DB::$lastId = $db->lastInsertId();
- return $sth;
+ return $stmt;
} catch (\Exception $e) {
ob_start();
debug_print_backtrace(DEBUG_BACKTRACE_IGNORE_ARGS);
@@ -269,12 +276,13 @@ class DB
return 0;
}
- $patterns = array(
+ $patterns = [
'/(LIMIT|ORDER BY|GROUP BY).*/i',
+ '/\(SELECT .*\)/',
'/SELECT DISTINCT\s([\w_]+),[\s\S]*? FROM/i',
'/SELECT [\w_]+,[\s\S]*? FROM/i',
- );
- $replace = array('', 'SELECT COUNT(DISTINCT \1) FROM', 'SELECT COUNT(*) FROM', '');
+ ];
+ $replace = ['', '','SELECT COUNT(DISTINCT \1) FROM', 'SELECT COUNT(*) FROM', ''];
// preg_match('/SELECT DISTINCT\s([\w_]*),.*\sFROM\s([\w_]*)\s(LEFT|RIGHT|WHERE).*/iU', $queryData->getQuery(), $match);
diff --git a/inc/SP/Storage/QueryData.class.php b/inc/SP/Storage/QueryData.class.php
index e113909e..4d4a9b8a 100644
--- a/inc/SP/Storage/QueryData.class.php
+++ b/inc/SP/Storage/QueryData.class.php
@@ -25,6 +25,8 @@
namespace SP\Storage;
+use SP\DataModel\DataModelBase;
+
/**
* Class QueryData
*
@@ -44,6 +46,14 @@ class QueryData
* @var string
*/
protected $mapClassName = '';
+ /**
+ * @var DataModelBase
+ */
+ protected $mapClass;
+ /**
+ * @var bool
+ */
+ protected $useKeyPair = false;
/**
* @param $value
@@ -51,7 +61,7 @@ class QueryData
*/
public function addParam($value, $name = null)
{
- if (!is_null($name)) {
+ if (null !== $name) {
$this->data[$name] = $value;
} else {
$this->data[] = $value;
@@ -97,4 +107,36 @@ class QueryData
{
$this->mapClassName = $mapClassName;
}
+
+ /**
+ * @return DataModelBase
+ */
+ public function getMapClass()
+ {
+ return $this->mapClass;
+ }
+
+ /**
+ * @param DataModelBase $mapClass
+ */
+ public function setMapClass(DataModelBase $mapClass)
+ {
+ $this->mapClass = $mapClass;
+ }
+
+ /**
+ * @return boolean
+ */
+ public function isUseKeyPair()
+ {
+ return $this->useKeyPair;
+ }
+
+ /**
+ * @param boolean $useKeyPair
+ */
+ public function setUseKeyPair($useKeyPair)
+ {
+ $this->useKeyPair = (bool)$useKeyPair;
+ }
}
\ No newline at end of file
diff --git a/inc/sql/1.3.16100601.sql b/inc/sql/1.3.16100601.sql
index d4c15fdd..23493a71 100644
--- a/inc/sql/1.3.16100601.sql
+++ b/inc/sql/1.3.16100601.sql
@@ -1,5 +1,5 @@
-- To 1.3.16100601
-ALTER TABLE `syspass-dev`.`accHistory`
+ALTER TABLE `accHistory`
CHANGE COLUMN `acchistory_userId` `acchistory_userId` SMALLINT(5) UNSIGNED NOT NULL ,
CHANGE COLUMN `acchistory_userEditId` `acchistory_userEditId` SMALLINT(5) UNSIGNED NOT NULL ,
CHANGE COLUMN `acchistory_customerId` `acchistory_customerId` INT(10) UNSIGNED NOT NULL ,
@@ -9,26 +9,26 @@ ADD INDEX `fk_accHistory_users_id_idx` (`acchistory_userId` ASC, `acchistory_use
ADD INDEX `fk_accHistory_categories_id_idx` (`acchistory_categoryId` ASC),
ADD INDEX `fk_accHistory_customers_id_idx` (`acchistory_customerId` ASC);
-ALTER TABLE `syspass-dev`.`accTags`
+ALTER TABLE `accTags`
CHANGE COLUMN `acctag_accountId` `acctag_accountId` SMALLINT(10) UNSIGNED NOT NULL ,
DROP INDEX `IDX_id` ,
ADD INDEX `IDX_id` (`acctag_accountId` ASC),
ADD INDEX `fk_accTags_tags_id_idx` (`acctag_tagId` ASC);
-ALTER TABLE `syspass-dev`.`accUsers`
+ALTER TABLE `accUsers`
DROP COLUMN `accuser_id`,
CHANGE COLUMN `accuser_accountId` `accuser_accountId` SMALLINT(5) UNSIGNED NOT NULL ,
CHANGE COLUMN `accuser_userId` `accuser_userId` SMALLINT(5) UNSIGNED NOT NULL ,
ADD INDEX `fk_accUsers_users_id_idx` (`accuser_userId` ASC),
DROP PRIMARY KEY;
-ALTER TABLE `syspass-dev`.`accViewLinks`
+ALTER TABLE `accViewLinks`
CHANGE COLUMN `accviewlinks_accountId` `accviewlinks_accountId` SMALLINT(5) UNSIGNED NULL DEFAULT NULL ,
CHANGE COLUMN `accviewlinks_userId` `accviewlinks_userId` SMALLINT(5) UNSIGNED NULL DEFAULT NULL ,
ADD INDEX `fk_accViewLinks_account_idx` (`accviewlinks_accountId` ASC),
ADD INDEX `fk_accViewLinks_user_id_idx` (`accviewlinks_userId` ASC);
-ALTER TABLE `syspass-dev`.`accounts`
+ALTER TABLE `accounts`
CHANGE COLUMN `account_id` `account_id` SMALLINT(5) UNSIGNED NOT NULL ,
CHANGE COLUMN `account_userId` `account_userId` SMALLINT(5) UNSIGNED NOT NULL ,
CHANGE COLUMN `account_userEditId` `account_userEditId` SMALLINT(5) UNSIGNED NOT NULL ,
@@ -36,16 +36,16 @@ CHANGE COLUMN `account_categoryId` `account_categoryId` SMALLINT(3) UNSIGNED NOT
CHANGE COLUMN `account_dateEdit` `account_dateEdit` DATETIME NULL DEFAULT NULL ,
ADD INDEX `fk_accounts_user_id_idx` (`account_userId` ASC, `account_userEditId` ASC);
-ALTER TABLE `syspass-dev`.`authTokens`
+ALTER TABLE `authTokens`
CHANGE COLUMN `authtoken_userId` `authtoken_userId` SMALLINT(5) UNSIGNED NOT NULL ,
ADD INDEX `fk_authTokens_users_id_idx` (`authtoken_userId` ASC, `authtoken_createdBy` ASC);
-ALTER TABLE `syspass-dev`.`log`
+ALTER TABLE `log`
CHANGE COLUMN `log_userId` `log_userId` SMALLINT(5) UNSIGNED NOT NULL ,
CHANGE COLUMN `log_description` `log_description` TEXT NULL DEFAULT NULL ,
ADD INDEX `fk_log_users_id_idx` (`log_userId` ASC);
-ALTER TABLE `syspass-dev`.`usrData`
+ALTER TABLE `usrData`
CHANGE COLUMN `user_groupId` `user_groupId` SMALLINT(3) UNSIGNED NOT NULL ,
CHANGE COLUMN `user_secGroupId` `user_secGroupId` SMALLINT(3) UNSIGNED NULL DEFAULT NULL ,
CHANGE COLUMN `user_profileId` `user_profileId` SMALLINT(5) UNSIGNED NOT NULL ,
@@ -56,165 +56,167 @@ CHANGE COLUMN `user_isDisabled` `user_isDisabled` BIT(1) NULL DEFAULT b'0' ,
ADD INDEX `fk_usrData_groups_id_idx` (`user_groupId` ASC),
ADD INDEX `fk_usrData_profiles_id_idx` (`user_profileId` ASC);
-ALTER TABLE `syspass-dev`.`usrPassRecover`
+ALTER TABLE `usrPassRecover`
CHANGE COLUMN `userpassr_used` `userpassr_used` BIT(1) NULL DEFAULT b'0' ;
-ALTER TABLE `syspass-dev`.`usrToGroups`
+ALTER TABLE `usrToGroups`
DROP COLUMN `usertogroup_id`,
CHANGE COLUMN `usertogroup_userId` `usertogroup_userId` SMALLINT(5) UNSIGNED NOT NULL ,
CHANGE COLUMN `usertogroup_groupId` `usertogroup_groupId` SMALLINT(5) UNSIGNED NOT NULL ,
ADD INDEX `fk_usrToGroups_groups_id_idx` (`usertogroup_groupId` ASC),
DROP PRIMARY KEY;
-ALTER TABLE `syspass-dev`.`accFavorites`
+ALTER TABLE `accFavorites`
ADD CONSTRAINT `fk_accFavorites_accounts_id`
FOREIGN KEY (`accfavorite_accountId`)
- REFERENCES `syspass-dev`.`accounts` (`account_id`)
+ REFERENCES `accounts` (`account_id`)
ON DELETE CASCADE
ON UPDATE NO ACTION,
ADD CONSTRAINT `fk_accFavorites_users_id`
FOREIGN KEY (`accfavorite_userId`)
- REFERENCES `syspass-dev`.`usrData` (`user_id`)
+ REFERENCES `usrData` (`user_id`)
ON DELETE CASCADE
ON UPDATE NO ACTION;
-ALTER TABLE `syspass-dev`.`accFiles`
+ALTER TABLE `accFiles`
ADD CONSTRAINT `fk_accFiles_accounts_id`
FOREIGN KEY (`accfile_accountId`)
- REFERENCES `syspass-dev`.`accounts` (`account_id`)
+ REFERENCES `accounts` (`account_id`)
ON DELETE NO ACTION
ON UPDATE NO ACTION;
-ALTER TABLE `syspass-dev`.`accGroups`
+ALTER TABLE `accGroups`
ADD CONSTRAINT `fk_accGroups_accounts_id`
FOREIGN KEY (`accgroup_accountId`)
- REFERENCES `syspass-dev`.`accounts` (`account_id`)
+ REFERENCES `accounts` (`account_id`)
ON DELETE CASCADE
ON UPDATE CASCADE,
ADD CONSTRAINT `fk_accGroups_groups_id`
FOREIGN KEY (`accgroup_groupId`)
- REFERENCES `syspass-dev`.`usrGroups` (`usergroup_id`)
+ REFERENCES `usrGroups` (`usergroup_id`)
ON DELETE CASCADE
ON UPDATE CASCADE;
-ALTER TABLE `syspass-dev`.`accHistory`
+ALTER TABLE `accHistory`
ADD CONSTRAINT `fk_accHistory_users_id`
FOREIGN KEY (`acchistory_userId` , `acchistory_userEditId`)
- REFERENCES `syspass-dev`.`usrData` (`user_id` , `user_id`)
+ REFERENCES `usrData` (`user_id` , `user_id`)
ON DELETE RESTRICT
ON UPDATE RESTRICT,
ADD CONSTRAINT `fk_accHistory_categories_id`
FOREIGN KEY (`acchistory_categoryId`)
- REFERENCES `syspass-dev`.`categories` (`category_id`)
+ REFERENCES `categories` (`category_id`)
ON DELETE RESTRICT
ON UPDATE RESTRICT,
ADD CONSTRAINT `fk_accHistory_customers_id`
FOREIGN KEY (`acchistory_customerId`)
- REFERENCES `syspass-dev`.`customers` (`customer_id`)
+ REFERENCES `customers` (`customer_id`)
ON DELETE RESTRICT
ON UPDATE RESTRICT;
-ALTER TABLE `syspass-dev`.`accTags`
+ALTER TABLE `accTags`
ADD CONSTRAINT `fk_accTags_accounts_id`
FOREIGN KEY (`acctag_accountId`)
- REFERENCES `syspass-dev`.`accounts` (`account_id`)
+ REFERENCES `accounts` (`account_id`)
ON DELETE CASCADE
ON UPDATE CASCADE,
ADD CONSTRAINT `fk_accTags_tags_id`
FOREIGN KEY (`acctag_tagId`)
- REFERENCES `syspass-dev`.`tags` (`tag_id`)
+ REFERENCES `tags` (`tag_id`)
ON DELETE CASCADE
ON UPDATE CASCADE;
-ALTER TABLE `syspass-dev`.`accUsers`
+ALTER TABLE `accUsers`
ADD CONSTRAINT `fk_accUsers_accounts_id`
FOREIGN KEY (`accuser_accountId`)
- REFERENCES `syspass-dev`.`accounts` (`account_id`)
+ REFERENCES `accounts` (`account_id`)
ON DELETE CASCADE
ON UPDATE CASCADE,
ADD CONSTRAINT `fk_accUsers_users_id`
FOREIGN KEY (`accuser_userId`)
- REFERENCES `syspass-dev`.`usrData` (`user_id`)
+ REFERENCES `usrData` (`user_id`)
ON DELETE CASCADE
ON UPDATE CASCADE;
-ALTER TABLE `syspass-dev`.`accViewLinks`
+ALTER TABLE `accViewLinks`
ADD CONSTRAINT `fk_accViewLinks_account_id`
FOREIGN KEY (`accviewlinks_accountId`)
- REFERENCES `syspass-dev`.`accounts` (`account_id`)
+ REFERENCES `accounts` (`account_id`)
ON DELETE CASCADE
ON UPDATE CASCADE,
ADD CONSTRAINT `fk_accViewLinks_user_id`
FOREIGN KEY (`accviewlinks_userId`)
- REFERENCES `syspass-dev`.`usrData` (`user_id`)
+ REFERENCES `usrData` (`user_id`)
ON DELETE NO ACTION
ON UPDATE NO ACTION;
-ALTER TABLE `syspass-dev`.`accounts`
+ALTER TABLE `accounts`
ADD CONSTRAINT `fk_accounts_categories_id`
FOREIGN KEY (`account_categoryId`)
- REFERENCES `syspass-dev`.`categories` (`category_id`)
+ REFERENCES `categories` (`category_id`)
ON DELETE RESTRICT
ON UPDATE CASCADE,
ADD CONSTRAINT `fk_accounts_user_id`
FOREIGN KEY (`account_userId` , `account_userEditId`)
- REFERENCES `syspass-dev`.`usrData` (`user_id` , `user_id`)
+ REFERENCES `usrData` (`user_id` , `user_id`)
ON DELETE RESTRICT
ON UPDATE RESTRICT,
ADD CONSTRAINT `fk_accounts_customer_id`
FOREIGN KEY (`account_customerId`)
- REFERENCES `syspass-dev`.`customers` (`customer_id`)
+ REFERENCES `customers` (`customer_id`)
ON DELETE RESTRICT
ON UPDATE RESTRICT;
-ALTER TABLE `syspass-dev`.`authTokens`
+ALTER TABLE `authTokens`
ADD CONSTRAINT `fk_authTokens_users_id`
FOREIGN KEY (`authtoken_userId` , `authtoken_createdBy`)
- REFERENCES `syspass-dev`.`usrData` (`user_id` , `user_id`)
+ REFERENCES `usrData` (`user_id` , `user_id`)
ON DELETE CASCADE
ON UPDATE CASCADE;
-ALTER TABLE `syspass-dev`.`customFieldsData`
+ALTER TABLE `customFieldsData`
ADD CONSTRAINT `fk_customFieldsData_def_id`
FOREIGN KEY (`customfielddata_defId`)
- REFERENCES `syspass-dev`.`customFieldsDef` (`customfielddef_id`)
+ REFERENCES `customFieldsDef` (`customfielddef_id`)
ON DELETE NO ACTION
ON UPDATE NO ACTION;
-ALTER TABLE `syspass-dev`.`log`
+ALTER TABLE `log`
ADD CONSTRAINT `fk_log_users_id`
FOREIGN KEY (`log_userId`)
- REFERENCES `syspass-dev`.`usrData` (`user_id`)
+ REFERENCES `usrData` (`user_id`)
ON DELETE RESTRICT
ON UPDATE RESTRICT;
-ALTER TABLE `syspass-dev`.`usrData`
+ALTER TABLE `usrData`
ADD CONSTRAINT `fk_usrData_groups_id`
FOREIGN KEY (`user_groupId`)
- REFERENCES `syspass-dev`.`usrGroups` (`usergroup_id`)
+ REFERENCES `usrGroups` (`usergroup_id`)
ON DELETE RESTRICT
ON UPDATE RESTRICT,
ADD CONSTRAINT `fk_usrData_profiles_id`
FOREIGN KEY (`user_profileId`)
- REFERENCES `syspass-dev`.`usrProfiles` (`userprofile_id`)
+ REFERENCES `usrProfiles` (`userprofile_id`)
ON DELETE RESTRICT
ON UPDATE RESTRICT;
-ALTER TABLE `syspass-dev`.`usrPassRecover`
+ALTER TABLE `usrPassRecover`
ADD CONSTRAINT `fk_usrPassRecover_users`
FOREIGN KEY (`userpassr_userId`)
- REFERENCES `syspass-dev`.`usrData` (`user_id`)
+ REFERENCES `usrData` (`user_id`)
ON DELETE CASCADE
ON UPDATE CASCADE;
-ALTER TABLE `syspass-dev`.`usrToGroups`
+ALTER TABLE `usrToGroups`
ADD CONSTRAINT `fk_usrToGroups_users_id`
FOREIGN KEY (`usertogroup_userId`)
- REFERENCES `syspass-dev`.`usrData` (`user_id`)
+ REFERENCES `usrData` (`user_id`)
ON DELETE CASCADE
ON UPDATE CASCADE,
ADD CONSTRAINT `fk_usrToGroups_groups_id`
FOREIGN KEY (`usertogroup_groupId`)
- REFERENCES `syspass-dev`.`usrGroups` (`usergroup_id`)
+ REFERENCES `usrGroups` (`usergroup_id`)
ON DELETE CASCADE
- ON UPDATE CASCADE;
\ No newline at end of file
+ ON UPDATE CASCADE;
+
+CREATE ALGORITHM=UNDEFINED DEFINER = CURRENT_USER SQL SECURITY DEFINER VIEW `account_search_v` AS select distinct `accounts`.`account_id` AS `account_id`,`accounts`.`account_customerId` AS `account_customerId`,`accounts`.`account_name` AS `account_name`,`accounts`.`account_login` AS `account_login`,`accounts`.`account_url` AS `account_url`,`accounts`.`account_notes` AS `account_notes`,`accounts`.`account_userId` AS `account_userId`,`accounts`.`account_userGroupId` AS `account_userGroupId`,conv(`accounts`.`account_otherUserEdit`,10,2) AS `account_otherUserEdit`,conv(`accounts`.`account_otherGroupEdit`,10,2) AS `account_otherGroupEdit`,`ug`.`usergroup_name` AS `usergroup_name`,`categories`.`category_name` AS `category_name`,`customers`.`customer_name` AS `customer_name`,(select count(0) from `accFiles` where (`accFiles`.`accfile_accountId` = `accounts`.`account_id`)) AS `num_files` from ((((((((`accounts` left join `categories` on((`accounts`.`account_categoryId` = `categories`.`category_id`))) left join `usrGroups` `ug` on((`accounts`.`account_userGroupId` = `ug`.`usergroup_id`))) left join `customers` on((`customers`.`customer_id` = `accounts`.`account_customerId`))) left join `accUsers` on((`accUsers`.`accuser_accountId` = `accounts`.`account_id`))) left join `accGroups` on((`accGroups`.`accgroup_accountId` = `accounts`.`account_id`))) left join `accFavorites` on((`accFavorites`.`accfavorite_accountId` = `accounts`.`account_id`))) left join `accTags` on((`accTags`.`acctag_accountId` = `accounts`.`account_id`))) left join `tags` on((`tags`.`tag_id` = `accTags`.`acctag_tagId`)));
diff --git a/inc/themes/classic/datasearch-grid.inc b/inc/themes/classic/datasearch-grid.inc
index 4b736565..3e67c1d0 100644
--- a/inc/themes/classic/datasearch-grid.inc
+++ b/inc/themes/classic/datasearch-grid.inc
@@ -1,7 +1,7 @@
@@ -14,7 +14,7 @@
getDataHeaderTemplate(); ?>
-
+
getDataPagerTemplate(); ?>
diff --git a/inc/themes/classic/datasearch-header.inc b/inc/themes/classic/datasearch-header.inc
index cee1623e..c62e298e 100644
--- a/inc/themes/classic/datasearch-header.inc
+++ b/inc/themes/classic/datasearch-header.inc
@@ -1,7 +1,7 @@
diff --git a/inc/themes/classic/datasearch-rows.inc b/inc/themes/classic/datasearch-rows.inc
index 843b6ad1..3eab03cf 100644
--- a/inc/themes/classic/datasearch-rows.inc
+++ b/inc/themes/classic/datasearch-rows.inc
@@ -1,7 +1,7 @@
@@ -50,9 +50,9 @@
isUrlIslink()): ?>
getUrlShort(); ?>
+ title="getUrl(); ?>">getShortUrl(); ?>
- getUrlShort(); ?>
+ getShortUrl(); ?>
@@ -80,7 +80,7 @@
getName())): ?>
-
+
diff --git a/inc/themes/material-blue/css/search-grid.css b/inc/themes/material-blue/css/search-grid.css
index 24573fc9..8c801404 100644
--- a/inc/themes/material-blue/css/search-grid.css
+++ b/inc/themes/material-blue/css/search-grid.css
@@ -21,7 +21,7 @@
min-height: 8em;
height: auto;
text-align: left;
- margin: 0 auto 0.2em;
+ margin: 0 auto 0.5em;
color: #696969;
background-color: #fcfcfc;
padding: 0 .5em;
diff --git a/inc/themes/material-blue/css/search-grid.min.css b/inc/themes/material-blue/css/search-grid.min.css
index f31b8932..44d95f6b 100644
--- a/inc/themes/material-blue/css/search-grid.min.css
+++ b/inc/themes/material-blue/css/search-grid.min.css
@@ -1 +1 @@
-#content #data-search .account-info img,#content #data-search .account-actions img{width:24px;height:24px;margin:0 .5em}#content #data-search{text-align:center;padding:.5em 0;width:100%;margin:0 auto}#content #data-search .account-label{display:flex;justify-content:space-between;flex-wrap:wrap;width:100%;min-height:8em;height:auto;text-align:left;margin:0 auto .2em;color:#696969;background-color:#fcfcfc;padding:0 .5em}#content #data-search .account-label .label-row-up,#content #data-search .account-label .label-row-down{display:flex;flex-wrap:wrap;min-height:3em;height:auto;width:100%;padding:.5em 0}#content #data-search .account-label .label-row-down{height:3em}#content #data-search .account-label .label-left{display:flex;flex-wrap:wrap;align-items:center}#content #data-search .account-label .label-right{display:flex;flex-wrap:wrap;width:15em}#content #data-search .account-label .label-right>div{width:15em}#content #data-search .account-label .label-field{width:15em;min-height:3em;height:auto}#content #data-search .account-label .field-customer{width:20em}#content #data-search .account-label .field-name{padding:.3em .2em;color:#b9b9b9;display:none}#content #data-search .account-label .field-text{width:14em;padding:.3em .3em;word-wrap:break-word}#content #data-search .account-label .header .field-name{color:white;font-weight:bold}#content #data-search .account-label .field-text a{color:#4895fa}#content #data-search .account-label .no-link,#content #data-search .account-label .no-link a{color:white;font-weight:bold}#content #data-search .account-info{padding:.5em 0 .5em 0;text-align:left}#content #data-search .account-actions{align-self:baseline;padding:.5em 0;text-align:right;border-top:1px solid #c9c9c9}#content .actions-optional{display:none}#content #data-search .account-spacer{float:left;clear:left;height:2em;width:20%}#content #data-search .tags-box{display:inline-block}#content #data-search .tags-box span.tag{cursor:pointer}@media screen and (max-width:1000px){#content #data-search .account-label .label-field{width:100%}#content #data-search .account-label .field-name{display:block;text-align:left;border-bottom:1px solid #d9d9d9}#content #data-search .account-label .label-right,#content #data-search .account-label .label-right>div{width:100%}}
\ No newline at end of file
+#content #data-search .account-info img,#content #data-search .account-actions img{width:24px;height:24px;margin:0 .5em}#content #data-search{text-align:center;padding:.5em 0;width:100%;margin:0 auto}#content #data-search .account-label{display:flex;justify-content:space-between;flex-wrap:wrap;width:100%;min-height:8em;height:auto;text-align:left;margin:0 auto .5em;color:#696969;background-color:#fcfcfc;padding:0 .5em}#content #data-search .account-label .label-row-up,#content #data-search .account-label .label-row-down{display:flex;flex-wrap:wrap;min-height:3em;height:auto;width:100%;padding:.5em 0}#content #data-search .account-label .label-row-down{height:3em}#content #data-search .account-label .label-left{display:flex;flex-wrap:wrap;align-items:center}#content #data-search .account-label .label-right{display:flex;flex-wrap:wrap;width:15em}#content #data-search .account-label .label-right>div{width:15em}#content #data-search .account-label .label-field{width:15em;min-height:3em;height:auto}#content #data-search .account-label .field-customer{width:20em}#content #data-search .account-label .field-name{padding:.3em .2em;color:#b9b9b9;display:none}#content #data-search .account-label .field-text{width:14em;padding:.3em .3em;word-wrap:break-word}#content #data-search .account-label .header .field-name{color:white;font-weight:bold}#content #data-search .account-label .field-text a{color:#4895fa}#content #data-search .account-label .no-link,#content #data-search .account-label .no-link a{color:white;font-weight:bold}#content #data-search .account-info{padding:.5em 0 .5em 0;text-align:left}#content #data-search .account-actions{align-self:baseline;padding:.5em 0;text-align:right;border-top:1px solid #c9c9c9}#content .actions-optional{display:none}#content #data-search .account-spacer{float:left;clear:left;height:2em;width:20%}#content #data-search .tags-box{display:inline-block}#content #data-search .tags-box span.tag{cursor:pointer}@media screen and (max-width:1000px){#content #data-search .account-label .label-field{width:100%}#content #data-search .account-label .field-name{display:block;text-align:left;border-bottom:1px solid #d9d9d9}#content #data-search .account-label .label-right,#content #data-search .account-label .label-right>div{width:100%}}
\ No newline at end of file
diff --git a/inc/themes/material-blue/css/styles.css b/inc/themes/material-blue/css/styles.css
index cacd7ee1..110c9d6f 100644
--- a/inc/themes/material-blue/css/styles.css
+++ b/inc/themes/material-blue/css/styles.css
@@ -217,6 +217,7 @@ pre, code, samp, kbd {
/* Action bar */
#container #actions-bar {
+ z-index: 100;
display: flex;
justify-content: space-between;
position: fixed;
@@ -555,9 +556,6 @@ pre, code, samp, kbd {
}
#content .data-header ul {
- display: flex;
- flex-wrap: wrap;
- justify-content: flex-start;
list-style: none;
width: 100%;
margin: 0 0 10px 0;
@@ -565,12 +563,12 @@ pre, code, samp, kbd {
}
#content .data-header li {
- display: inline-flex;
- min-width: 10em;
- padding: .5em;
+ display: inline-block;
+ padding: .2em .5em;
font-weight: bold;
letter-spacing: .2em;
- color: #fff
+ color: #fff;
+ text-align: center;
}
#content .data-header li a {
@@ -585,14 +583,19 @@ pre, code, samp, kbd {
}
#content .data-header-minimal {
- border-bottom: 1px solid #dfdfdf
+ border-bottom: 1px solid #dfdfdf;
}
#content .data-header-minimal ul {
- margin: 0
+ display: flex;
+ flex-wrap: wrap;
+ justify-content: flex-start;
+ margin: 0;
}
#content .data-header-minimal li {
+ display: inline-flex;
+ min-width: 10em;
font-weight: normal;
letter-spacing: normal
}
@@ -613,22 +616,22 @@ pre, code, samp, kbd {
#content .data-rows li {
float: left;
display: block;
- padding: 1.5em .5em;
+ padding: 1em;
color: #696969;
text-align: center;
background-color: #fcfcfc;
- height: 1em
+ min-height: 2em;
}
#content .data-rows li.cell-nodata {
padding: 1em 0;
- height: 2em;
- text-align: left
+ min-height: 2em;
+ text-align: left;
}
#content .data-rows li.cell-actions {
float: right;
- height: 2em;
+ min-height: 2em;
padding: 1em 0;
text-align: center;
background-color: #fcfcfc;
@@ -1148,8 +1151,7 @@ footer img {
.header-grey {
background-color: #607d8b;
color: #fff;
- height: 30px;
- text-align: center
+ height: 2em;
}
.no-background {
diff --git a/inc/themes/material-blue/css/styles.min.css b/inc/themes/material-blue/css/styles.min.css
index 190148fe..bccacace 100644
--- a/inc/themes/material-blue/css/styles.min.css
+++ b/inc/themes/material-blue/css/styles.min.css
@@ -1 +1 @@
-html,body{margin:0;padding:0;text-align:left;background-color:#f5f5f5;color:#555;font-size:12px;font-weight:normal;box-sizing:border-box}*{font-family:Roboto-Regular,Verdana,Tahoma,sans-serif}*,*:before,*:after{box-sizing:inherit}table{font-size:11px;border-spacing:0}#searchbox,#tblAccion{border:1px solid #d9d9d9;background-color:#f9f9f9;background-color:rgba(249,249,249,.5);vertical-align:middle}table th{border-bottom:2px solid transparent;vertical-align:middle}table th .icon{width:24px;height:24px}table tr.odd{background-color:#f9f9f9}table tr.even>td,table tr.odd>td{border-bottom:1px solid #d9d9d9 !important}table tr.even:hover{background-color:#e8ff99}table tr.odd:hover{background-color:#e8ff99}table tr{height:20px}table td{padding:3px}table td.txtCliente{font-weight:bold;text-align:center}form{font-size:11px;border:0 solid #5dd;margin:0}input.inputImg,img.inputImg{background-color:transparent !important;width:24px !important;height:24px !important;border:0;vertical-align:middle;margin:0 .5em}input.txtFile{width:200px}input.txtLong{width:300px}textarea{width:350px;resize:none}select.files{width:250px}input.spinner{width:5em}img{margin:0;padding:0;border:0;cursor:pointer}img.inputImgMini{background-color:transparent !important;width:16px !important;height:16px !important;margin:0 5px 0 5px;border:0;vertical-align:middle}i{cursor:pointer}.altTable{border:0;font-size:10px}.altTable .section{font-size:14px;font-weight:bold}a,a:visited{text-decoration:none;color:rgba(83,109,254,1)}a:hover,a:active,a:focus{text-decoration:none;color:rgba(83,109,254,.6);cursor:pointer}#nojs{width:80%;text-align:center;vertical-align:middle;margin:10px auto;padding:3px;background-color:red;color:white;font-weight:bold;font-size:14px}pre,code,samp,kbd{font-family:Consolas,"Andale Mono WT","Andale Mono","Bitstream Vera Sans Mono","Nimbus Mono L",Monaco,"Courier New",monospace;font-size:1em;direction:ltr;text-align:left;background-color:#fbfaf9;color:#333;box-shadow:inset 0 0 .3em #ccc;border-radius:2px}#wrap{height:auto !important;min-height:100%;width:100%;background-color:#f5f5f5}#wrap-loading{position:fixed;z-index:9999;top:50%;left:50%;padding:1em;background-color:rgba(255,255,255,.8);border-radius:5px;display:none}#container{margin:auto;width:100%}#container.login{padding-top:10em}#container.main{position:absolute;top:0;width:100%;height:auto;background:url("../imgs/logo_full.svg") no-repeat left top transparent;background-size:auto 150px}#container.error,#container.install,#container.passreset{width:100%}#container #header{width:100%;margin-bottom:15px}#container #actions-bar{display:flex;justify-content:space-between;position:fixed;border:0 none;top:0;left:0;width:100%;padding:1em 0;background-color:transparent}#container #actions-bar-icons{flex-grow:1;text-align:center}#container #actions-bar-logo{display:none;padding:0 .5em}#container #actions-bar-logo img{display:inline-block;width:50px;opacity:.75}#container #content{width:95%;margin:10em auto 5em auto}#container #content.public-link{min-height:0;margin:0}#content td.descField,#fancyContainer td.descField{text-align:right;padding-right:20px;width:25%;font-weight:bold;border-right:1px solid #d9d9d9;color:#555}#content td.valField,#fancyContainer td.valField{padding-left:20px;width:100%}#content #resBuscar{margin-bottom:50px}#content #resBuscar img{vertical-align:middle}#content #pageNav{width:100%;margin-top:15px;padding:.5em;vertical-align:middle;font-size:11px;color:#999;border:1px solid #d9d9d9;background-color:#f5f5f5}#content #pageNav img{margin-left:5px;vertical-align:middle}#content #pageNav a{margin-left:5px;font-size:12px;color:#999}#content #pageNav .current{margin-left:5px;color:darkorange}#content #pageNav>div{display:inline-block;width:49%}#content #pageNav #pageNavLeft{text-align:left}#content #pageNav #pageNavRight{text-align:right}#content #title{width:50%;padding:7px;margin:auto;background-color:#d9d9d9;color:#fff;font-size:17px;letter-spacing:.3em;text-align:center}#content #title.titleBlue{background-color:#536dfe;background-image:-webkit-gradient(linear,50% 0,50% 100%,color-stop(20%,#536dfe),color-stop(90%,#536dfe));background-image:-webkit-linear-gradient(#536dfe 20%,#536dfe 90%);background-image:-moz-linear-gradient(#536dfe 20%,#536dfe 90%);background-image:-o-linear-gradient(#536dfe 20%,#536dfe 90%);background-image:linear-gradient(#536dfe 20%,#536dfe 90%);background:#536dfe url("../inc/themes/material-blue/css/images/ui-bg_highlight-hard_100_536DFE_1x100.png") repeat-x scroll 50% 50%}#content #title.titleNormal{background-color:#607d8b;color:#fff}#content .data{width:75%;padding:10px;border:1px solid #c9c9c9;margin:auto;background-color:#f9f9f9}#content .data #history-icon{position:relative;top:5em;right:2em}#content .data td{text-align:left}#content .data td.descField{text-align:right;font-size:12px;font-weight:bold;color:#999}#content .data select{min-width:210px}#content .data #files-wrap{max-height:100px;width:95%;overflow-y:auto;border:1px solid #dfdfdf;padding:.5em;margin:1em 0}#content .data #files-list{list-style-type:none;margin:0;padding:0}#content .data #files-list li{background:#f2f2f2;padding:.5em;font-size:1em;margin-bottom:5px}#content .data #files-list li:hover{background:#fffccd;color:#000}#content .data #files-list li div{display:inline-block}#content .data #files-list li div.files-item-info{width:55%}#content .data #files-list li div.files-item-info img{margin:0 .5em}#content .data #files-list li div.files-item-actions{width:40%;text-align:right}#content .data .dropzone{width:30em;padding:1em;border:2px dashed #009688;text-align:center}#content .data .dropzone img{vertical-align:middle}#content .data .file-upload{display:none}#content .data .account-permissions{width:100%}#content .data .account-permissions fieldset{border:1px solid #c9c9c9;padding:1em}#content .data .account-permissions legend{font-weight:bold;color:#999;padding:.2em 0}#content .data .account-permissions fieldset>span{font-weight:bold;color:#999;padding:.2em 0;display:inline-block;width:100px;text-align:right}#content span.tag{margin:0 3px 3px 0;padding:.2em;background:#5c6bc0;color:#fff;border:0 solid rgba(0,0,0,0);-webkit-border-radius:3px;-moz-border-radius:3px;border-radius:3px}#content .extra-info{margin-top:20px}#content .tblIcon{background:url("../imgs/clock.png") no-repeat transparent}#content #tabs .ui-tabs-nav{position:relative;left:12em;width:90%}#content #tabs fieldset{border:1px solid #c9c9c9}#content #tabs #frmConfig label{float:left}#content .tblConfig{margin-bottom:2em}#content .tblConfig td.descField{width:35%;font-size:11px;font-weight:bold}#content .tblConfig td.rowHeader{padding:5px 0 5px 0;background-color:#f5f5f5;text-align:center;font-weight:bold;border-top:15px solid #f9f9f9;border-bottom:3px solid #a9c1d7;letter-spacing:.5em;color:#696969}#content .tblConfig input.checkbox{width:15px;text-align:left;padding:0}#content .tblConfig .option-disabled{text-align:center;background-color:#fff2d9;color:orange;font-weight:bold}#content #tblAccion{width:100%}#content h2{width:100%;height:1.5em;font-size:18px;color:white;background-color:#a9c1d7;margin:0;padding-top:.1em}#content .section{margin-top:2.5em;border-bottom:1px solid #d9d9d9;text-align:left;font-size:14px;font-weight:bold;color:#045fb4}#content .row_even>td{background-color:#f5f5f5}#content .row_odd>td{background-color:white}#content .data-header ul{display:flex;flex-wrap:wrap;justify-content:flex-start;list-style:none;width:100%;margin:0 0 10px 0;padding:0}#content .data-header li{display:inline-flex;min-width:10em;padding:.5em;font-weight:bold;letter-spacing:.2em;color:#fff}#content .data-header li a{color:#777}#content .data-header li img{float:right;width:24px;height:24px;vertical-align:middle}#content .data-header-minimal{border-bottom:1px solid #dfdfdf}#content .data-header-minimal ul{margin:0}#content .data-header-minimal li{font-weight:normal;letter-spacing:normal}#content .data-header-minimal li a{color:#b9b9b9;padding:.3em .8em}#content .data-rows ul{display:table;list-style:none;width:100%;margin:0 0 10px 0;padding:0}#content .data-rows li{float:left;display:block;padding:1.5em .5em;color:#696969;text-align:center;background-color:#fcfcfc;height:1em}#content .data-rows li.cell-nodata{padding:1em 0;height:2em;text-align:left}#content .data-rows li.cell-actions{float:right;height:2em;padding:1em 0;text-align:center;background-color:#fcfcfc;width:15em}#content .data-rows li.cell-actions:hover{background-color:#fffef0 !important}#content .data-rows li.cell-nodata img,#content .data-rows li.cell-actions img,#content #data-search .account-info img,#content #data-search .account-actions img{width:24px;height:24px;margin:0 .5em}#content .rowSpace>.cellBorder{height:10px;border-top:1px solid #d9d9d9}#content .rowSpace>.cellBlank{height:10px}#content #resEventLog .data{width:100%}#content #resEventLog thead{text-align:center}#content #resEventLog tbody{width:100%;height:500px;overflow:auto}#content #resEventLog td{border-bottom:1px solid #d9d9d9}#content #resEventLog .cell{text-align:center}#content #resEventLog .cell-description{width:60%}#content #searchbox{position:relative;left:8%;width:91%;height:auto;padding:0 1em}#content #searchbox form{display:flex;justify-content:flex-start;align-items:center;text-align:left}#content #searchbox .search-filters>*{margin:0 .5em}#content #searchbox .search-filters .filter-buttons{display:inline-block}#content #searchbox div.chosen-container{margin:0 .2em}#content #searchbox select{min-width:15em}#content .btn-clear{opacity:.35;filter:alpha(opacity=35)}#content .btn-clear:hover{opacity:1;filter:alpha(opacity=100)}#content #tabs.ui-widget-content{border:0;background-color:transparent}#content #tabs .ui-widget-header{background:0;border:0;border-bottom:1px solid #c9c9c9}#content #tabs.ui-widget-content{background:none !important}#content #tabs .tabs-spacer{float:left;height:200px}#content .tabs-bottom .ui-tabs-nav{clear:left;padding:0 .2em .2em .2em}#content .tabs-bottom .ui-tabs-nav li{top:auto;bottom:0;margin:0 .2em 1px 0;border-top:0}#content .tabs-bottom .ui-tabs-nav li.ui-tabs-active{margin-top:-1px;padding-top:1px}#datos{float:left;width:400px;text-align:left;margin-top:10px;color:#b9b9b9}#datos a{color:orange;font-weight:bold;border:0;padding:3px;margin:5px 0 5px 0;display:block;width:40px;text-align:center;background-color:transparent}#datos img{border:0}#resAccion,#resFancyAccion{height:20px;padding:5px;margin:5px;font-weight:bold;font-size:14px}#resAccion span{padding:5px;border:#a9a9a9 1px solid}#fancyView{min-width:250px;text-align:center;padding:15px;line-height:20px;border:#d9d9d9 1px solid;font-size:14px}#fancyView ul{list-style:none}#fancyView.msgError{margin:5px;background-color:#fee8e6;color:#c00;font-weight:bold;border:#fed2ce 1px solid}#fancyView.msgOk{margin:5px;background-color:#ecfde4;color:green;font-weight:bold;border:#dbfdcb 1px solid}#fancyView.msgWarn{margin:5px;background-color:#fff2d9;color:orange;font-weight:bold;border:#ffe5b3 1px solid}#fancyView.msgInfo{margin:5px;background-color:#e9e9e9;color:orange;font-weight:bold;border:#ffe5b3 1px solid}#fancyView.backGrey{background-color:#f2f2f2 !important}#fancyView PRE{text-align:left}#fancyView table{border:0;width:100%;font-size:14px;text-align:left}#fancyView td{border-bottom:#d9d9d9 1px solid}#fancyMsg{min-width:250px;height:150px;background-color:#f5f5f5;font-family:Verdana,Arial;font-size:16px;text-align:center;display:table-cell;vertical-align:middle;font-weight:bold;border:0;line-height:20px;padding:0 15px;border-radius:25px;-moz-border-radius:25px;-webkit-border-radius:25px}#fancyMsg table{border:0;width:100%;font-size:14px;text-align:left}#fancyMsg td{border-bottom:#d9d9d9 1px solid}#fancyMsg.msgError{background:url('../imgs/bg_msg_error.png') white repeat-x;color:#c00}#fancyMsg.msgOk{background:url('../imgs/bg_msg_ok.png') white repeat-x;color:green}#fancyMsg.msgWarn{background:url('../imgs/bg_msg_warn.png') white repeat-x;color:orange}#fancyMsg.msgInfo{background:url('../imgs/bg_msg_info.png') white repeat-x;color:#555}#fancyView a,#fancyMsg a{color:#555}#fancyContainer{padding:0}#fancyContainer>h2{width:100%;font-size:18px;color:white;background-color:#607d8b;margin:0 0 1em 0;padding:.5em 0;line-height:1em}#fancyContainer select{width:220px}#fancyContainer.help{min-height:100px;background-color:#f5f5f5}#fancyContainer.help p{font-size:14px;text-align:justify;line-height:2em}#fancyContainer #resFancyAccion{display:none}#fancyContainer #resCheck{display:inline-block;width:80%;height:4em;padding:1em 0}#debug{float:left;text-align:left}#debuginfo{width:100%;min-height:10em;padding:1em;background-color:lightgoldenrodyellow;text-align:left;line-height:1.5em}#debuginfo H3{text-align:center}.fancyNone{background-color:transparent !important}.fancydata{min-width:400px;border:0;text-align:left;margin:0 .5em}.fancydata .descField{min-width:100px;font-weight:bold}footer{display:flex;justify-content:space-between;position:fixed;bottom:0;z-index:100;width:100%;padding:.5em 0;background-color:#f5f5f5;color:#b9b9b9;font-size:1em;box-shadow:0 -8px 6px -6px #c9c9c9;-webkit-box-shadow:0 -8px 6px -6px #c9c9c9;-moz-box-shadow:0 -8px 6px -6px #c9c9c9}footer,footer .footer-parts{display:flex;justify-content:space-between}footer #footer-left,footer #footer-right{width:50%;margin:0 1em}footer #footer-right{justify-content:flex-end;text-align:right}footer #updates{min-width:10em;text-align:center;cursor:pointer}footer #status{margin:0 1em}footer #status>div{display:inline-block}footer #status .status-info{padding:.5em}footer #session{text-align:left;color:#999;font-size:.8em}footer a,footer a:visited{color:#b9b9b9}footer #project a:hover{color:#a9c1d7;border-bottom:1px solid #a9c1d7}footer #updates a:hover{color:#a9c1d7}footer img{border:0;width:16px;height:16px;vertical-align:middle}.round{border-radius:5px !important;-moz-border-radius:5px !important;-webkit-border-radius:5px !important}.round5{border-radius:5px !important;-moz-border-radius:5px !important;-webkit-border-radius:5px !important}.midround{border-radius:0 0 10px 10px !important;-moz-border-radius:0 0 10px 10px !important;-webkit-border-radius:0 0 10px 10px !important}.midroundup{border-radius:10px 10px 0 0 !important;-moz-border-radius:10px 10px 0 0 !important;-webkit-border-radius:10px 10px 0 0 !important}.fullround{border-radius:50% !important;-moz-border-radius:50% !important;-webkit-border-radius:50% !important}.iconMini{width:16px !important;height:16px !important;vertical-align:middle}#content .error{width:350px;margin:15px;padding:15px;background-color:#f9f9f9;color:orange;border:orange 1px solid;margin:0 auto;text-align:center;font-size:16px;line-height:1.5em}.hide{display:none !important}.btn-checks{padding:5px;margin:.2em 0;width:30em;border-bottom:1px solid #c9c9c9}.shadow{box-shadow:1px 1px 2px #d9d9d9}.noRes{width:60%;margin:15px;padding:15px;background-color:#f9f9f9;color:#a9a9a9;border:#c9c9c9 1px solid;margin:20px auto;text-align:center;font-size:16px}.header-blue{background:#536dfe url("../inc/themes/material-blue/css/images/ui-bg_highlight-hard_100_536DFE_1x100.png") repeat-x scroll 50% 50%}.header-grey{background-color:#607d8b;color:#fff;height:30px;text-align:center}.no-background{background:none !important}.action{max-width:75%;height:4em;margin:.7em auto;text-align:right}.action-in-box{display:inline-block;height:4em;margin:.7em 0;text-align:right}.action ul{list-style:none;margin:0;padding:0;padding-right:2em}.action-in-box ul{list-style:none;margin:0;padding:0}.action li{display:inline-block;width:2em;height:2em;margin-left:3em}.action li img,.action-in-box li img{padding:1em;border:1px solid #d9d9d9;border-radius:3em;background-color:#f9f9f9 !important}.fullWidth{max-width:100% !important}.filterOn{padding:.3em 1em;background-color:#ecfde4;color:green !important;border:#dbfdcb 1px solid !important}.globalOn{padding:.3em 1em;background-color:#fff2d9;color:orange !important;border:#ffe5b3 1px solid !important}.opacity50{filter:alpha(opacity=50);-moz-opacity:.5;-khtml-opacity:.5;opacity:.5}.custom-combobox{position:relative;display:inline-block}.custom-combobox input{width:80%}.custom-combobox-toggle{position:absolute;top:0;bottom:0;margin-left:-1px;padding:0;*height:1.7em;*top:.1em}.custom-combobox-input{margin:0;padding:.3em}.ui-tooltip{background:#ffffa3;color:#555;padding:10px;border-radius:10px;box-shadow:0 0 7px #a9a9a9}.ui-autocomplete,.ui-menu-item{z-index:8050}.fancybox-inner{overflow:visible !important}.passLevel{width:20px;height:20px;display:inline-block;position:relative;top:2px}.passLevel.strongest,.passLevel.strongest:hover{background-color:#ecfde4 !important;color:green;font-weight:bold;border:lightgreen 1px solid}.passLevel.strong,.passLevel.strong:hover{background-color:#e6f2ff !important;color:#64b4f4;font-weight:bold;border:#64b4f4 1px solid}.passLevel.good,.passLevel.good:hover{background-color:#fff2d9 !important;color:orange;font-weight:bold;border:#ffe5b3 1px solid}.passLevel.weak,.passLevel.weak:hover{background-color:#fee8e6 !important;color:#c00;font-weight:bold;border:#fed2ce 1px solid}#alert #alert-text{margin:15px auto;font-size:14px;font-weight:bold}#alert #alert-pass{width:50%;padding:10px;margin:15px auto;border:1px solid #c9c9c9;color:#555;font-weight:bold}.dialog-user-text{padding:.5em;border-bottom:#d9d9d9 1px solid;text-align:center;min-width:200px;color:#d9d9d9}.dialog-pass-text{padding:.5em;border:transparent 1px solid;text-align:center;min-width:200px}.dialog-buttons{text-align:center;padding:.5em;border-top:1px solid #c9c9c9;line-height:2.5em}.dialog-clip-pass-copy{background-color:#ecfde4;color:green;border:#dbfdcb 1px solid}.help-box{background-color:#fff !important;color:#607d8b}.help-box>*{font-weight:bold}.help-text{text-align:justify;line-height:1.5em;margin-top:1em}.tooltip{width:300px;max-width:300px;background-color:#777;color:#fff;z-index:101}.cursor-pointer{cursor:pointer}.password-actions{display:inline-block;width:12em}.password-actions>span,.password-actions i{margin-right:.6em}.custom-input-color{width:3em;height:1em;display:inline-block}.account-pass-image{height:32px;width:auto}.select-box{width:20em}#boxLogin{width:45em;min-height:150px;margin:0 auto;padding:1em;background:url("../imgs/logo_full.svg") no-repeat #fff;background-size:300px auto;background-position:.5em .5em}#boxLogin .error{float:left;width:315px;margin-top:15px;color:orange;border:1px orange solid;margin-left:auto;margin-right:auto}#boxLogin #boxData,#boxLogin #boxButton{margin-top:7em}#boxLogin #boxData{display:inline-block;width:250px;height:100%;min-height:100px;text-align:left;margin-left:13em;background-color:transparent}#boxLogin #boxButton{display:inline-block;text-align:right;margin-left:2em}#boxLogin #boxActions{width:100%;height:1em;margin-top:1em;text-align:right}#boxLogin #boxActions a{color:#c9c9c9}#boxLogout{width:250px;margin:8em auto 0 auto;font-size:14px;text-align:center;color:orange;background:#fff2d9;border:#ffe5b3 1px solid;padding:.5em}#boxUpdated{width:350px;margin:5em auto 5em auto;font-size:14px;text-align:center;color:green;background:#ecfde4;border:#dbfdcb 1px solid;padding:.5em}fieldset.warning{padding:8px;color:#b94a48;background-color:#f2dede;border:1px solid #eed3d7;border-radius:5px}fieldset.warning legend{color:#b94a48 !important}fieldset.warning a{color:#b94a48 !important;font-weight:bold}#actions{width:100%;margin:auto auto 50px;line-height:2em}#actions #logo{display:flex;width:100%;margin-bottom:30px;color:#607d8b;box-shadow:0 8px 6px -6px rgba(83,109,254,.3);-webkit-box-shadow:0 8px 6px -6px rgba(83,109,254,.3);-moz-box-shadow:0 8px 6px -6px rgba(83,109,254,.3);align-items:center;background:url("../imgs/logo_full.svg") left no-repeat;background-size:auto 150px;height:150px}#actions #logo #pageDesc{color:#607d8b;align-self:auto;flex:1 0 auto;text-align:center}#actions #logo #pageDesc h1{font-weight:bold;font-size:24px;letter-spacing:3px}#actions ul.errors{max-width:40%;margin:0 auto;list-style:none;font-size:14px;text-align:left}#actions ul.errors>li{margin:1.5em auto;border-radius:5px;padding:.5em}#actions ul.errors>li.err_critical{color:#b94a48;background:#fed7d7;border:1px solid red}#actions ul.errors>li.err_warning{color:orange;background:#fff2d9;border:#ffe5b3 1px solid}#actions ul.errors>li.err_ok{color:green;background:#ecfde4;border:#dbfdcb 1px solid;font-weight:bold}#actions ul.errors>li>p.hint{background-image:url('../imgs/info.png');background-repeat:no-repeat;color:#777;padding-left:25px;background-position:0 .3em;font-size:12px}#actions form{width:450px;margin:0 auto;text-align:left}#actions form fieldset legend{width:100%;margin-top:1em;color:#fff;font-size:14px;font-weight:bold;text-align:center;background-color:#607d8b;margin-bottom:1em;border-radius:5px;letter-spacing:.2em;padding:.2em 0}#actions div.buttons{margin-top:2em;text-align:center}#whatsNewIcon{text-align:center}#whatsNewIcon img{width:64px;height:64px}#whatsNewIcon h2{display:inline-block;color:#555;font-size:16px}#whatsNew{margin:0 auto;width:500px;background-color:#fffde1;padding:2em;line-height:1.5em;font-size:16px;color:#555;border:1px solid #d9d9d9;margin-bottom:3em;display:none}#whatsNew ul{padding:0;border:0}#whatsNew li{padding-left:37px;background:url("../imgs/arrow-list.png") left center no-repeat;line-height:32px;list-style:none}.no-title .ui-dialog-titlebar{display:none}.ui-dialog{z-index:9999 !important}@media screen and (max-width:1000px){#content #searchbox{position:relative;left:0;width:100%}#content #searchbox form{flex-wrap:wrap}#content #searchbox form>div{width:100%}#content #searchbox input[type=text]{width:100%}footer,footer .footer-parts{justify-content:space-between;flex-wrap:wrap}footer #footer-left,footer #footer-right,footer .footer-parts>div{width:100%}footer .footer-parts>div{padding:.5em 0}}
\ No newline at end of file
+html,body{margin:0;padding:0;text-align:left;background-color:#f5f5f5;color:#555;font-size:12px;font-weight:normal;box-sizing:border-box}*{font-family:Roboto-Regular,Verdana,Tahoma,sans-serif}*,*:before,*:after{box-sizing:inherit}table{font-size:11px;border-spacing:0}#searchbox,#tblAccion{border:1px solid #d9d9d9;background-color:#f9f9f9;background-color:rgba(249,249,249,.5);vertical-align:middle}table th{border-bottom:2px solid transparent;vertical-align:middle}table th .icon{width:24px;height:24px}table tr.odd{background-color:#f9f9f9}table tr.even>td,table tr.odd>td{border-bottom:1px solid #d9d9d9 !important}table tr.even:hover{background-color:#e8ff99}table tr.odd:hover{background-color:#e8ff99}table tr{height:20px}table td{padding:3px}table td.txtCliente{font-weight:bold;text-align:center}form{font-size:11px;border:0 solid #5dd;margin:0}input.inputImg,img.inputImg{background-color:transparent !important;width:24px !important;height:24px !important;border:0;vertical-align:middle;margin:0 .5em}input.txtFile{width:200px}input.txtLong{width:300px}textarea{width:350px;resize:none}select.files{width:250px}input.spinner{width:5em}img{margin:0;padding:0;border:0;cursor:pointer}img.inputImgMini{background-color:transparent !important;width:16px !important;height:16px !important;margin:0 5px 0 5px;border:0;vertical-align:middle}i{cursor:pointer}.altTable{border:0;font-size:10px}.altTable .section{font-size:14px;font-weight:bold}a,a:visited{text-decoration:none;color:rgba(83,109,254,1)}a:hover,a:active,a:focus{text-decoration:none;color:rgba(83,109,254,.6);cursor:pointer}#nojs{width:80%;text-align:center;vertical-align:middle;margin:10px auto;padding:3px;background-color:red;color:white;font-weight:bold;font-size:14px}pre,code,samp,kbd{font-family:Consolas,"Andale Mono WT","Andale Mono","Bitstream Vera Sans Mono","Nimbus Mono L",Monaco,"Courier New",monospace;font-size:1em;direction:ltr;text-align:left;background-color:#fbfaf9;color:#333;box-shadow:inset 0 0 .3em #ccc;border-radius:2px}#wrap{height:auto !important;min-height:100%;width:100%;background-color:#f5f5f5}#wrap-loading{position:fixed;z-index:9999;top:50%;left:50%;padding:1em;background-color:rgba(255,255,255,.8);border-radius:5px;display:none}#container{margin:auto;width:100%}#container.login{padding-top:10em}#container.main{position:absolute;top:0;width:100%;height:auto;background:url("../imgs/logo_full.svg") no-repeat left top transparent;background-size:auto 150px}#container.error,#container.install,#container.passreset{width:100%}#container #header{width:100%;margin-bottom:15px}#container #actions-bar{z-index:100;display:flex;justify-content:space-between;position:fixed;border:0 none;top:0;left:0;width:100%;padding:1em 0;background-color:transparent}#container #actions-bar-icons{flex-grow:1;text-align:center}#container #actions-bar-logo{display:none;padding:0 .5em}#container #actions-bar-logo img{display:inline-block;width:50px;opacity:.75}#container #content{width:95%;margin:10em auto 5em auto}#container #content.public-link{min-height:0;margin:0}#content td.descField,#fancyContainer td.descField{text-align:right;padding-right:20px;width:25%;font-weight:bold;border-right:1px solid #d9d9d9;color:#555}#content td.valField,#fancyContainer td.valField{padding-left:20px;width:100%}#content #resBuscar{margin-bottom:50px}#content #resBuscar img{vertical-align:middle}#content #pageNav{width:100%;margin-top:15px;padding:.5em;vertical-align:middle;font-size:11px;color:#999;border:1px solid #d9d9d9;background-color:#f5f5f5}#content #pageNav img{margin-left:5px;vertical-align:middle}#content #pageNav a{margin-left:5px;font-size:12px;color:#999}#content #pageNav .current{margin-left:5px;color:darkorange}#content #pageNav>div{display:inline-block;width:49%}#content #pageNav #pageNavLeft{text-align:left}#content #pageNav #pageNavRight{text-align:right}#content #title{width:50%;padding:7px;margin:auto;background-color:#d9d9d9;color:#fff;font-size:17px;letter-spacing:.3em;text-align:center}#content #title.titleBlue{background-color:#536dfe;background-image:-webkit-gradient(linear,50% 0,50% 100%,color-stop(20%,#536dfe),color-stop(90%,#536dfe));background-image:-webkit-linear-gradient(#536dfe 20%,#536dfe 90%);background-image:-moz-linear-gradient(#536dfe 20%,#536dfe 90%);background-image:-o-linear-gradient(#536dfe 20%,#536dfe 90%);background-image:linear-gradient(#536dfe 20%,#536dfe 90%);background:#536dfe url("../inc/themes/material-blue/css/images/ui-bg_highlight-hard_100_536DFE_1x100.png") repeat-x scroll 50% 50%}#content #title.titleNormal{background-color:#607d8b;color:#fff}#content .data{width:75%;padding:10px;border:1px solid #c9c9c9;margin:auto;background-color:#f9f9f9}#content .data #history-icon{position:relative;top:5em;right:2em}#content .data td{text-align:left}#content .data td.descField{text-align:right;font-size:12px;font-weight:bold;color:#999}#content .data select{min-width:210px}#content .data #files-wrap{max-height:100px;width:95%;overflow-y:auto;border:1px solid #dfdfdf;padding:.5em;margin:1em 0}#content .data #files-list{list-style-type:none;margin:0;padding:0}#content .data #files-list li{background:#f2f2f2;padding:.5em;font-size:1em;margin-bottom:5px}#content .data #files-list li:hover{background:#fffccd;color:#000}#content .data #files-list li div{display:inline-block}#content .data #files-list li div.files-item-info{width:55%}#content .data #files-list li div.files-item-info img{margin:0 .5em}#content .data #files-list li div.files-item-actions{width:40%;text-align:right}#content .data .dropzone{width:30em;padding:1em;border:2px dashed #009688;text-align:center}#content .data .dropzone img{vertical-align:middle}#content .data .file-upload{display:none}#content .data .account-permissions{width:100%}#content .data .account-permissions fieldset{border:1px solid #c9c9c9;padding:1em}#content .data .account-permissions legend{font-weight:bold;color:#999;padding:.2em 0}#content .data .account-permissions fieldset>span{font-weight:bold;color:#999;padding:.2em 0;display:inline-block;width:100px;text-align:right}#content span.tag{margin:0 3px 3px 0;padding:.2em;background:#5c6bc0;color:#fff;border:0 solid rgba(0,0,0,0);-webkit-border-radius:3px;-moz-border-radius:3px;border-radius:3px}#content .extra-info{margin-top:20px}#content .tblIcon{background:url("../imgs/clock.png") no-repeat transparent}#content #tabs .ui-tabs-nav{position:relative;left:12em;width:90%}#content #tabs fieldset{border:1px solid #c9c9c9}#content #tabs #frmConfig label{float:left}#content .tblConfig{margin-bottom:2em}#content .tblConfig td.descField{width:35%;font-size:11px;font-weight:bold}#content .tblConfig td.rowHeader{padding:5px 0 5px 0;background-color:#f5f5f5;text-align:center;font-weight:bold;border-top:15px solid #f9f9f9;border-bottom:3px solid #a9c1d7;letter-spacing:.5em;color:#696969}#content .tblConfig input.checkbox{width:15px;text-align:left;padding:0}#content .tblConfig .option-disabled{text-align:center;background-color:#fff2d9;color:orange;font-weight:bold}#content #tblAccion{width:100%}#content h2{width:100%;height:1.5em;font-size:18px;color:white;background-color:#a9c1d7;margin:0;padding-top:.1em}#content .section{margin-top:2.5em;border-bottom:1px solid #d9d9d9;text-align:left;font-size:14px;font-weight:bold;color:#045fb4}#content .row_even>td{background-color:#f5f5f5}#content .row_odd>td{background-color:white}#content .data-header ul{list-style:none;width:100%;margin:0 0 10px 0;padding:0}#content .data-header li{display:inline-block;padding:.2em .5em;font-weight:bold;letter-spacing:.2em;color:#fff;text-align:center}#content .data-header li a{color:#777}#content .data-header li img{float:right;width:24px;height:24px;vertical-align:middle}#content .data-header-minimal{border-bottom:1px solid #dfdfdf}#content .data-header-minimal ul{display:flex;flex-wrap:wrap;justify-content:flex-start;margin:0}#content .data-header-minimal li{display:inline-flex;min-width:10em;font-weight:normal;letter-spacing:normal}#content .data-header-minimal li a{color:#b9b9b9;padding:.3em .8em}#content .data-rows ul{display:table;list-style:none;width:100%;margin:0 0 10px 0;padding:0}#content .data-rows li{float:left;display:block;padding:1em;color:#696969;text-align:center;background-color:#fcfcfc;min-height:2em}#content .data-rows li.cell-nodata{padding:1em 0;min-height:2em;text-align:left}#content .data-rows li.cell-actions{float:right;min-height:2em;padding:1em 0;text-align:center;background-color:#fcfcfc;width:15em}#content .data-rows li.cell-actions:hover{background-color:#fffef0 !important}#content .data-rows li.cell-nodata img,#content .data-rows li.cell-actions img,#content #data-search .account-info img,#content #data-search .account-actions img{width:24px;height:24px;margin:0 .5em}#content .rowSpace>.cellBorder{height:10px;border-top:1px solid #d9d9d9}#content .rowSpace>.cellBlank{height:10px}#content #resEventLog .data{width:100%}#content #resEventLog thead{text-align:center}#content #resEventLog tbody{width:100%;height:500px;overflow:auto}#content #resEventLog td{border-bottom:1px solid #d9d9d9}#content #resEventLog .cell{text-align:center}#content #resEventLog .cell-description{width:60%}#content #searchbox{position:relative;left:8%;width:91%;height:auto;padding:0 1em}#content #searchbox form{display:flex;justify-content:flex-start;align-items:center;text-align:left}#content #searchbox .search-filters>*{margin:0 .5em}#content #searchbox .search-filters .filter-buttons{display:inline-block}#content #searchbox div.chosen-container{margin:0 .2em}#content #searchbox select{min-width:15em}#content .btn-clear{opacity:.35;filter:alpha(opacity=35)}#content .btn-clear:hover{opacity:1;filter:alpha(opacity=100)}#content #tabs.ui-widget-content{border:0;background-color:transparent}#content #tabs .ui-widget-header{background:0;border:0;border-bottom:1px solid #c9c9c9}#content #tabs.ui-widget-content{background:none !important}#content #tabs .tabs-spacer{float:left;height:200px}#content .tabs-bottom .ui-tabs-nav{clear:left;padding:0 .2em .2em .2em}#content .tabs-bottom .ui-tabs-nav li{top:auto;bottom:0;margin:0 .2em 1px 0;border-top:0}#content .tabs-bottom .ui-tabs-nav li.ui-tabs-active{margin-top:-1px;padding-top:1px}#datos{float:left;width:400px;text-align:left;margin-top:10px;color:#b9b9b9}#datos a{color:orange;font-weight:bold;border:0;padding:3px;margin:5px 0 5px 0;display:block;width:40px;text-align:center;background-color:transparent}#datos img{border:0}#resAccion,#resFancyAccion{height:20px;padding:5px;margin:5px;font-weight:bold;font-size:14px}#resAccion span{padding:5px;border:#a9a9a9 1px solid}#fancyView{min-width:250px;text-align:center;padding:15px;line-height:20px;border:#d9d9d9 1px solid;font-size:14px}#fancyView ul{list-style:none}#fancyView.msgError{margin:5px;background-color:#fee8e6;color:#c00;font-weight:bold;border:#fed2ce 1px solid}#fancyView.msgOk{margin:5px;background-color:#ecfde4;color:green;font-weight:bold;border:#dbfdcb 1px solid}#fancyView.msgWarn{margin:5px;background-color:#fff2d9;color:orange;font-weight:bold;border:#ffe5b3 1px solid}#fancyView.msgInfo{margin:5px;background-color:#e9e9e9;color:orange;font-weight:bold;border:#ffe5b3 1px solid}#fancyView.backGrey{background-color:#f2f2f2 !important}#fancyView PRE{text-align:left}#fancyView table{border:0;width:100%;font-size:14px;text-align:left}#fancyView td{border-bottom:#d9d9d9 1px solid}#fancyMsg{min-width:250px;height:150px;background-color:#f5f5f5;font-family:Verdana,Arial;font-size:16px;text-align:center;display:table-cell;vertical-align:middle;font-weight:bold;border:0;line-height:20px;padding:0 15px;border-radius:25px;-moz-border-radius:25px;-webkit-border-radius:25px}#fancyMsg table{border:0;width:100%;font-size:14px;text-align:left}#fancyMsg td{border-bottom:#d9d9d9 1px solid}#fancyMsg.msgError{background:url('../imgs/bg_msg_error.png') white repeat-x;color:#c00}#fancyMsg.msgOk{background:url('../imgs/bg_msg_ok.png') white repeat-x;color:green}#fancyMsg.msgWarn{background:url('../imgs/bg_msg_warn.png') white repeat-x;color:orange}#fancyMsg.msgInfo{background:url('../imgs/bg_msg_info.png') white repeat-x;color:#555}#fancyView a,#fancyMsg a{color:#555}#fancyContainer{padding:0}#fancyContainer>h2{width:100%;font-size:18px;color:white;background-color:#607d8b;margin:0 0 1em 0;padding:.5em 0;line-height:1em}#fancyContainer select{width:220px}#fancyContainer.help{min-height:100px;background-color:#f5f5f5}#fancyContainer.help p{font-size:14px;text-align:justify;line-height:2em}#fancyContainer #resFancyAccion{display:none}#fancyContainer #resCheck{display:inline-block;width:80%;height:4em;padding:1em 0}#debug{float:left;text-align:left}#debuginfo{width:100%;min-height:10em;padding:1em;background-color:lightgoldenrodyellow;text-align:left;line-height:1.5em}#debuginfo H3{text-align:center}.fancyNone{background-color:transparent !important}.fancydata{min-width:400px;border:0;text-align:left;margin:0 .5em}.fancydata .descField{min-width:100px;font-weight:bold}footer{display:flex;justify-content:space-between;position:fixed;bottom:0;z-index:100;width:100%;padding:.5em 0;background-color:#f5f5f5;color:#b9b9b9;font-size:1em;box-shadow:0 -8px 6px -6px #c9c9c9;-webkit-box-shadow:0 -8px 6px -6px #c9c9c9;-moz-box-shadow:0 -8px 6px -6px #c9c9c9}footer,footer .footer-parts{display:flex;justify-content:space-between}footer #footer-left,footer #footer-right{width:50%;margin:0 1em}footer #footer-right{justify-content:flex-end;text-align:right}footer #updates{min-width:10em;text-align:center;cursor:pointer}footer #status{margin:0 1em}footer #status>div{display:inline-block}footer #status .status-info{padding:.5em}footer #session{text-align:left;color:#999;font-size:.8em}footer a,footer a:visited{color:#b9b9b9}footer #project a:hover{color:#a9c1d7;border-bottom:1px solid #a9c1d7}footer #updates a:hover{color:#a9c1d7}footer img{border:0;width:16px;height:16px;vertical-align:middle}.round{border-radius:5px !important;-moz-border-radius:5px !important;-webkit-border-radius:5px !important}.round5{border-radius:5px !important;-moz-border-radius:5px !important;-webkit-border-radius:5px !important}.midround{border-radius:0 0 10px 10px !important;-moz-border-radius:0 0 10px 10px !important;-webkit-border-radius:0 0 10px 10px !important}.midroundup{border-radius:10px 10px 0 0 !important;-moz-border-radius:10px 10px 0 0 !important;-webkit-border-radius:10px 10px 0 0 !important}.fullround{border-radius:50% !important;-moz-border-radius:50% !important;-webkit-border-radius:50% !important}.iconMini{width:16px !important;height:16px !important;vertical-align:middle}#content .error{width:350px;margin:15px;padding:15px;background-color:#f9f9f9;color:orange;border:orange 1px solid;margin:0 auto;text-align:center;font-size:16px;line-height:1.5em}.hide{display:none !important}.btn-checks{padding:5px;margin:.2em 0;width:30em;border-bottom:1px solid #c9c9c9}.shadow{box-shadow:1px 1px 2px #d9d9d9}.noRes{width:60%;margin:15px;padding:15px;background-color:#f9f9f9;color:#a9a9a9;border:#c9c9c9 1px solid;margin:20px auto;text-align:center;font-size:16px}.header-blue{background:#536dfe url("../inc/themes/material-blue/css/images/ui-bg_highlight-hard_100_536DFE_1x100.png") repeat-x scroll 50% 50%}.header-grey{background-color:#607d8b;color:#fff;height:2em}.no-background{background:none !important}.action{max-width:75%;height:4em;margin:.7em auto;text-align:right}.action-in-box{display:inline-block;height:4em;margin:.7em 0;text-align:right}.action ul{list-style:none;margin:0;padding:0;padding-right:2em}.action-in-box ul{list-style:none;margin:0;padding:0}.action li{display:inline-block;width:2em;height:2em;margin-left:3em}.action li img,.action-in-box li img{padding:1em;border:1px solid #d9d9d9;border-radius:3em;background-color:#f9f9f9 !important}.fullWidth{max-width:100% !important}.filterOn{padding:.3em 1em;background-color:#ecfde4;color:green !important;border:#dbfdcb 1px solid !important}.globalOn{padding:.3em 1em;background-color:#fff2d9;color:orange !important;border:#ffe5b3 1px solid !important}.opacity50{filter:alpha(opacity=50);-moz-opacity:.5;-khtml-opacity:.5;opacity:.5}.custom-combobox{position:relative;display:inline-block}.custom-combobox input{width:80%}.custom-combobox-toggle{position:absolute;top:0;bottom:0;margin-left:-1px;padding:0;*height:1.7em;*top:.1em}.custom-combobox-input{margin:0;padding:.3em}.ui-tooltip{background:#ffffa3;color:#555;padding:10px;border-radius:10px;box-shadow:0 0 7px #a9a9a9}.ui-autocomplete,.ui-menu-item{z-index:8050}.fancybox-inner{overflow:visible !important}.passLevel{width:20px;height:20px;display:inline-block;position:relative;top:2px}.passLevel.strongest,.passLevel.strongest:hover{background-color:#ecfde4 !important;color:green;font-weight:bold;border:lightgreen 1px solid}.passLevel.strong,.passLevel.strong:hover{background-color:#e6f2ff !important;color:#64b4f4;font-weight:bold;border:#64b4f4 1px solid}.passLevel.good,.passLevel.good:hover{background-color:#fff2d9 !important;color:orange;font-weight:bold;border:#ffe5b3 1px solid}.passLevel.weak,.passLevel.weak:hover{background-color:#fee8e6 !important;color:#c00;font-weight:bold;border:#fed2ce 1px solid}#alert #alert-text{margin:15px auto;font-size:14px;font-weight:bold}#alert #alert-pass{width:50%;padding:10px;margin:15px auto;border:1px solid #c9c9c9;color:#555;font-weight:bold}.dialog-user-text{padding:.5em;border-bottom:#d9d9d9 1px solid;text-align:center;min-width:200px;color:#d9d9d9}.dialog-pass-text{padding:.5em;border:transparent 1px solid;text-align:center;min-width:200px}.dialog-buttons{text-align:center;padding:.5em;border-top:1px solid #c9c9c9;line-height:2.5em}.dialog-clip-pass-copy{background-color:#ecfde4;color:green;border:#dbfdcb 1px solid}.help-box{background-color:#fff !important;color:#607d8b}.help-box>*{font-weight:bold}.help-text{text-align:justify;line-height:1.5em;margin-top:1em}.tooltip{width:300px;max-width:300px;background-color:#777;color:#fff;z-index:101}.cursor-pointer{cursor:pointer}.password-actions{display:inline-block;width:12em}.password-actions>span,.password-actions i{margin-right:.6em}.custom-input-color{width:3em;height:1em;display:inline-block}.account-pass-image{height:32px;width:auto}.select-box{width:20em}#boxLogin{width:45em;min-height:150px;margin:0 auto;padding:1em;background:url("../imgs/logo_full.svg") no-repeat #fff;background-size:300px auto;background-position:.5em .5em}#boxLogin .error{float:left;width:315px;margin-top:15px;color:orange;border:1px orange solid;margin-left:auto;margin-right:auto}#boxLogin #boxData,#boxLogin #boxButton{margin-top:7em}#boxLogin #boxData{display:inline-block;width:250px;height:100%;min-height:100px;text-align:left;margin-left:13em;background-color:transparent}#boxLogin #boxButton{display:inline-block;text-align:right;margin-left:2em}#boxLogin #boxActions{width:100%;height:1em;margin-top:1em;text-align:right}#boxLogin #boxActions a{color:#c9c9c9}#boxLogout{width:250px;margin:8em auto 0 auto;font-size:14px;text-align:center;color:orange;background:#fff2d9;border:#ffe5b3 1px solid;padding:.5em}#boxUpdated{width:350px;margin:5em auto 5em auto;font-size:14px;text-align:center;color:green;background:#ecfde4;border:#dbfdcb 1px solid;padding:.5em}fieldset.warning{padding:8px;color:#b94a48;background-color:#f2dede;border:1px solid #eed3d7;border-radius:5px}fieldset.warning legend{color:#b94a48 !important}fieldset.warning a{color:#b94a48 !important;font-weight:bold}#actions{width:100%;margin:auto auto 50px;line-height:2em}#actions #logo{display:flex;width:100%;margin-bottom:30px;color:#607d8b;box-shadow:0 8px 6px -6px rgba(83,109,254,.3);-webkit-box-shadow:0 8px 6px -6px rgba(83,109,254,.3);-moz-box-shadow:0 8px 6px -6px rgba(83,109,254,.3);align-items:center;background:url("../imgs/logo_full.svg") left no-repeat;background-size:auto 150px;height:150px}#actions #logo #pageDesc{color:#607d8b;align-self:auto;flex:1 0 auto;text-align:center}#actions #logo #pageDesc h1{font-weight:bold;font-size:24px;letter-spacing:3px}#actions ul.errors{max-width:40%;margin:0 auto;list-style:none;font-size:14px;text-align:left}#actions ul.errors>li{margin:1.5em auto;border-radius:5px;padding:.5em}#actions ul.errors>li.err_critical{color:#b94a48;background:#fed7d7;border:1px solid red}#actions ul.errors>li.err_warning{color:orange;background:#fff2d9;border:#ffe5b3 1px solid}#actions ul.errors>li.err_ok{color:green;background:#ecfde4;border:#dbfdcb 1px solid;font-weight:bold}#actions ul.errors>li>p.hint{background-image:url('../imgs/info.png');background-repeat:no-repeat;color:#777;padding-left:25px;background-position:0 .3em;font-size:12px}#actions form{width:450px;margin:0 auto;text-align:left}#actions form fieldset legend{width:100%;margin-top:1em;color:#fff;font-size:14px;font-weight:bold;text-align:center;background-color:#607d8b;margin-bottom:1em;border-radius:5px;letter-spacing:.2em;padding:.2em 0}#actions div.buttons{margin-top:2em;text-align:center}#whatsNewIcon{text-align:center}#whatsNewIcon img{width:64px;height:64px}#whatsNewIcon h2{display:inline-block;color:#555;font-size:16px}#whatsNew{margin:0 auto;width:500px;background-color:#fffde1;padding:2em;line-height:1.5em;font-size:16px;color:#555;border:1px solid #d9d9d9;margin-bottom:3em;display:none}#whatsNew ul{padding:0;border:0}#whatsNew li{padding-left:37px;background:url("../imgs/arrow-list.png") left center no-repeat;line-height:32px;list-style:none}.no-title .ui-dialog-titlebar{display:none}.ui-dialog{z-index:9999 !important}@media screen and (max-width:1000px){#content #searchbox{position:relative;left:0;width:100%}#content #searchbox form{flex-wrap:wrap}#content #searchbox form>div{width:100%}#content #searchbox input[type=text]{width:100%}footer,footer .footer-parts{justify-content:space-between;flex-wrap:wrap}footer #footer-left,footer #footer-right,footer .footer-parts>div{width:100%}footer .footer-parts>div{padding:.5em 0}}
\ No newline at end of file
diff --git a/inc/themes/material-blue/views/accitem/profiles.inc b/inc/themes/material-blue/views/accitem/profiles.inc
index 81787a85..7d15c7b4 100644
--- a/inc/themes/material-blue/views/accitem/profiles.inc
+++ b/inc/themes/material-blue/views/accitem/profiles.inc
@@ -92,6 +92,13 @@
+
diff --git a/inc/themes/material-blue/views/account/account-editpass.inc b/inc/themes/material-blue/views/account/account-editpass.inc
index dd45a053..60cdc109 100644
--- a/inc/themes/material-blue/views/account/account-editpass.inc
+++ b/inc/themes/material-blue/views/account/account-editpass.inc
@@ -9,7 +9,7 @@
|
- account_name; ?> |
+ getAccountName(); ?> |
|
@@ -17,12 +17,12 @@
|
- account_url; ?> |
+ getAccountUrl(); ?> |
|
- account_login; ?> |
+ getAccountLogin(); ?> |
|
diff --git a/inc/themes/material-blue/views/account/account-link.inc b/inc/themes/material-blue/views/account/account-link.inc
index e5c64065..36f98d2c 100644
--- a/inc/themes/material-blue/views/account/account-link.inc
+++ b/inc/themes/material-blue/views/account/account-link.inc
@@ -11,7 +11,7 @@
|
- account_name; ?>
+ getAccountName(); ?>
|
@@ -29,19 +29,19 @@
|
- account_url; ?>
+ getAccountUrl(); ?>
|
|
- account_login; ?>
+ getAccountLogin(); ?>
|
|
- account_notes; ?>
+ getAccountNotes(); ?>
|
|
diff --git a/inc/themes/material-blue/views/account/account-permissions.inc b/inc/themes/material-blue/views/account/account-permissions.inc
index e9612e72..f0f226ce 100644
--- a/inc/themes/material-blue/views/account/account-permissions.inc
+++ b/inc/themes/material-blue/views/account/account-permissions.inc
@@ -57,7 +57,7 @@
+ value="id; ?>" id == $accountData->getAccountUserGroupId()) ? 'selected' : ''; ?>>name; ?>
diff --git a/inc/themes/material-blue/views/account/account.inc b/inc/themes/material-blue/views/account/account.inc
index f2801661..bcbc27e2 100644
--- a/inc/themes/material-blue/views/account/account.inc
+++ b/inc/themes/material-blue/views/account/account.inc
@@ -1,4 +1,7 @@
-
+
@@ -28,11 +31,11 @@
+ maxlength="50" value="getAccountName() : ''; ?>">
- account_name; ?>
+ getAccountName(); ?>
@@ -44,7 +47,7 @@
+ value="id; ?>" id == $accountData->getAccountCustomerId()) ? 'selected' : ''; ?>>name; ?>
getIconAdd()->getIcon(); ?>
- customer_name; ?>
+ getCustomerName(); ?>
@@ -66,7 +69,7 @@
+ value="id; ?>" id == $accountData->getAccountCategoryId()) ? 'selected' : ''; ?>>name; ?>
@@ -78,7 +81,7 @@
data-onclick="appMgmt/show">getIconAdd()->getIcon(); ?>
- category_name; ?>
+ getCategoryName(); ?>
@@ -88,11 +91,11 @@
+ maxlength="255" value="getAccountUrl() : ''; ?>">
- account_url; ?>
+ getAccountUrl(); ?>
@@ -103,11 +106,11 @@
+ maxlength="50" value="getAccountLogin() : ''; ?>">
- account_login; ?>
+ getAccountLogin(); ?>
@@ -144,12 +147,12 @@
+ maxlength="1000">getAccountNotes() : ''; ?>
- account_notes; ?>
+ getAccountNotes(); ?>
@@ -184,11 +187,11 @@
- user_editName): ?>
+ getUserEditName()): ?>
|
- user_editName): ?>
- account_dateEdit, ' ', _('por'), ' ', $accountData->user_editName; ?> |
+ getUserEditName()): ?>
+ getAccountDateEdit(), ' ', _('por'), ' ', $accountData->getUserEditName(); ?> |
@@ -262,7 +265,7 @@
plugins: ['remove_button'],
options: otherUsers,
onInitialize: function () {
- var userId = account_userId : 0; ?>;
+ var userId = getAccountUserId() : 0; ?>;
if (userId > 0) {
this.removeOption(userId);
@@ -280,7 +283,7 @@
plugins: ['remove_button'],
options: otherGroups,
onInitialize: function () {
- var userGroupId = account_userGroupId : 0; ?>;
+ var userGroupId = getAccountUserGroupId() : 0; ?>;
if (userGroupId > 0) {
this.removeOption(userGroupId);
diff --git a/inc/themes/material-blue/views/account/details.inc b/inc/themes/material-blue/views/account/details.inc
index eb092a29..5b951381 100644
--- a/inc/themes/material-blue/views/account/details.inc
+++ b/inc/themes/material-blue/views/account/details.inc
@@ -1,22 +1,23 @@