Exemplo n.º 1
0
 /**
  * Generates a menu item based on given data.
  *
  * @param   array  $data  Data to insert to the menu item.
  *
  * @return null
  */
 private static function createMenuItem($data)
 {
     $count = count(self::$data);
     $defaults = array('id' => $count, 'menutype' => 'testmenu', 'title' => '', 'alias' => isset($data['title']) ? JFilterOutput::stringURLSafe($data['title']) : '', 'route' => isset($data['title']) ? JFilterOutput::stringURLSafe($data['title']) : '', 'link' => JUri::buildQuery($data['query']), 'type' => 'component', 'level' => '1', 'language' => '*', 'access' => '1', 'params' => '{}', 'home' => '0', 'component_id' => '1000', 'parent_id' => '0', 'component' => 'com_monitor', 'tree' => isset($data['id']) ? array($data['id']) : array($count), 'query' => array('option' => 'com_monitor'));
     $obj = (object) array_merge($defaults, $data);
     self::$data[$obj->id] = $obj;
 }
Exemplo n.º 2
0
 /**
  * Retrieve the url where the user should be returned after logging in
  *
  * @param   \Joomla\Registry\Registry  $params  module parameters
  * @param   string                     $type    return type
  *
  * @return string
  */
 public static function getReturnURL($params, $type)
 {
     $app = JFactory::getApplication();
     $item = $app->getMenu()->getItem($params->get($type));
     if ($item) {
         $vars = $item->query;
     } else {
         // Stay on the same page
         $vars = $app::getRouter()->getVars();
     }
     return base64_encode('index.php?' . JUri::buildQuery($vars));
 }
Exemplo n.º 3
0
 /**
  * Returns the login url
  *
  * @since	1.0
  * @access	public
  * @param	string
  * @return
  */
 public static function getReturnURL(&$params)
 {
     // $params->get( 'return' , FD::getCallback() );
     $app = JFactory::getApplication();
     $router = $app->getRouter();
     $url = null;
     $itemid = $params->get('return');
     if ($itemid) {
         $db = JFactory::getDbo();
         $query = $db->getQuery(true)->select($db->quoteName('link'))->from($db->quoteName('#__menu'))->where($db->quoteName('published') . '=1')->where($db->quoteName('id') . '=' . $db->quote($itemid));
         $db->setQuery($query);
         if ($link = $db->loadResult()) {
             if ($router->getMode() == JROUTER_MODE_SEF) {
                 $url = 'index.php?Itemid=' . $itemid;
             } else {
                 $url = $link . '&Itemid=' . $itemid;
             }
         }
     }
     if (!$url) {
         // Stay on the same page
         $uri = clone JUri::getInstance();
         $vars = $router->parse($uri);
         unset($vars['lang']);
         if ($router->getMode() == JROUTER_MODE_SEF) {
             if (isset($vars['Itemid'])) {
                 $itemid = $vars['Itemid'];
                 $menu = $app->getMenu();
                 $item = $menu->getItem($itemid);
                 unset($vars['Itemid']);
                 if (isset($item) && $vars == $item->query) {
                     $url = 'index.php?Itemid=' . $itemid;
                 } else {
                     $url = 'index.php?' . JUri::buildQuery($vars) . '&Itemid=' . $itemid;
                 }
             } else {
                 $url = 'index.php?' . JUri::buildQuery($vars);
             }
         } else {
             $url = 'index.php?' . JUri::buildQuery($vars);
         }
     }
     return base64_encode($url);
 }
 /**
  * Builds internal URL - indepedent of SEF function
  *
  * @param object $uri
  *
  * @return string
  */
 private function buildInternalUrl($uri)
 {
     // Clone JUri object to avoid an error because of the method -parse- in the next step
     $uri_clone = clone $uri;
     // Reference to JRouter object
     $route = JSite::getRouter();
     // Get the internal route
     $url_internal_array = $route->parse($uri_clone);
     // Move Itemid at the end
     if (array_key_exists('Itemid', $url_internal_array)) {
         $itemid = $url_internal_array['Itemid'];
         unset($url_internal_array['Itemid']);
         $url_internal_array['Itemid'] = $itemid;
     }
     // Move lang at the end
     if (array_key_exists('lang', $url_internal_array)) {
         $lang = $url_internal_array['lang'];
         unset($url_internal_array['lang']);
         $url_internal_array['lang'] = $lang;
     }
     $url_internal = JUri::base() . 'index.php?' . JUri::buildQuery($url_internal_array);
     return $url_internal;
 }
