Code Duplication    Length = 25-25 lines in 2 locations

class/class.newsstory.php 1 location

@@ 729-753 (lines=25) @@
726
     * @param string $format
727
     * @return
728
     */
729
    public function topic_imgurl($format = 'S')
730
    {
731
        if (trim($this->topic_imgurl) === '') {
732
            $this->topic_imgurl = 'blank.png';
733
        }
734
        $myts = MyTextSanitizer::getInstance();
735
        switch ($format) {
736
            case 'S':
737
                $imgurl = $myts->htmlSpecialChars($this->topic_imgurl);
738
                break;
739
            case 'E':
740
                $imgurl = $myts->htmlSpecialChars($this->topic_imgurl);
741
                break;
742
            case 'P':
743
                $imgurl = $myts->stripSlashesGPC($this->topic_imgurl);
744
                $imgurl = $myts->htmlSpecialChars($imgurl);
745
                break;
746
            case 'F':
747
                $imgurl = $myts->stripSlashesGPC($this->topic_imgurl);
748
                $imgurl = $myts->htmlSpecialChars($imgurl);
749
                break;
750
        }
751
752
        return $imgurl;
753
    }
754
755
    /**
756
     * @param string $format

class/class.newstopic.php 1 location

@@ 549-573 (lines=25) @@
546
     *
547
     * @return mixed
548
     */
549
    public function topic_imgurl($format = 'S')
550
    {
551
        if (trim($this->topic_imgurl) === '') {
552
            $this->topic_imgurl = 'blank.png';
553
        }
554
        $myts = MyTextSanitizer::getInstance();
555
        switch ($format) {
556
            case 'S':
557
                $imgurl = $myts->htmlSpecialChars($this->topic_imgurl);
558
                break;
559
            case 'E':
560
                $imgurl = $myts->htmlSpecialChars($this->topic_imgurl);
561
                break;
562
            case 'P':
563
                $imgurl = $myts->stripSlashesGPC($this->topic_imgurl);
564
                $imgurl = $myts->htmlSpecialChars($imgurl);
565
                break;
566
            case 'F':
567
                $imgurl = $myts->stripSlashesGPC($this->topic_imgurl);
568
                $imgurl = $myts->htmlSpecialChars($imgurl);
569
                break;
570
        }
571
572
        return $imgurl;
573
    }
574
575
    /**
576
     * @param $topic