Code Duplication    Length = 25-25 lines in 2 locations

class/class.newsstory.php 1 location

@@ 647-671 (lines=25) @@
644
     * @param string $format
645
     * @return
646
     */
647
    public function topic_imgurl($format = 'S')
648
    {
649
        if (trim($this->topic_imgurl) == '') {
650
            $this->topic_imgurl = 'blank.png';
651
        }
652
        $myts = MyTextSanitizer::getInstance();
653
        switch ($format) {
654
            case 'S':
655
                $imgurl = $myts->htmlSpecialChars($this->topic_imgurl);
656
                break;
657
            case 'E':
658
                $imgurl = $myts->htmlSpecialChars($this->topic_imgurl);
659
                break;
660
            case 'P':
661
                $imgurl = $myts->stripSlashesGPC($this->topic_imgurl);
662
                $imgurl = $myts->htmlSpecialChars($imgurl);
663
                break;
664
            case 'F':
665
                $imgurl = $myts->stripSlashesGPC($this->topic_imgurl);
666
                $imgurl = $myts->htmlSpecialChars($imgurl);
667
                break;
668
        }
669
670
        return $imgurl;
671
    }
672
673
    /**
674
     * @param string $format

class/class.newstopic.php 1 location

@@ 531-555 (lines=25) @@
528
     *
529
     * @return mixed
530
     */
531
    public function topic_imgurl($format = 'S')
532
    {
533
        if (trim($this->topic_imgurl) == '') {
534
            $this->topic_imgurl = 'blank.png';
535
        }
536
        $myts = MyTextSanitizer::getInstance();
537
        switch ($format) {
538
            case 'S':
539
                $imgurl = $myts->htmlSpecialChars($this->topic_imgurl);
540
                break;
541
            case 'E':
542
                $imgurl = $myts->htmlSpecialChars($this->topic_imgurl);
543
                break;
544
            case 'P':
545
                $imgurl = $myts->stripSlashesGPC($this->topic_imgurl);
546
                $imgurl = $myts->htmlSpecialChars($imgurl);
547
                break;
548
            case 'F':
549
                $imgurl = $myts->stripSlashesGPC($this->topic_imgurl);
550
                $imgurl = $myts->htmlSpecialChars($imgurl);
551
                break;
552
        }
553
554
        return $imgurl;
555
    }
556
557
    /**
558
     * @param $topic