2017-03-17 00:11:48 +00:00
|
|
|
<?php
|
|
|
|
|
|
|
|
namespace Zotlabs\Widget;
|
|
|
|
|
2021-12-02 22:33:36 +00:00
|
|
|
use App;
|
|
|
|
|
2021-12-02 23:02:31 +00:00
|
|
|
class Website_portation_tools
|
|
|
|
{
|
2017-03-17 00:11:48 +00:00
|
|
|
|
2021-12-02 23:02:31 +00:00
|
|
|
public function widget($arr)
|
|
|
|
{
|
2017-03-17 00:11:48 +00:00
|
|
|
|
2021-12-02 23:02:31 +00:00
|
|
|
// mod menu doesn't load a profile. For any modules which load a profile, check it.
|
|
|
|
// otherwise local_channel() is sufficient for permissions.
|
2017-03-17 00:11:48 +00:00
|
|
|
|
2021-12-03 03:01:39 +00:00
|
|
|
if (App::$profile['profile_uid']) {
|
|
|
|
if ((App::$profile['profile_uid'] != local_channel()) && (!App::$is_sys)) {
|
2021-12-02 23:02:31 +00:00
|
|
|
return '';
|
2021-12-03 03:01:39 +00:00
|
|
|
}
|
|
|
|
}
|
2017-03-17 00:11:48 +00:00
|
|
|
|
2021-12-03 03:01:39 +00:00
|
|
|
if (!local_channel()) {
|
2021-12-02 23:02:31 +00:00
|
|
|
return '';
|
2021-12-03 03:01:39 +00:00
|
|
|
}
|
2017-03-17 00:11:48 +00:00
|
|
|
|
2021-12-02 23:02:31 +00:00
|
|
|
return website_portation_tools();
|
|
|
|
}
|
2017-03-17 00:11:48 +00:00
|
|
|
}
|