コード例 #1
0
 function route($url, $xhtml = true, $Itemid = '')
 {
     if (!$Itemid && RSTicketsProHelper::getConfig('calculate_itemids')) {
         $Itemid = RSTicketsProHelper::_findRoute($url);
     }
     if (strpos($url, 'Itemid=') === false) {
         if (!$Itemid) {
             $Itemid = JRequest::getInt('Itemid');
             if ($Itemid) {
                 $Itemid = 'Itemid=' . $Itemid;
             }
         } elseif ($Itemid) {
             $Itemid = 'Itemid=' . (int) $Itemid;
         }
         if ($Itemid) {
             $url .= strpos($url, '?') === false ? '?' . $Itemid : '&' . $Itemid;
         }
     }
     return JRoute::_($url, $xhtml);
 }