Code Duplication    Length = 5-5 lines in 2 locations

application/libraries/template.php 2 locations

@@ 473-477 (lines=5) @@
470
471
        $this->split(array_flip($this->_links));
472
473
        if (self::$result_before) {
474
            if (!$this->CI->input->is_ajax_request()) {
475
                $tpl = preg_replace('/\<\/head\>/', self::$result_before . '</head>' . "\n", $tpl, 1);
476
            }
477
        }
478
479
        if (self::$result_after) {
480
            if (!$this->CI->input->is_ajax_request()) {
@@ 479-483 (lines=5) @@
476
            }
477
        }
478
479
        if (self::$result_after) {
480
            if (!$this->CI->input->is_ajax_request()) {
481
                $tpl = preg_replace('/(\<\/body>(\s*|\n)<\/html>)(\s*|\n)$/', self::$result_after . '</body></html>', $tpl, 1);
482
            }
483
        }
484
485
        return $tpl;
486
    }