aboutsummaryrefslogtreecommitdiff
path: root/mod/sitepages
diff options
context:
space:
mode:
authorbrettp <brettp@36083f99-b078-4883-b0ff-0f9b5a30f544>2010-04-26 21:31:15 +0000
committerbrettp <brettp@36083f99-b078-4883-b0ff-0f9b5a30f544>2010-04-26 21:31:15 +0000
commit9797c88099cd0fd3a0a316540dcee91aea9bcf65 (patch)
tree519b996bc077ff0bbdf2744a450d912ae79a5c33 /mod/sitepages
parent7891827783ff68aaede9d095221dc2bafd15d918 (diff)
downloadelgg-9797c88099cd0fd3a0a316540dcee91aea9bcf65.tar.gz
elgg-9797c88099cd0fd3a0a316540dcee91aea9bcf65.tar.bz2
Only admin users can view site pages.
Corrected ECML default for site pages. Moved view and entity ECML keywords to sitepages and restricted them. git-svn-id: http://code.elgg.org/elgg/trunk@5889 36083f99-b078-4883-b0ff-0f9b5a30f544
Diffstat (limited to 'mod/sitepages')
-rw-r--r--mod/sitepages/start.php13
-rw-r--r--mod/sitepages/views/default/sitepages/forms/editfront.php24
2 files changed, 25 insertions, 12 deletions
diff --git a/mod/sitepages/start.php b/mod/sitepages/start.php
index a173dcd6f..e45abb2b6 100644
--- a/mod/sitepages/start.php
+++ b/mod/sitepages/start.php
@@ -134,6 +134,7 @@ function sitepages_page_handler($page) {
switch ($action) {
case 'edit':
+ admin_gatekeeper();
$title = elgg_echo('sitepages');
$content = sitepages_get_edit_section_content($page_type);
@@ -185,6 +186,18 @@ function sitepages_ecml_keyword_hook($hook, $entity_type, $return_value, $params
'restricted' => array('sitepages/custom_frontpage')
);
+ $return_value['entity'] = array(
+ 'description' => elgg_echo('sitepages:ecml:keywords:entity'),
+ 'usage' => elgg_echo('sitepages:ecml:keywords:entity_usage'),
+ 'restricted' => array('sitepages/custom_frontpage')
+ );
+
+ $return_value['view'] = array(
+ 'description' => elgg_echo('sitepages:ecml:keywords:view'),
+ 'usage' => elgg_echo('sitepages:ecml:keywords:view_usage'),
+ 'restricted' => array('sitepages/custom_frontpage')
+ );
+
return $return_value;
}
diff --git a/mod/sitepages/views/default/sitepages/forms/editfront.php b/mod/sitepages/views/default/sitepages/forms/editfront.php
index 24384dfb2..818bdfd8b 100644
--- a/mod/sitepages/views/default/sitepages/forms/editfront.php
+++ b/mod/sitepages/views/default/sitepages/forms/editfront.php
@@ -21,28 +21,28 @@ if ($sitepages_object = sitepages_get_sitepage_object('front')) {
___EOT;
$logged_in_content = <<<___EOT
<div id="elgg_content" class="clearfloat sidebar">
-<div id="elgg_sidebar">
- <h3>Newest members:</h3>[userlist: list_type=new, only_with_avatars=TRUE, limit=5]
+ <div id="elgg_sidebar">
+ <h3>Newest members:</h3>[userlist list_type=new only_with_avatars=TRUE limit=5]
</div>
<div id="elgg_page_contents" class="clearfloat">
- <h2>All site activity</h2>
- [activity]
-</div>
+ <h2>All site activity</h2>
+ [activity]
+ </div>
</div>
___EOT;
$logged_out_content = <<<___EOT
<div id="elgg_content" class="clearfloat sidebar">
-<div id="elgg_sidebar">
- [loginbox]
- <h3>Newest members:</h3>[userlist: list_type=new, only_with_avatars=TRUE, limit=5]
+ <div id="elgg_sidebar">
+ [loginbox]
+ <h3>Newest members:</h3>[userlist: list_type=new, only_with_avatars=TRUE, limit=5]
</div>
<div id="elgg_page_contents" class="clearfloat">
- <h2>Welcome to [networkname]</h2><p class="margin_top">Introduction and instructions might go here. Learn about this network, and how to get registered and start adding content.</p>
- <h2>All site activity</h2>
- [activity]
-</div>
+ <h2>Welcome to [networkname]</h2><p class="margin_top">Introduction and instructions might go here. Learn about this network, and how to get registered and start adding content.</p>
+ <h2>All site activity</h2>
+ [activity]
+ </div>
</div>
___EOT;
}