Move App to src

- Add `use Friendica\App;` wherever needed
This commit is contained in:
Hypolite Petovan 2017-04-30 00:07:00 -04:00
commit 20043914e6
197 changed files with 1321 additions and 996 deletions

View file

@ -1,5 +1,7 @@
<?php
use Friendica\App;
// Included here for completeness, but this is a very dangerous operation.
// It is the caller's responsibility to confirm the requestor's intent and
// authorisation to do this.

View file

@ -1,5 +1,7 @@
<?php
use Friendica\App;
/**
* @file include/ForumManager.php
* @brief ForumManager class with its methods related to forum functionality *

View file

@ -4,6 +4,8 @@
* @brief This file contains the Photo class for image processing
*/
use Friendica\App;
require_once("include/photos.php");
class Photo {

View file

@ -5,6 +5,7 @@
*
*/
use Friendica\App;
use Friendica\Core\Config;
use Friendica\Core\PConfig;

View file

@ -4,6 +4,8 @@
* @file include/acl_selectors.php
*/
use Friendica\App;
require_once "include/contact_selectors.php";
require_once "include/contact_widgets.php";
require_once "include/DirSearch.php";

View file

@ -6,6 +6,7 @@
* @todo Automatically detect if incoming data is HTML or BBCode
*/
use Friendica\App;
use Friendica\Core\Config;
require_once 'include/HTTPExceptions.php';

View file

@ -1,5 +1,6 @@
<?php
use Friendica\App;
use Friendica\Core\Config;
require_once('include/security.php');

View file

@ -1,5 +1,6 @@
<?php
use Friendica\App;
use Friendica\Core\Config;
require_once 'include/oembed.php';

View file

@ -1,5 +1,6 @@
<?php /** @file */
use Friendica\App;
use Friendica\Core\Config;
require_once('boot.php');

View file

@ -1,5 +1,7 @@
<?php
use Friendica\App;
function follow_widget($value = "") {
return replace_macros(get_markup_template('follow.tpl'), array(

View file

@ -1,5 +1,7 @@
<?php
use Friendica\App;
require_once "include/bbcode.php";
require_once "include/acl_selectors.php";

View file

@ -1,5 +1,6 @@
<?php
use Friendica\App;
use Friendica\Core\Config;
function cronjobs_run(&$argv, &$argc){

View file

@ -1,5 +1,6 @@
<?php
use Friendica\App;
use Friendica\Core\Config;
require_once("boot.php");

View file

@ -1,5 +1,6 @@
<?php
use Friendica\App;
use Friendica\Core\Config;
require_once('include/queue_fn.php');

View file

@ -7,6 +7,8 @@
* https://github.com/friendica/friendica/blob/master/spec/dfrn2.pdf
*/
use Friendica\App;
require_once("include/Contact.php");
require_once("include/ostatus.php");
require_once("include/enotify.php");

View file

@ -8,6 +8,7 @@
* This will change in the future.
*/
use Friendica\App;
use Friendica\Core\Config;
require_once 'include/items.php';

View file

@ -1,4 +1,7 @@
<?php
use Friendica\App;
require_once('include/Emailer.php');
require_once('include/email.php');
require_once('include/bbcode.php');

View file

@ -4,6 +4,8 @@
* @brief functions specific to event handling
*/
use Friendica\App;
require_once 'include/bbcode.php';
require_once 'include/map.php';
require_once 'include/datetime.php';

View file

@ -1,4 +1,7 @@
<?php
use Friendica\App;
require_once("include/Scrape.php");
require_once("include/socgraph.php");
require_once('include/group.php');

View file

@ -3,6 +3,8 @@
* @file include/identity.php
*/
use Friendica\App;
require_once('include/ForumManager.php');
require_once('include/bbcode.php');
require_once("mod/proxy.php");

View file

@ -4,6 +4,7 @@
* @file include/items.php
*/
use Friendica\App;
use Friendica\ParseUrl;
require_once 'include/bbcode.php';

View file

@ -1,4 +1,7 @@
<?php
use Friendica\App;
require_once("include/diaspora.php");
/**

View file

@ -2,6 +2,7 @@
// send a private message
use Friendica\App;
function send_message($recipient=0, $body='', $subject='', $replyto=''){

View file

@ -1,5 +1,7 @@
<?php
use Friendica\App;
function nav(App $a) {
/*

View file

@ -4,6 +4,7 @@
* @file include/network.php
*/
use Friendica\App;
use Friendica\Core\Config;
require_once("include/xml.php");

View file

@ -1,5 +1,6 @@
<?php
use Friendica\App;
use Friendica\Core\Config;
require_once('include/queue_fn.php');

View file

@ -5,6 +5,8 @@
*
*/
use Friendica\App;
define('REQUEST_TOKEN_DURATION', 300);
define('ACCESS_TOKEN_DURATION', 31536000);

View file

@ -4,6 +4,7 @@
* @file include/oembed.php
*/
use Friendica\App;
use Friendica\ParseUrl;
use Friendica\Core\Config;

View file

@ -3,6 +3,8 @@
* @file include/ostatus.php
*/
use Friendica\App;
require_once("include/Contact.php");
require_once("include/threads.php");
require_once("include/html2bbcode.php");

View file

@ -4,6 +4,7 @@
* @file include/plaintext.php
*/
use Friendica\App;
use Friendica\ParseUrl;
require_once("include/Photo.php");

View file

@ -5,6 +5,7 @@
* @brief Some functions to handle addons and themes.
*/
use Friendica\App;
/**
* @brief uninstalls an addon.

View file

@ -1,5 +1,6 @@
<?php
use Friendica\App;
use Friendica\Core\Config;
if (!file_exists("boot.php") AND (sizeof($_SERVER["argv"]) != 0)) {

View file

@ -1,5 +1,6 @@
<?php
use Friendica\App;
use Friendica\Core\Config;
require_once('include/items.php');

View file

@ -1,5 +1,7 @@
<?php
use Friendica\App;
function auto_redir(App $a, $contact_nick) {
// prevent looping

View file

@ -1,5 +1,7 @@
<?php
use Friendica\App;
/**
* @brief Calculate the hash that is needed for the "Friendica" cookie
*

View file

@ -1,5 +1,6 @@
<?php
use Friendica\App;
use Friendica\Core\Config;
require_once("boot.php");

View file

@ -7,6 +7,7 @@
* @todo Detect if it is a forum
*/
use Friendica\App;
use Friendica\Core\Config;
require_once('include/datetime.php');

View file

@ -1,4 +1,7 @@
<?php
use Friendica\App;
function create_tags_from_item($itemid) {
$profile_base = App::get_baseurl();
$profile_data = parse_url($profile_base);

View file

@ -1,5 +1,7 @@
<?php
use Friendica\App;
require_once("include/template_processor.php");
require_once("include/friendica_smarty.php");
require_once("include/Smilies.php");

View file

@ -1,4 +1,7 @@
<?php
use Friendica\App;
function add_thread($itemid, $onlyshadow = false) {
$items = q("SELECT `uid`, `created`, `edited`, `commented`, `received`, `changed`, `wall`, `private`, `pubmail`,
`moderated`, `visible`, `spam`, `starred`, `bookmark`, `contact-id`, `gcontact-id`,

View file

@ -1,5 +1,7 @@
<?php
use Friendica\App;
require_once("include/Photo.php");
define("IMPORT_DEBUG", False);