diff options
author | friendica <info@friendica.com> | 2012-09-27 17:48:10 -0700 |
---|---|---|
committer | friendica <info@friendica.com> | 2012-09-27 17:48:10 -0700 |
commit | d261fe271fdee747244c76f7ba4679b8372a2e8c (patch) | |
tree | 90da2f6f16c484243c4b422d32b72ddd9e04965f /index.php | |
parent | ba4fe4ff919fa3250db33eee2425870f10107e81 (diff) | |
download | volse-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.php | 22 |
1 files changed, 20 insertions, 2 deletions
@@ -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; |