aboutsummaryrefslogtreecommitdiff
path: root/mod/pages
diff options
context:
space:
mode:
Diffstat (limited to 'mod/pages')
-rw-r--r--mod/pages/manifest.xml7
-rw-r--r--mod/pages/pages/pages/edit.php6
-rw-r--r--mod/pages/pages/pages/friends.php2
-rw-r--r--mod/pages/pages/pages/owner.php2
-rw-r--r--mod/pages/start.php7
-rw-r--r--mod/pages/views/default/annotation/page.php2
-rw-r--r--mod/pages/views/default/forms/pages/edit.php2
-rw-r--r--mod/pages/views/default/object/page_top.php21
-rw-r--r--mod/pages/views/default/pages/group_module.php2
-rw-r--r--mod/pages/views/default/river/object/page/create.php2
-rw-r--r--mod/pages/views/default/widgets/pages/content.php1
11 files changed, 32 insertions, 22 deletions
diff --git a/mod/pages/manifest.xml b/mod/pages/manifest.xml
index 4b5e5c747..6990bd6b0 100644
--- a/mod/pages/manifest.xml
+++ b/mod/pages/manifest.xml
@@ -9,11 +9,10 @@
<description>Elgg Pages</description>
<website>http://www.elgg.org</website>
<copyright>See COPYRIGHT.txt</copyright>
- <license>GNU Public License version 2</license>
+ <license>GNU General Public License version 2</license>
<requires>
- <type>elgg_version</type>
- <version>2010030101</version>
+ <type>elgg_release</type>
+ <version>1.8</version>
</requires>
- <admin_interface>simple</admin_interface>
<activate_on_install>true</activate_on_install>
</plugin_manifest>
diff --git a/mod/pages/pages/pages/edit.php b/mod/pages/pages/pages/edit.php
index 6f54d72bf..1f411b94d 100644
--- a/mod/pages/pages/pages/edit.php
+++ b/mod/pages/pages/pages/edit.php
@@ -10,12 +10,14 @@ gatekeeper();
$page_guid = (int)get_input('guid');
$page = get_entity($page_guid);
if (!$page) {
-
+ register_error(elgg_echo('noaccess'));
+ forward('');
}
$container = $page->getContainerEntity();
if (!$container) {
-
+ register_error(elgg_echo('noaccess'));
+ forward('');
}
elgg_set_page_owner_guid($container->getGUID());
diff --git a/mod/pages/pages/pages/friends.php b/mod/pages/pages/pages/friends.php
index c55b27466..87ac631c2 100644
--- a/mod/pages/pages/pages/friends.php
+++ b/mod/pages/pages/pages/friends.php
@@ -7,7 +7,7 @@
$owner = elgg_get_page_owner_entity();
if (!$owner) {
-
+ forward('pages/all');
}
elgg_push_breadcrumb($owner->name, "pages/owner/$owner->username");
diff --git a/mod/pages/pages/pages/owner.php b/mod/pages/pages/pages/owner.php
index 2ff310ac8..2ff45ae0c 100644
--- a/mod/pages/pages/pages/owner.php
+++ b/mod/pages/pages/pages/owner.php
@@ -7,7 +7,7 @@
$owner = elgg_get_page_owner_entity();
if (!$owner) {
-
+ forward('pages/all');
}
// access check for closed groups
diff --git a/mod/pages/start.php b/mod/pages/start.php
index 744306649..b2f26c719 100644
--- a/mod/pages/start.php
+++ b/mod/pages/start.php
@@ -100,6 +100,7 @@ function pages_init() {
* Title is ignored
*
* @param array $page
+ * @return bool
*/
function pages_page_handler($page) {
@@ -149,12 +150,12 @@ function pages_page_handler($page) {
include "$base_dir/revision.php";
break;
case 'all':
- default:
include "$base_dir/world.php";
break;
+ default:
+ return false;
}
-
- return;
+ return true;
}
/**
diff --git a/mod/pages/views/default/annotation/page.php b/mod/pages/views/default/annotation/page.php
index f7a7a78a1..a621b9281 100644
--- a/mod/pages/views/default/annotation/page.php
+++ b/mod/pages/views/default/annotation/page.php
@@ -21,6 +21,7 @@ if (!$owner) {
$owner_link = elgg_view('output/url', array(
'href' => $owner->getURL(),
'text' => $owner->name,
+ 'is_trusted' => true,
));
$date = elgg_view_friendly_time($annotation->time_created);
@@ -28,6 +29,7 @@ $date = elgg_view_friendly_time($annotation->time_created);
$title_link = elgg_view('output/url', array(
'href' => $annotation->getURL(),
'text' => $page->title,
+ 'is_trusted' => true,
));
$subtitle = elgg_echo('pages:revision:subtitle', array($date, $owner_link));
diff --git a/mod/pages/views/default/forms/pages/edit.php b/mod/pages/views/default/forms/pages/edit.php
index c29de1085..20737a121 100644
--- a/mod/pages/views/default/forms/pages/edit.php
+++ b/mod/pages/views/default/forms/pages/edit.php
@@ -24,7 +24,7 @@ foreach ($variables as $name => $type) {
<?php
}
-$cats = elgg_view('categories', $vars);
+$cats = elgg_view('input/categories', $vars);
if (!empty($cats)) {
echo $cats;
}
diff --git a/mod/pages/views/default/object/page_top.php b/mod/pages/views/default/object/page_top.php
index 8ba9fc298..e78289f28 100644
--- a/mod/pages/views/default/object/page_top.php
+++ b/mod/pages/views/default/object/page_top.php
@@ -40,11 +40,13 @@ $editor = get_entity($annotation->owner_guid);
$editor_link = elgg_view('output/url', array(
'href' => "pages/owner/$editor->username",
'text' => $editor->name,
+ 'is_trusted' => true,
));
$date = elgg_view_friendly_time($annotation->time_created);
$editor_text = elgg_echo('pages:strapline', array($date, $editor_link));
$tags = elgg_view('output/tags', array('tags' => $page->tags));
+$categories = elgg_view('output/categories', $vars);
$comments_count = $page->countComments();
//only display if there are commments
@@ -53,6 +55,7 @@ if ($comments_count != 0 && !$revision) {
$comments_link = elgg_view('output/url', array(
'href' => $page->getURL() . '#page-comments',
'text' => $text,
+ 'is_trusted' => true,
));
} else {
$comments_link = '';
@@ -65,7 +68,7 @@ $metadata = elgg_view_menu('entity', array(
'class' => 'elgg-menu-hz',
));
-$subtitle = "$editor_text $categories $comments_link";
+$subtitle = "$editor_text $comments_link $categories";
// do not show the metadata and controls in widget view
if (elgg_in_context('widgets') || $revision) {
@@ -77,20 +80,20 @@ if ($full) {
$params = array(
'entity' => $page,
- 'title' => false,
'metadata' => $metadata,
'subtitle' => $subtitle,
'tags' => $tags,
);
$params = $params + $vars;
- $list_body = elgg_view('object/elements/summary', $params);
-
- $info = elgg_view_image_block($page_icon, $list_body);
+ $summary = elgg_view('object/elements/summary', $params);
- echo <<<HTML
-$info
-$body
-HTML;
+ echo elgg_view('object/elements/full', array(
+ 'entity' => $page,
+ 'title' => false,
+ 'icon' => $page_icon,
+ 'summary' => $summary,
+ 'body' => $body,
+ ));
} else {
// brief view
diff --git a/mod/pages/views/default/pages/group_module.php b/mod/pages/views/default/pages/group_module.php
index 7e2656ca3..0d7df96ac 100644
--- a/mod/pages/views/default/pages/group_module.php
+++ b/mod/pages/views/default/pages/group_module.php
@@ -15,6 +15,7 @@ if ($group->pages_enable == "no") {
$all_link = elgg_view('output/url', array(
'href' => "pages/group/$group->guid/all",
'text' => elgg_echo('link:view:all'),
+ 'is_trusted' => true,
));
@@ -37,6 +38,7 @@ if (!$content) {
$new_link = elgg_view('output/url', array(
'href' => "pages/add/$group->guid",
'text' => elgg_echo('pages:add'),
+ 'is_trusted' => true,
));
echo elgg_view('groups/profile/module', array(
diff --git a/mod/pages/views/default/river/object/page/create.php b/mod/pages/views/default/river/object/page/create.php
index ca15ddea7..4c31def33 100644
--- a/mod/pages/views/default/river/object/page/create.php
+++ b/mod/pages/views/default/river/object/page/create.php
@@ -7,7 +7,7 @@ $object = $vars['item']->getObjectEntity();
$excerpt = strip_tags($object->description);
$excerpt = elgg_get_excerpt($excerpt);
-echo elgg_view('river/item', array(
+echo elgg_view('river/elements/layout', array(
'item' => $vars['item'],
'message' => $excerpt,
)); \ No newline at end of file
diff --git a/mod/pages/views/default/widgets/pages/content.php b/mod/pages/views/default/widgets/pages/content.php
index 3ae0b8454..f63777c09 100644
--- a/mod/pages/views/default/widgets/pages/content.php
+++ b/mod/pages/views/default/widgets/pages/content.php
@@ -24,6 +24,7 @@ if ($content) {
$more_link = elgg_view('output/url', array(
'href' => $url,
'text' => elgg_echo('pages:more'),
+ 'is_trusted' => true,
));
echo "<span class=\"elgg-widget-more\">$more_link</span>";
} else {