Code Duplication    Length = 11-11 lines in 7 locations

class/oledrion_cat.php 1 location

@@ 77-87 (lines=11) @@
74
     *
75
     * @return boolean Vrai si l'image existe sinon faux
76
     */
77
    public function pictureExists()
78
    {
79
        $return = false;
80
        if (xoops_trim($this->getVar('cat_imgurl')) != ''
81
            && file_exists(OLEDRION_PICTURES_PATH . '/' . $this->getVar('cat_imgurl'))
82
        ) {
83
            $return = true;
84
        }
85
86
        return $return;
87
    }
88
89
    /**
90
     * Supprime l'image associée à une catégorie

class/oledrion_delivery.php 1 location

@@ 63-73 (lines=11) @@
60
     *
61
     * @return boolean Vrai si l'image existe sinon faux
62
     */
63
    public function pictureExists()
64
    {
65
        $return = false;
66
        if (xoops_trim($this->getVar('delivery_image')) != ''
67
            && file_exists(OLEDRION_PICTURES_PATH . '/' . $this->getVar('delivery_image'))
68
        ) {
69
            $return = true;
70
        }
71
72
        return $return;
73
    }
74
75
    /**
76
     * Supprime l'image associée à une catégorie

class/oledrion_packing.php 1 location

@@ 65-75 (lines=11) @@
62
     *
63
     * @return boolean Vrai si l'image existe sinon faux
64
     */
65
    public function pictureExists()
66
    {
67
        $return = false;
68
        if (xoops_trim($this->getVar('packing_image')) != ''
69
            && file_exists(OLEDRION_PICTURES_PATH . '/' . $this->getVar('packing_image'))
70
        ) {
71
            $return = true;
72
        }
73
74
        return $return;
75
    }
76
77
    /**
78
     * Supprime l'image associée à une catégorie

class/oledrion_payment.php 1 location

@@ 63-73 (lines=11) @@
60
     *
61
     * @return boolean Vrai si l'image existe sinon faux
62
     */
63
    public function pictureExists()
64
    {
65
        $return = false;
66
        if (xoops_trim($this->getVar('payment_image')) != ''
67
            && file_exists(OLEDRION_PICTURES_PATH . '/' . $this->getVar('payment_image'))
68
        ) {
69
            $return = true;
70
        }
71
72
        return $return;
73
    }
74
75
    /**
76
     * Supprime l'image associée à une catégorie

class/oledrion_products.php 3 locations

@@ 183-193 (lines=11) @@
180
     *
181
     * @return boolean Vrai si l'image existe sinon faux
182
     */
183
    public function pictureExists()
184
    {
185
        $return = false;
186
        if (xoops_trim($this->getVar('product_image_url')) != ''
187
            && file_exists(OLEDRION_PICTURES_PATH . '/' . $this->getVar('product_image_url'))
188
        ) {
189
            $return = true;
190
        }
191
192
        return $return;
193
    }
194
195
    /**
196
     * Indique si la vignette du produit existe
@@ 200-210 (lines=11) @@
197
     *
198
     * @return boolean Vrai si l'image existe sinon faux
199
     */
200
    public function thumbExists()
201
    {
202
        $return = false;
203
        if (xoops_trim($this->getVar('product_thumb_url')) != ''
204
            && file_exists(OLEDRION_PICTURES_PATH . '/' . $this->getVar('product_thumb_url'))
205
        ) {
206
            $return = true;
207
        }
208
209
        return $return;
210
    }
211
212
    /**
213
     * Supprime l'image associée à un produit
@@ 230-240 (lines=11) @@
227
     *
228
     * @return boolean
229
     */
230
    public function attachmentExists()
231
    {
232
        $return = false;
233
        if (xoops_trim($this->getVar('product_attachment')) != ''
234
            && file_exists(OLEDRION_ATTACHED_FILES_PATH . '/' . $this->getVar('product_attachment'))
235
        ) {
236
            $return = true;
237
        }
238
239
        return $return;
240
    }
241
242
    /**
243
     * Supprime le fichier attaché