Code Duplication    Length = 25-25 lines in 2 locations

class/class.newsstory.php 1 location

@@ 701-725 (lines=25) @@
698
     * @param string $format
699
     * @return
700
     */
701
    public function topic_imgurl($format = 'S')
702
    {
703
        if ('' === trim($this->topic_imgurl)) {
704
            $this->topic_imgurl = 'blank.png';
705
        }
706
        $myts = MyTextSanitizer::getInstance();
707
        switch ($format) {
708
            case 'S':
709
                $imgurl = $myts->htmlSpecialChars($this->topic_imgurl);
710
                break;
711
            case 'E':
712
                $imgurl = $myts->htmlSpecialChars($this->topic_imgurl);
713
                break;
714
            case 'P':
715
                $imgurl = $myts->stripSlashesGPC($this->topic_imgurl);
716
                $imgurl = $myts->htmlSpecialChars($imgurl);
717
                break;
718
            case 'F':
719
                $imgurl = $myts->stripSlashesGPC($this->topic_imgurl);
720
                $imgurl = $myts->htmlSpecialChars($imgurl);
721
                break;
722
        }
723
724
        return $imgurl;
725
    }
726
727
    /**
728
     * @param string $format

class/class.newstopic.php 1 location

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