diff options
Diffstat (limited to 'mod/pages/lib')
-rw-r--r-- | mod/pages/lib/pages.php | 7 |
1 files changed, 6 insertions, 1 deletions
diff --git a/mod/pages/lib/pages.php b/mod/pages/lib/pages.php index afe42b68f..7f90d53d8 100644 --- a/mod/pages/lib/pages.php +++ b/mod/pages/lib/pages.php @@ -9,7 +9,7 @@ * @param ElggObject $page * @return array */ -function pages_prepare_form_vars($page = null, $parent_guid = 0) { +function pages_prepare_form_vars($page = null, $parent_guid = 0, $revision = null) { // input names => defaults $values = array( @@ -41,6 +41,11 @@ function pages_prepare_form_vars($page = null, $parent_guid = 0) { elgg_clear_sticky_form('page'); + // load the revision annotation if requested + if ($revision instanceof ElggAnnotation && $revision->entity_guid == $page->getGUID()) { + $values['description'] = $revision->value; + } + return $values; } |