function widget_design_tools($arr) { $a = get_app(); // mod menu doesn't load a profile. For any modules which load a profile, check it. // otherwise local_user() is sufficient for permissions. if ($a->profile['profile_uid']) { if ($a->profile['profile_uid'] != local_user()) { return ''; } } if (!local_user()) { return ''; } return design_tools(); }
function widget_design_tools($arr) { // mod menu doesn't load a profile. For any modules which load a profile, check it. // otherwise local_channel() is sufficient for permissions. if (App::$profile['profile_uid']) { if (App::$profile['profile_uid'] != local_channel() && !App::$is_sys) { return ''; } } if (!local_channel()) { return ''; } return design_tools(); }