feat: ajout la possibilite de modifier le prefix du slug
This commit is contained in:
parent
260dffa24e
commit
9672c3ee46
1 changed files with 3 additions and 1 deletions
|
@ -1,6 +1,8 @@
|
|||
<?php
|
||||
if (!defined('_ECRIRE_INC_VERSION')) return;
|
||||
|
||||
defined('_GAMUMAIL_PREFIX_SLUG') || define('_GAMUMAIL_PREFIX_SLUG', "slug");
|
||||
|
||||
/**
|
||||
* créer un slug Gamumail
|
||||
*
|
||||
|
@ -30,7 +32,7 @@ function action_creer_slug_dist($slug = null, $opt = [], $ecraser = false){
|
|||
];
|
||||
|
||||
if ($id_slug = objet_inserer('gamumail', null, $set)) {
|
||||
$set = ['slug' => 'slug_'.$id_slug];
|
||||
$set = ['slug' => _GAMUMAIL_PREFIX_SLUG .'_'.$id_slug];
|
||||
sql_updateq('spip_gamumails', $set, 'id_gamumail = '.$id_slug);
|
||||
}
|
||||
} else {
|
||||
|
|
Loading…
Add table
Reference in a new issue