Commit 1dddcb83 authored by Mario's avatar Mario

hopefully fix whitescreen issue with gallery on bsd

parent 45c584b7
...@@ -15,32 +15,14 @@ use Zotlabs\Extend\Hook; ...@@ -15,32 +15,14 @@ use Zotlabs\Extend\Hook;
require_once('addon/gallery/Mod_Gallery.php'); require_once('addon/gallery/Mod_Gallery.php');
function gallery_module() {}
function gallery_load() { function gallery_load() {
Hook::register('load_pdl', 'addon/gallery/gallery.php', 'gallery_load_pdl');
Hook::register('channel_apps', 'addon/gallery/gallery.php', 'gallery_channel_apps'); Hook::register('channel_apps', 'addon/gallery/gallery.php', 'gallery_channel_apps');
} }
function gallery_unload() { function gallery_unload() {
Hook::unregister('load_pdl', 'addon/gallery/gallery.php', 'gallery_load_pdl');
Hook::unregister('channel_apps', 'addon/gallery/gallery.php', 'gallery_channel_apps'); Hook::unregister('channel_apps', 'addon/gallery/gallery.php', 'gallery_channel_apps');
} }
function gallery_load_pdl(&$b) {
if ($b['module'] === 'gallery') {
$b['layout'] = '
[region=aside]
[widget=vcard][/widget]
[/region]
[region=right_aside]
[widget=notifications][/widget]
[widget=newmember][/widget]
[/region]
';
}
}
function gallery_channel_apps(&$b) { function gallery_channel_apps(&$b) {
if(Apps::system_app_installed(App::$profile_uid, 'Gallery')) { if(Apps::system_app_installed(App::$profile_uid, 'Gallery')) {
$b['tabs'][] = [ $b['tabs'][] = [
......
[region=aside]
[widget=vcard][/widget]
[/region]
[region=right_aside]
[widget=notifications][/widget]
[widget=newmember][/widget]
[/region]
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment