diff --git a/mod/hovercard.php b/mod/hovercard.php index 553d5d2232..ec749db208 100644 --- a/mod/hovercard.php +++ b/mod/hovercard.php @@ -11,7 +11,7 @@ require_once("include/socgraph.php"); require_once("include/Contact.php"); -function hovercard_init(App &$a) { +function hovercard_init(App $a) { // Just for testing purposes $_GET["mode"] = "minimal"; } @@ -96,10 +96,10 @@ function hovercard_content() { /** * @brief Get the raw content of a template file - * + * * @param string $template The name of the template * @param string $root Directory of the template - * + * * @return string|bool Output the raw content if existent, otherwise false */ function get_template_content($template, $root = "") { diff --git a/mod/ignored.php b/mod/ignored.php index 99b3a3ddcc..0065d51c58 100644 --- a/mod/ignored.php +++ b/mod/ignored.php @@ -1,7 +1,7 @@ argc==2 && $a->argv[1]=="testrewrite") { @@ -24,7 +24,7 @@ function install_init(App &$a){ } -function install_post(App &$a) { +function install_post(App $a) { global $install_wizard_pass, $db; switch($install_wizard_pass) { @@ -132,7 +132,7 @@ function get_db_errno() { } } -function install_content(App &$a) { +function install_content(App $a) { global $install_wizard_pass, $db; $o = ''; @@ -565,7 +565,7 @@ function check_imagik(&$checks) { } } -function manual_config(App &$a) { +function manual_config(App $a) { $data = htmlentities($a->data['txt'],ENT_COMPAT,'UTF-8'); $o = t('The database configuration file ".htconfig.php" could not be written. Please use the enclosed text to create a configuration file in your web server root.'); $o .= ""; diff --git a/mod/invite.php b/mod/invite.php index a7739fc774..f5c60e1ed3 100644 --- a/mod/invite.php +++ b/mod/invite.php @@ -9,7 +9,7 @@ require_once('include/email.php'); -function invite_post(App &$a) { +function invite_post(App $a) { if (! local_user()) { notice( t('Permission denied.') . EOL); @@ -73,8 +73,8 @@ function invite_post(App &$a) { $nmessage = $message; } - $res = mail($recip, email_header_encode( t('Please join us on Friendica'),'UTF-8'), - $nmessage, + $res = mail($recip, email_header_encode( t('Please join us on Friendica'),'UTF-8'), + $nmessage, "From: " . $a->user['email'] . "\n" . 'Content-type: text/plain; charset=UTF-8' . "\n" . 'Content-transfer-encoding: 8bit' ); @@ -97,7 +97,7 @@ function invite_post(App &$a) { } -function invite_content(App &$a) { +function invite_content(App $a) { if (! local_user()) { notice( t('Permission denied.') . EOL); @@ -136,7 +136,7 @@ function invite_content(App &$a) { '$msg_text' => t('Your message:'), '$default_message' => t('You are cordially invited to join me and other close friends on Friendica - and help us to create a better social web.') . "\r\n" . "\r\n" . $linktxt - . "\r\n" . "\r\n" . (($invonly) ? t('You will need to supply this invitation code: $invite_code') . "\r\n" . "\r\n" : '') .t('Once you have registered, please connect with me via my profile page at:') + . "\r\n" . "\r\n" . (($invonly) ? t('You will need to supply this invitation code: $invite_code') . "\r\n" . "\r\n" : '') .t('Once you have registered, please connect with me via my profile page at:') . "\r\n" . "\r\n" . App::get_baseurl() . '/profile/' . $a->user['nickname'] . "\r\n" . "\r\n" . t('For more information about the Friendica project and why we feel it is important, please visit http://friendica.com') . "\r\n" . "\r\n" , '$submit' => t('Submit') diff --git a/mod/item.php b/mod/item.php index 1c7a970c2d..c9306c523a 100644 --- a/mod/item.php +++ b/mod/item.php @@ -27,7 +27,7 @@ require_once('include/Scrape.php'); require_once('include/diaspora.php'); require_once('include/Contact.php'); -function item_post(App &$a) { +function item_post(App $a) { if((! local_user()) && (! remote_user()) && (! x($_REQUEST,'commenter'))) return; @@ -1066,7 +1066,7 @@ function item_post_return($baseurl, $api_source, $return_path) { -function item_content(App &$a) { +function item_content(App $a) { if ((! local_user()) && (! remote_user())) { return; diff --git a/mod/like.php b/mod/like.php index ff1e238ac1..1f6a233f3d 100755 --- a/mod/like.php +++ b/mod/like.php @@ -5,7 +5,7 @@ require_once('include/bbcode.php'); require_once('include/items.php'); require_once('include/like.php'); -function like_content(App &$a) { +function like_content(App $a) { if(! local_user() && ! remote_user()) { return false; } diff --git a/mod/localtime.php b/mod/localtime.php index 00a7c59094..5353089031 100644 --- a/mod/localtime.php +++ b/mod/localtime.php @@ -3,7 +3,7 @@ require_once('include/datetime.php'); -function localtime_post(App &$a) { +function localtime_post(App $a) { $t = $_REQUEST['time']; if(! $t) @@ -16,7 +16,7 @@ function localtime_post(App &$a) { } -function localtime_content(App &$a) { +function localtime_content(App $a) { $t = $_REQUEST['time']; if(! $t) $t = 'now'; @@ -38,7 +38,7 @@ function localtime_content(App &$a) { $o .= '
'; - $o .= '

' . t('Please select your timezone:') . '

'; + $o .= '

' . t('Please select your timezone:') . '

'; $o .= select_timezone(($_REQUEST['timezone']) ? $_REQUEST['timezone'] : 'America/Los_Angeles'); diff --git a/mod/lockview.php b/mod/lockview.php index 746df28cd9..38a308634e 100644 --- a/mod/lockview.php +++ b/mod/lockview.php @@ -1,8 +1,8 @@ argc > 1) ? $a->argv[1] : 0); if (is_numeric($type)) { $item_id = intval($type); @@ -10,13 +10,13 @@ function lockview_content(App &$a) { } else { $item_id = (($a->argc > 2) ? intval($a->argv[2]) : 0); } - + if(! $item_id) killme(); if (!in_array($type, array('item','photo','event'))) killme(); - + $r = q("SELECT * FROM `%s` WHERE `id` = %d LIMIT 1", dbesc($type), intval($item_id) @@ -34,7 +34,7 @@ function lockview_content(App &$a) { } - if(($item['private'] == 1) && (! strlen($item['allow_cid'])) && (! strlen($item['allow_gid'])) + if(($item['private'] == 1) && (! strlen($item['allow_cid'])) && (! strlen($item['allow_gid'])) && (! strlen($item['deny_cid'])) && (! strlen($item['deny_gid']))) { echo t('Remote privacy information not available.') . '
'; @@ -54,7 +54,7 @@ function lockview_content(App &$a) { dbesc(implode(', ', $allowed_groups)) ); if (dbm::is_result($r)) - foreach($r as $rr) + foreach($r as $rr) $l[] = '' . $rr['name'] . ''; } if(count($allowed_users)) { @@ -62,7 +62,7 @@ function lockview_content(App &$a) { dbesc(implode(', ',$allowed_users)) ); if (dbm::is_result($r)) - foreach($r as $rr) + foreach($r as $rr) $l[] = $rr['name']; } @@ -72,7 +72,7 @@ function lockview_content(App &$a) { dbesc(implode(', ', $deny_groups)) ); if (dbm::is_result($r)) - foreach($r as $rr) + foreach($r as $rr) $l[] = '' . $rr['name'] . ''; } if(count($deny_users)) { @@ -80,7 +80,7 @@ function lockview_content(App &$a) { dbesc(implode(', ',$deny_users)) ); if (dbm::is_result($r)) - foreach($r as $rr) + foreach($r as $rr) $l[] = '' . $rr['name'] . ''; } diff --git a/mod/login.php b/mod/login.php index db49ba20ac..8fd28c7230 100644 --- a/mod/login.php +++ b/mod/login.php @@ -1,6 +1,6 @@ argc != 2) killme(); diff --git a/mod/mood.php b/mod/mood.php index 0e603c869a..e80a7f0976 100644 --- a/mod/mood.php +++ b/mod/mood.php @@ -5,7 +5,7 @@ require_once('include/bbcode.php'); require_once('include/items.php'); -function mood_init(App &$a) { +function mood_init(App $a) { if (! local_user()) { return; @@ -60,7 +60,7 @@ function mood_init(App &$a) { $uri = item_new_uri($a->get_hostname(),$uid); - $action = sprintf( t('%1$s is currently %2$s'), '[url=' . $poster['url'] . ']' . $poster['name'] . '[/url]' , $verbs[$verb]); + $action = sprintf( t('%1$s is currently %2$s'), '[url=' . $poster['url'] . ']' . $poster['name'] . '[/url]' , $verbs[$verb]); $arr = array(); $arr['guid'] = get_guid(32); @@ -109,7 +109,7 @@ function mood_init(App &$a) { -function mood_content(App &$a) { +function mood_content(App $a) { if (! local_user()) { notice( t('Permission denied.') . EOL); diff --git a/mod/msearch.php b/mod/msearch.php index 4b5205ac08..277242afff 100644 --- a/mod/msearch.php +++ b/mod/msearch.php @@ -1,6 +1,6 @@ $rr['name'], - 'url' => App::get_baseurl() . '/profile/' . $rr['nickname'], + 'name' => $rr['name'], + 'url' => App::get_baseurl() . '/profile/' . $rr['nickname'], 'photo' => App::get_baseurl() . '/photo/avatar/' . $rr['uid'] . '.jpg', 'tags' => str_replace(array(',',' '),array(' ',' '),$rr['pub_keywords']) ); diff --git a/mod/navigation.php b/mod/navigation.php index d69c76a843..be1b522e9c 100644 --- a/mod/navigation.php +++ b/mod/navigation.php @@ -2,7 +2,7 @@ require_once("include/nav.php"); -function navigation_content(App &$a) { +function navigation_content(App $a) { $nav_info = nav_info($a); diff --git a/mod/network.php b/mod/network.php index 61df38fb12..2f33c62f72 100644 --- a/mod/network.php +++ b/mod/network.php @@ -1,5 +1,5 @@ argc >= 2 && is_numeric($a->argv[1])) { @@ -303,7 +303,7 @@ function network_query_get_sel_group(App &$a) { } -function network_content(&$a, $update = 0) { +function network_content(App $a, $update = 0) { require_once('include/conversation.php'); @@ -728,7 +728,7 @@ function network_content(&$a, $update = 0) { intval($parents), intval($max_comments + 1) ); - + if (dbm::is_result($thread_items)) $items = array_merge($items, $thread_items); } @@ -805,11 +805,11 @@ function network_content(&$a, $update = 0) { /** * @brief Get the network tabs menu - * + * * @param app $a The global App * @return string Html of the networktab */ -function network_tabs(App &$a) { +function network_tabs(App $a) { // item filter tabs /// @TODO fix this logic, reduce duplication /// $a->page['content'] .= '
'; @@ -892,7 +892,7 @@ function network_tabs(App &$a) { $arr = array('tabs' => $tabs); call_hooks('network_tabs', $arr); - + $tpl = get_markup_template('common_tabs.tpl'); return replace_macros($tpl, array('$tabs' => $arr['tabs'])); diff --git a/mod/newmember.php b/mod/newmember.php index 1ef0985066..a5e41f1e24 100644 --- a/mod/newmember.php +++ b/mod/newmember.php @@ -1,6 +1,6 @@ ' . t('Welcome to Friendica') . ''; @@ -15,7 +15,7 @@ function newmember_content(App &$a) { $o .= ''; @@ -23,7 +23,7 @@ function newmember_content(App &$a) { $o .= '