From f92918f471a35520dadc02861ca0e5bd96a156ba Mon Sep 17 00:00:00 2001 From: Hypolite Petovan Date: Mon, 9 Jan 2017 23:14:25 +1100 Subject: [PATCH] Normalize App parameter declaration (mod folder, 2 out of 3) --- mod/hovercard.php | 6 +++--- mod/ignored.php | 2 +- mod/install.php | 8 ++++---- mod/invite.php | 10 +++++----- mod/item.php | 4 ++-- mod/like.php | 2 +- mod/localtime.php | 6 +++--- mod/lockview.php | 18 +++++++++--------- mod/login.php | 2 +- mod/lostpass.php | 4 ++-- mod/maintenance.php | 2 +- mod/manage.php | 4 ++-- mod/match.php | 4 ++-- mod/message.php | 6 +++--- mod/modexp.php | 2 +- mod/mood.php | 6 +++--- mod/msearch.php | 6 +++--- mod/navigation.php | 2 +- mod/network.php | 16 ++++++++-------- mod/newmember.php | 10 +++++----- mod/nodeinfo.php | 6 +++--- mod/nogroup.php | 4 ++-- mod/noscrape.php | 2 +- mod/notes.php | 4 ++-- mod/notice.php | 4 ++-- mod/notifications.php | 4 ++-- mod/notify.php | 8 ++++---- mod/oembed.php | 2 +- mod/oexchange.php | 12 ++++++------ mod/openid.php | 4 ++-- mod/opensearch.php | 14 +++++++------- mod/ostatus_subscribe.php | 2 +- mod/parse_url.php | 20 ++++++++++---------- mod/photo.php | 2 +- mod/photos.php | 8 ++++---- mod/poco.php | 2 +- mod/poke.php | 8 ++++---- mod/post.php | 6 +++--- mod/pretheme.php | 4 ++-- mod/probe.php | 4 ++-- mod/profile.php | 4 ++-- mod/profile_photo.php | 22 +++++++++++----------- 42 files changed, 133 insertions(+), 133 deletions(-) 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 .= '
    '; - $o .= '
  • ' . '' . t('Friendica Walk-Through') . '
    ' . t('On your Quick Start page - find a brief introduction to your profile and network tabs, make some new connections, and find some groups to join.') . '
  • ' . EOL; + $o .= '
  • ' . '' . t('Friendica Walk-Through') . '
    ' . t('On your Quick Start page - find a brief introduction to your profile and network tabs, make some new connections, and find some groups to join.') . '
  • ' . EOL; $o .= '
