Code Duplication    Length = 5-5 lines in 2 locations

class/registryfile.php 2 locations

@@ 60-64 (lines=5) @@
57
    public function getfile($fichier = null)
58
    {
59
        $fw = '';
60
        if (!$fichier) {
61
            $fw = $this->filename;
62
        } else {
63
            $fw = XOOPS_UPLOAD_PATH . '/' . $fichier;
64
        }
65
        if (file_exists($fw)) {
66
            return file_get_contents($fw);
67
        } else {
@@ 81-85 (lines=5) @@
78
    public function savefile($content, $fichier = null)
79
    {
80
        $fw = '';
81
        if (!$fichier) {
82
            $fw = $this->filename;
83
        } else {
84
            $fw = XOOPS_UPLOAD_PATH . '/' . $fichier;
85
        }
86
        if (file_exists($fw)) {
87
            @unlink($fw);
88
        }