AAAAhome/academiac/www/administrator/components/com_virtuemart/tables/usergroups.php000060400000003522151372157360024525 0ustar00setUniqueName('group_name'); $this->setLoggable(); } /** * Validates the userfields record fields. * * @return boolean True if the table buffer is contains valid data, false otherwise. */ function check($nrOfValues){ if (preg_match('/[^a-z0-9\._\-]/i', $this->group_name) > 0) { vmError(JText::_('COM_VIRTUEMART_PERMISSION_GROUP_NAME_INVALID_CHARACTERS')); return false; } return parent::check(); } } //No CLosing Tag home/academiac/www/administrator/components/com_virtuemart/models/usergroups.php000060400000004011151372164550024527 0ustar00setMainTable('usergroups'); } function getUsergroup() { $db = JFactory::getDBO(); if (empty($this->_data)) { $this->_data = $this->getTable('usergroups'); $this->_data->load((int)$this->_id); } return $this->_data; } function getUsergroups($onlyPublished=false, $noLimit=false) { $where = array(); if ($onlyPublished) { $where[] = ' `#__virtuemart_shoppergroups`.`published` = 1'; } $whereString = ''; if (count($where) > 0) $whereString = ' WHERE '.implode(' AND ', $where) ; return $this->_data = $this->exeSortSearchListQuery(0,'*',' FROM `#__virtuemart_permgroups`',$whereString,'',$this->_getOrdering()); } } home/academiac/www/administrator/components/com_virtuemart/controllers/usergroups.php000060400000002343151372433120025610 0ustar00