'; @@ -23,7 +23,7 @@ function newmember_content(App &$a) { $o .= '
    '; - $o .= '
  • ' . '' . t('Go to Your Settings') . '
    ' . t('On your Settings page - change your initial password. Also make a note of your Identity Address. This looks just like an email address - and will be useful in making friends on the free social web.') . '
  • ' . EOL; + $o .= '
  • ' . '' . t('Go to Your Settings') . '
    ' . t('On your Settings page - change your initial password. Also make a note of your Identity Address. This looks just like an email address - and will be useful in making friends on the free social web.') . '
  • ' . EOL; $o .= '
  • ' . t('Review the other settings, particularly the privacy settings. An unpublished directory listing is like having an unlisted phone number. In general, you should probably publish your listing - unless all of your friends and potential friends know exactly how to find you.') . '
  • ' . EOL; @@ -33,7 +33,7 @@ function newmember_content(App &$a) { $o .= '
      '; - $o .= '
    • ' . '' . t('Upload Profile Photo') . '
      ' . t('Upload a profile photo if you have not done so already. Studies have shown that people with real photos of themselves are ten times more likely to make friends than people who do not.') . '
    • ' . EOL; + $o .= '
    • ' . '' . t('Upload Profile Photo') . '
      ' . t('Upload a profile photo if you have not done so already. Studies have shown that people with real photos of themselves are ten times more likely to make friends than people who do not.') . '
    • ' . EOL; $o .= '
    • ' . '' . t('Edit Your Profile') . '
      ' . t('Edit your default profile to your liking. Review the settings for hiding your list of friends and hiding the profile from unknown visitors.') . '
    • ' . EOL; @@ -46,7 +46,7 @@ function newmember_content(App &$a) { $o .= '
        '; $mail_disabled = ((function_exists('imap_open') && (! get_config('system','imap_disabled'))) ? 0 : 1); - + if(! $mail_disabled) $o .= '
      • ' . '' . t('Importing Emails') . '
        ' . t('Enter your email access information on your Connector Settings page if you wish to import and interact with friends or mailing lists from your email INBOX') . '
      • ' . EOL; diff --git a/mod/nodeinfo.php b/mod/nodeinfo.php index 104fecb755..e084b25da3 100644 --- a/mod/nodeinfo.php +++ b/mod/nodeinfo.php @@ -1,13 +1,13 @@ argc > 1) $which = $a->argv[1]; diff --git a/mod/notes.php b/mod/notes.php index b2aa5487af..c7cfe8d70f 100644 --- a/mod/notes.php +++ b/mod/notes.php @@ -1,6 +1,6 @@ friendica items permanent-url compatibility */ - - function notice_init(App &$a){ + + function notice_init(App $a) { $id = $a->argv[1]; $r = q("SELECT user.nickname FROM user LEFT JOIN item ON item.uid=user.uid WHERE item.id=%d", intval($id) diff --git a/mod/notifications.php b/mod/notifications.php index 47e4cd0340..8cd1b29ea4 100644 --- a/mod/notifications.php +++ b/mod/notifications.php @@ -9,7 +9,7 @@ require_once("include/NotificationsManager.php"); require_once("include/contact_selectors.php"); require_once("include/network.php"); -function notifications_post(App &$a) { +function notifications_post(App $a) { if (! local_user()) { goaway(z_root()); @@ -65,7 +65,7 @@ function notifications_post(App &$a) { } } -function notifications_content(App &$a) { +function notifications_content(App $a) { if (! local_user()) { notice( t('Permission denied.') . EOL); diff --git a/mod/notify.php b/mod/notify.php index bd7a7faf49..0026f5ca6e 100644 --- a/mod/notify.php +++ b/mod/notify.php @@ -1,7 +1,7 @@ getByID($a->argv[2]); if ($note) { $nm->setSeen($note); - + // The friendica client has problems with the GUID. this is some workaround if ($a->is_friendica_app()) { require_once("include/items.php"); @@ -39,13 +39,13 @@ function notify_init(App &$a) { } -function notify_content(App &$a) { +function notify_content(App $a) { if (! local_user()) { return login(); } $nm = new NotificationsManager(); - + $notif_tpl = get_markup_template('notifications.tpl'); $not_tpl = get_markup_template('notify.tpl'); diff --git a/mod/oembed.php b/mod/oembed.php index 1d6e6145cd..7770c62fb0 100644 --- a/mod/oembed.php +++ b/mod/oembed.php @@ -1,7 +1,7 @@ query_string, LOGGER_ALL); if ($a->argv[1]=='b2h'){ diff --git a/mod/oexchange.php b/mod/oexchange.php index 49c5d01f45..47547e691c 100644 --- a/mod/oexchange.php +++ b/mod/oexchange.php @@ -1,7 +1,7 @@ argc > 1) && ($a->argv[1] === 'xrd')) { $tpl = get_markup_template('oexchange_xrd.tpl'); @@ -14,7 +14,7 @@ function oexchange_init(App &$a) { } -function oexchange_content(App &$a) { +function oexchange_content(App $a) { if (! local_user()) { $o = login(false); @@ -26,13 +26,13 @@ function oexchange_content(App &$a) { return; } - $url = (((x($_REQUEST,'url')) && strlen($_REQUEST['url'])) + $url = (((x($_REQUEST,'url')) && strlen($_REQUEST['url'])) ? urlencode(notags(trim($_REQUEST['url']))) : ''); - $title = (((x($_REQUEST,'title')) && strlen($_REQUEST['title'])) + $title = (((x($_REQUEST,'title')) && strlen($_REQUEST['title'])) ? '&title=' . urlencode(notags(trim($_REQUEST['title']))) : ''); - $description = (((x($_REQUEST,'description')) && strlen($_REQUEST['description'])) + $description = (((x($_REQUEST,'description')) && strlen($_REQUEST['description'])) ? '&description=' . urlencode(notags(trim($_REQUEST['description']))) : ''); - $tags = (((x($_REQUEST,'tags')) && strlen($_REQUEST['tags'])) + $tags = (((x($_REQUEST,'tags')) && strlen($_REQUEST['tags'])) ? '&tags=' . urlencode(notags(trim($_REQUEST['tags']))) : ''); $s = fetch_url(App::get_baseurl() . '/parse_url?f=&url=' . $url . $title . $description . $tags); diff --git a/mod/openid.php b/mod/openid.php index ce707c4150..59a7530140 100644 --- a/mod/openid.php +++ b/mod/openid.php @@ -4,7 +4,7 @@ require_once('library/openid.php'); -function openid_content(App &$a) { +function openid_content(App $a) { $noid = get_config('system','no_openid'); if($noid) @@ -47,7 +47,7 @@ function openid_content(App &$a) { require_once('include/security.php'); authenticate_success($r[0],true,true); - // just in case there was no return url set + // just in case there was no return url set // and we fell through goaway(z_root()); diff --git a/mod/opensearch.php b/mod/opensearch.php index 1a7d4cd307..a599ddc1ed 100644 --- a/mod/opensearch.php +++ b/mod/opensearch.php @@ -1,18 +1,18 @@ App::get_baseurl(), '$nodename' => $a->get_hostname(), )); - + echo $o; - + killme(); - + } ?> \ No newline at end of file diff --git a/mod/ostatus_subscribe.php b/mod/ostatus_subscribe.php index b2f536e6df..a9f7c3a909 100644 --- a/mod/ostatus_subscribe.php +++ b/mod/ostatus_subscribe.php @@ -3,7 +3,7 @@ require_once('include/Scrape.php'); require_once('include/follow.php'); -function ostatus_subscribe_content(App &$a) { +function ostatus_subscribe_content(App $a) { if (! local_user()) { notice( t('Permission denied.') . EOL); diff --git a/mod/parse_url.php b/mod/parse_url.php index 44cf80935e..2c610f2751 100644 --- a/mod/parse_url.php +++ b/mod/parse_url.php @@ -1,9 +1,9 @@ argc > 1) auto_redir($a, $a->argv[1]); @@ -112,7 +112,7 @@ function photos_init(App &$a) { -function photos_post(App &$a) { +function photos_post(App $a) { logger('mod-photos: photos_post: begin' , LOGGER_DEBUG); @@ -945,7 +945,7 @@ function photos_post(App &$a) { -function photos_content(App &$a) { +function photos_content(App $a) { // URLs: // photos/name @@ -1307,7 +1307,7 @@ function photos_content(App &$a) { } - /** + /** * Display one photo */ diff --git a/mod/poco.php b/mod/poco.php index 0415e1a2ce..4ce075301c 100644 --- a/mod/poco.php +++ b/mod/poco.php @@ -2,7 +2,7 @@ // See here for a documentation for portable contacts: // https://web.archive.org/web/20160405005550/http://portablecontacts.net/draft-spec.html -function poco_init(App &$a) { +function poco_init(App $a) { require_once("include/bbcode.php"); $system_mode = false; diff --git a/mod/poke.php b/mod/poke.php index 2e15ed853f..5161129b31 100644 --- a/mod/poke.php +++ b/mod/poke.php @@ -4,11 +4,11 @@ * * Poke, prod, finger, or otherwise do unspeakable things to somebody - who must be a connection in your address book * This function can be invoked with the required arguments (verb and cid and private and possibly parent) silently via ajax or - * other web request. You must be logged in and connected to a profile. + * other web request. You must be logged in and connected to a profile. * If the required arguments aren't present, we'll display a simple form to choose a recipient and a verb. * parent is a special argument which let's you attach this activity as a comment to an existing conversation, which * may have started with somebody else poking (etc.) somebody, but this isn't necessary. This can be used in the more pokes - * plugin version to have entire conversations where Alice poked Bob, Bob fingered Alice, Alice hugged Bob, etc. + * plugin version to have entire conversations where Alice poked Bob, Bob fingered Alice, Alice hugged Bob, etc. * * private creates a private conversation with the recipient. Otherwise your profile's default post privacy is used. * @@ -19,7 +19,7 @@ require_once('include/bbcode.php'); require_once('include/items.php'); -function poke_init(App &$a) { +function poke_init(App $a) { if (! local_user()) { return; @@ -148,7 +148,7 @@ function poke_init(App &$a) { -function poke_content(App &$a) { +function poke_content(App $a) { if (! local_user()) { notice( t('Permission denied.') . EOL); diff --git a/mod/post.php b/mod/post.php index 076587839d..c8a88e66cd 100644 --- a/mod/post.php +++ b/mod/post.php @@ -9,8 +9,8 @@ require_once('include/salmon.php'); require_once('include/crypto.php'); // not yet ready for prime time //require_once('include/zot.php'); - -function post_post(App &$a) { + +function post_post(App $a) { $bulk_delivery = false; @@ -19,7 +19,7 @@ function post_post(App &$a) { } else { $nickname = $a->argv[2]; - $r = q("SELECT * FROM `user` WHERE `nickname` = '%s' + $r = q("SELECT * FROM `user` WHERE `nickname` = '%s' AND `account_expired` = 0 AND `account_removed` = 0 LIMIT 1", dbesc($nickname) ); diff --git a/mod/pretheme.php b/mod/pretheme.php index 694fd5ba27..6dd6b781ac 100644 --- a/mod/pretheme.php +++ b/mod/pretheme.php @@ -1,7 +1,7 @@ Probe Diagnostic'; $o .= ''; $o .= 'Lookup address: '; - $o .= ''; + $o .= ''; $o .= '

        '; diff --git a/mod/profile.php b/mod/profile.php index 32d3985b7f..5dd8293c7f 100644 --- a/mod/profile.php +++ b/mod/profile.php @@ -4,7 +4,7 @@ require_once('include/contact_widgets.php'); require_once('include/redir.php'); -function profile_init(App &$a) { +function profile_init(App $a) { if(! x($a->page,'aside')) $a->page['aside'] = ''; @@ -71,7 +71,7 @@ function profile_init(App &$a) { } -function profile_content(&$a, $update = 0) { +function profile_content(App $a, $update = 0) { $category = $datequery = $datequery2 = ''; diff --git a/mod/profile_photo.php b/mod/profile_photo.php index c600dd1f86..f9bf60cf54 100644 --- a/mod/profile_photo.php +++ b/mod/profile_photo.php @@ -2,7 +2,7 @@ require_once("include/Photo.php"); -function profile_photo_init(App &$a) { +function profile_photo_init(App $a) { if (! local_user()) { return; @@ -13,7 +13,7 @@ function profile_photo_init(App &$a) { } -function profile_photo_post(App &$a) { +function profile_photo_post(App $a) { if (! local_user()) { notice ( t('Permission denied.') . EOL ); @@ -174,13 +174,13 @@ function profile_photo_post(App &$a) { if(! function_exists('profile_photo_content')) { -function profile_photo_content(App &$a) { +function profile_photo_content(App $a) { if (! local_user()) { notice( t('Permission denied.') . EOL ); return; } - + $newuser = false; if($a->argc == 2 && $a->argv[1] === 'new') @@ -191,9 +191,9 @@ function profile_photo_content(App &$a) { notice( t('Permission denied.') . EOL ); return; }; - + // check_form_security_token_redirectOnErr('/profile_photo', 'profile_photo'); - + $resource_id = $a->argv[2]; //die(":".local_user()); $r=q("SELECT * FROM `photo` WHERE `uid` = %d AND `resource-id` = '%s' ORDER BY `scale` ASC", @@ -246,7 +246,7 @@ function profile_photo_content(App &$a) { if(! x($a->config,'imagecrop')) { - + $tpl = get_markup_template('profile_photo.tpl'); $o .= replace_macros($tpl,array( @@ -284,7 +284,7 @@ function profile_photo_content(App &$a) { if(! function_exists('profile_photo_crop_ui_head')) { -function profile_photo_crop_ui_head(&$a, $ph){ +function profile_photo_crop_ui_head(App $a, $ph) { $max_length = get_config('system','max_image_length'); if (! $max_length) { $max_length = MAX_IMAGE_LENGTH; @@ -303,11 +303,11 @@ function profile_photo_crop_ui_head(&$a, $ph){ } $hash = photo_new_resource(); - + $smallest = 0; - $r = $ph->store(local_user(), 0 , $hash, $filename, t('Profile Photos'), 0 ); + $r = $ph->store(local_user(), 0 , $hash, $filename, t('Profile Photos'), 0 ); if ($r) { info( t('Image uploaded successfully.') . EOL ); @@ -317,7 +317,7 @@ function profile_photo_crop_ui_head(&$a, $ph){ if ($width > 640 || $height > 640) { $ph->scaleImage(640); - $r = $ph->store(local_user(), 0 , $hash, $filename, t('Profile Photos'), 1 ); + $r = $ph->store(local_user(), 0 , $hash, $filename, t('Profile Photos'), 1 ); if ($r === false) { notice( sprintf(t('Image size reduction [%s] failed.'),"640") . EOL );