]> gitweb.fluxo.info Git - lorea/elgg.git/commitdiff
Blog edit/create form displays correct title.
authorbrettp <brettp@36083f99-b078-4883-b0ff-0f9b5a30f544>
Mon, 24 May 2010 16:28:56 +0000 (16:28 +0000)
committerbrettp <brettp@36083f99-b078-4883-b0ff-0f9b5a30f544>
Mon, 24 May 2010 16:28:56 +0000 (16:28 +0000)
git-svn-id: http://code.elgg.org/elgg/trunk@6176 36083f99-b078-4883-b0ff-0f9b5a30f544

mod/blog/views/default/blog/forms/edit.php

index 2b3366e48c7b5313436e8b1e14b220fad1af6b28..81e4dae444990762f815eccb550b0196a54b0cc4 100644 (file)
@@ -153,7 +153,13 @@ $categories_input = elgg_view('categories', $vars);
 //$container_guid_input = elgg_view('input/hidden', array('internalname' => 'container_guid', 'value' => $values['container_guid']));
 $guid_input = elgg_view('input/hidden', array('internalname' => 'guid', 'value' => $values['guid']));
 $forward_input = elgg_view('input/hidden', array('internalname' => 'forward', 'value' => $forward));
-$page_title = elgg_echo('blog:edit') . " " . $values['title'];
+
+// editing or creating.
+if (isset($values['guid'])) {
+       $page_title = elgg_echo('blog:edit') . ": \"{$values['title']}\"";
+} else {
+       $page_title = elgg_echo('blog:new');
+}
 
 // display notice if editing an old revision
 if (isset($vars['revision']) && $vars['revision'] instanceof ElggAnnotation) {