From d55b34fd10a5a1474651e3805aab86e8a25f6d89 Mon Sep 17 00:00:00 2001 From: Chuck Scott Date: Thu, 5 May 2016 16:31:08 -0400 Subject: [PATCH] Removed some old code --- models/admin/contacts/index.php | 144 +------------------------------- 1 file changed, 1 insertion(+), 143 deletions(-) diff --git a/models/admin/contacts/index.php b/models/admin/contacts/index.php index e033693..22fe460 100644 --- a/models/admin/contacts/index.php +++ b/models/admin/contacts/index.php @@ -514,21 +514,7 @@ class GlmMembersAdmin_contacts_index extends GlmDataContacts } - - - - - - - - - - - - - - /* - + /* Left in case we want to use this // Filter by text string supplied if (isset($_REQUEST['filterText'])) { @@ -660,134 +646,6 @@ class GlmMembersAdmin_contacts_index extends GlmDataContacts } } } - -/* - public function modelAction($actionData = false) { - -// $filterArchived = false; - $loggedInMember = false; - $filterText = false; - $haveFilter = false; - $contactsList = false; - $haveContacts = false; - $numbContacts = false; - $numbDisplayed = false; - $lastDisplayed = false; - $paging = true; - $prevStart = false; - $nextStart = false; - $start = 1; - $limit = 20; // Set to the number of listings per page - $namesList = false; - - // Only list member contacts for the selected member - $where = "true"; - - // If this is a logged in member user, then show their contacts only - if (isset($this->config['loggedInUser']['contactUser'])) { - $contactUser = $this->config['loggedInUser']['contactUser']; - if ($contactUser['ref_type'] = $this->config['ref_type_numb']['Member'] - && $contactUser['ref_dest'] ) { - $where .= " AND ref_type = ".$this->config['ref_type_numb']['Member']." - AND ref_dest = ".$contactUser['ref_dest']; - $loggedInMember = $contactUser['ref_dest']; - } - } - - // Filter by text string supplied - if (isset($_REQUEST['filterText'])) { - $filterText = esc_sql($_REQUEST['filterText']); - $where .= " AND ( - lname LIKE '%$filterText%' OR - fname LIKE '%$filterText%' OR - org LIKE '%$filterText%' OR - descr LIKE '%$filterText%' - )"; - $haveFilter = true; - } - - // Get the total number of contacts listed - $numbContacts = $this->getStats($where); - - // If the number of events is less than a page, don't do paging - if ($numbContacts <= $limit) { - $paging = false; - } - - // Get full list of names matching this where clause for search box - $namesList = $this->getIdName($where); - - // Check if we're doing paging - if (isset($_REQUEST['pageSelect'])) { - - // If request is for Next - if ($_REQUEST['pageSelect'][0] == 'N') { - $newStart = $_REQUEST['nextStart'] - 0; - - // Otherwise it must be Previous - } else { - $newStart = $_REQUEST['prevStart'] - 0; - } - - if ($newStart > 0) { - $start = $newStart; - } - } - - // Get list of contacts - $contactsList = $this->getSimplified($where, false, 'lname, fname', true, 'id', $start, $limit ); - - if ($contactsList != false) { - - // Get paging results - $numbDisplayed = $contactsList['returned']; - $lastDisplayed = $contactsList['last']; - if ($start == 1) { - $prevStart = false; - } else { - $prevStart = $start - $limit; - if ($start < 1) { - $start = 1; - } - } - if ($contactsList['returned'] == $limit) { - $nextStart = $start + $limit; - } - - if (count($contactsList['list']) > 0) { - $haveContacts = true; - } - - } - - // Compile template data - $templateData = array( - 'haveContacts' => $haveContacts, - 'contacts' => $contactsList['list'], - 'numbContacts' => $numbContacts, - 'filterText' => $filterText, - 'haveFilter' => $haveFilter, - 'numbDisplayed' => $numbDisplayed, - 'lastDisplayed' => $lastDisplayed, - 'paging' => $paging, - 'prevStart' => $prevStart, - 'nextStart' => $nextStart, - 'start' => $start = 1, - 'limit' => $limit, - 'namesList' => $namesList - ); - - // Return status, any suggested view, and any data to controller - return array( - 'status' => true, - 'modelRedirect' => false, - 'view' => 'admin/contacts/index.html', - 'data' => $templateData - ); - - } - -*/ } ?> \ No newline at end of file -- 2.17.1