/**
  * 
  * Redirect to position listing page
  */
 public function selectPosition()
 {
     if (!JSNFactory::_cURLCheckFunctions()) {
         $msg = JText::_('JSN_POWERADMIN_ERROR_CURL_NOT_ENABLED');
         $this->setRedirect('index.php?option=com_poweradmin&view=error&tmpl=component', $msg, 'error');
         $this->redirect();
     }
     global $templateAuthor, $notSupportedTemplateAuthors;
     if (in_array($templateAuthor, $notSupportedTemplateAuthors)) {
         $msg = JText::_('JSN_POWERADMIN_ERROR_TEMPLATE_NOT_SUPPORTED');
         $this->setRedirect('index.php?option=com_poweradmin&view=error&tmpl=component', $msg);
     } else {
         $app = JFactory::getApplication();
         $moduleid = JRequest::getVar('moduleid', array(), 'get', 'array');
         $appendRedirect = 'tmpl=component';
         $moduleid = explode(',', $moduleid[0]);
         $app->setUserState('com_poweradmin.changeposition.moduleid', $moduleid);
         $this->setRedirect('index.php?option=com_poweradmin&view=changeposition&' . $appendRedirect);
         $this->redirect();
     }
 }
 /**
  * Method to check if we should turn
  * position chooser feature On or not
  * @return boolean
  */
 private function canEnablePosChooser()
 {
     // Bypass if CUrl not enabled.
     if (!JSNFactory::_cURLCheckFunctions()) {
         return false;
     }
     // Bypass if current site template not supported
     // 		global $notSupportedTemplateAuthors;
     // 		$template = JSNTemplateHelper::getInstance();
     // 		$templateAuthor = $template->getAuthor();
     // 		if (in_array($templateAuthor, $notSupportedTemplateAuthors)) return false;
     // Bypass if site is offline mode
     $app = $this->_application;
     if ($app->getCfg('offline')) {
         return false;
     }
     return true;
 }