Code Duplication    Length = 5-5 lines in 2 locations

class/registryfile.php 2 locations

@@ 59-63 (lines=5) @@
56
    public function getfile($fichier = null)
57
    {
58
        $fw = '';
59
        if (!$fichier) {
60
            $fw = $this->filename;
61
        } else {
62
            $fw = XOOPS_UPLOAD_PATH . DIRECTORY_SEPARATOR . $fichier;
63
        }
64
        if (file_exists($fw)) {
65
            return file_get_contents($fw);
66
        } else {
@@ 74-78 (lines=5) @@
71
    public function savefile($content, $fichier = null)
72
    {
73
        $fw = '';
74
        if (!$fichier) {
75
            $fw = $this->filename;
76
        } else {
77
            $fw = XOOPS_UPLOAD_PATH . DIRECTORY_SEPARATOR . $fichier;
78
        }
79
        if (file_exists($fw)) {
80
            @unlink($fw);
81
        }