Code Duplication    Length = 11-12 lines in 3 locations

class/oledrion_cat.php 1 location

@@ 105-116 (lines=12) @@
102
     *
103
     * @return string L'url à utiliser
104
     */
105
    public function getLink()
106
    {
107
        require_once XOOPS_ROOT_PATH . '/modules/oledrion/include/common.php';
108
        $url = '';
109
        if (OledrionUtility::getModuleOption('urlrewriting') == 1) { // On utilise l'url rewriting
110
            $url = OLEDRION_URL . 'category-' . $this->getVar('cat_cid') . OledrionUtility::makeSeoUrl($this->getVar('cat_title', 'n')) . '.html';
111
        } else { // Pas d'utilisation de l'url rewriting
112
            $url = OLEDRION_URL . 'category.php?cat_cid=' . $this->getVar('cat_cid');
113
        }
114
115
        return $url;
116
    }
117
118
    /**
119
     * 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 (OledrionUtility::getModuleOption('urlrewriting') == 1) { // On utilise l'url rewriting
112
            $url = OLEDRION_URL . 'list-' . $this->getVar('list_id') . OledrionUtility::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

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