Esempio n. 1
0
 function getTotal()
 {
     $db = $this->getDbo();
     $search = $this->getState('filter.search');
     $filter_type = $this->state->get('filter.state');
     switch ($filter_type) {
         case 'moodle':
             $total = JoomdleHelperContent::getMoodleUsersNumber($search);
             break;
         case 'joomla':
             $searchEscaped = $db->Quote('%' . $db->escape($search, true) . '%', false);
             $total = JoomdleHelperContent::getJoomlaUsersNumber($searchEscaped);
             break;
         case 'joomdle':
             $searchEscaped = $db->Quote('%' . $db->escape($search, true) . '%', false);
             $total = count(JoomdleHelperContent::getJoomdleUsers(0, 0, '', '', $searchEscaped));
             break;
         case 'not_joomdle':
             $total = count(JoomdleHelperContent::getNotJoomdleUsers(0, 0, 'username', 'asc', $search));
             break;
         default:
             $total = JoomdleHelperContent::getAllUsersNumber($search);
             break;
     }
     return $total;
 }