fix : slug immuable en édition — suppression de la propagation auto (v1.6.11)
En mode édition, le slug ne doit jamais changer. Suppression du hidden[slug] dans step6.php et du bloc qui le sauvegardait dans le draft overlay avant commitDraftOverlay(). Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
This commit is contained in:
@@ -985,10 +985,6 @@ switch ($action) {
|
||||
case 6:
|
||||
if ($_SERVER['REQUEST_METHOD'] === 'POST' && !empty($_POST['_confirm'])) {
|
||||
$revisionComment = trim($_POST['revision_comment'] ?? '');
|
||||
// Si le slug a été modifié dans le formulaire de confirmation, le propager
|
||||
if (!empty($_POST['slug'])) {
|
||||
$articles->saveDraftOverlay($uuid, ['slug' => trim($_POST['slug'])]);
|
||||
}
|
||||
$articles->commitDraftOverlay($uuid, $revisionComment);
|
||||
$final = $articles->getByUuid($uuid);
|
||||
header('Location: /post/' . rawurlencode($final['slug'] ?? $uuid));
|
||||
@@ -1001,7 +997,6 @@ switch ($action) {
|
||||
unset($_pd);
|
||||
$diffLines = lineDiff((string)($article['content'] ?? ''), (string)($draftData['content'] ?? ''));
|
||||
$titleChanged = ($draftData['title'] ?? '') !== ($article['title'] ?? '');
|
||||
$autoSlug = slugify($draftData['title'] ?? '');
|
||||
$postSlug = $draftData['slug'] ?? $article['slug'];
|
||||
$changes = [];
|
||||
if ($titleChanged) {
|
||||
|
||||
+1
-1
@@ -1 +1 @@
|
||||
1.6.10
|
||||
1.6.11
|
||||
|
||||
Reference in New Issue
Block a user