/** * Method to get the field input markup. * * @access protected * * @return string The field input markup. * * @since 11.1 */ protected function getInput() { $db = JFactory::getDBO(); $db->setQuery('SELECT `name`' . ' FROM #__rtiprint_manufacturers' . ' WHERE id = ' . (int) $this->value); $this->_title = $db->loadResult(); if ($error = $db->getErrorMsg()) { JError::raiseWarning(500, $error); } return parent::getInput(); }
/** * Method to get the field input markup. * * @access protected * * @return string The field input markup. * * @since 11.1 */ protected function getInput() { if ($this->value == 'auto') { $this->_title = JText::_('RTIPRINT_AUTO'); } else { $db = JFactory::getDBO(); $db->setQuery('SELECT `name`' . ' FROM #__users' . ' WHERE id = ' . (int) $this->value); $this->_title = $db->loadResult(); if ($error = $db->getErrorMsg()) { JError::raiseWarning(500, $error); } } return parent::getInput(); }