Code Duplication    Length = 11-12 lines in 3 locations

class/oledrion_cat.php 1 location

@@ 106-117 (lines=12) @@
103
     *
104
     * @return string L'url à utiliser
105
     */
106
    public function getLink()
107
    {
108
        include_once XOOPS_ROOT_PATH . '/modules/oledrion/include/common.php';
109
        $url = '';
110
        if (Oledrion_utils::getModuleOption('urlrewriting') == 1) { // On utilise l'url rewriting
111
            $url = OLEDRION_URL . 'category-' . $this->getVar('cat_cid') . Oledrion_utils::makeSeoUrl($this->getVar('cat_title', 'n')) . '.html';
112
        } else { // Pas d'utilisation de l'url rewriting
113
            $url = OLEDRION_URL . 'category.php?cat_cid=' . $this->getVar('cat_cid');
114
        }
115
116
        return $url;
117
    }
118
119
    /**
120
     * Rentourne la chaine à envoyer dans une balise <a> pour l'attribut href

class/oledrion_lists.php 1 location

@@ 108-118 (lines=11) @@
105
     *
106
     * @return string L'url à utiliser
107
     */
108
    public function getLink()
109
    {
110
        $url = '';
111
        if (Oledrion_utils::getModuleOption('urlrewriting') == 1) { // On utilise l'url rewriting
112
            $url = OLEDRION_URL . 'list-' . $this->getVar('list_id') . Oledrion_utils::makeSeoUrl($this->getVar('list_title', 'n')) . '.html';
113
        } else { // Pas d'utilisation de l'url rewriting
114
            $url = OLEDRION_URL . 'list.php?list_id=' . $this->getVar('list_id');
115
        }
116
117
        return $url;
118
    }
119
120
    /**
121
     * Retourne la date de création de la liste formatée

class/oledrion_manufacturer.php 1 location

@@ 140-150 (lines=11) @@
137
     *
138
     * @return string
139
     */
140
    public function getLink()
141
    {
142
        $url = '';
143
        if (Oledrion_utils::getModuleOption('urlrewriting') == 1) { // On utilise l'url rewriting
144
            $url = OLEDRION_URL . 'manufacturer-' . $this->getVar('manu_id') . Oledrion_utils::makeSeoUrl($this->getVar('manu_commercialname', 'n') . ' ' . $this->getVar('manu_name')) . '.html';
145
        } else { // Pas d'utilisation de l'url rewriting
146
            $url = OLEDRION_URL . 'manufacturer.php?manu_id=' . $this->getVar('manu_id');
147
        }
148
149
        return $url;
150
    }
151
152
    /**
153
     * Rentourne la chaine à envoyer dans une balise <a> pour l'attribut href