use Friendica\Content\Widget;
use Friendica\Content\Text\HTML;
use Friendica\Core\ACL;
-use Friendica\Core\Addon;
use Friendica\Core\Config;
use Friendica\Core\Hook;
use Friendica\Core\L10n;
* Return selected tab from query
*
* urls -> returns
- * '/network' => $no_active = 'active'
- * '/network?f=&order=comment' => $comment_active = 'active'
- * '/network?f=&order=post' => $postord_active = 'active'
- * '/network?f=&conv=1', => $conv_active = 'active'
- * '/network/new', => $new_active = 'active'
- * '/network?f=&star=1', => $starred_active = 'active'
- * '/network?f=&bmark=1', => $bookmarked_active = 'active'
+ * '/network' => $no_active = 'active'
+ * '/network?f=&order=comment' => $comment_active = 'active'
+ * '/network?f=&order=post' => $postord_active = 'active'
+ * '/network?f=&conv=1', => $conv_active = 'active'
+ * '/network/new', => $new_active = 'active'
+ * '/network?f=&star=1', => $starred_active = 'active'
+ * '/network?f=&bmark=1', => $bookmarked_active = 'active'
*
- * @return Array ($no_active, $comment_active, $postord_active, $conv_active, $new_active, $starred_active, $bookmarked_active);
+ * @param App $a
+ * @return array ($no_active, $comment_active, $postord_active, $conv_active, $new_active, $starred_active, $bookmarked_active);
*/
function network_query_get_sel_tab(App $a)
{
/**
* @brief Sets the pager data and returns SQL
*
- * @param App $a The global App
+ * @param App $a The global App
+ * @param Pager $pager
* @param integer $update Used for the automatic reloading
* @return string SQL with the appropriate LIMIT clause
+ * @throws \Friendica\Network\HTTPException\InternalServerErrorException
*/
function networkPager(App $a, Pager $pager, $update)
{
* @brief Sets items as seen
*
* @param array $condition The array with the SQL condition
+ * @throws \Friendica\Network\HTTPException\InternalServerErrorException
*/
function networkSetSeen($condition)
{
*
* @param App $a The global App
* @param array $items Items of the conversation
+ * @param Pager $pager
* @param string $mode Display mode for the conversation
* @param integer $update Used for the automatic reloading
+ * @param string $ordering
* @return string HTML of the conversation
+ * @throws ImagickException
+ * @throws \Friendica\Network\HTTPException\InternalServerErrorException
*/
function networkConversation(App $a, $items, Pager $pager, $mode, $update, $ordering = '')
{
/// @TODO Is this really necessary? $a is already available to hooks
$arr = ['query' => $a->query_string];
- Addon::callHooks('network_content_init', $arr);
+ Hook::callAll('network_content_init', $arr);
$flat_mode = false;
/**
* @brief Get the network content in flat view
*
- * @param Pager $pager
* @param App $a The global App
* @param integer $update Used for the automatic reloading
* @return string HTML of the network content in flat view
+ * @throws ImagickException
+ * @throws \Friendica\Network\HTTPException\InternalServerErrorException
+ * @global Pager $pager
*/
function networkFlatView(App $a, $update = 0)
{
/**
* @brief Get the network content in threaded view
*
- * @global Pager $pager
* @param App $a The global App
* @param integer $update Used for the automatic reloading
* @param integer $parent
* @return string HTML of the network content in flat view
+ * @throws ImagickException
+ * @throws \Friendica\Network\HTTPException\InternalServerErrorException
+ * @global Pager $pager
*/
function networkThreadedView(App $a, $update, $parent)
{
$group = DBA::selectFirst('group', ['name'], ['id' => $gid, 'uid' => local_user()]);
if (!DBA::isResult($group)) {
if ($update) {
- killme();
+ exit();
}
notice(L10n::t('No such group') . EOL);
$a->internalRedirect('network/0');
*
* @param App $a The global App
* @return string Html of the networktab
+ * @throws \Friendica\Network\HTTPException\InternalServerErrorException
*/
function network_tabs(App $a)
{
}
$arr = ['tabs' => $tabs];
- Addon::callHooks('network_tabs', $arr);
+ Hook::callAll('network_tabs', $arr);
$tpl = Renderer::getMarkupTemplate('common_tabs.tpl');
* of the page to make the correct asynchronous call. This is obtained through the Pager that was instantiated in
* networkThreadedView or networkFlatView.
*
- * @global Pager $pager
- * @param App $a
+ * @param App $a
* @param string $htmlhead The head tag HTML string
+ * @throws \Friendica\Network\HTTPException\InternalServerErrorException
+ * @global Pager $pager
*/
function network_infinite_scroll_head(App $a, &$htmlhead)
{
/// @TODO this will have to be converted to a static property of the converted Module\Network class
+ /**
+ * @var $pager Pager
+ */
global $pager;
if (PConfig::get(local_user(), 'system', 'infinite_scroll')