diff --git a/inc/AccountHistory.class.php b/inc/AccountHistory.class.php index 428df54c..38018abc 100644 --- a/inc/AccountHistory.class.php +++ b/inc/AccountHistory.class.php @@ -340,7 +340,7 @@ class AccountHistory extends AccountBase implements AccountInterface $queryRes = DB::getResults($query, __FUNCTION__, $data); if ($queryRes === false) { - throw new Exception(_('No se pudieron obtener los datos de la cuenta')); + throw new \Exception(_('No se pudieron obtener los datos de la cuenta')); } $this->setAccountUserId($queryRes->account_userId); diff --git a/inc/AccountSearch.class.php b/inc/AccountSearch.class.php index 77bc8451..07605194 100644 --- a/inc/AccountSearch.class.php +++ b/inc/AccountSearch.class.php @@ -32,41 +32,194 @@ defined('APP_ROOT') || die(_('No es posible acceder directamente a este archivo' */ class AccountSearch { + /** + * Constantes de ordenación + */ + const SORT_NAME = 1; + const SORT_CATEGORY = 2; + const SORT_LOGIN = 3; + const SORT_URL = 4; + const SORT_CUSTOMER = 5; + /** * @var int El número de registros de la última consulta */ public static $queryNumRows; + private $_globalSearch = false; + private $_txtSearch = ''; + private $_customerId = 0; + private $_categoryId = 0; + private $_sortOrder = 0; + private $_sortKey = 0; + private $_limitStart = 0; + private $_limitCount = 12; + + /** + * Constructor + */ + function __construct() + { + $this->setLimitCount(Config::getValue('account_count')); + } + + /** + * @return boolean + */ + public function isGlobalSearch() + { + return $this->_globalSearch; + } + + /** + * @param boolean $globalSearch + */ + public function setGlobalSearch($globalSearch) + { + $this->_globalSearch = $globalSearch; + } + + /** + * @return string + */ + public function getTxtSearch() + { + return $this->_txtSearch; + } + + /** + * @param string $txtSearch + */ + public function setTxtSearch($txtSearch) + { + $this->_txtSearch = $txtSearch; + } + + /** + * @return int + */ + public function getCustomerId() + { + return $this->_customerId; + } + + /** + * @param int $customerId + */ + public function setCustomerId($customerId) + { + $this->_customerId = $customerId; + } + + /** + * @return int + */ + public function getCategoryId() + { + return $this->_categoryId; + } + + /** + * @param int $categoryId + */ + public function setCategoryId($categoryId) + { + $this->_categoryId = $categoryId; + } + + /** + * @return int + */ + public function getSortOrder() + { + return $this->_sortOrder; + } + + /** + * @param int $sortOrder + */ + public function setSortOrder($sortOrder) + { + $this->_sortOrder = $sortOrder; + } + + /** + * @return int + */ + public function getSortKey() + { + return $this->_sortKey; + } + + /** + * @param int $sortKey + */ + public function setSortKey($sortKey) + { + $this->_sortKey = $sortKey; + } + + /** + * @return int + */ + public function getLimitStart() + { + return $this->_limitStart; + } + + /** + * @param int $limitStart + */ + public function setLimitStart($limitStart) + { + $this->_limitStart = $limitStart; + } + + /** + * @return int + */ + public function getLimitCount() + { + return $this->_limitCount; + } + + /** + * @param int $limitCount + */ + public function setLimitCount($limitCount) + { + $this->_limitCount = $limitCount; + } + /** * Obtener las cuentas de una búsqueda. * - * @param array $searchFilter Filtros de búsqueda * @return bool Resultado de la consulta */ - public static function getAccounts($searchFilter) + public function getAccounts() { - $isAdmin = ($_SESSION['uisadminapp'] || $_SESSION['uisadminacc']); - $globalSearch = ($searchFilter['globalSearch'] === 1 && Config::getValue('globalsearch', 0)); + $isAdmin = (Session::getUserIsAdminApp() || Session::getUserIsAdminAcc()); + $globalSearch = ($this->isGlobalSearch() && Config::getValue('globalsearch', 0)); $arrFilterCommon = array(); $arrFilterSelect = array(); $arrFilterUser = array(); $arrQueryWhere = array(); - switch ($searchFilter['keyId']) { - case 1: + switch ($this->getSortKey()) { + case self::SORT_NAME: $orderKey = 'account_name'; break; - case 2: + case self::SORT_CATEGORY: $orderKey = 'category_name'; break; - case 3: + case self::SORT_LOGIN: $orderKey = 'account_login'; break; - case 4: + case self::SORT_URL: $orderKey = 'account_url'; break; - case 5: + case self::SORT_CUSTOMER: $orderKey = 'customer_name'; break; default : @@ -95,27 +248,27 @@ class AccountSearch . 'LEFT JOIN accUsers ON accuser_accountId = account_id ' . 'LEFT JOIN accGroups ON accgroup_accountId = account_id'; - if ($searchFilter['txtSearch']) { + if ($this->getTxtSearch()) { $arrFilterCommon[] = 'account_name LIKE :name'; $arrFilterCommon[] = 'account_login LIKE :login'; $arrFilterCommon[] = 'account_url LIKE :url'; $arrFilterCommon[] = 'account_notes LIKE :notes'; - $data['name'] = '%' . $searchFilter['txtSearch'] . '%'; - $data['login'] = '%' . $searchFilter['txtSearch'] . '%'; - $data['url'] = '%' . $searchFilter['txtSearch'] . '%'; - $data['notes'] = '%' . $searchFilter['txtSearch'] . '%'; + $data['name'] = '%' . $this->getTxtSearch() . '%'; + $data['login'] = '%' . $this->getTxtSearch() . '%'; + $data['url'] = '%' . $this->getTxtSearch() . '%'; + $data['notes'] = '%' . $this->getTxtSearch() . '%'; } - if ($searchFilter['categoryId'] != 0) { + if ($this->getCategoryId() !== 0) { $arrFilterSelect[] = 'category_id = :categoryId'; - $data['categoryId'] = $searchFilter['categoryId']; + $data['categoryId'] = $this->getCategoryId(); } - if ($searchFilter['customerId'] != 0) { + if ($this->getCustomerId() !== 0) { $arrFilterSelect[] = 'account_customerId = :customerId'; - $data['customerId'] = $searchFilter['customerId']; + $data['customerId'] = $this->getCustomerId(); } if (count($arrFilterCommon) > 0) { @@ -132,23 +285,25 @@ class AccountSearch $arrFilterUser[] = 'accgroup_groupId = :accgroup_groupId'; $arrFilterUser[] = 'accuser_userId = :accuser_userId'; - $data['userGroupId'] = $searchFilter['groupId']; - $data['userId'] = $searchFilter['userId']; - $data['accgroup_groupId'] = $searchFilter['groupId']; - $data['accuser_userId'] = $searchFilter['userId']; + // Usuario/Grupo principal de la cuenta + $data['userId'] = Session::getUserId(); + $data['accuser_userId'] = Session::getUserId(); + + // Usuario/Grupo secundario de la cuenta + $data['userGroupId'] = Session::getUserGroupId(); + $data['accgroup_groupId'] = Session::getUserGroupId(); - //$arrQueryWhere[] = '(' . implode(' OR ', $arrFilterUser) . ')'; $arrQueryWhere[] = implode(' OR ', $arrFilterUser); } - $orderDir = ($searchFilter["txtOrder"] == 0) ? 'ASC' : 'DESC'; + $orderDir = ($this->getSortOrder() === 0) ? 'ASC' : 'DESC'; $queryOrder = 'ORDER BY ' . $orderKey . ' ' . $orderDir; - if ($searchFilter['limitCount'] != 99) { + if ($this->getLimitCount() != 99) { $queryLimit = 'LIMIT :limitStart,:limitCount'; - $data['limitStart'] = $searchFilter['limitStart']; - $data['limitCount'] = $searchFilter['limitCount']; + $data['limitStart'] = $this->getLimitStart(); + $data['limitCount'] = $this->getLimitCount(); } if (count($arrQueryWhere) === 1) { @@ -177,14 +332,8 @@ class AccountSearch // Obtenemos el número de registros totales de la consulta sin contar el LIMIT self::$queryNumRows = DB::$last_num_rows; - $_SESSION["accountSearchTxt"] = $searchFilter["txtSearch"]; - $_SESSION["accountSearchCustomer"] = $searchFilter["customerId"]; - $_SESSION["accountSearchCategory"] = $searchFilter["categoryId"]; - $_SESSION["accountSearchOrder"] = $searchFilter["txtOrder"]; - $_SESSION["accountSearchKey"] = $searchFilter["keyId"]; - $_SESSION["accountSearchStart"] = $searchFilter["limitStart"]; - $_SESSION["accountSearchLimit"] = $searchFilter["limitCount"]; - $_SESSION["accountGlobalSearch"] = $searchFilter["globalSearch"]; + // Establecer el filtro de búsqueda en la sesión como un objeto + Session::setSearchFilters($this); return $queryRes; } diff --git a/inc/Session.class.php b/inc/Session.class.php index b461b479..2dee879e 100644 --- a/inc/Session.class.php +++ b/inc/Session.class.php @@ -251,4 +251,39 @@ class Session { $_SESSION["usrprofile"] = $profile; } + + /** + * @return \SP\AccountSearch + */ + public static function getSearchFilters() + { + return $_SESSION["search"]; + } + + /** + * @param \SP\AccountSearch $search + */ + public static function setSearchFilters(\SP\AccountSearch $search) + { + $_SESSION["search"] = $search; + } + + /** + * Establece la cuenta primaria para el histórico + * + * @param $id int El id de la cuenta + */ + public static function setAccountParentId($id){ + $_SESSION["accParentId"] = (int) $id; + } + + /** + * Devuelve la cuenta primaria para el histórico + * + * @return int + */ + public static function getAccountParentId() + { + return $_SESSION["accParentId"]; + } } \ No newline at end of file diff --git a/inc/tpl/account.inc b/inc/tpl/account.inc index c3160868..5bc321c5 100644 --- a/inc/tpl/account.inc +++ b/inc/tpl/account.inc @@ -1,12 +1,12 @@
-
- - - - -
+ + +
+ +
+ @@ -23,12 +23,18 @@ @@ -36,9 +42,15 @@ @@ -50,7 +62,7 @@ maxlength="255" value="account_url : ''; ?>"> - account_url; ?> + account_url; ?> @@ -62,7 +74,7 @@ maxlength="50" value="account_login : ''; ?>"> - account_login; ?> + account_login; ?> @@ -165,17 +177,17 @@ - - - - + + + + - - - - + + + + @@ -207,11 +219,26 @@ @@ -300,7 +327,8 @@ - + diff --git a/inc/tpl/searchbox.inc b/inc/tpl/searchbox.inc index e7c53b11..428019d3 100644 --- a/inc/tpl/searchbox.inc +++ b/inc/tpl/searchbox.inc @@ -2,24 +2,29 @@
@@ -15,7 +15,7 @@ maxlength="50" value="account_name : ''; ?>"> - account_name; ?> + account_name; ?>
- +

- customer_name; ?> + customer_name; ?>
- + - category_name; ?> + category_name; ?>
- - + }); +
- - + + - /> - - + + /> + - -
+ +
@@ -30,13 +35,15 @@ \ No newline at end of file diff --git a/js/functions.js b/js/functions.js index 5fca8ea5..5a4db107 100644 --- a/js/functions.js +++ b/js/functions.js @@ -153,12 +153,8 @@ function clearSearch(clearStart) { } document.frmSearch.search.value = ""; - document.frmSearch.customer.selectedIndex = 0; - document.frmSearch.category.selectedIndex = 0; - $('#frmSearch').find('input[name="start"]').val(0); - $('#frmSearch').find('input[name="skey"]').val(0); - $('#frmSearch').find('input[name="sorder"]').val(0); - $(".select-box").val('').trigger("chosen:updated"); + $('#frmSearch').find('select').prop('selectedIndex', 0).trigger("chosen:updated"); + $('#frmSearch').find('input[name="start"], input[name="skey"], input[name="sorder"]').val(0); order.key = 0; order.dir = 0; } @@ -185,12 +181,14 @@ function accSearch(continous, event) { return; } - if (lenTxtSearch < 3 && continous === 1 && lenTxtSearch > window.lastlen && event.keyCode != 13) { + if (lenTxtSearch < 3 && continous === 1 && lenTxtSearch > window.lastlen && event.keyCode !== 13) { return; } window.lastlen = lenTxtSearch; + $('#frmSearch').find('input[name="start"]').val(0); + doSearch(); } diff --git a/web/AccountC.class.php b/web/AccountC.class.php index a597cea6..f6c2474f 100644 --- a/web/AccountC.class.php +++ b/web/AccountC.class.php @@ -174,9 +174,6 @@ class AccountC extends Controller implements ActionsInterface if ($this->isGotData()) { $this->view->assign('accountParentId', $this->getAccount()->getAccountParentId()); $this->view->assign('accountIsHistory', $this->getAccount()->getAccountIsHistory()); - $this->view->assign('accountCategories', \SP\DB::getValuesForSelect('categories', 'category_id', 'category_name')); - $this->view->assign('otherUsers', \SP\DB::getValuesForSelect('usrData', 'user_id', 'user_name')); - $this->view->assign('otherGroups', \SP\DB::getValuesForSelect('usrGroups', 'usergroup_id', 'usergroup_name')); $this->view->assign('accountOtherUsers', $this->getAccount()->getAccountUsersId()); $this->view->assign('accountOtherUsersName', \SP\Users::getUsersNameForAccount($this->getId())); $this->view->assign('accountOtherGroups', $this->getAccount()->getAccountUserGroupsId()); @@ -184,46 +181,17 @@ class AccountC extends Controller implements ActionsInterface $this->view->assign('changesHash', $this->getAccount()->calcChangesHash()); $this->view->assign('chkUserEdit', ($this->view->accountData->account_otherUserEdit) ? 'checked' : ''); $this->view->assign('chkGroupEdit', ($this->view->accountData->account_otherGroupEdit) ? 'checked' : ''); + $this->view->assign('historyData', \SP\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('maxFileSize', round(\SP\Config::getValue('files_allowed_size') / 1024, 1)); + $this->view->assign('filesAllowedExts', \SP\Config::getValue('files_allowed_exts')); + $this->view->assign('filesDelete', ($this->_action == Acl::ACTION_ACC_EDIT) ? 1 : 0); } - $this->view->assign('customersSelProp', array("name" => "customerId", - "id" => "selCustomer", - "class" => "", - "size" => 1, - "label" => "", - "selected" => ($this->_gotData) ? $this->view->accountData->account_customerId : '', - "default" => "", - "js" => "", - "attribs" => "" - )); - - $this->view->assign('categoriesSelProp', array("name" => "categoryId", - "id" => "selCategory", - "class" => "", - "size" => 1, - "label" => "", - "selected" => ($this->_gotData) ? $this->view->accountData->account_categoryId : '', - "default" => "", - "js" => "", - "attribs" => "" - )); - - $this->view->assign('historySelProp', array("name" => "historyId", - "id" => "sel-history", - "class" => "", - "size" => 1, - "label" => "", - "selected" => ($this->_gotData && $this->_account->getAccountIsHistory()) ? $this->getId() : '', - "default" => "", - "js" => "OnChange=\"if ( $('#sel-history').val() > 0 ) doAction(" . self::ACTION_ACC_VIEW_HISTORY . "," . self::ACTION_ACC_VIEW . ", $('#sel-history').val());\"", - "attribs" => '' - )); - - $this->view->assign('isModified', ($this->_gotData && $this->view->accountData->account_dateEdit && $this->view->accountData->account_dateEdit <> '0000-00-00 00:00:00')); - $this->view->assign('filesDelete', ($this->_action == Acl::ACTION_ACC_EDIT) ? 1 : 0); - $this->view->assign('maxFileSize', round(\SP\Config::getValue('files_allowed_size') / 1024, 1)); - $this->view->assign('historyData', \SP\AccountHistory::getAccountList($this->getId())); - $this->view->assign('filesAllowedExts', \SP\Config::getValue('files_allowed_exts')); + $this->view->assign('categories', \SP\DB::getValuesForSelect('categories', 'category_id', 'category_name')); + $this->view->assign('customers', \SP\DB::getValuesForSelect('customers', 'customer_id', 'customer_name')); + $this->view->assign('otherUsers', \SP\DB::getValuesForSelect('usrData', 'user_id', 'user_name')); + $this->view->assign('otherGroups', \SP\DB::getValuesForSelect('usrGroups', 'usergroup_id', 'usergroup_name')); } /** @@ -291,7 +259,7 @@ class AccountC extends Controller implements ActionsInterface try { $this->setAccount(new Account()); $this->_account->setAccountId($this->getId()); - $this->_account->setAccountParentId(Common::parseParams('s', 'accParentId', 0)); + $this->_account->setAccountParentId(\SP\Session::getAccountParentId()); $this->view->assign('accountId', $this->getId()); $this->view->assign('accountData', $this->getAccount()->getAccountData()); @@ -377,7 +345,7 @@ class AccountC extends Controller implements ActionsInterface $this->view->assign('title', array('class' => 'titleNormal', 'name' => _('Detalles de Cuenta'))); $this->view->assign('showform', false); - $_SESSION["accParentId"] = $this->getId(); + \SP\Session::setAccountParentId($this->getId()); $this->_account->incrementViewCounter(); $this->setCommonData(); @@ -418,7 +386,7 @@ class AccountC extends Controller implements ActionsInterface try { $this->setAccount(new AccountHistory()); $this->_account->setAccountId($this->getId()); - $this->_account->setAccountParentId(Common::parseParams('s', 'accParentId', 0)); + $this->_account->setAccountParentId(\SP\Session::getAccountParentId()); $this->view->assign('accountId', $this->getId()); $this->view->assign('accountData', $this->getAccount()->getAccountData()); diff --git a/web/SearchC.class.php b/web/SearchC.class.php index 5de24ae7..4a390c8f 100644 --- a/web/SearchC.class.php +++ b/web/SearchC.class.php @@ -26,6 +26,7 @@ namespace SP\Controller; use SP\AccountSearch; +use SP\Session; defined('APP_ROOT') || die(_('No es posible acceder directamente a este archivo')); @@ -36,15 +37,6 @@ defined('APP_ROOT') || die(_('No es posible acceder directamente a este archivo' */ class SearchC extends Controller implements ActionsInterface { - /** - * Constantes de ordenación - */ - const SORT_NAME = 1; - const SORT_CATEGORY = 2; - const SORT_USER = 3; - const SORT_URL = 4; - const SORT_CUSTOMER = 5; - /** * Constructor * @@ -63,18 +55,26 @@ class SearchC extends Controller implements ActionsInterface */ private function setVars() { - $this->view->assign('isAdmin', ($_SESSION["uisadminapp"] || $_SESSION["uisadminacc"])); + $this->view->assign('isAdmin', (\SP\Session::getUserIsAdminApp() || \SP\Session::getUserIsAdminAcc())); $this->view->assign('globalSearch', \SP\Config::getValue('globalsearch', 0)); + // Comprobar si está creado el objeto de búsqueda en la sesión + if (!is_object(Session::getSearchFilters())) { + Session::setSearchFilters(new AccountSearch()); + } + + // Obtener el filtro de búsqueda desde la sesión + $filters = Session::getSearchFilters(); + // Valores POST - $this->view->assign('searchKey', \SP\Common::parseParams('p', 'skey', \SP\Common::parseParams('s', 'accountSearchKey', 0))); - $this->view->assign('searchOrder', \SP\Common::parseParams('p', 'sorder', \SP\Common::parseParams('s', 'accountSearchOrder', 0))); - $this->view->assign('searchCustomer', \SP\Common::parseParams('p', 'customer', \SP\Common::parseParams('s', 'accountSearchCustomer', 0))); - $this->view->assign('searchCategory', \SP\Common::parseParams('p', 'category', \SP\Common::parseParams('s', 'accountSearchCategory', 0))); - $this->view->assign('searchTxt', \SP\Common::parseParams('p', 'search', \SP\Common::parseParams('s', 'accountSearchTxt'))); - $this->view->assign('searchGlobal', \SP\Common::parseParams('p', 'gsearch', \SP\Common::parseParams('s', 'accountGlobalSearch', 0), false, 1)); - $this->view->assign('limitStart', \SP\Common::parseParams('p', 'start', \SP\Common::parseParams('s', 'accountSearchStart', 0))); - $this->view->assign('limitCount', \SP\Common::parseParams('p', 'rpp', \SP\Common::parseParams('s', 'accountSearchLimit', \SP\Config::getValue('account_count', 10)))); + $this->view->assign('searchKey', \SP\Common::parseParams('p', 'skey', $filters->getSortKey())); + $this->view->assign('searchOrder', \SP\Common::parseParams('p', 'sorder', $filters->getSortOrder())); + $this->view->assign('searchCustomer', \SP\Common::parseParams('p', 'customer', $filters->getCustomerId())); + $this->view->assign('searchCategory', \SP\Common::parseParams('p', 'category', $filters->getCategoryId())); + $this->view->assign('searchTxt', \SP\Common::parseParams('p', 'search', $filters->getTxtSearch())); + $this->view->assign('searchGlobal', \SP\Common::parseParams('p', 'gsearch', $filters->isGlobalSearch(), false, 1)); + $this->view->assign('limitStart', \SP\Common::parseParams('p', 'start', $filters->getLimitStart())); + $this->view->assign('limitCount', \SP\Common::parseParams('p', 'rpp', $filters->getLimitCount())); } /** @@ -84,29 +84,8 @@ class SearchC extends Controller implements ActionsInterface { $this->view->addTemplate('searchbox'); - $this->view->assign('customersSelProp', - array("name" => "customer", - "id" => "selCustomer", - "class" => "select-box", - "size" => 1, - "label" => "", - "selected" => $this->view->searchCustomer, - "default" => "", - "js" => 'OnChange="clearSearch(1); accSearch(0)"', - "attribs" => "") - ); - - $this->view->assign('categoriesSelProp', - array("name" => "category", - "id" => "selCategory", - "class" => "select-box", - "size" => 1, - "label" => "", - "selected" => $this->view->searchCategory, - "default" => "", - "js" => 'OnChange="clearSearch(1); accSearch(0)"', - "attribs" => "") - ); + $this->view->assign('customers', \SP\DB::getValuesForSelect('customers', 'customer_id', 'customer_name')); + $this->view->assign('categories', \SP\DB::getValuesForSelect('categories', 'category_id', 'category_name')); } public function getSearch() @@ -115,20 +94,18 @@ class SearchC extends Controller implements ActionsInterface $this->view->assign('queryTimeStart', microtime()); - $searchFilter = array( - 'txtSearch' => $this->view->searchTxt, - 'userId' => \SP\Common::parseParams('s', 'uid', 0), - 'groupId' => \SP\Common::parseParams('s', 'ugroup', 0), - 'categoryId' => $this->view->searchCategory, - 'customerId' => $this->view->searchCustomer, - 'keyId' => $this->view->searchKey, - 'txtOrder' => $this->view->searchOrder, - 'limitStart' => $this->view->limitStart, - 'limitCount' => $this->view->limitCount, - 'globalSearch' => $this->view->globalSearch - ); + $search = new AccountSearch(); - $resQuery = AccountSearch::getAccounts($searchFilter); + $search->setGlobalSearch($this->view->globalSearch); + $search->setTxtSearch($this->view->searchTxt); + $search->setCategoryId($this->view->searchCategory); + $search->setCustomerId($this->view->searchCustomer); + $search->setSortKey($this->view->searchKey); + $search->setSortOrder($this->view->searchOrder); + $search->setLimitStart($this->view->limitStart); + $search->setLimitCount($this->view->limitCount); + + $resQuery = $search->getAccounts(); if (!$resQuery) { $this->view->assign('accounts', false); @@ -282,34 +259,34 @@ class SearchC extends Controller implements ActionsInterface { $this->view->assign('sortFields', array( array( - 'key' => self::SORT_CUSTOMER, + 'key' => AccountSearch::SORT_CUSTOMER, 'title' => _('Ordenar por Cliente'), 'name' => _('Cliente'), - 'function' => 'searchSort(' . self::SORT_CUSTOMER . ',' . $this->view->limitStart . ')' + 'function' => 'searchSort(' . AccountSearch::SORT_CUSTOMER . ',' . $this->view->limitStart . ')' ), array( - 'key' => self::SORT_NAME, + 'key' => AccountSearch::SORT_NAME, 'title' => _('Ordenar por Nombre'), 'name' => _('Nombre'), - 'function' => 'searchSort(' . self::SORT_NAME . ',' . $this->view->limitStart . ')' + 'function' => 'searchSort(' . AccountSearch::SORT_NAME . ',' . $this->view->limitStart . ')' ), array( - 'key' => self::SORT_CATEGORY, + 'key' => AccountSearch::SORT_CATEGORY, 'title' => _('Ordenar por Categoría'), 'name' => _('Categoría'), - 'function' => 'searchSort(' . self::SORT_CATEGORY . ',' . $this->view->limitStart . ')' + 'function' => 'searchSort(' . AccountSearch::SORT_CATEGORY . ',' . $this->view->limitStart . ')' ), array( - 'key' => self::SORT_USER, + 'key' => AccountSearch::SORT_LOGIN, 'title' => _('Ordenar por Usuario'), 'name' => _('Usuario'), - 'function' => 'searchSort(' . self::SORT_USER . ',' . $this->view->limitStart . ')' + 'function' => 'searchSort(' . AccountSearch::SORT_LOGIN . ',' . $this->view->limitStart . ')' ), array( - 'key' => self::SORT_URL, + 'key' => AccountSearch::SORT_URL, 'title' => _('Ordenar por URL / IP'), 'name' => _('URL / IP'), - 'function' => 'searchSort(' . self::SORT_URL . ',' . $this->view->limitStart . ')' + 'function' => 'searchSort(' . AccountSearch::SORT_URL . ',' . $this->view->limitStart . ')' ) )); }