* return the HTML for the pages of the admin panel.
*
* @param App $a
- *
+ * @throws ImagickException
+ * @throws \Friendica\Network\HTTPException\InternalServerErrorException
*/
function admin_post(App $a)
{
*
* @param App $a
* @return string
+ * @throws \Friendica\Network\HTTPException\InternalServerErrorException
*/
function admin_content(App $a)
{
*
* @param App $a
* @return string
+ * @throws \Friendica\Network\HTTPException\InternalServerErrorException
*/
function admin_page_tos(App $a)
{
* @brief Process send data from Admin TOS Page
*
* @param App $a
+ * @throws \Friendica\Network\HTTPException\InternalServerErrorException
*/
function admin_page_tos_post(App $a)
{
*
* @param App $a
* @return string
+ * @throws \Friendica\Network\HTTPException\InternalServerErrorException
*/
function admin_page_blocklist(App $a)
{
* @brief Process send data from Admin Blocklist Page
*
* @param App $a
+ * @throws \Friendica\Network\HTTPException\InternalServerErrorException
*/
function admin_page_blocklist_post(App $a)
{
* @brief Process data send by the contact block admin page
*
* @param App $a
+ * @throws ImagickException
+ * @throws \Friendica\Network\HTTPException\InternalServerErrorException
*/
function admin_page_contactblock_post(App $a)
{
*
* @param App $a
* @return string
+ * @throws \Friendica\Network\HTTPException\InternalServerErrorException
*/
function admin_page_contactblock(App $a)
{
*
* @param App $a
* @return string
+ * @throws \Friendica\Network\HTTPException\InternalServerErrorException
*/
function admin_page_deleteitem(App $a)
{
* URLs like the full /display URL to make the process more easy for the admin.
*
* @param App $a
+ * @throws \Friendica\Network\HTTPException\InternalServerErrorException
*/
function admin_page_deleteitem_post(App $a)
{
*
* @param App $a
* @return string
+ * @throws \Friendica\Network\HTTPException\InternalServerErrorException
*/
function admin_page_federation(App $a)
{
*
* @param App $a
* @return string
+ * @throws \Friendica\Network\HTTPException\InternalServerErrorException
*/
function admin_page_queue(App $a)
{
* The returned string holds the content of the page.
*
* @param App $a
+ * @param $deferred
* @return string
+ * @throws \Friendica\Network\HTTPException\InternalServerErrorException
*/
function admin_page_workerqueue(App $a, $deferred)
{
*
* @param App $a
* @return string
+ * @throws \Friendica\Network\HTTPException\InternalServerErrorException
*/
function admin_page_summary(App $a)
{
* @brief Process send data from Admin Site Page
*
* @param App $a
+ * @throws \Friendica\Network\HTTPException\InternalServerErrorException
*/
function admin_page_site_post(App $a)
{
$relay_server_tags = (!empty($_POST['relay_server_tags']) ? Strings::escapeTags(trim($_POST['relay_server_tags'])) : '');
$relay_user_tags = !empty($_POST['relay_user_tags']);
$active_panel = (!empty($_POST['active_panel']) ? "#" . Strings::escapeTags(trim($_POST['active_panel'])) : '');
-
+
+ /**
+ * @var $storagebackend \Friendica\Model\Storage\IStorage
+ */
$storagebackend = Strings::escapeTags(trim(defaults($_POST, 'storagebackend', '')));
StorageManager::setBackend($storagebackend);
-
+
// save storage backend form
if (!is_null($storagebackend) && $storagebackend != "") {
$storage_opts = $storagebackend::getOptions();
*
* @param App $a
* @return string
+ * @throws \Friendica\Network\HTTPException\InternalServerErrorException
*/
function admin_page_site(App $a)
{
/* storage backend */
$storage_backends = StorageManager::listBackends();
+ /**
+ * @var $storage_current_backend \Friendica\Model\Storage\IStorage
+ */
$storage_current_backend = StorageManager::getBackend();
$storage_backends_choices = [
*
* @param App $a
* @return string
- * */
+ * @throws \Friendica\Network\HTTPException\InternalServerErrorException
+ */
function admin_page_dbsync(App $a)
{
$o = '';
* @brief Process data send by Users admin page
*
* @param App $a
+ * @throws \Friendica\Network\HTTPException\InternalServerErrorException
*/
function admin_page_users_post(App $a)
{
*
* @param App $a
* @return string
+ * @throws \Friendica\Network\HTTPException\InternalServerErrorException
*/
function admin_page_users(App $a)
{
* @param App $a
* @param array $addons_admin A list of admin addon names
* @return string
+ * @throws \Friendica\Network\HTTPException\InternalServerErrorException
*/
function admin_page_addons(App $a, array $addons_admin)
{
*
* @param App $a
* @return string
+ * @throws \Friendica\Network\HTTPException\InternalServerErrorException
*/
function admin_page_themes(App $a)
{
* @brief Prosesses data send by Logs admin page
*
* @param App $a
+ * @throws \Friendica\Network\HTTPException\InternalServerErrorException
*/
function admin_page_logs_post(App $a)
{
*
* @param App $a
* @return string
+ * @throws \Friendica\Network\HTTPException\InternalServerErrorException
*/
function admin_page_logs(App $a)
{
*
* @param App $a
* @return string
+ * @throws \Friendica\Network\HTTPException\InternalServerErrorException
*/
function admin_page_viewlogs(App $a)
{
* @brief Prosesses data send by the features admin page
*
* @param App $a
+ * @throws \Friendica\Network\HTTPException\InternalServerErrorException
*/
function admin_page_features_post(App $a)
{
*
* @param App $a
* @return string
+ * @throws \Friendica\Network\HTTPException\InternalServerErrorException
*/
function admin_page_features(App $a)
{
* in order to link our friend request with our own server cell.
* After logging in, we click 'submit' to approve the linkage.
*
+ * @param App $a
+ * @throws ImagickException
+ * @throws \Friendica\Network\HTTPException\InternalServerErrorException
*/
function dfrn_request_post(App $a)
{
/**
* @param App $a
+ * @return string
+ * @throws \Friendica\Network\HTTPException\InternalServerErrorException
*/
function fbrowser_content(App $a)
{
* @brief Get the raw content of a template file
*
* @param string $template The name of the template
- * @param string $root Directory of the template
+ * @param string $root Directory of the template
*
* @return string|bool Output the raw content if existent, otherwise false
+ * @throws Exception
*/
function get_template_content($template, $root = '')
{
/**
* This function removes the tag $tag from the text $body and replaces it with
- * the appropiate link.
+ * the appropriate link.
*
- * @param App $a Application instance @TODO is unused in this function's scope (excluding included files)
- * @param string $body the text to replace the tag in
- * @param string $inform a comma-seperated string containing everybody to inform
- * @param string $str_tags string to add the tag to
+ * @param string $body the text to replace the tag in
+ * @param string $inform a comma-seperated string containing everybody to inform
+ * @param string $str_tags string to add the tag to
* @param integer $profile_uid
- * @param string $tag the tag to replace
- * @param string $network The network of the post
+ * @param string $tag the tag to replace
+ * @param string $network The network of the post
*
- * @return boolean true if replaced, false if not replaced
+ * @return array|bool ['replaced' => $replaced, 'contact' => $contact];
+ * @throws ImagickException
+ * @throws \Friendica\Network\HTTPException\InternalServerErrorException
*/
function handle_tag(App $a, &$body, &$inform, &$str_tags, $profile_uid, $tag, $network = "")
{
* @param App $a App
*
* @return string
+ * @throws ImagickException
+ * @throws \Friendica\Network\HTTPException\InternalServerErrorException
+ * @throws Exception
*/
function match_content(App $a)
{
* 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 \Friendica\Network\HTTPException\InternalServerErrorException
*/
function networkConversation(App $a, $items, Pager $pager, $mode, $update, $ordering = '')
{
/**
* @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 \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 \Friendica\Network\HTTPException\InternalServerErrorException
+ * @global Pager $pager
*/
function networkThreadedView(App $a, $update, $parent)
{
* 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 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')
* Note: We have moved the function to ParseUrl.php. This function is only for
* legacy support and will be remove in the future
*
- * @param type $url The url of the page which should be scraped
- * @param type $no_guessing If true the parse doens't search for
- * preview pictures
- * @param type $do_oembed The false option is used by the function fetch_oembed()
- * to avoid endless loops
+ * @param string $url The url of the page which should be scraped
+ * @param bool $no_guessing If true the parse doens't search for
+ * preview pictures
+ * @param bool $do_oembed The false option is used by the function fetch_oembed()
+ * to avoid endless loops
*
* @return array which contains needed data for embedding
*
- * @see ParseUrl::getSiteinfoCached()
+ * @throws \Friendica\Network\HTTPException\InternalServerErrorException
+ * @see ParseUrl::getSiteinfoCached()
*
- * @todo Remove this function after all Addons has been changed to use
- * ParseUrl::getSiteinfoCached
+ * @deprecated since version 3.6 use ParseUrl::getSiteinfoCached instead
*/
function parseurl_getsiteinfo_cached($url, $no_guessing = false, $do_oembed = true)
{
*
* Expected JSON structure:
* {
- * "result": {
- * "intro": 0,
- * "mail": 0,
- * "net": 0,
- * "home": 0,
- * "register": 0,
- * "all-events": 0,
- * "all-events-today": 0,
- * "events": 0,
- * "events-today": 0,
- * "birthdays": 0,
- * "birthdays-today": 0,
- * "groups": [ ],
- * "forums": [ ],
- * "notify": 0,
- * "notifications": [ ],
- * "sysmsgs": {
- * "notice": [ ],
- * "info": [ ]
- * }
- * }
- * }
+ * "result": {
+ * "intro": 0,
+ * "mail": 0,
+ * "net": 0,
+ * "home": 0,
+ * "register": 0,
+ * "all-events": 0,
+ * "all-events-today": 0,
+ * "events": 0,
+ * "events-today": 0,
+ * "birthdays": 0,
+ * "birthdays-today": 0,
+ * "groups": [ ],
+ * "forums": [ ],
+ * "notify": 0,
+ * "notifications": [ ],
+ * "sysmsgs": {
+ * "notice": [ ],
+ * "info": [ ]
+ * }
+ * }
+ * }
*
* @param App $a The Friendica App instance
+ * @throws \Friendica\Network\HTTPException\InternalServerErrorException
*/
function ping_init(App $a)
{
*
* @param int $uid User id
* @return array Associative array of notifications
+ * @throws \Friendica\Network\HTTPException\InternalServerErrorException
*/
function ping_get_notifications($uid)
{
* @param array $notifs Complete list of notification
* @param array $sysmsgs List of system notice messages
* @param array $sysmsgs_info List of system info messages
- * @param array $groups_unseen List of unseen group messages
- * @param array $forums_unseen List of unseen forum messages
+ * @param array $groups_unseen List of unseen group items
+ * @param array $forums_unseen List of unseen forum items
*
* @return array XML-transform ready data array
*/
use Friendica\Protocol\Diaspora;
/**
- * @param object $a App
+ * @param App $a App
* @return void
+ * @throws ImagickException
+ * @throws \Friendica\Network\HTTPException\InternalServerErrorException
*/
function receive_post(App $a)
{
use Friendica\Core\System;
/**
- * @param object $a App
+ * @param App $a App
* @return string
+ * @throws \Friendica\Network\HTTPException\InternalServerErrorException
*/
function smilies_content(App $a)
{
/**
* Updates tags from an item
+ *
* @param $item_id
* @param $tags array
+ * @throws Exception
*/
function update_tags($item_id, $tags){
if (empty($item_id) || empty($tags)){
<?php
/**
* load view/theme/$current_theme/style.php with friendica contex
+ *
+ * @param App $a
*/
-
function view_init($a){
header("Content-Type: text/css");
* @param string $uid The user_id
* @param string $family The category of the configuration value
* @param string $key The configuration key to set
- * @param string $value The value to store
+ * @param mixed $value The value to store
*
* @return bool Operation success
* @throws \Friendica\Network\HTTPException\InternalServerErrorException
* If $name is not defined, return engine defined by theme,
* or default
*
- * @return object Template Engine instance
+ * @return ITemplateEngine Template Engine instance
*/
public static function getTemplateEngine()
{
}
/**
- * @param object $uid user
+ * @param int $uid user
* @param integer $start optional, default 0
* @param integer $limit optional, default 80
* @return array
/**
* @brief Constructor
- * @param object $data data
+ * @param string $data
* @param boolean $type optional, default null
* @throws \Friendica\Network\HTTPException\InternalServerErrorException
* @throws \ImagickException
}
/**
- * @param object $data data
+ * @param string $data data
* @return boolean
* @throws \Friendica\Network\HTTPException\InternalServerErrorException
* @throws \ImagickException
/**
* Transmits a given activity to a target
*
- * @param array $activity
- * @param string $target Target profile
- * @param integer $uid User ID
+ * @param string $activity Type name
+ * @param string $target Target profile
+ * @param integer $uid User ID
+ * @return bool
* @throws \Friendica\Network\HTTPException\InternalServerErrorException
* @throws \ImagickException
* @throws \Exception