aboutsummaryrefslogtreecommitdiff
path: root/mod/pages/lib
diff options
context:
space:
mode:
authorcash <cash.costello@gmail.com>2013-04-19 20:28:51 -0400
committercash <cash.costello@gmail.com>2013-04-19 20:28:51 -0400
commit863d45bb76d5bce2dabe32acc6f7d1f5400d568d (patch)
treebe52131c535c5b84897b79f49dfce59041450995 /mod/pages/lib
parentaa409144fcac454c8f6e2566606e0fb206d933d7 (diff)
parent7b002adf2fd383e6a0e7e4b93890720d99750282 (diff)
downloadelgg-863d45bb76d5bce2dabe32acc6f7d1f5400d568d.tar.gz
elgg-863d45bb76d5bce2dabe32acc6f7d1f5400d568d.tar.bz2
Merge pull request #5325 into 1.8 branch
Diffstat (limited to 'mod/pages/lib')
-rw-r--r--mod/pages/lib/pages.php7
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;
}