News - Features - Downloads - Forum - Team - Support - Switch View: Screen
Login - Registrierung - Passwort vergessen

Antworten: 0
Seite [1]
Mindcrime


Geekboy





Beiträge: 1155
# Thema - 16.10.2009 um 14:57 Uhr
This patch will make cs_sort and cs_pages work with search name and search letter, so that you can apply sort order without losing the search criteria (of letter or name search) and go through the pages without losing the name search criteria:

Explanation: - = old code, + = new code


8,9c8,9
- $search_name = empty($_POST['search_name']) ? 0 : $_POST['search_name'];
- $data['search']['name'] = empty($_POST['search_name']) ? '' : $_POST['search_name'];
---
+ $search_name = empty($_REQUEST['search_name']) ? 0 : $_REQUEST['search_name'];
+ $data['search']['name'] = empty($_REQUEST['search_name']) ? '' : $_REQUEST['search_name'];
23,24c23,35
- $where = empty($letter) ? $where : "users_delete = '0' AND users_nick LIKE '" . cs_sql_escape($letter) . "%'";
- $where = empty($search_name) ? $where : "users_delete = '0' AND users_nick LIKE '%" . cs_sql_escape($search_name) . "%'";
---
+ $more = '';
+ if (!empty($letter))
+ {
+ $where = "users_delete = '0' AND users_nick LIKE '" . cs_sql_escape($letter) . "%'";
+ $more = 'where=k';
+ }
+ else if (!empty($search_name))
+ {
+ $where = "users_delete = '0' AND users_nick LIKE '%" . cs_sql_escape($search_name) . "%'";
+ $letter = '&search_name='.urlencode($search_name);
+ $more = 'where=&search_name='.urlencode($search_name);
+ }
34,37c45,48
- $data['sort']['nick'] = cs_sort('users', 'manage', $start, $access_id, 1, $sort);
- $data['sort']['laston'] = cs_sort('users', 'manage', $start, $access_id, 3, $sort);
- $data['sort']['active'] = cs_sort('users', 'manage', $start, $access_id, 5, $sort);
- $data['sort']['access'] = cs_sort('users', 'manage', $start, $access_id, 7, $sort);
---
+ $data['sort']['nick'] = cs_sort('users', 'manage', $start, $access_id, 1, $sort, $more);
+ $data['sort']['laston'] = cs_sort('users', 'manage', $start, $access_id, 3, $sort, $more);
+ $data['sort']['active'] = cs_sort('users', 'manage', $start, $access_id, 5, $sort, $more);
+ $data['sort']['access'] = cs_sort('users', 'manage', $start, $access_id, 7, $sort, $more);



PS: Da der bugtracker dieser tekst als SPAM sieht, poste ich es hier rein...
Inaktiv
Antworten: 0
Seite [1]


Sie müssen sich registrieren, um zu antworten.


ClanSphere Project - Mailus - Imprint - Disclaimer - Scriptinfo