Exemplo n.º 5
0
 /**
  * Get the URL of current page for redirecting if any error occurs.
  *
  * @return  string  Base64 URL.
  *
  * @since   1.0.0
  */
 function getErrorReturnUrl()
 {
     $app = JFactory::getApplication();
     $router = $app->getRouter();
     $uri = clone JUri::getInstance();
     $vars = $router->parse($uri);
     unset($vars['lang']);
     if ($router->getMode() == JROUTER_MODE_SEF) {
         if (isset($vars['Itemid'])) {
             $itemId = $vars['Itemid'];
             $menu = $app->getMenu();
             $item = $menu->getItem($itemId);
             unset($vars['Itemid']);
             if (isset($item) && $vars == $item->query) {
                 $url = 'index.php?Itemid=' . $itemId;
             } else {
                 $url = 'index.php?' . JUri::buildQuery($vars) . '&Itemid=' . $itemId;
             }
         } else {
             $url = 'index.php?' . JUri::buildQuery($vars);
         }
     } else {
         $url = 'index.php?' . JUri::buildQuery($vars);
     }
     return base64_encode($url);
 }
Exemplo n.º 6
0
 /**
  * Sets the type of the menu item currently being edited.
  *
  * @return  void
  *
  * @since   1.6
  */
 public function setType()
 {
     $app = JFactory::getApplication();
     // Get the posted values from the request.
     $data = $this->input->post->get('jform', array(), 'array');
     // Get the type.
     $type = $data['type'];
     $type = json_decode(base64_decode($type));
     $title = isset($type->title) ? $type->title : null;
     $recordId = isset($type->id) ? $type->id : 0;
     $specialTypes = array('alias', 'separator', 'url', 'heading');
     if (!in_array($title, $specialTypes)) {
         $title = 'component';
     }
     $app->setUserState('com_menus.edit.item.type', $title);
     if ($title == 'component') {
         if (isset($type->request)) {
             $component = JComponentHelper::getComponent($type->request->option);
             $data['component_id'] = $component->id;
             $app->setUserState('com_menus.edit.item.link', 'index.php?' . JUri::buildQuery((array) $type->request));
         }
     } elseif ($title == 'alias') {
         $app->setUserState('com_menus.edit.item.link', 'index.php?Itemid=');
     }
     unset($data['request']);
     $data['type'] = $title;
     if ($this->input->get('fieldtype') == 'type') {
         $data['link'] = $app->getUserState('com_menus.edit.item.link');
     }
     //Save the data in the session.
     $app->setUserState('com_menus.edit.item.data', $data);
     $this->type = $type;
     $this->setRedirect(JRoute::_('index.php?option=' . $this->option . '&view=' . $this->view_item . $this->getRedirectToItemAppend($recordId), false));
 }
 /**
  * Test the buildQuery method.
  *
  * @return  void
  *
  * @since   11.1
  * @covers  JUri::buildQuery
  */
 public function testBuildQuery()
 {
     $params = array('field' => array('price' => array('from' => 5, 'to' => 10), 'name' => 'foo'), 'v' => 45);
     $expected = 'field[price][from]=5&field[price][to]=10&field[name]=foo&v=45';
     $this->assertEquals($expected, JUri::buildQuery($params));
 }
