2017-03-16 03:56:12 +00:00
|
|
|
<?php
|
|
|
|
|
2022-02-16 04:08:28 +00:00
|
|
|
namespace Code\Widget;
|
2017-03-16 03:56:12 +00:00
|
|
|
|
2020-10-21 22:22:23 +00:00
|
|
|
use App;
|
|
|
|
|
2022-10-23 21:18:44 +00:00
|
|
|
class Catcloud_wall implements WidgetInterface
|
2021-12-02 23:02:31 +00:00
|
|
|
{
|
2017-03-16 03:56:12 +00:00
|
|
|
|
2022-10-24 03:39:49 +00:00
|
|
|
public function widget(array $arguments): string
|
2021-12-02 23:02:31 +00:00
|
|
|
{
|
2017-03-16 03:56:12 +00:00
|
|
|
|
2021-12-03 03:01:39 +00:00
|
|
|
if ((!App::$profile['profile_uid']) || (!App::$profile['channel_hash'])) {
|
2021-12-02 23:02:31 +00:00
|
|
|
return '';
|
2021-12-03 03:01:39 +00:00
|
|
|
}
|
|
|
|
if (!perm_is_allowed(App::$profile['profile_uid'], get_observer_hash(), 'view_stream')) {
|
2021-12-02 23:02:31 +00:00
|
|
|
return '';
|
2021-12-03 03:01:39 +00:00
|
|
|
}
|
2017-03-16 03:56:12 +00:00
|
|
|
|
2022-10-24 03:39:49 +00:00
|
|
|
$limit = ((array_key_exists('limit', $arguments)) ? intval($arguments['limit']) : 50);
|
2017-03-16 03:56:12 +00:00
|
|
|
|
2021-12-02 23:02:31 +00:00
|
|
|
return catblock(App::$profile['profile_uid'], $limit, '', App::$profile['channel_hash'], 'wall');
|
|
|
|
}
|
2017-03-16 03:56:12 +00:00
|
|
|
}
|