mirror of
https://github.com/friendica/friendica
synced 2024-11-09 16:22:56 +00:00
Merge pull request #12033 from annando/no-boot
All references to boot.php are now removed
This commit is contained in:
commit
660912351c
16 changed files with 381 additions and 423 deletions
2
Doxyfile
2
Doxyfile
|
@ -1,4 +1,4 @@
|
||||||
INPUT = README.md index.php boot.php update.php bin/ mod/ include/ view/ src/ VERSION
|
INPUT = README.md index.php update.php bin/ mod/ include/ view/ src/ VERSION
|
||||||
RECURSIVE = YES
|
RECURSIVE = YES
|
||||||
PROJECT_NAME = "Friendica"
|
PROJECT_NAME = "Friendica"
|
||||||
PROJECT_LOGO = images/friendica-64.png
|
PROJECT_LOGO = images/friendica-64.png
|
||||||
|
|
|
@ -45,7 +45,7 @@ $longopts = ['foreground'];
|
||||||
$options = getopt($shortopts, $longopts);
|
$options = getopt($shortopts, $longopts);
|
||||||
|
|
||||||
// Ensure that daemon.php is executed from the base path of the installation
|
// Ensure that daemon.php is executed from the base path of the installation
|
||||||
if (!file_exists('boot.php') && (sizeof($_SERVER['argv']) != 0)) {
|
if (!file_exists('index.php') && (sizeof($_SERVER['argv']) != 0)) {
|
||||||
$directory = dirname($_SERVER['argv'][0]);
|
$directory = dirname($_SERVER['argv'][0]);
|
||||||
|
|
||||||
if (substr($directory, 0, 1) != '/') {
|
if (substr($directory, 0, 1) != '/') {
|
||||||
|
|
|
@ -40,7 +40,7 @@ $longopts = ['spawn', 'no_cron'];
|
||||||
$options = getopt($shortopts, $longopts);
|
$options = getopt($shortopts, $longopts);
|
||||||
|
|
||||||
// Ensure that worker.php is executed from the base path of the installation
|
// Ensure that worker.php is executed from the base path of the installation
|
||||||
if (!file_exists("boot.php") && (sizeof($_SERVER["argv"]) != 0)) {
|
if (!file_exists("index.php") && (sizeof($_SERVER["argv"]) != 0)) {
|
||||||
$directory = dirname($_SERVER["argv"][0]);
|
$directory = dirname($_SERVER["argv"][0]);
|
||||||
|
|
||||||
if (substr($directory, 0, 1) != '/') {
|
if (substr($directory, 0, 1) != '/') {
|
||||||
|
|
28
boot.php
28
boot.php
|
@ -1,28 +0,0 @@
|
||||||
<?php
|
|
||||||
/**
|
|
||||||
* @copyright Copyright (C) 2010-2022, the Friendica project
|
|
||||||
*
|
|
||||||
* @license GNU AGPL version 3 or any later version
|
|
||||||
*
|
|
||||||
* This program is free software: you can redistribute it and/or modify
|
|
||||||
* it under the terms of the GNU Affero General Public License as
|
|
||||||
* published by the Free Software Foundation, either version 3 of the
|
|
||||||
* License, or (at your option) any later version.
|
|
||||||
*
|
|
||||||
* This program is distributed in the hope that it will be useful,
|
|
||||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
|
||||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
|
||||||
* GNU Affero General Public License for more details.
|
|
||||||
*
|
|
||||||
* You should have received a copy of the GNU Affero General Public License
|
|
||||||
* along with this program. If not, see <https://www.gnu.org/licenses/>.
|
|
||||||
*
|
|
||||||
* Friendica is a communications platform for integrated social communications
|
|
||||||
* utilising decentralised communications and linkage to several indie social
|
|
||||||
* projects - as well as popular mainstream providers.
|
|
||||||
*
|
|
||||||
* Our mission is to free our friends and families from the clutches of
|
|
||||||
* data-harvesting corporations, and pave the way to a future where social
|
|
||||||
* communications are free and open and flow between alternate providers as
|
|
||||||
* easily as email does today.
|
|
||||||
*/
|
|
|
@ -83,10 +83,7 @@
|
||||||
"psr-4": {
|
"psr-4": {
|
||||||
"Friendica\\": "src/",
|
"Friendica\\": "src/",
|
||||||
"Friendica\\Addon\\": "addon/"
|
"Friendica\\Addon\\": "addon/"
|
||||||
},
|
}
|
||||||
"files": [
|
|
||||||
"boot.php"
|
|
||||||
]
|
|
||||||
},
|
},
|
||||||
"autoload-dev": {
|
"autoload-dev": {
|
||||||
"psr-4": {
|
"psr-4": {
|
||||||
|
|
|
@ -6,7 +6,7 @@ Using Composer
|
||||||
|
|
||||||
Friendica uses [Composer](https://getcomposer.org) to manage dependencies libraries and the class autoloader both for libraries and namespaced Friendica classes.
|
Friendica uses [Composer](https://getcomposer.org) to manage dependencies libraries and the class autoloader both for libraries and namespaced Friendica classes.
|
||||||
|
|
||||||
It's a command-line tool that downloads required libraries into the `vendor` folder and makes any namespaced class in `src` available through the whole application through `boot.php`.
|
It's a command-line tool that downloads required libraries into the `vendor` folder and makes any namespaced class in `src` available through the whole application.
|
||||||
|
|
||||||
* [Class autoloading](help/autoloader)
|
* [Class autoloading](help/autoloader)
|
||||||
|
|
||||||
|
|
|
@ -47,7 +47,7 @@ Friendica uses an implementation of [Domain-Driven-Design](help/Developer-Domain
|
||||||
|
|
||||||
Friendica uses [Composer](https://getcomposer.org) to manage dependencies libraries and the class autoloader both for libraries and namespaced Friendica classes.
|
Friendica uses [Composer](https://getcomposer.org) to manage dependencies libraries and the class autoloader both for libraries and namespaced Friendica classes.
|
||||||
|
|
||||||
It's a command-line tool that downloads required libraries into the `vendor` folder and makes any namespaced class in `src` available through the whole application through `boot.php`.
|
It's a command-line tool that downloads required libraries into the `vendor` folder and makes any namespaced class in `src` available through the whole application.
|
||||||
|
|
||||||
If you want to have git automatically update the dependencies with composer, you can use the `post-merge` [git-hook](https://git-scm.com/book/en/v2/Customizing-Git-Git-Hooks) with a script similar to this one:
|
If you want to have git automatically update the dependencies with composer, you can use the `post-merge` [git-hook](https://git-scm.com/book/en/v2/Customizing-Git-Git-Hooks) with a script similar to this one:
|
||||||
|
|
||||||
|
|
|
@ -6,7 +6,7 @@ Autoloader with Composer
|
||||||
|
|
||||||
Friendica uses [Composer](https://getcomposer.org) to manage dependencies libraries and the class autoloader both for libraries and namespaced Friendica classes.
|
Friendica uses [Composer](https://getcomposer.org) to manage dependencies libraries and the class autoloader both for libraries and namespaced Friendica classes.
|
||||||
|
|
||||||
It's a command-line tool that downloads required libraries into the `vendor` folder and makes any namespaced class in `src` available through the whole application through `boot.php`.
|
It's a command-line tool that downloads required libraries into the `vendor` folder and makes any namespaced class in `src` available through the whole application.
|
||||||
|
|
||||||
* [Using Composer](help/Composer)
|
* [Using Composer](help/Composer)
|
||||||
|
|
||||||
|
@ -39,7 +39,6 @@ Namespaces are useful to keep classes separated and avoid names conflicts (could
|
||||||
|
|
||||||
Let's say now that you need to load some items in a view, maybe in a fictional `mod/network.php`.
|
Let's say now that you need to load some items in a view, maybe in a fictional `mod/network.php`.
|
||||||
In order for the Composer autoloader to work, it must first be included.
|
In order for the Composer autoloader to work, it must first be included.
|
||||||
In Friendica this is already done at the top of `boot.php`, with `require_once('vendor/autoload.php');`.
|
|
||||||
|
|
||||||
The code will be something like:
|
The code will be something like:
|
||||||
|
|
||||||
|
|
|
@ -19,7 +19,6 @@ static/
|
||||||
vendor/
|
vendor/
|
||||||
view/
|
view/
|
||||||
.htaccess-dist
|
.htaccess-dist
|
||||||
boot.php
|
|
||||||
CHANGELOG
|
CHANGELOG
|
||||||
CREDITS.txt
|
CREDITS.txt
|
||||||
database.sql
|
database.sql
|
||||||
|
|
|
@ -75,7 +75,7 @@ HELP;
|
||||||
$arr = [];
|
$arr = [];
|
||||||
|
|
||||||
$files = array_merge(
|
$files = array_merge(
|
||||||
['index.php', 'boot.php'],
|
['index.php'],
|
||||||
glob('mod/*'),
|
glob('mod/*'),
|
||||||
glob('include/*'),
|
glob('include/*'),
|
||||||
glob('addon/*/*'),
|
glob('addon/*/*'),
|
||||||
|
|
|
@ -25,8 +25,6 @@ use Friendica\DI;
|
||||||
use Friendica\Model\Profile;
|
use Friendica\Model\Profile;
|
||||||
use Friendica\Util\Strings;
|
use Friendica\Util\Strings;
|
||||||
|
|
||||||
require_once 'boot.php';
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Some functions to handle themes
|
* Some functions to handle themes
|
||||||
*/
|
*/
|
||||||
|
|
|
@ -38,8 +38,6 @@ use Friendica\Protocol\Relay;
|
||||||
use Friendica\Util\BasePath;
|
use Friendica\Util\BasePath;
|
||||||
use Friendica\Util\EMailer\MailBuilder;
|
use Friendica\Util\EMailer\MailBuilder;
|
||||||
|
|
||||||
require_once __DIR__ . '/../../../boot.php';
|
|
||||||
|
|
||||||
class Site extends BaseAdmin
|
class Site extends BaseAdmin
|
||||||
{
|
{
|
||||||
protected function post(array $request = [])
|
protected function post(array $request = [])
|
||||||
|
|
|
@ -28,8 +28,6 @@ use Friendica\Core\Session;
|
||||||
use Friendica\DI;
|
use Friendica\DI;
|
||||||
use Friendica\Network\HTTPException;
|
use Friendica\Network\HTTPException;
|
||||||
|
|
||||||
require_once 'boot.php';
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* This abstract module is meant to be extended by all modules that are reserved to administrator users.
|
* This abstract module is meant to be extended by all modules that are reserved to administrator users.
|
||||||
*
|
*
|
||||||
|
|
|
@ -29,8 +29,6 @@ use Friendica\Database\DBA;
|
||||||
use Friendica\DI;
|
use Friendica\DI;
|
||||||
use Friendica\Model;
|
use Friendica\Model;
|
||||||
|
|
||||||
require_once 'boot.php';
|
|
||||||
|
|
||||||
class Group extends BaseModule
|
class Group extends BaseModule
|
||||||
{
|
{
|
||||||
protected function post(array $request = [])
|
protected function post(array $request = [])
|
||||||
|
|
File diff suppressed because it is too large
Load diff
|
@ -20,8 +20,7 @@
|
||||||
|
|
||||||
<script language="javascript" type="text/javascript">
|
<script language="javascript" type="text/javascript">
|
||||||
// This js part changes the state of page-flags radio buttons according
|
// This js part changes the state of page-flags radio buttons according
|
||||||
// to the selected account type. For a translation of the different
|
// to the selected account type.
|
||||||
// account-types and page-flags have a look in the define section in boot.php
|
|
||||||
var accountType = {{$account_type}};
|
var accountType = {{$account_type}};
|
||||||
|
|
||||||
$(document).ready(function(){
|
$(document).ready(function(){
|
||||||
|
|
Loading…
Reference in a new issue