Exemplo n.º 8
0
 public static function buildQuery($parts)
 {
     if ($item = JoomleagueHelperRoute::_findItem($parts)) {
         $parts['Itemid'] = $item->id;
     } else {
         $params = JComponentHelper::getParams('com_joomleague');
         if ($params->get('default_itemid')) {
             $parts['Itemid'] = intval($params->get('default_itemid'));
         }
     }
     return JUri::buildQuery($parts);
 }
    $totalPhotos = $photosModel->getPhotosCount($user->id);
    //group count
    $groupmodel = CFactory::getModel('groups');
    $totalGroups = $groupmodel->getGroupsCount($user->id);
    //event count
    $eventmodel = CFactory::getModel('events');
    $totalEvents = $eventmodel->getEventsCount($user->id);
    if ($moduleParams->get('logout')) {
        $app = JFactory::getApplication();
        $item = $app->getMenu()->getItem($moduleParams->get('logout'));
        if ($item) {
            $vars = $item->query;
        } else {
            base64_encode(CRoute::_('index.php?option=com_community&view=' . CFactory::getConfig()->get('redirect_logout'), false));
        }
        $logoutlink = base64_encode('index.php?' . JUri::buildQuery($vars));
    } else {
        $logoutlink = base64_encode(CRoute::_('index.php?option=com_community&view=' . CFactory::getConfig()->get('redirect_logout'), false));
    }
}
if ($moduleParams->get('login', 0)) {
    $app = JFactory::getApplication();
    $item = $app->getMenu()->getItem($moduleParams->get('login'));
    if ($item) {
        $vars = $item->query;
    }
    $loginLink = base64_encode('index.php?' . JUri::buildQuery($vars));
} else {
    $loginLink = base64_encode(CRoute::_('index.php?option=com_community&view=' . CFactory::getConfig()->get('redirect_logout'), false));
}
require JModuleHelper::getLayoutPath('mod_community_hellome', $params->get('layout', 'default'));
Exemplo n.º 10
0
 /**
  * Create a uri based on a full or partial url string
  *
  * @param   string  $url  The URI
  *
  * @return  JUri
  *
  * @since   11.1
  */
 protected function _createURI($url)
 {
     // Create full URL if we are only appending variables to it
     if (substr($url, 0, 1) == '&') {
         $vars = array();
         if (strpos($url, '&') !== false) {
             $url = str_replace('&', '&', $url);
         }
         parse_str($url, $vars);
         $vars = array_merge($this->getVars(), $vars);
         foreach ($vars as $key => $var) {
             if ($var == "") {
                 unset($vars[$key]);
             }
         }
         $url = 'index.php?' . JUri::buildQuery($vars);
     }
     // Decompose link into url component parts
     return new JUri($url);
 }
Exemplo n.º 11
0
 /**
  * Create a uri based on a full or partial url string
  *
  * @param   string  $url  The URI or an associative array
  *
  * @return  JUri
  *
  * @since   3.2
  */
 protected function createURI($url)
 {
     if (is_array($url)) {
         $uri = new JUri('index.php');
         $uri->setQuery($url);
         return $uri;
     } elseif (substr($url, 0, 1) == '&') {
         $vars = array();
         if (strpos($url, '&') !== false) {
             $url = str_replace('&', '&', $url);
         }
         parse_str($url, $vars);
         $vars = array_merge($this->getVars(), $vars);
         foreach ($vars as $key => $var) {
             if ($var == "") {
                 unset($vars[$key]);
             }
         }
         $url = 'index.php?' . JUri::buildQuery($vars);
     }
     // Decompose link into url component parts
     return new JUri($url);
 }
Exemplo n.º 12
0
 static function pagenav2($jl_task, $rlimit, $currentRoundcode = 0, $user = '', $mode = '')
 {
     $mytask = JRequest::getVar('task', false);
     $divLevel = JRequest::getInt('divLevel', 0);
     $division = JRequest::getInt('division', 0);
     $pageNav2 = '<form action="" method="get" style="display:inline;">';
     $pageNav2 .= '<select class="inputbox" onchange="joomleague_changedoc(this)">';
     $params = array();
     $params['option'] = 'com_joomleague';
     $params['controller'] = $jl_task;
     $params['p'] = $this->projectid;
     if ($user) {
         $params['uid'] = $user;
     }
     if ($mode) {
         $params['mode'] = $mode;
     }
     if ($mytask) {
         $params['task'] = $mytask;
     }
     if ($division > 0) {
         $params['division'] = $division;
     }
     if ($divLevel > 0) {
         $params['divLevel'] = $divLevel;
     }
     for ($counter = 1; $counter <= $rlimit; $counter++) {
         if ($counter < 10) {
             $pagenumber = "0" . $counter;
         } else {
             $pagenumber = $counter;
         }
         if ($counter <= $rlimit) {
             $params['r'] = $counter;
             $query = JUri::buildQuery($params);
             $link = JRoute::_('index.php?' . $query);
             $pageNav2 .= "<option value='" . $link . "'";
             if ($counter == $currentRoundcode) {
                 $pageNav2 .= " selected='selected'";
             }
             $pageNav2 .= '>';
         }
         $pageNav2 .= $pagenumber . '</option>';
     }
     $pageNav2 .= '</select></form>';
     return $pageNav2;
 }
