]> git.mxchange.org Git - friendica.git/commitdiff
Fix require_once format
authorHypolite Petovan <mrpetovan@gmail.com>
Sun, 7 May 2017 18:40:23 +0000 (14:40 -0400)
committerHypolite Petovan <mrpetovan@gmail.com>
Sun, 7 May 2017 18:40:23 +0000 (14:40 -0400)
21 files changed:
include/Contact.php
include/NotificationsManager.php
include/bb2diaspora.php
include/cronjobs.php
include/delivery.php
include/event.php
include/follow.php
include/gprobe.php
include/notifier.php
include/ostatus.php
include/salmon.php
include/socgraph.php
mod/contacts.php
mod/dfrn_confirm.php
mod/dfrn_request.php
mod/follow.php
mod/item.php
mod/ostatus_subscribe.php
mod/photos.php
mod/profiles.php
mod/repair_ostatus.php

index d8971abc35d5493cc9892ed33c08424ec58e941f..5787439c1ff57d6be9e6e7bf346c007ad368ba07 100644 (file)
@@ -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
index bce65a092d94c08f24e186b7bb2a990ab952fbae..add19a177c3cfcab0cec8e78f2598cb768a53c03 100644 (file)
@@ -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
index 1dc775887ebf3e2936c2c0fbbc2bbd98c92a36ed..c1a6d38c0fb988832dc4ac37e42f7e6dd9362e09 100644 (file)
@@ -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
index ee1ac517acbe91d3038bdbbc3716c0e4efd545aa..a2fc99825176fa95695d536d50ae280254a86c6f 100644 (file)
@@ -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) {
index 3aecf3b7233bbc8fa362e5319ad93f1ef427131a..7589b556d7d7d9efacfe7d921895f91267513b0d 100644 (file)
@@ -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];
 
index afb8ea755bc8bc04649a4802c08005ac7a6dd3a4..9b49bdb40d39623014d99ea2b3523b03db2381f4 100644 (file)
@@ -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 = '<html><body>' . $h . '</body></html>';
 
index 161e669e949bb26480e07521528aa02b9820125d..f3dc793c275bd0b38a03bd6812b28baa7da46bd7 100644 (file)
@@ -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) {
        /*
index 55ce4c70615a37b628a5bff563d95fdd93773bcd..46aec0d1d92e72dae137c778116e0b3ab6c5c8e9 100644 (file)
@@ -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) {
index ad89eacb6d8eb4c99c6f61b281790275a376678d..1ae56bd05d5baf78a72fc2a89fc1128c57b0e70f 100644 (file)
@@ -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];
 
index c3bdadf55b9522a714dc8ceaceb32ddc53d69d61..1138906ca0ab1c6c884641191be79a0911bfdc3a 100644 (file)
@@ -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
index 79fd4c10d9ee884e4f9bdd14f835bf7984d49822..8ebd9016f1dbbfcedd628622c6ae7a37dd663cd2 100644 (file)
@@ -1,6 +1,6 @@
 <?php
 
-require_once('include/crypto.php');
+require_once 'include/crypto.php';
 require_once('include/Probe.php');
 
 function get_salmon_key($uri, $keyhash) {
index 03bd14359d1ba27d434b4726e481e85d68d8653b..8f13d895599015b97db033c15a2e98a94d70479d 100644 (file)
@@ -9,13 +9,13 @@
 
 use Friendica\App;
 use Friendica\Core\Config;
-
-require_once('include/datetime.php');
 require_once("include/Scrape.php");
-require_once("include/network.php");
-require_once("include/html2bbcode.php");
-require_once("include/Contact.php");
-require_once("include/Photo.php");
+
+require_once 'include/datetime.php';
+require_once 'include/network.php';
+require_once 'include/html2bbcode.php';
+require_once 'include/Contact.php';
+require_once 'include/Photo.php';
 
 /**
  * @brief Fetch POCO data
index 41d10cc9e2b2d264bd9ba00de8891e3a98cf22e7..2ddd17e7384e28ed7d991deb9e391cb425b68113 100644 (file)
@@ -2,12 +2,12 @@
 
 use Friendica\App;
 
-require_once('include/Contact.php');
-require_once('include/socgraph.php');
-require_once('include/contact_selectors.php');
 require_once('include/Scrape.php');
-require_once('mod/proxy.php');
-require_once('include/Photo.php');
+require_once 'include/Contact.php';
+require_once 'include/socgraph.php';
+require_once 'include/contact_selectors.php';
+require_once 'mod/proxy.php';
+require_once 'include/Photo.php';
 
 function contacts_init(App $a) {
        if (! local_user()) {
@@ -27,8 +27,8 @@ function contacts_init(App $a) {
                }
        }
 
-       require_once('include/group.php');
-       require_once('include/contact_widgets.php');
+       require_once 'include/group.php';
+       require_once 'include/contact_widgets.php';
 
        if ($_GET['nets'] == "all") {
                $_GET['nets'] = "";
@@ -498,7 +498,7 @@ function contacts_content(App $a) {
                        '$baseurl' => App::get_baseurl(true),
                ));
 
-               require_once('include/contact_selectors.php');
+               require_once 'include/contact_selectors.php';
 
                $tpl = get_markup_template("contact_edit.tpl");
 
index 6ebde734e6ace3dfae9c610c521371afcaab1300..10ea8937ea31f8e8cf7dfb8200c3e44c9c146e28 100644 (file)
@@ -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)
index 18a6b7ebdb21e6b0ae3db8c659b0b22af81b5b8f..8e461cbb3f50ed4c0b36c74f2429c53b65f58e2a 100644 (file)
 
 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'],
index c59af73ee7b39c907d5eec8ed92e790f455de1fc..fbe4602f5b5b1082e89625acbbc9a7465375724a 100644 (file)
@@ -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) {
 
index 4744ec4ad50e380b2d3f5883f4f8676bfa94acf2..151575e6bb3d114c877ae7651c73981593dc1985 100644 (file)
@@ -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;
index a36821aa2ef7569a8c5c82fc4b6058b9aaf481c6..28dc5f86687fd0795122be08585ce1553f310e27 100644 (file)
@@ -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) {
 
index 8d6d54ac88c2991c832d0c61ab36ad8579be59d8..1d20120a890390e1fd2a67b852d157792afa5822 100644 (file)
@@ -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 );
index 42699e5e0c7aab57f376bdb3c39489d09151ebbd..0d3e1afbaac3158bb800df50b2f72a01de1e242e 100644 (file)
@@ -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(
index a690680d1f520ea2d416f40f2c606725fa829855..b9b94e55137107d3df74a74c417bcb174f478a26 100755 (executable)
@@ -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) {