From: Hypolite Petovan Date: Sun, 7 May 2017 18:40:23 +0000 (-0400) Subject: Fix require_once format X-Git-Url: https://git.mxchange.org/?a=commitdiff_plain;h=82b423c5ac3269d39e6384fa3c43d1d9e5285ad4;p=friendica.git Fix require_once format --- diff --git a/include/Contact.php b/include/Contact.php index d8971abc35..5787439c1f 100644 --- a/include/Contact.php +++ b/include/Contact.php @@ -91,11 +91,11 @@ function terminate_friendship($user,$self,$contact) { /// @TODO Get rid of this, include/datetime.php should care about it by itself $a = get_app(); - require_once('include/datetime.php'); + require_once 'include/datetime.php'; if ($contact['network'] === NETWORK_OSTATUS) { - require_once('include/ostatus.php'); + require_once 'include/ostatus.php'; // create an unfollow slap $item = array(); @@ -104,14 +104,14 @@ function terminate_friendship($user,$self,$contact) { $slap = ostatus::salmon($item, $user); if ((x($contact,'notify')) && (strlen($contact['notify']))) { - require_once('include/salmon.php'); + require_once 'include/salmon.php'; slapper($user,$contact['notify'],$slap); } } elseif ($contact['network'] === NETWORK_DIASPORA) { - require_once('include/diaspora.php'); + require_once 'include/diaspora.php'; Diaspora::send_unshare($user,$contact); } elseif ($contact['network'] === NETWORK_DFRN) { - require_once('include/dfrn.php'); + require_once 'include/dfrn.php'; dfrn::deliver($user,$contact,'placeholder', 1); } @@ -706,7 +706,7 @@ function get_contact($url, $uid = 0, $no_update = false) { */ function posts_from_gcontact(App $a, $gcontact_id) { - require_once('include/conversation.php'); + require_once 'include/conversation.php'; // There are no posts with "uid = 0" with connector networks // This speeds up the query a lot @@ -745,7 +745,7 @@ function posts_from_gcontact(App $a, $gcontact_id) { */ function posts_from_contact_url(App $a, $contact_url) { - require_once('include/conversation.php'); + require_once 'include/conversation.php'; // There are no posts with "uid = 0" with connector networks // This speeds up the query a lot diff --git a/include/NotificationsManager.php b/include/NotificationsManager.php index bce65a092d..add19a177c 100644 --- a/include/NotificationsManager.php +++ b/include/NotificationsManager.php @@ -4,9 +4,9 @@ * @brief Methods for read and write notifications from/to database * or for formatting notifications */ -require_once('include/html2plain.php'); -require_once("include/datetime.php"); -require_once("include/bbcode.php"); +require_once 'include/html2plain.php'; +require_once 'include/datetime.php'; +require_once 'include/bbcode.php'; /** * @brief Methods for read and write notifications from/to database diff --git a/include/bb2diaspora.php b/include/bb2diaspora.php index 1dc775887e..c1a6d38c0f 100644 --- a/include/bb2diaspora.php +++ b/include/bb2diaspora.php @@ -4,11 +4,11 @@ use Friendica\App; use League\HTMLToMarkdown\HtmlConverter; -require_once "include/oembed.php"; -require_once "include/event.php"; -require_once "library/markdown.php"; -require_once "include/html2bbcode.php"; -require_once "include/bbcode.php"; +require_once 'include/oembed.php'; +require_once 'include/event.php'; +require_once 'library/markdown.php'; +require_once 'include/html2bbcode.php'; +require_once 'include/bbcode.php'; /** * @brief Callback function to replace a Diaspora style mention in a mention for Friendica diff --git a/include/cronjobs.php b/include/cronjobs.php index ee1ac517ac..a2fc998251 100644 --- a/include/cronjobs.php +++ b/include/cronjobs.php @@ -6,14 +6,14 @@ use Friendica\Core\Config; function cronjobs_run(&$argv, &$argc){ global $a; - require_once('include/datetime.php'); - require_once('include/ostatus.php'); - require_once('include/post_update.php'); - require_once('mod/nodeinfo.php'); - require_once('include/photos.php'); - require_once('include/user.php'); - require_once('include/socgraph.php'); require_once('include/Probe.php'); + require_once 'include/datetime.php'; + require_once 'include/ostatus.php'; + require_once 'include/post_update.php'; + require_once 'mod/nodeinfo.php'; + require_once 'include/photos.php'; + require_once 'include/user.php'; + require_once 'include/socgraph.php'; // No parameter set? So return if ($argc <= 1) { diff --git a/include/delivery.php b/include/delivery.php index 3aecf3b723..7589b556d7 100644 --- a/include/delivery.php +++ b/include/delivery.php @@ -3,20 +3,20 @@ use Friendica\App; use Friendica\Core\Config; -require_once('include/queue_fn.php'); -require_once('include/html2plain.php'); require_once('include/Scrape.php'); -require_once('include/diaspora.php'); -require_once('include/ostatus.php'); -require_once('include/dfrn.php'); +require_once 'include/queue_fn.php'; +require_once 'include/html2plain.php'; +require_once 'include/diaspora.php'; +require_once 'include/ostatus.php'; +require_once 'include/dfrn.php'; function delivery_run(&$argv, &$argc){ global $a; - require_once('include/datetime.php'); - require_once('include/items.php'); - require_once('include/bbcode.php'); - require_once('include/email.php'); + require_once 'include/datetime.php'; + require_once 'include/items.php'; + require_once 'include/bbcode.php'; + require_once 'include/email.php'; if ($argc < 3) { return; @@ -166,7 +166,7 @@ function delivery_run(&$argv, &$argc){ $public_message = true; if (!($mail || $fsuggest || $relocate)) { - require_once('include/group.php'); + require_once 'include/group.php'; $parent = $items[0]; diff --git a/include/event.php b/include/event.php index afb8ea755b..9b49bdb40d 100644 --- a/include/event.php +++ b/include/event.php @@ -88,7 +88,7 @@ function format_event_html($ev, $simple = false) { function parse_event($h) { require_once('include/Scrape.php'); - require_once('include/html2bbcode'); + require_once 'include/html2bbcode'; $h = '' . $h . ''; diff --git a/include/follow.php b/include/follow.php index 161e669e94..f3dc793c27 100644 --- a/include/follow.php +++ b/include/follow.php @@ -3,12 +3,12 @@ use Friendica\App; require_once("include/Scrape.php"); -require_once("include/socgraph.php"); -require_once('include/group.php'); -require_once('include/salmon.php'); -require_once('include/ostatus.php'); -require_once("include/Photo.php"); -require_once('include/diaspora.php'); +require_once 'include/socgraph.php'; +require_once 'include/group.php'; +require_once 'include/salmon.php'; +require_once 'include/ostatus.php'; +require_once 'include/Photo.php'; +require_once 'include/diaspora.php'; function update_contact($id) { /* diff --git a/include/gprobe.php b/include/gprobe.php index 55ce4c7061..46aec0d1d9 100644 --- a/include/gprobe.php +++ b/include/gprobe.php @@ -3,8 +3,8 @@ use Friendica\Core\Config; require_once('include/Scrape.php'); -require_once('include/socgraph.php'); -require_once('include/datetime.php'); +require_once 'include/socgraph.php'; +require_once 'include/datetime.php'; function gprobe_run(&$argv, &$argc){ if ($argc != 2) { diff --git a/include/notifier.php b/include/notifier.php index ad89eacb6d..1ae56bd05d 100644 --- a/include/notifier.php +++ b/include/notifier.php @@ -3,12 +3,12 @@ use Friendica\App; use Friendica\Core\Config; -require_once('include/queue_fn.php'); -require_once('include/html2plain.php'); require_once('include/Scrape.php'); -require_once('include/diaspora.php'); -require_once('include/ostatus.php'); -require_once('include/salmon.php'); +require_once 'include/queue_fn.php'; +require_once 'include/html2plain.php'; +require_once 'include/diaspora.php'; +require_once 'include/ostatus.php'; +require_once 'include/salmon.php'; /* * This file was at one time responsible for doing all deliveries, but this caused @@ -46,10 +46,10 @@ require_once('include/salmon.php'); function notifier_run(&$argv, &$argc){ global $a; - require_once('include/datetime.php'); - require_once('include/items.php'); - require_once('include/bbcode.php'); - require_once('include/email.php'); + require_once 'include/datetime.php'; + require_once 'include/items.php'; + require_once 'include/bbcode.php'; + require_once 'include/email.php'; if ($argc < 3) { return; @@ -139,7 +139,7 @@ function notifier_run(&$argv, &$argc){ if (!$r) { return; } - require_once('include/Contact.php'); + require_once 'include/Contact.php'; foreach ($r as $contact) { terminate_friendship($user, $self, $contact); } @@ -223,7 +223,7 @@ function notifier_run(&$argv, &$argc){ $slap = ostatus::salmon($target_item,$owner); - require_once('include/group.php'); + require_once 'include/group.php'; $parent = $items[0]; diff --git a/include/ostatus.php b/include/ostatus.php index c3bdadf55b..1138906ca0 100644 --- a/include/ostatus.php +++ b/include/ostatus.php @@ -5,21 +5,21 @@ use Friendica\App; use Friendica\Core\Config; - -require_once("include/Contact.php"); -require_once("include/threads.php"); -require_once("include/html2bbcode.php"); -require_once("include/bbcode.php"); -require_once("include/items.php"); -require_once("mod/share.php"); -require_once("include/enotify.php"); -require_once("include/socgraph.php"); -require_once("include/Photo.php"); require_once("include/Scrape.php"); -require_once("include/follow.php"); -require_once("include/api.php"); -require_once("mod/proxy.php"); -require_once("include/xml.php"); + +require_once 'include/Contact.php'; +require_once 'include/threads.php'; +require_once 'include/html2bbcode.php'; +require_once 'include/bbcode.php'; +require_once 'include/items.php'; +require_once 'mod/share.php'; +require_once 'include/enotify.php'; +require_once 'include/socgraph.php'; +require_once 'include/Photo.php'; +require_once 'include/follow.php'; +require_once 'include/api.php'; +require_once 'mod/proxy.php'; +require_once 'include/xml.php'; /** * @brief This class contain functions for the OStatus protocol diff --git a/include/salmon.php b/include/salmon.php index 79fd4c10d9..8ebd9016f1 100644 --- a/include/salmon.php +++ b/include/salmon.php @@ -1,6 +1,6 @@ App::get_baseurl(true), )); - require_once('include/contact_selectors.php'); + require_once 'include/contact_selectors.php'; $tpl = get_markup_template("contact_edit.tpl"); diff --git a/mod/dfrn_confirm.php b/mod/dfrn_confirm.php index 6ebde734e6..10ea8937ea 100644 --- a/mod/dfrn_confirm.php +++ b/mod/dfrn_confirm.php @@ -20,9 +20,9 @@ use Friendica\App; -require_once('include/enotify.php'); -require_once('include/group.php'); require_once('include/Probe.php'); +require_once 'include/enotify.php'; +require_once 'include/group.php'; function dfrn_confirm_post(App $a, $handsfree = null) { @@ -154,7 +154,7 @@ function dfrn_confirm_post(App $a, $handsfree = null) { * worried about key leakage than anybody cracking it. * */ - require_once('include/crypto.php'); + require_once 'include/crypto.php'; $res = new_keypair(4096); @@ -319,7 +319,7 @@ function dfrn_confirm_post(App $a, $handsfree = null) { * */ - require_once('include/Photo.php'); + require_once 'include/Photo.php'; update_contact_avatar($contact['photo'],$uid,$contact_id); @@ -435,7 +435,7 @@ function dfrn_confirm_post(App $a, $handsfree = null) { if ((isset($new_relation) && $new_relation == CONTACT_IS_FRIEND)) { if (($contact) && ($contact['network'] === NETWORK_DIASPORA)) { - require_once('include/diaspora.php'); + require_once 'include/diaspora.php'; $ret = Diaspora::send_share($user[0],$r[0]); logger('share returns: ' . $ret); } @@ -448,7 +448,7 @@ function dfrn_confirm_post(App $a, $handsfree = null) { if((dbm::is_result($r)) && ($r[0]['hide-friends'] == 0) && ($activity) && (! $hidden)) { - require_once('include/items.php'); + require_once 'include/items.php'; $self = q("SELECT * FROM `contact` WHERE `self` = 1 AND `uid` = %d LIMIT 1", intval($uid) @@ -672,7 +672,7 @@ function dfrn_confirm_post(App $a, $handsfree = null) { $photo = App::get_baseurl() . '/images/person-175.jpg'; } - require_once("include/Photo.php"); + require_once 'include/Photo.php'; update_contact_avatar($photo,$local_uid,$dfrn_record); @@ -752,7 +752,7 @@ function dfrn_confirm_post(App $a, $handsfree = null) { if((dbm::is_result($r)) && ($r[0]['hide-friends'] == 0)) { - require_once('include/items.php'); + require_once 'include/items.php'; $self = q("SELECT * FROM `contact` WHERE `self` = 1 AND `uid` = %d LIMIT 1", intval($local_uid) diff --git a/mod/dfrn_request.php b/mod/dfrn_request.php index 18a6b7ebdb..8e461cbb3f 100644 --- a/mod/dfrn_request.php +++ b/mod/dfrn_request.php @@ -14,10 +14,10 @@ use Friendica\App; -require_once('include/enotify.php'); require_once('include/Scrape.php'); require_once('include/Probe.php'); -require_once('include/group.php'); +require_once 'include/enotify.php'; +require_once 'include/group.php'; function dfrn_request_init(App $a) { @@ -522,8 +522,6 @@ function dfrn_request_post(App $a) { return; // NOTREACHED } - require_once('include/Scrape.php'); - $parms = Probe::profile(($hcard) ? $hcard : $url); if (! count($parms)) { @@ -767,7 +765,7 @@ function dfrn_request_content(App $a) { } if($auto_confirm) { - require_once('mod/dfrn_confirm.php'); + require_once 'mod/dfrn_confirm.php'; $handsfree = array( 'uid' => $r[0]['uid'], 'node' => $r[0]['nickname'], diff --git a/mod/follow.php b/mod/follow.php index c59af73ee7..fbe4602f5b 100644 --- a/mod/follow.php +++ b/mod/follow.php @@ -3,9 +3,9 @@ use Friendica\App; require_once('include/Scrape.php'); -require_once('include/follow.php'); -require_once('include/Contact.php'); -require_once('include/contact_selectors.php'); +require_once 'include/follow.php'; +require_once 'include/Contact.php'; +require_once 'include/contact_selectors.php'; function follow_content(App $a) { diff --git a/mod/item.php b/mod/item.php index 4744ec4ad5..151575e6bb 100644 --- a/mod/item.php +++ b/mod/item.php @@ -144,7 +144,6 @@ function item_post(App $a) { $parent_contact = get_contact_details_by_url($thrparent[0]["author-link"]); if (!isset($parent_contact["nick"])) { - require_once 'include/Scrape.php'; $probed_contact = probe_url($thrparent[0]["author-link"]); if ($probed_contact["network"] != NETWORK_FEED) { $parent_contact = $probed_contact; @@ -1106,7 +1105,6 @@ function item_content(App $a) { * @return boolean true if replaced, false if not replaced */ function handle_tag(App $a, &$body, &$inform, &$str_tags, $profile_uid, $tag, $network = "") { - require_once 'include/Scrape.php'; require_once 'include/socgraph.php'; $replaced = false; diff --git a/mod/ostatus_subscribe.php b/mod/ostatus_subscribe.php index a36821aa2e..28dc5f8668 100644 --- a/mod/ostatus_subscribe.php +++ b/mod/ostatus_subscribe.php @@ -3,7 +3,7 @@ use Friendica\App; require_once('include/Scrape.php'); -require_once('include/follow.php'); +require_once 'include/follow.php'; function ostatus_subscribe_content(App $a) { diff --git a/mod/photos.php b/mod/photos.php index 8d6d54ac88..1d20120a89 100644 --- a/mod/photos.php +++ b/mod/photos.php @@ -982,9 +982,9 @@ function photos_content(App $a) { return; } - require_once('include/bbcode.php'); - require_once('include/security.php'); - require_once('include/conversation.php'); + require_once 'include/bbcode.php'; + require_once 'include/security.php'; + require_once 'include/conversation.php'; if (! x($a->data,'user')) { notice( t('No photos selected') . EOL ); diff --git a/mod/profiles.php b/mod/profiles.php index 42699e5e0c..0d3e1afbaa 100644 --- a/mod/profiles.php +++ b/mod/profiles.php @@ -2,7 +2,7 @@ use Friendica\App; -require_once("include/Contact.php"); +require_once 'include/Contact.php'; require_once('include/Probe.php'); function profiles_init(App $a) { @@ -504,7 +504,7 @@ function profiles_post(App $a) { proc_run(PRIORITY_LOW, "include/directory.php", $url); } - require_once('include/profile_update.php'); + require_once 'include/profile_update.php'; profile_change(); // Update the global contact for the user @@ -529,7 +529,7 @@ function profile_activity($changed, $value) { return; } - require_once('include/items.php'); + require_once 'include/items.php'; $self = q("SELECT * FROM `contact` WHERE `self` = 1 AND `uid` = %d LIMIT 1", intval(local_user()) @@ -623,7 +623,7 @@ function profiles_content(App $a) { return; } - require_once('include/profile_selectors.php'); + require_once 'include/profile_selectors.php'; $a->page['htmlhead'] .= replace_macros(get_markup_template('profed_head.tpl'), array( diff --git a/mod/repair_ostatus.php b/mod/repair_ostatus.php index a690680d1f..b9b94e5513 100755 --- a/mod/repair_ostatus.php +++ b/mod/repair_ostatus.php @@ -3,7 +3,7 @@ use Friendica\App; require_once('include/Scrape.php'); -require_once('include/follow.php'); +require_once 'include/follow.php'; function repair_ostatus_content(App $a) {