cognidox / OTRS-Joomla-Gateway

Provides seamless access to OTRS tickets through Joomla
https://www.cognidox.com/
10 stars 3 forks source link

Compatibility with Joomla 3.x #36

Closed ChuckNorrison closed 10 years ago

ChuckNorrison commented 10 years ago

replace "DS" with "DIRECTORYSEPARATOR" 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...

lbourne43 commented 10 years ago

Hi ChuckNorrison

Many thanks for your contributions :). We'll review your changes when we can schedule in the time to do so and merge them if everything checks out.

Lewis

ChuckNorrison commented 10 years ago

Iam done so far, it works great in my environment :)

ToDo: Backend settings for Ticket informations shown (like priority, queues, user) and for fields shown in Ticket creation (like priority and choose from queues/post to default queue). Show ticket states as images in Ticket Overview. Redirect to a specific page after reply or submit.

ChuckNorrison commented 10 years ago

Have made so much code rework and fixed my failures... there comes a new pull request.