Code Duplication    Length = 19-19 lines in 2 locations

class/utility.php 1 location

@@ 442-460 (lines=19) @@
439
        /**
440
         * Firefox and Opera Navigation's Bar
441
         */
442
        if (static::getModuleOption('sitenavbar')) {
443
            $content .= sprintf("<link rel=\"Home\" title=\"%s\" href=\"%s/\">\n", $xoopsConfig['sitename'], XOOPS_URL);
444
            $content .= sprintf("<link rel=\"Contents\" href=\"%s\">\n", XOOPS_URL . '/modules/news/index.php');
445
            $content .= sprintf("<link rel=\"Search\" href=\"%s\">\n", XOOPS_URL . '/search.php');
446
            $content .= sprintf("<link rel=\"Glossary\" href=\"%s\">\n", XOOPS_URL . '/modules/news/archive.php');
447
            $content .= sprintf("<link rel=\"%s\" href=\"%s\">\n", $myts->htmlSpecialChars(_NW_SUBMITNEWS), XOOPS_URL . '/modules/news/submit.php');
448
            $content .= sprintf("<link rel=\"alternate\" type=\"application/rss+xml\" title=\"%s\" href=\"%s/\">\n", $xoopsConfig['sitename'], XOOPS_URL . '/backend.php');
449
450
            // Create chapters
451
            require_once XOOPS_ROOT_PATH . '/class/tree.php';
452
            require_once XOOPS_ROOT_PATH . '/modules/news/class/class.newstopic.php';
453
            $xt         = new NewsTopic();
454
            $allTopics  = $xt->getAllTopics(static::getModuleOption('restrictindex'));
455
            $topic_tree = new XoopsObjectTree($allTopics, 'topic_id', 'topic_pid');
456
            $topics_arr = $topic_tree->getAllChild(0);
457
            foreach ($topics_arr as $onetopic) {
458
                $content .= sprintf("<link rel=\"Chapter\" title=\"%s\" href=\"%s\">\n", $onetopic->topic_title(), XOOPS_URL . '/modules/news/index.php?storytopic=' . $onetopic->topic_id());
459
            }
460
        }
461
462
        /**
463
         * Meta Keywords and Description

include/functions.php 1 location

@@ 320-338 (lines=19) @@
317
    /**
318
     * Firefox and Opera Navigation's Bar
319
     */
320
    if (news_getmoduleoption('sitenavbar')) {
321
        $content .= sprintf("<link rel=\"Home\" title=\"%s\" href=\"%s/\">\n", $xoopsConfig['sitename'], XOOPS_URL);
322
        $content .= sprintf("<link rel=\"Contents\" href=\"%s\">\n", XOOPS_URL . '/modules/news/index.php');
323
        $content .= sprintf("<link rel=\"Search\" href=\"%s\">\n", XOOPS_URL . '/search.php');
324
        $content .= sprintf("<link rel=\"Glossary\" href=\"%s\">\n", XOOPS_URL . '/modules/news/archive.php');
325
        $content .= sprintf("<link rel=\"%s\" href=\"%s\">\n", $myts->htmlSpecialChars(_NW_SUBMITNEWS), XOOPS_URL . '/modules/news/submit.php');
326
        $content .= sprintf("<link rel=\"alternate\" type=\"application/rss+xml\" title=\"%s\" href=\"%s/\">\n", $xoopsConfig['sitename'], XOOPS_URL . '/backend.php');
327
328
        // Create chapters
329
        require_once XOOPS_ROOT_PATH . '/class/tree.php';
330
        require_once XOOPS_ROOT_PATH . '/modules/news/class/class.newstopic.php';
331
        $xt         = new NewsTopic();
332
        $allTopics  = $xt->getAllTopics(news_getmoduleoption('restrictindex'));
333
        $topic_tree = new XoopsObjectTree($allTopics, 'topic_id', 'topic_pid');
334
        $topics_arr = $topic_tree->getAllChild(0);
335
        foreach ($topics_arr as $onetopic) {
336
            $content .= sprintf("<link rel=\"Chapter\" title=\"%s\" href=\"%s\">\n", $onetopic->topic_title(), XOOPS_URL . '/modules/news/index.php?storytopic=' . $onetopic->topic_id());
337
        }
338
    }
339
340
    /**
341
     * Meta Keywords and Description