2014-04-02 Miguel de Dios <miguel.dedios@artica.es>

* operation/search_results.php, operation/search_users.getdata.php:
	fixed the count of user in the global search main page.
	
	Incident: #710




git-svn-id: https://svn.code.sf.net/p/pandora/code/trunk@9702 c3f86ba8-e40f-0410-aaad-9ba5e7f4b01f
This commit is contained in:
mdtrooper 2014-04-02 11:37:09 +00:00
parent a4dd11d017
commit 667080b5c6
3 changed files with 11 additions and 11 deletions

View File

@ -1,3 +1,10 @@
2014-04-02 Miguel de Dios <miguel.dedios@artica.es>
* operation/search_results.php, operation/search_users.getdata.php:
fixed the count of user in the global search main page.
Incident: #710
2014-04-02 Vanessa Gil <vanessa.gil@artica.es> 2014-04-02 Vanessa Gil <vanessa.gil@artica.es>
* godmode/menu.php * godmode/menu.php

View File

@ -15,7 +15,7 @@
// GNU General Public License for more details. // GNU General Public License for more details.
global $config; global $config;
require_once ($config['homedir']."/include/functions_reporting.php"); require_once ($config['homedir'] . "/include/functions_reporting.php");
// Load enterprise extensions // Load enterprise extensions
enterprise_include ('operation/reporting/custom_reporting.php'); enterprise_include ('operation/reporting/custom_reporting.php');

View File

@ -150,21 +150,14 @@ if ($searchUsers) {
unset($users); unset($users);
} }
if (!$users_id) {
$user_condition = "";
}
else {
// Condition with the visible agents
$user_condition = " AND id_user IN (\"".implode('","',$users_id)."\")";
}
$sql = "SELECT COUNT(id_user) AS count FROM tusuario $sql = "SELECT COUNT(id_user) AS count FROM tusuario
WHERE (fullname LIKE '%" . $stringSearchSQL . "%' OR WHERE id_user LIKE '%" . $stringSearchSQL . "%' OR
fullname LIKE '%" . $stringSearchSQL . "%' OR
firstname LIKE '%" . $stringSearchSQL . "%' OR firstname LIKE '%" . $stringSearchSQL . "%' OR
lastname LIKE '%" . $stringSearchSQL . "%' OR lastname LIKE '%" . $stringSearchSQL . "%' OR
middlename LIKE '%" . $stringSearchSQL . "%' OR middlename LIKE '%" . $stringSearchSQL . "%' OR
email LIKE '%" . $stringSearchSQL . "%')".$user_condition; email LIKE '%" . $stringSearchSQL . "%'";
$totalUsers = db_get_value_sql($sql); $totalUsers = db_get_value_sql($sql);
} }
else { else {