diff --git a/include/staff/page.inc.php b/include/staff/page.inc.php index 714f8ce724d16da403b6f0fdc5679eea9843b554..a83de55b377fbccd3a56aeab43dd5fd347dc3f88 100644 --- a/include/staff/page.inc.php +++ b/include/staff/page.inc.php @@ -150,8 +150,10 @@ $($('option:selected', this).val()).show(); "> foreach ($langs as $tag) { ?> <div id="translation-<?php echo $tag; ?>" style="display:none" lang="<?php echo $tag; ?>"> <textarea name="trans[<?php echo $tag; ?>]" cols="21" rows="12" - style="width:98%;" class="richtext" - ><?php echo $info['trans'][$tag]; ?></textarea> + style="width:98%;" class="richtext draft" +<?php + list($draft, $attrs) = Draft::getDraftAndDataAttrs('page', $info['id'].'.'.$tag, $info['trans'][$tag]); + echo $attrs; ?>><?php echo $draft ?: $info['trans'][$tag]; ?></textarea> </div> <?php } } ?> diff --git a/scp/pages.php b/scp/pages.php index c761d92e2e84a1fdcb57b5d02e134213711c81d5..f818272afebc2578a8cc97f42698c1c9fb4b634b 100644 --- a/scp/pages.php +++ b/scp/pages.php @@ -48,7 +48,7 @@ if($_POST) { $page->attachments->upload( Draft::getAttachmentIds($_POST['body']), true); - Draft::deleteForNamespace('page.'.$page->getId()); + Draft::deleteForNamespace('page.'.$page->getId().'%'); } elseif(!$errors['err']) $errors['err'] = sprintf(__('Unable to update %s. Correct error(s) below and try again.'), __('this site page'));