cognidox/OTRS-Joomla-Gateway — pull request #36 by ChuckNorrison (2014-08-11 12:47:52+00:00)
Title: Compatibility with Joomla 3.x

replace "DS" with "DIRECTORY_SEPARATOR"
replace nameQuote with quoteName
replace JModel with JModelLegacy
replace JView with JViewLegacy
replace JController with JControllerLegacy
replace "JHtmlBehavior::mootools();" with
"JHtml::_('behavior.framework');"
replace "JHTML::_( 'stylesheet', 'otrsgateway.css',
'components/com_otrsgateway/assets/' );" with

$doc = JFactory::getDocument();
$doc->addStyleSheet( JUri::root() .
'components/com_otrsgateway/assets/otrsgateway.css' );
now it gets more tricky...

replace all "$this->assignRef" calls like this:

//$this->assignRef( 'stateList', $stateList );
$this->stateList=$stateList;
replace all JRequest::getVar calls with JInput. Its nessecary to create
object first (i.e.):

//$ticketID = JRequest::getVar( 'ticketID' );
$jinput = JFactory::getApplication()->input;
$ticketID = $jinput->get( 'ticketID', null, null );
replace all JRequest::SetVar calls with JInput. Use the object $jinput
(created like above):

//JRequest::setVar( 'view', 'tickets' );
$jinput->set( 'view', 'tickets' );
replace all JRequest::getCmd calls with JInput. Use the object $jinput
(created like above):

//if ( ! JRequest::getCmd( 'view' ) )
if ( ! $jinput->getCmd( 'view' ) )
replace JFactory::getEditor() with JEditor::getInstance like this:

//$editor =& JFactory::getEditor();
$conf = JFactory::getConfig();
$editor_conf = $conf->get('editor');
$editor = JEditor::getInstance($editor_conf);
replace JUtility::getHash with JApplication::getHash

replace JRequest::checkToken() with JSession::checkToken()
replacements for attachments in view.raw.php:

// $file = JRequest::getVar( 'attachment', null, 'files', 'array' );
$jinput_new = new JInput($_FILES);
$file = $jinput_new->get( 'attachment', null, 'array' );
rewrite javascript from mootools to jquery in reply.php...