require_once(__DIR__ . DIRECTORY_SEPARATOR . 'vendor' . DIRECTORY_SEPARATOR . 'autoload.php');
use Friendica\App;
+use Friendica\Core\System;
use Friendica\Core\Config;
use Friendica\Util\Lock;
<?php
use Friendica\App;
+use Friendica\Core\System;
use Friendica\Network\Probe;
// Included here for completeness, but this is a very dangerous operation.
*/
use Friendica\App;
+use Friendica\Core\System;
require_once("include/photos.php");
*/
use Friendica\App;
+use Friendica\Core\System;
/**
* This class contains functions to handle smiles
*/
use Friendica\App;
+use Friendica\Core\System;
use Friendica\Core\Config;
require_once 'include/HTTPExceptions.php';
<?php
use Friendica\App;
+use Friendica\Core\System;
use Friendica\Core\Config;
require_once('include/security.php');
<?php
use Friendica\App;
+use Friendica\Core\System;
use Friendica\Network\Probe;
use League\HTMLToMarkdown\HtmlConverter;
<?php
use Friendica\App;
+use Friendica\Core\System;
use Friendica\Core\Config;
require_once 'include/oembed.php';
<?php
use Friendica\App;
+use Friendica\Core\System;
use Friendica\Core\Config;
require_once 'include/contact_selectors.php';
<?php
use Friendica\App;
+use Friendica\Core\System;
require_once "include/bbcode.php";
require_once "include/acl_selectors.php";
<?php
use Friendica\App;
+use Friendica\Core\System;
use Friendica\Core\Config;
require_once "boot.php";
<?php
use Friendica\App;
+use Friendica\Core\System;
use Friendica\Core\Config;
require_once 'include/queue_fn.php';
*/
use Friendica\App;
+use Friendica\Core\System;
require_once("include/Contact.php");
require_once("include/ostatus.php");
*/
use Friendica\App;
+use Friendica\Core\System;
use Friendica\Core\Config;
require_once 'include/items.php';
<?php
use Friendica\App;
+use Friendica\Core\System;
require_once('include/Emailer.php');
require_once('include/email.php');
*/
use Friendica\App;
+use Friendica\Core\System;
require_once 'include/bbcode.php';
require_once 'include/map.php';
<?php
use Friendica\App;
+use Friendica\Core\System;
require_once 'include/probe.php';
require_once 'include/socgraph.php';
*/
use Friendica\App;
+use Friendica\Core\System;
require_once 'include/ForumManager.php';
require_once 'include/bbcode.php';
*/
use Friendica\App;
+use Friendica\Core\System;
use Friendica\ParseUrl;
use Friendica\Util\Lock;
use Friendica\Core\Config;
<?php
use Friendica\App;
+use Friendica\Core\System;
require_once("include/diaspora.php");
// send a private message
use Friendica\App;
+use Friendica\Core\System;
function send_message($recipient=0, $body='', $subject='', $replyto=''){
<?php
use Friendica\App;
+use Friendica\Core\System;
function nav(App $a) {
*/
use Friendica\App;
+use Friendica\Core\System;
use Friendica\Core\Config;
use Friendica\Network\Probe;
*/
use Friendica\App;
+use Friendica\Core\System;
define('REQUEST_TOKEN_DURATION', 300);
define('ACCESS_TOKEN_DURATION', 31536000);
*/
use Friendica\App;
+use Friendica\Core\System;
use Friendica\ParseUrl;
use Friendica\Core\Config;
*/
use Friendica\App;
+use Friendica\Core\System;
use Friendica\Core\Config;
use Friendica\Network\Probe;
*/
use Friendica\App;
+use Friendica\Core\System;
/**
* @brief uninstalls an addon.
<?php
use Friendica\App;
+use Friendica\Core\System;
use Friendica\Core\Config;
use Friendica\Util\Lock;
<?php
use Friendica\App;
+use Friendica\Core\System;
use Friendica\Core\Config;
require_once('include/items.php');
<?php
use Friendica\App;
+use Friendica\Core\System;
function auto_redir(App $a, $contact_nick) {
<?php
use Friendica\App;
+use Friendica\Core\System;
/**
* @brief Calculate the hash that is needed for the "Friendica" cookie
*/
use Friendica\App;
+use Friendica\Core\System;
use Friendica\Core\Config;
use Friendica\Network\Probe;
<?php
use Friendica\App;
+use Friendica\Core\System;
function create_tags_from_item($itemid) {
$profile_base = App::get_baseurl();
<?php
use Friendica\App;
+use Friendica\Core\System;
require_once "include/template_processor.php";
require_once "include/friendica_smarty.php";
<?php
use Friendica\App;
+use Friendica\Core\System;
function add_thread($itemid, $onlyshadow = false) {
$items = q("SELECT `uid`, `created`, `edited`, `commented`, `received`, `changed`, `wall`, `private`, `pubmail`,
<?php
use Friendica\App;
+use Friendica\Core\System;
require_once("include/Photo.php");
define("IMPORT_DEBUG", False);
*/
use Friendica\App;
+use Friendica\Core\System;
use Friendica\Core\Config;
require_once 'boot.php';
*/
use Friendica\App;
+use Friendica\Core\System;
use Friendica\Core\Config;
require_once("include/enotify.php");
<?php
use Friendica\App;
+use Friendica\Core\System;
require_once('include/socgraph.php');
require_once('include/Contact.php');
<?php
use Friendica\App;
+use Friendica\Core\System;
require_once('include/conversation.php');
require_once('include/items.php');
*/
use Friendica\App;
+use Friendica\Core\System;
require_once('include/event.php');
require_once('include/redir.php');
<?php
use Friendica\App;
+use Friendica\Core\System;
use Friendica\Network\Probe;
require_once 'include/Contact.php';
// and 10-20 milliseconds to fetch all the child items.
use Friendica\App;
+use Friendica\Core\System;
function content_content(App $a, $update = 0) {
<?php
use Friendica\App;
+use Friendica\Core\System;
require_once('mod/settings.php');
*/
use Friendica\App;
+use Friendica\Core\System;
use Friendica\Network\Probe;
require_once 'include/enotify.php';
<?php
use Friendica\App;
+use Friendica\Core\System;
require_once('include/items.php');
require_once('include/auth.php');
*/
use Friendica\App;
+use Friendica\Core\System;
use Friendica\Network\Probe;
require_once 'include/enotify.php';
<?php
use Friendica\App;
+use Friendica\Core\System;
require_once 'include/contact_widgets.php';
require_once 'include/probe.php';
<?php
use Friendica\App;
+use Friendica\Core\System;
require_once('include/dfrn.php');
<?php
use Friendica\App;
+use Friendica\Core\System;
require_once('include/acl_selectors.php');
*/
use Friendica\App;
+use Friendica\Core\System;
require_once 'include/bbcode.php';
require_once 'include/datetime.php';
*/
use Friendica\App;
+use Friendica\Core\System;
require_once('include/Photo.php');
*/
use Friendica\App;
+use Friendica\Core\System;
require_once("include/crypto.php");
require_once("include/diaspora.php");
<?php
use Friendica\App;
+use Friendica\Core\System;
function filerm_content(App $a) {
<?php
use Friendica\App;
+use Friendica\Core\System;
require_once 'include/probe.php';
require_once 'include/follow.php';
<?php
use Friendica\App;
+use Friendica\Core\System;
use Friendica\Core\Config;
function friendica_init(App $a) {
*/
use Friendica\App;
+use Friendica\Core\System;
function group_init(App $a) {
if (local_user()) {
<?php
use Friendica\App;
+use Friendica\Core\System;
function hcard_init(App $a) {
<?php
use Friendica\App;
+use Friendica\Core\System;
require_once('library/markdown.php');
<?php
use Friendica\App;
+use Friendica\Core\System;
if(! function_exists('home_init')) {
function home_init(App $a) {
<?php
use Friendica\App;
+use Friendica\Core\System;
function ignored_init(App $a) {
<?php
use Friendica\App;
+use Friendica\Core\System;
require_once "include/Photo.php";
*/
use Friendica\App;
+use Friendica\Core\System;
require_once('include/email.php');
*/
use Friendica\App;
+use Friendica\Core\System;
require_once 'include/crypto.php';
require_once 'include/enotify.php';
<?php
use Friendica\App;
+use Friendica\Core\System;
require_once('include/security.php');
require_once('include/bbcode.php');
<?php
use Friendica\App;
+use Friendica\Core\System;
require_once('include/datetime.php');
return $o;
-}
\ No newline at end of file
+}
<?php
use Friendica\App;
+use Friendica\Core\System;
require_once('include/email.php');
require_once('include/enotify.php');
<?php
use Friendica\App;
+use Friendica\Core\System;
require_once("include/text.php");
<?php
use Friendica\App;
+use Friendica\Core\System;
use Friendica\Core\Config;
function manifest_content(App $a) {
<?php
use Friendica\App;
+use Friendica\Core\System;
require_once('include/text.php');
require_once('include/socgraph.php');
<?php
use Friendica\App;
+use Friendica\Core\System;
require_once('include/acl_selectors.php');
require_once('include/message.php');
<?php
use Friendica\App;
+use Friendica\Core\System;
require_once('include/security.php');
require_once('include/bbcode.php');
<?php
use Friendica\App;
+use Friendica\Core\System;
function msearch_post(App $a) {
<?php
use Friendica\App;
+use Friendica\Core\System;
require_once("include/nav.php");
<?php
use Friendica\App;
+use Friendica\Core\System;
function network_init(App $a) {
if (! local_user()) {
*/
use Friendica\App;
+use Friendica\Core\System;
use Friendica\Core\Config;
require_once 'include/plugin.php';
<?php
use Friendica\App;
+use Friendica\Core\System;
function noscrape_init(App $a) {
/* identi.ca -> friendica items permanent-url compatibility */
use Friendica\App;
+use Friendica\Core\System;
function notice_init(App $a) {
<?php
use Friendica\App;
+use Friendica\Core\System;
require_once('include/NotificationsManager.php');
<?php
use Friendica\App;
+use Friendica\Core\System;
function oexchange_init(App $a) {
<?php
use Friendica\App;
+use Friendica\Core\System;
require_once('library/openid.php');
<?php
use Friendica\App;
+use Friendica\Core\System;
function opensearch_content(App $a) {
<?php
use Friendica\App;
+use Friendica\Core\System;
require_once 'include/probe.php';
require_once 'include/follow.php';
*/
use Friendica\App;
+use Friendica\Core\System;
require_once("include/diaspora.php");
<?php
use Friendica\App;
+use Friendica\Core\System;
use Friendica\Core\Config;
use Friendica\Network\Probe;
<?php
use Friendica\App;
+use Friendica\Core\System;
require_once('include/datetime.php');
require_once('include/bbcode.php');
*/
use Friendica\App;
+use Friendica\Core\System;
require_once('include/security.php');
require_once('include/bbcode.php');
<?php
use Friendica\App;
+use Friendica\Core\System;
require_once('include/contact_widgets.php');
require_once('include/redir.php');
<?php
use Friendica\App;
+use Friendica\Core\System;
require_once("include/Photo.php");
<?php
use Friendica\App;
+use Friendica\Core\System;
use Friendica\Network\Probe;
require_once 'include/Contact.php';
// Based upon "Privacy Image Cache" by Tobias Hößl <https://github.com/CatoTH/>
use Friendica\App;
+use Friendica\Core\System;
define('PROXY_DEFAULT_TIME', 86400); // 1 Day
<?php
use Friendica\App;
+use Friendica\Core\System;
function randprof_init(App $a) {
require_once('include/Contact.php');
<?php
use Friendica\App;
+use Friendica\Core\System;
function redir_init(App $a) {
<?php
use Friendica\App;
+use Friendica\Core\System;
require_once('include/enotify.php');
require_once('include/bbcode.php');
<?php
use Friendica\App;
+use Friendica\Core\System;
require_once('include/enotify.php');
require_once('include/user.php');
<?php
use Friendica\App;
+use Friendica\Core\System;
function removeme_post(App $a) {
<?php
use Friendica\App;
+use Friendica\Core\System;
require_once 'include/probe.php';
require_once 'include/follow.php';
<?php
use Friendica\App;
+use Friendica\Core\System;
function rsd_xml_content(App $a)
{
</rsd>';
killme();
-}
\ No newline at end of file
+}
<?php
use Friendica\App;
+use Friendica\Core\System;
require_once('include/group.php');
require_once('include/socgraph.php');
<?php
use Friendica\App;
+use Friendica\Core\System;
function starred_init(App $a) {
<?php
use Friendica\App;
+use Friendica\Core\System;
require_once('include/security.php');
require_once('include/bbcode.php');
<?php
use Friendica\App;
+use Friendica\Core\System;
require_once('include/socgraph.php');
require_once('include/contact_widgets.php');
<?php
use Friendica\App;
+use Friendica\Core\System;
require_once('include/security.php');
require_once('include/bbcode.php');
<?php
use Friendica\App;
+use Friendica\Core\System;
require_once('include/bbcode.php');
<?php
use Friendica\App;
+use Friendica\Core\System;
function toggle_mobile_init(App $a) {
<?php
use Friendica\App;
+use Friendica\Core\System;
function uexport_init(App $a) {
if (!local_user()) {
<?php
use Friendica\App;
+use Friendica\Core\System;
require_once('include/items.php');
require_once('include/acl_selectors.php');
*/
use Friendica\App;
+use Friendica\Core\System;
use Friendica\Core\Config;
require_once 'include/Photo.php';
<?php
use Friendica\App;
+use Friendica\Core\System;
require_once('include/crypto.php');
--- /dev/null
+<?php
+namespace Friendica\Core;
+
+use dba;
+use dbm;
+use Friendica\App;
+
+/**
+ * @file include/Core/System.php
+ *
+ * @brief Contains the class with system relevant stuff
+ */
+
+
+/**
+ * @brief System methods
+ */
+class System {
+
+ private static $a;
+
+ /**
+ * @brief Initializes the static class variable
+ */
+ private static function init() {
+ global $a;
+
+ if (!is_object(self::$a)) {
+ self::$a = $a;
+ }
+ }
+
+ /**
+ * @brief Retrieves the Friendica instance base URL
+ *
+ * @param bool $ssl Whether to append http or https under SSL_POLICY_SELFSIGN
+ * @return string Friendica server base URL
+ */
+ public static function baseUrl($ssl = false) {
+ self::init();
+ return self::$a->get_baseurl($ssl);
+ }
+
+ /**
+ * @brief Removes the baseurl from an url. This avoids some mixed content problems.
+ *
+ * @param string $orig_url
+ *
+ * @return string The cleaned url
+ */
+ function removedBaseUrl($orig_url) {
+ self::init();
+ return self::$a->remove_baseurl($orig_url);
+ }
+
+ /// @todo Move the following functions from boot.php
+ /*
+ function get_guid($size = 16, $prefix = "")
+ function killme()
+ function goaway($s)
+ function local_user()
+ function public_contact()
+ function remote_user()
+ function notice($s)
+ function info($s)
+ function is_site_admin()
+ function random_digits($digits)
+ function get_server()
+ function get_temppath()
+ function get_cachefile($file, $writemode = true)
+ function get_itemcachepath()
+ function get_spoolpath()
+ function current_load()
+ */
+}
*/
use Friendica\App;
+use Friendica\Core\System;
use Friendica\Core\Config;
use dbm;
*/
use Friendica\App;
+use Friendica\Core\System;
function theme_content(App $a) {
if (!local_user()) {
<?php
use Friendica\App;
+use Friendica\Core\System;
require_once('view/theme/frio/php/Image.php');
*/
use Friendica\App;
+use Friendica\Core\System;
$frio = "view/theme/frio";
*/
use Friendica\App;
+use Friendica\Core\System;
function frost_mobile_init(App $a) {
$a->sourcename = 'Friendica mobile web';
*/
use Friendica\App;
+use Friendica\Core\System;
function frost_init(App $a) {
$a->videowidth = 400;
*/
use Friendica\App;
+use Friendica\Core\System;
function theme_content(App $a) {
if (!local_user()) {
*/
use Friendica\App;
+use Friendica\Core\System;
function quattro_init(App $a) {
$a->page['htmlhead'] .= '<script src="'.App::get_baseurl().'/view/theme/quattro/tinycon.min.js"></script>';
*/
use Friendica\App;
+use Friendica\Core\System;
function smoothly_init(App $a) {
set_template_engine($a, 'smarty3');
*/
use Friendica\App;
+use Friendica\Core\System;
function theme_content(App $a) {
if (!local_user()) {
*/
use Friendica\App;
+use Friendica\Core\System;
require_once "include/plugin.php";
require_once "include/socgraph.php";