aboutsummaryrefslogtreecommitdiffstats
path: root/index.php
diff options
context:
space:
mode:
authorfriendica <info@friendica.com>2012-09-27 17:48:10 -0700
committerfriendica <info@friendica.com>2012-09-27 17:48:10 -0700
commitd261fe271fdee747244c76f7ba4679b8372a2e8c (patch)
tree90da2f6f16c484243c4b422d32b72ddd9e04965f /index.php
parentba4fe4ff919fa3250db33eee2425870f10107e81 (diff)
downloadvolse-hubzilla-d261fe271fdee747244c76f7ba4679b8372a2e8c.tar.gz
volse-hubzilla-d261fe271fdee747244c76f7ba4679b8372a2e8c.tar.bz2
volse-hubzilla-d261fe271fdee747244c76f7ba4679b8372a2e8c.zip
create a widget registry for pages so themes can reorder, insert/delete, and relocate widgets to different regions of the page
Diffstat (limited to 'index.php')
-rw-r--r--index.php22
1 files changed, 20 insertions, 2 deletions
diff --git a/index.php b/index.php
index 3c45a3b4c..f8069445f 100644
--- a/index.php
+++ b/index.php
@@ -158,6 +158,8 @@ $a->apps = $arr['app_menu'];
if(strlen($a->module)) {
+
+
/**
*
* We will always have a module name.
@@ -176,10 +178,19 @@ if(strlen($a->module)) {
*/
if((! $a->module_loaded) && (file_exists("mod/{$a->module}.php"))) {
- include_once("mod/{$a->module}.php");
- $a->module_loaded = true;
+ if((strpos($a->module,'admin') === 0) && (! is_site_admin())) {
+ $a->module_loaded = false;
+ notice( t('Permission denied.') . EOL);
+ goaway(z_root());
+ }
+ else {
+ include_once("mod/{$a->module}.php");
+ $a->module_loaded = true;
+ }
}
+
+
/**
*
* The URL provided does not resolve to a valid module.
@@ -362,6 +373,13 @@ head_add_js('mod_' . $a->module . '.js');
'$js_strings' => js_strings()
));
+$arr = $a->get_widgets();
+if(count($arr)) {
+ foreach($arr as $x) {
+ $a->page[$x['location']] .= $x['html'];
+ }
+}
+
$page = $a->page;
$profile = $a->profile;