Exemplo n.º 13
0
 public static function nextLastPages($url, $text, $maxentries, $limitstart = 0, $limit = 10)
 {
     $latestlimitstart = 0;
     if (intval($limitstart - $limit) > 0) {
         $latestlimitstart = intval($limitstart - $limit);
     }
     $nextlimitstart = 0;
     if ($limitstart + $limit < $maxentries) {
         $nextlimitstart = $limitstart + $limit;
     }
     $lastlimitstart = $maxentries - $maxentries % $limit;
     if ($maxentries % $limit == 0) {
         $lastlimitstart = $maxentries - $maxentries % $limit - $limit;
     }
     echo '<center>';
     echo '<table style="width: 50%; align: center;" cellspacing="0" cellpadding="0" border="0">';
     echo '<tr>';
     echo '<td style="width: 10%; text-align: left;" nowrap="nowrap">';
     if ($limitstart > 0) {
         $query = JUri::buildQuery(array("limit" => $limit, "limitstart" => 0));
         echo JHtml::link($url . $query, '&lt;&lt;&lt;');
         echo '&nbsp;&nbsp;&nbsp';
         $query = JUri::buildQuery(array("limit" => $limit, "limitstart" => $latestlimitstart));
         echo JHtml::link($url . $query, '&lt;&lt;');
         echo '&nbsp;&nbsp;&nbsp;';
     }
     echo '</td>';
     echo '<td style="text-align: center;" nowrap="nowrap">';
     $players_to = $maxentries;
     if ($limitstart + $limit < $maxentries) {
         $players_to = $limitstart + $limit;
     }
     echo sprintf($text, $maxentries, $limitstart + 1 . ' - ' . $players_to);
     echo '</td>';
     echo '<td style="width: 10%; text-align: right;" nowrap="nowrap">';
     if ($nextlimitstart > 0) {
         echo '&nbsp;&nbsp;&nbsp;';
         $query = JUri::buildQuery(array("limit" => $limit, "limitstart" => $nextlimitstart));
         echo JHtml::link($url . $query, '&gt;&gt;');
         echo '&nbsp;&nbsp;&nbsp';
         $query = JUri::buildQuery(array("limit" => $limit, "limitstart" => $lastlimitstart));
         echo JHtml::link($url . $query, '&gt;&gt;&gt;');
     }
     echo '</td>';
     echo '</tr>';
     echo '</table>';
     echo '</center>';
 }
 public static function processRedirects($params, $type)
 {
     $app = JFactory::getApplication();
     $user = JFactory::getUser();
     $jinput = JFactory::getApplication()->input;
     $option = $jinput->get('option', '', 'string');
     if (version_compare(JVERSION, '3.2', '>')) {
         $requireReset = $user->requireReset;
     } else {
         $requireReset = 0;
     }
     if (!$app->isSite()) {
         return false;
     } elseif ($option == 'com_users' || $option == 'com_comprofiler' || $option == 'com_community' || $option == 'com_awdwall') {
         if ($requireReset) {
             return;
         }
         #			$params					= $this->params;
         $task = $jinput->get('task', '', 'string');
         $view = $jinput->get('view', '', 'string');
         $layout = $jinput->get('layout', '', 'string');
         $return = $jinput->get('return', '', 'string');
         $custom_register = $params->get('custom_register', 'cb');
         $custom_post_register = $params->get('custom_post_register', 'cb');
         $custom_login = $params->get('custom_login', 'cb');
         $custom_profile = $params->get('custom_profile', 'cb');
         $custom_password = $params->get('custom_password', 'cb');
         $custom_username = $params->get('custom_username', 'cb');
         $custom_post_login = $params->get('custom_post_login', 0);
         $custom_post_login_menu = $params->get('custom_post_login_menu', '');
         $custom_post_login_URL = $params->get('custom_post_login_URL', '');
         $custom_logout = $params->get('custom_logout', 0);
         $custom_logout_menu = $params->get('custom_logout_menu', '');
         $custom_logout_URL = $params->get('custom_logout_url', '');
         $devMode = $params->get('dev_mode', 0);
         $ckeckRegister = $task == 'register' || $view == 'registration' || $view == 'register';
         $ckeckProfile = $task != 'user.logout' && $task != 'user.login';
         $redirectURL = '';
         switch (true) {
             // bypass plugin altogether if logging out with a valid token
             // (it seems that the task 'user.logout' is only used when a token is present)
             case $option == 'com_users' && $task == 'user.logout':
                 return;
                 #				case $clro:
                 #					return;
                 // LOGOUT:
                 // redirect for a forced logout
             #				case $clro:
             #					return;
             // LOGOUT:
             // redirect for a forced logout
             case $option == 'com_users' && $view == 'login' && !$user->guest && $custom_logout && $type == 'after_route':
                 $processType = 'LOGOUT';
                 if ($custom_logout_menu == '' && $custom_logout_URL == '') {
                     $vars = $app::getRouter()->getVars();
                     $returnVar = '&return=' . base64_encode('index.php?' . JUri::buildQuery($vars));
                 } else {
                     $redirectURL = self::checkCustomURL($params, 'custom_logout');
                     $returnVar = '&return=' . base64_encode($redirectURL);
                 }
                 $masterRedirect = 'index.php?option=com_users&task=user.logout' . $returnVar . '&' . JSession::getFormToken() . '=1';
                 break;
                 // REGISTRATION:
                 // redirect FROM joomla registration TO community builder registration
             // REGISTRATION:
             // redirect FROM joomla registration TO community builder registration
             case $option == 'com_users' && $ckeckRegister && $custom_register == 'cb':
                 $processType = 'REGISTRATION';
                 $masterRedirect = 'index.php?option=com_comprofiler&task=registers';
                 break;
                 // redirect FROM joomla registration TO jomsocial registeration
             // redirect FROM joomla registration TO jomsocial registeration
             case $option == 'com_users' && $ckeckRegister && $custom_register == 'js':
                 $processType = 'REGISTRATION';
                 $masterRedirect = "index.php?option=com_community&view=register";
                 break;
                 // redirect FROM joomla registration TO custom registration
             // redirect FROM joomla registration TO custom registration
             case $option == 'com_users' && $ckeckRegister && $custom_register == 'custom':
                 $processType = 'REGISTRATION';
                 $masterRedirect = self::checkCustomURL($params, 'custom_register');
                 break;
                 // redirect FROM community builder registration TO custom registration
             // redirect FROM community builder registration TO custom registration
             case $option == 'com_comprofiler' && $task == 'registers' && $custom_register == 'custom':
                 $processType = 'REGISTRATION';
                 $masterRedirect = self::checkCustomURL($params, 'custom_register');
                 break;
                 // redirect FROM jomsocial registration TO custom registration
             // redirect FROM jomsocial registration TO custom registration
             case $option == 'com_community' && $task == 'register' && $custom_register == 'custom':
                 $processType = 'REGISTRATION';
                 $masterRedirect = self::checkCustomURL($params, 'custom_register');
                 break;
                 // redirect FROM jomwall registration TO custom registration
                 // not sure if this will be able to be used since it appears that JomWall doesn't have a direct URL to a registration page
                 /*
                 				case $option=='com_awdwall' && $task=='register' && $custom_register == 'custom':
                 					$masterRedirect = self::checkCustomURL($params, 'custom_register');
                 					break;
                 */
                 // LOGIN:
                 // redirect FROM joomla login TO custom login
             // redirect FROM jomwall registration TO custom registration
             // not sure if this will be able to be used since it appears that JomWall doesn't have a direct URL to a registration page
             /*
             				case $option=='com_awdwall' && $task=='register' && $custom_register == 'custom':
             					$masterRedirect = self::checkCustomURL($params, 'custom_register');
             					break;
             */
             // LOGIN:
             // redirect FROM joomla login TO custom login
             case $option == 'com_users' && $view == 'login' && $custom_login == 'custom':
                 $processType = 'LOGIN';
                 $masterRedirect = self::checkCustomURL($params, 'custom_login');
                 break;
                 // redirect FROM community builder login TO custom login
             // redirect FROM community builder login TO custom login
             case $option == 'com_comprofiler' && $view == 'login' && $custom_login == 'custom':
                 $processType = 'LOGIN';
                 $masterRedirect = self::checkCustomURL($params, 'custom_login');
                 break;
                 // redirect FROM jomsocial login TO custom login
             // redirect FROM jomsocial login TO custom login
             case $option == 'com_users' && $view == 'frontpage' && $custom_login == 'custom':
                 $processType = 'LOGIN';
                 $masterRedirect = self::checkCustomURL($params, 'custom_login');
                 break;
                 // redirect FROM jomwall login TO custom login
             // redirect FROM jomwall login TO custom login
             case $option == 'com_awdwall' && $task == 'login' && $custom_login == 'custom':
                 $processType = 'LOGIN';
                 $masterRedirect = self::checkCustomURL($params, 'custom_login');
                 break;
                 // redirect FROM joomla login TO community builder login
             // redirect FROM joomla login TO community builder login
             case $option == 'com_users' && $view == 'login' && $custom_login == 'cb':
                 $processType = 'LOGIN';
                 $masterRedirect = "index.php?option=com_comprofiler&task=login";
                 break;
                 // redirect FROM joomla login TO jomsocial login
             // redirect FROM joomla login TO jomsocial login
             case $option == 'com_users' && $view == 'login' && $custom_login == 'js':
                 $processType = 'LOGIN';
                 $app->redirect(JRoute::_("index.php?option=com_community&view=frontpage", false));
                 break;
                 // redirect FROM joomla login TO jomwall login
             // redirect FROM joomla login TO jomwall login
             case $option == 'com_users' && $view == 'login' && $custom_login == 'jw':
                 $processType = 'LOGIN';
                 $masterRedirect = "index.php?option=com_awdwall&task=login";
                 break;
                 // redirect FROM community builder login TO joomla login
             // redirect FROM community builder login TO joomla login
             case $option == 'com_comprofiler' && $task == 'login' && $custom_login == 'joomla':
                 $processType = 'LOGIN';
                 $masterRedirect = "index.php?option=com_users&view=login";
                 break;
                 // redirect FROM jomsocial login TO joomla login
             // redirect FROM jomsocial login TO joomla login
             case $option == 'com_community' && $view == 'frontpage' && $custom_login == 'joomla':
                 $processType = 'LOGIN';
                 $masterRedirect = "index.php?option=com_users&view=login";
                 break;
                 // redirect FROM jomwall login TO joomla login
             // redirect FROM jomwall login TO joomla login
             case $option == 'com_awdwall' && $task == 'login' && $custom_login == 'joomla':
                 $processType = 'LOGIN';
                 $masterRedirect = "index.php?option=com_users&view=login";
                 break;
                 // PROFILE:
                 // redirect FROM joomla profile TO community builder profile
             // PROFILE:
             // redirect FROM joomla profile TO community builder profile
             case $option == 'com_users' && $view == 'profile' && $custom_profile == 'cb':
                 $processType = 'PROFILE';
                 $masterRedirect = "index.php?option=com_comprofiler&view=profile";
                 break;
                 // redirect FROM joomla profile TO jomsocial profile
             // redirect FROM joomla profile TO jomsocial profile
             case $option == 'com_users' && $ckeckProfile && !$user->guest && $custom_profile == 'js':
                 $processType = 'PROFILE';
                 $masterRedirect = "index.php?option=com_community&view=profile";
                 break;
                 // redirect FROM joomla profile TO jomwall profile
             // redirect FROM joomla profile TO jomwall profile
             case $option == 'com_users' && $ckeckProfile && !$user->guest && $custom_profile == 'jw':
                 $processType = 'PROFILE';
                 $masterRedirect = "index.php?option=com_awdwall&view=awdwall&layout=mywall";
                 break;
                 // redirect FROM community builder profile TO joomla profile
             // redirect FROM community builder profile TO joomla profile
             case $option == 'com_comprofiler' && $view == 'profile' && $custom_profile == 'joomla':
                 $processType = 'PROFILE';
                 $masterRedirect = "index.php?option=com_users&view=profile";
                 break;
                 // redirect FROM jomsocial profile TO joomla profile
             // redirect FROM jomsocial profile TO joomla profile
             case $option == 'com_community' && $view == 'profile' && $custom_profile == 'joomla':
                 $processType = 'PROFILE';
                 $masterRedirect = "index.php?option=com_users&view=profile";
                 break;
                 // redirect FROM jomwall profile TO joomla profile
             // redirect FROM jomwall profile TO joomla profile
             case $option == 'com_awdwall' && $view == 'awdwall' && $layout == 'mywall' && $custom_profile == 'joomla':
                 $processType = 'PROFILE';
                 $masterRedirect = "index.php?option=com_users&view=profile";
                 break;
                 // redirect FROM community builder profile or joomla or jomsocial or jomwall TO custom profile
             // redirect FROM community builder profile or joomla or jomsocial or jomwall TO custom profile
             case ($option == 'com_comprofiler' || $option == 'com_users' || $option == 'com_community' || $option == 'com_awdwall') && ($view == 'profile' || $view == 'awdwall') && $custom_profile == 'custom':
                 $processType = 'PROFILE';
                 $masterRedirect = self::checkCustomURL($params, 'custom_profile');
                 break;
                 // PASSWORD:
                 // redirect FROM joomla core TO community builder forgot password
             // PASSWORD:
             // redirect FROM joomla core TO community builder forgot password
             case $option == 'com_users' && $view == 'reset' && $custom_password == 'cb':
                 $processType = 'PASSWORD';
                 $masterRedirect = "index.php?option=com_comprofiler&task=lostPassword";
                 break;
                 // redirect FROM joomla password TO custom password
             // redirect FROM joomla password TO custom password
             case $option == 'com_users' && $view == 'reset' && $custom_password == 'custom':
                 $processType = 'PASSWORD';
                 $masterRedirect = self::checkCustomURL($params, 'custom_password');
                 break;
                 // redirect FROM community builder TO joomla password
             // redirect FROM community builder TO joomla password
             case $option == 'com_comprofiler' && $task == 'lostpassword' && ($custom_password == 'joomla' || $custom_username == 'joomla'):
                 $processType = 'PASSWORD';
                 $masterRedirect = 'index.php?option=com_users&view=reset';
                 break;
                 // redirect FROM community builder TO custom password
             // redirect FROM community builder TO custom password
             case $option == 'com_comprofiler' && $task == 'lostpassword' && ($custom_password == 'custom' || $custom_username == 'custom'):
                 $processType = 'PASSWORD';
                 $masterRedirect = self::checkCustomURL($params, 'custom_password');
                 break;
                 // USERNAME:
                 // FYI, there isn't a seperate call for community builder username reminder
                 // redirect FROM joomla core TO community builder forgot username
             // USERNAME:
             // FYI, there isn't a seperate call for community builder username reminder
             // redirect FROM joomla core TO community builder forgot username
             case $option == 'com_users' && $view == 'remind' && $custom_username == 'cb':
                 $processType = 'USERNAME';
                 $masterRedirect = "index.php?option=com_comprofiler&task=lostPassword";
                 break;
                 // redirect FROM joomla core TO custom username
             // redirect FROM joomla core TO custom username
             case $option == 'com_users' && $view == 'remind' && $custom_username == 'custom':
                 $processType = 'USERNAME';
                 $masterRedirect = self::checkCustomURL($params, 'custom_profile');
                 break;
             default:
                 $processType = 'none';
                 $masterRedirect = '';
         }
         $devMessage = '';
         if ($devMode) {
             $html = '<pre>';
             $html .= time() . '<br>';
             $html .= 'TYPE: ' . $type . '<br>';
             $html .= 'PROCESS TYPE: ' . $processType . '<br>';
             $html .= 'OPTION: ' . $option . '<br>';
             $html .= 'TASK: ' . $task . '<br>';
             $html .= 'VIEW: ' . $view . '<br>';
             $html .= 'custom_logout: ' . $custom_logout . '<br>';
             $html .= 'custom_register: ' . $custom_register . '<br>';
             $html .= 'custom_login: '******'<br>';
             $html .= 'custom_profile: ' . $custom_profile . '<br>';
             $html .= 'custom_password: '******'<br>';
             $html .= 'custom_username: '******'<br>';
             $html .= 'custom_post_login: '******'<br>';
             $html .= 'redirectURL: ' . $redirectURL . '<br>';
             $html .= 'masterRedirect: ' . $masterRedirect . '<br>';
             $html .= '</pre>';
             #$_SESSION['devLog'].= $html;
             #	print_r($vars);
             $devMessage = $html . '<br />';
             /*	die('DevMode Enabled for \'Core Login Redirect\'.'.$devMessage);
             */
             JError::raiseNotice(100, '<strong>DEV NOTICE:</strong> The \'Core Login Redirect\' - System Plugin was processed.<p style="color:red;">This is a \'Developer Release\' of this plugin and should not to be installed on live sites.<br />' . $masterRedirect . $html);
         }
         if ($masterRedirect != '') {
             $app->redirect(JRoute::_($masterRedirect, false), $devMessage);
         }
     }
 }