mirror of
https://github.com/silverstripe/silverstripe-framework
synced 2024-10-22 14:05:37 +02:00
Remove unnecessary require calls.
Now that we have PSR-4 compliance on these classes, manual include statements aren’t needed.
This commit is contained in:
parent
f7ba78a8b3
commit
822f9f4390
@ -80,9 +80,6 @@ global $databaseConfig;
|
|||||||
// We don't have a session in cli-script, but this prevents errors
|
// We don't have a session in cli-script, but this prevents errors
|
||||||
$_SESSION = null;
|
$_SESSION = null;
|
||||||
|
|
||||||
require_once("ORM/DB.php");
|
|
||||||
|
|
||||||
|
|
||||||
// Connect to database
|
// Connect to database
|
||||||
if(!isset($databaseConfig) || !isset($databaseConfig['database']) || !$databaseConfig['database']) {
|
if(!isset($databaseConfig) || !isset($databaseConfig['database']) || !$databaseConfig['database']) {
|
||||||
echo "\nPlease configure your database connection details. You can do this by creating a file
|
echo "\nPlease configure your database connection details. You can do this by creating a file
|
||||||
|
@ -49,7 +49,6 @@ class ParameterConfirmationToken {
|
|||||||
*/
|
*/
|
||||||
protected function genToken() {
|
protected function genToken() {
|
||||||
// Generate a new random token (as random as possible)
|
// Generate a new random token (as random as possible)
|
||||||
require_once(dirname(dirname(dirname(__FILE__))).'/security/RandomGenerator.php');
|
|
||||||
$rg = new RandomGenerator();
|
$rg = new RandomGenerator();
|
||||||
$token = $rg->randomToken('md5');
|
$token = $rg->randomToken('md5');
|
||||||
|
|
||||||
|
1
main.php
1
main.php
@ -147,7 +147,6 @@ $chain
|
|||||||
require_once('core/Core.php');
|
require_once('core/Core.php');
|
||||||
|
|
||||||
// Connect to database
|
// Connect to database
|
||||||
require_once('ORM/DB.php');
|
|
||||||
global $databaseConfig;
|
global $databaseConfig;
|
||||||
if ($databaseConfig) DB::connect($databaseConfig);
|
if ($databaseConfig) DB::connect($databaseConfig);
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user