Code Duplication    Length = 25-25 lines in 2 locations

class/class.newsstory.php 1 location

@@ 762-786 (lines=25) @@
759
     * @param string $format
760
     * @return
761
     */
762
    public function topic_imgurl($format = 'S')
763
    {
764
        if (trim($this->topic_imgurl) === '') {
765
            $this->topic_imgurl = 'blank.png';
766
        }
767
        $myts = MyTextSanitizer::getInstance();
768
        switch ($format) {
769
            case 'S':
770
                $imgurl = $myts->htmlSpecialChars($this->topic_imgurl);
771
                break;
772
            case 'E':
773
                $imgurl = $myts->htmlSpecialChars($this->topic_imgurl);
774
                break;
775
            case 'P':
776
                $imgurl = $myts->stripSlashesGPC($this->topic_imgurl);
777
                $imgurl = $myts->htmlSpecialChars($imgurl);
778
                break;
779
            case 'F':
780
                $imgurl = $myts->stripSlashesGPC($this->topic_imgurl);
781
                $imgurl = $myts->htmlSpecialChars($imgurl);
782
                break;
783
        }
784
785
        return $imgurl;
786
    }
787
788
    /**
789
     * @param string $format

class/class.newstopic.php 1 location

@@ 564-588 (lines=25) @@
561
     *
562
     * @return mixed
563
     */
564
    public function topic_imgurl($format = 'S')
565
    {
566
        if (trim($this->topic_imgurl) === '') {
567
            $this->topic_imgurl = 'blank.png';
568
        }
569
        $myts = MyTextSanitizer::getInstance();
570
        switch ($format) {
571
            case 'S':
572
                $imgurl = $myts->htmlSpecialChars($this->topic_imgurl);
573
                break;
574
            case 'E':
575
                $imgurl = $myts->htmlSpecialChars($this->topic_imgurl);
576
                break;
577
            case 'P':
578
                $imgurl = $myts->stripSlashesGPC($this->topic_imgurl);
579
                $imgurl = $myts->htmlSpecialChars($imgurl);
580
                break;
581
            case 'F':
582
                $imgurl = $myts->stripSlashesGPC($this->topic_imgurl);
583
                $imgurl = $myts->htmlSpecialChars($imgurl);
584
                break;
585
        }
586
587
        return $imgurl;
588
    }
589
590
    /**
591
     * @param $topic