Code Duplication    Length = 3-3 lines in 2 locations

htdocs/modules/publisher/class/category.php 1 location

@@ 368-370 (lines=3) @@
365
            }
366
        }
367
        // Auto create short_url if empty
368
        if (!$category->getVar('short_url')) {
369
            $category->setVar('short_url', PublisherMetagen::generateSeoTitle($category->getVar('name', 'n'), false));
370
        }
371
        $ret = parent::insert($category, $force);
372
        return $ret;
373
    }

htdocs/modules/publisher/class/item.php 1 location

@@ 1011-1013 (lines=3) @@
1008
                $item->setVar('meta_description', $publisher_metagen->_description);
1009
            }
1010
            // Auto create short_url if empty
1011
            if (!$item->getVar('short_url')) {
1012
                $item->setVar('short_url', $publisher_metagen->generateSeoTitle($item->getVar('title', 'n'), false));
1013
            }
1014
        }
1015
        if (!parent::insert($item, $force)) {
1016
            return false;