Code Duplication    Length = 7-7 lines in 6 locations

class/oledrion_cat.php 1 location

@@ 93-99 (lines=7) @@
90
     * Supprime l'image associée à une catégorie
91
     * @return void
92
     */
93
    public function deletePicture()
94
    {
95
        if ($this->pictureExists()) {
96
            @unlink(OLEDRION_PICTURES_PATH . '/' . $this->getVar('cat_imgurl'));
97
        }
98
        $this->setVar('cat_imgurl', '');
99
    }
100
101
    /**
102
     * Retourne l'url à utiliser pour accéder à la catégorie en tenant compte des préférences du module

class/oledrion_delivery.php 1 location

@@ 79-85 (lines=7) @@
76
     * Supprime l'image associée à une catégorie
77
     * @return void
78
     */
79
    public function deletePicture()
80
    {
81
        if ($this->pictureExists()) {
82
            @unlink(OLEDRION_PICTURES_PATH . '/' . $this->getVar('delivery_image'));
83
        }
84
        $this->setVar('delivery_image', '');
85
    }
86
87
    /**
88
     * Retourne les éléments du produits formatés pour affichage

class/oledrion_packing.php 1 location

@@ 81-87 (lines=7) @@
78
     * Supprime l'image associée à une catégorie
79
     * @return void
80
     */
81
    public function deletePicture()
82
    {
83
        if ($this->pictureExists()) {
84
            @unlink(OLEDRION_PICTURES_PATH . '/' . $this->getVar('packing_image'));
85
        }
86
        $this->setVar('packing_image', '');
87
    }
88
89
    /**
90
     * Retourne les éléments du produits formatés pour affichage

class/oledrion_payment.php 1 location

@@ 79-85 (lines=7) @@
76
     * Supprime l'image associée à une catégorie
77
     * @return void
78
     */
79
    public function deletePicture()
80
    {
81
        if ($this->pictureExists()) {
82
            @unlink(OLEDRION_PICTURES_PATH . '/' . $this->getVar('payment_image'));
83
        }
84
        $this->setVar('payment_image', '');
85
    }
86
87
    /**
88
     * Retourne les éléments du produits formatés pour affichage

class/oledrion_products.php 2 locations

@@ 217-223 (lines=7) @@
214
     *
215
     * @return void
216
     */
217
    public function deletePicture()
218
    {
219
        if ($this->pictureExists()) {
220
            @unlink(OLEDRION_PICTURES_PATH . '/' . $this->getVar('product_image_url'));
221
        }
222
        $this->setVar('product_image_url', '');
223
    }
224
225
    /**
226
     * Indique si le fichier attaché à un produit existe
@@ 260-266 (lines=7) @@
257
     *
258
     * @return void
259
     */
260
    public function deleteThumb()
261
    {
262
        if ($this->thumbExists()) {
263
            @unlink(OLEDRION_PICTURES_PATH . '/' . $this->getVar('product_thumb_url'));
264
        }
265
        $this->setVar('product_thumb_url', '');
266
    }
267
268
    /**
269
     * Supprime les 2 images (raccourcis)