Exemple #1
0
     if (shTranslateUrl($option, $shLangName)) {
         // V 1.2.4.m
         $issueName = $database->loadObject(false);
     } else {
         $issueName = $database->loadObject();
     }
     if ($issueName) {
         $title[] = ($sefConfig->shInsertIJoomlaMagIssueId ? $ed . $sefConfig->replacement : '') . $issueName->title;
     }
     shRemoveFromGETVarsList('ed');
 }
 // end of edition id insertion
 // V 1.5.7 : article id, on some categories only
 $articleId = empty($id) ? '' : shGetArticleIdString($id, $view, $option, $shLangName);
 if (empty($layout) || !empty($layout) && $layout != 'form') {
     $contentTitle = sef_404::getContentTitles(isset($view) ? @$view : null, isset($id) ? @$id : null, isset($layout) ? @$layout : null, isset($Itemid) ? @$Itemid : null, $shLangName);
     if (!empty($articleId)) {
         $lastBit = array_pop($contentTitle);
         $lastBit .= $sefConfig->replacement . $articleId;
         array_push($contentTitle, $lastBit);
     }
     if (!empty($title)) {
         $title = array_merge($title, $contentTitle);
         // V 1.2.4.q added forced language
     } else {
         $title = $contentTitle;
         // V 1.2.4.q added forced language
     }
     if (!empty($format) && $format == 'feed') {
         $title[] = $format;
         if (!empty($type) && $format != $type) {
Exemple #2
0
function is_valid($string)
{
    global $base, $index;
    if (empty($string)) {
        $state = false;
    } elseif ($string == $index | $string == $base . $index) {
        $state = true;
    } else {
        $state = false;
        require_once sh404SEF_FRONT_ABS_PATH . 'sef_ext.php';
        $sef_ext = new sef_404();
        $option = isset($_GET['option']) ? $_GET['option'] : isset($_REQUEST['option']) ? $_REQUEST['option'] : null;
        $vars = array();
        if (is_null($option)) {
            parse_str($string, $vars);
            if (isset($vars['option'])) {
                $option = $vars['option'];
            }
        }
        switch ($option) {
            case is_null($option):
                break;
            case "login":
                /*Beat: makes this also compatible with CommunityBuilder login module*/
            /*Beat: makes this also compatible with CommunityBuilder login module*/
            case "logout":
                $state = true;
                break;
            default:
                if (is_valid_component($option)) {
                    if (!($option == "com_content") | !($option == "content")) {
                        $state = true;
                    } else {
                        $title = $sef_ext->getContentTitles($_REQUEST['view'], $_REQUEST['id'], empty($_REQUEST['layout']) ? '' : $_REQUEST['layout']);
                        if (count($title) > 0) {
                            $state = true;
                        }
                    }
                } else {
                    if (JString::substr($string, 0, 5) == 'lang=') {
                        $state = true;
                    }
                }
                // shumisha end of change
        }
    }
    return $state;
}
Exemple #3
0
 }
 // use regular function to get content titles, as per out specific settings
 $customConfig = clone $sefConfig;
 $customConfig->ShowSection = $sefConfig->ContentTitleShowSection;
 $customConfig->ShowCat = $sefConfig->ContentTitleShowCat;
 $customConfig->UseAlias = $sefConfig->ContentTitleUseAlias;
 $customConfig->useCatAlias = $sefConfig->ContentTitleUseCatAlias;
 $customConfig->useSecAlias = $sefConfig->ContentTitleUseSecAlias;
 $customConfig->LowerCase = false;
 // V 1.2.4.t protect against sef_ext.php not being included
 if (!class_exists('sef_404')) {
     require_once sh404SEF_ABS_PATH . 'components/com_sh404sef/sef_ext.php';
 }
 $layout = isset($layout) ? $layout : null;
 $articleId = shGetArticleIdString($id, $view, $option, $shLangName);
 $title = sef_404::getContentTitles($view, $id, $layout, $Itemid, $shLangName, $customConfig);
 if (!empty($articleId)) {
     $lastBit = array_pop($title);
     $lastBit .= ' [' . $articleId . ']';
     array_push($title, $lastBit);
 }
 $pageNumber = '';
 // V 1.2.4.t try better handling of multipages article (use of mospagebreak)
 if ($view == 'article' && !empty($limitstart)) {
     // this is multipage article
     $shPageTitle = '';
     $sql = 'SELECT c.id, c.fulltext, c.introtext  FROM #__content AS c WHERE id=' . $id;
     $database->setQuery($sql);
     $contentElement = $database->loadObject();
     if ($database->getErrorNum()) {
         JError::raiseError(500, $database->stderr());