Delete requires in applications where possible
This commit is contained in:
parent
f5c0dbd947
commit
2f807a3c7f
|
@ -22,8 +22,6 @@
|
|||
*/
|
||||
|
||||
require_once('../lib/base.php');
|
||||
include_once('../lib/installer.php');
|
||||
require( 'template.php' );
|
||||
if( !OC_USER::isLoggedIn() || !OC_GROUP::inGroup( OC_USER::getUser(), 'admin' )){
|
||||
header( "Location: ".OC_HELPER::linkTo( "", "index.php" ));
|
||||
exit();
|
||||
|
|
|
@ -22,7 +22,6 @@
|
|||
*/
|
||||
|
||||
require_once('../lib/base.php');
|
||||
require( 'template.php' );
|
||||
if( !OC_USER::isLoggedIn() || !OC_GROUP::inGroup( OC_USER::getUser(), 'admin' )){
|
||||
header( "Location: ".OC_HELPER::linkTo( "index.php" ));
|
||||
exit();
|
||||
|
|
|
@ -22,7 +22,6 @@
|
|||
*/
|
||||
|
||||
require_once('../lib/base.php');
|
||||
require( 'template.php' );
|
||||
if( !OC_USER::isLoggedIn() || !OC_GROUP::inGroup( OC_USER::getUser(), 'admin' )){
|
||||
header( "Location: ".OC_HELPER::linkTo( "index.php" ));
|
||||
exit();
|
||||
|
|
|
@ -25,7 +25,6 @@
|
|||
// Init owncloud
|
||||
require_once('../../lib/base.php');
|
||||
require_once( 'lib_public.php' );
|
||||
require( 'template.php' );
|
||||
|
||||
|
||||
// Check if we are a user
|
||||
|
|
|
@ -3,7 +3,6 @@ $RUNTIME_NOAPPS=true; //no need to load the apps
|
|||
$RUNTIME_NOSETUPFS=true; //don't setup the fs yet
|
||||
|
||||
require_once '../../lib/base.php';
|
||||
require( 'template.php' );
|
||||
|
||||
require_once 'lib_public.php';
|
||||
|
||||
|
|
|
@ -32,7 +32,6 @@ if( !OC_USER::isLoggedIn()){
|
|||
|
||||
require_once('lib_collection.php');
|
||||
require_once('lib_scanner.php');
|
||||
require_once('template.php');
|
||||
|
||||
OC_UTIL::addScript('media','player');
|
||||
OC_UTIL::addScript('media','music');
|
||||
|
|
|
@ -29,7 +29,6 @@ if( !OC_USER::isLoggedIn()){
|
|||
exit();
|
||||
}
|
||||
|
||||
require( 'template.php' );
|
||||
require( 'lib_collection.php' );
|
||||
|
||||
OC_UTIL::addStyle('media','style');
|
||||
|
|
|
@ -22,7 +22,6 @@
|
|||
*/
|
||||
|
||||
require_once('../../lib/base.php');
|
||||
require( 'template.php' );
|
||||
|
||||
if( !OC_USER::isLoggedIn() || !OC_GROUP::inGroup( OC_USER::getUser(), 'admin' )){
|
||||
header( "Location: ".OC_HELPER::linkTo( "index.php" ));
|
||||
|
|
|
@ -21,8 +21,6 @@
|
|||
*
|
||||
*/
|
||||
|
||||
require_once('User/backend.php');
|
||||
|
||||
class OC_USER_LDAP extends OC_USER_BACKEND {
|
||||
|
||||
protected $ds;
|
||||
|
|
|
@ -12,9 +12,6 @@
|
|||
* @version 0.9
|
||||
*/
|
||||
|
||||
require( 'template.php' );
|
||||
|
||||
|
||||
/**
|
||||
* Set a constant to indicate that phpMyID is running
|
||||
*/
|
||||
|
|
|
@ -1,7 +1,6 @@
|
|||
<?php
|
||||
|
||||
require_once('../../lib/base.php');
|
||||
require( 'template.php' );
|
||||
if( !OC_USER::isLoggedIn()){
|
||||
header( "Location: ".OC_HELPER::linkTo( "index.php" ));
|
||||
exit();
|
||||
|
|
|
@ -21,7 +21,6 @@
|
|||
*
|
||||
*/
|
||||
|
||||
require_once('User/backend.php');
|
||||
require_once('class.openid.v3.php');
|
||||
|
||||
/**
|
||||
|
|
|
@ -1,7 +1,6 @@
|
|||
<?php
|
||||
if(!isset($_)){//also provide standalone error page
|
||||
require_once '../../lib/base.php';
|
||||
require( 'template.php' );
|
||||
|
||||
$tmpl = new OC_TEMPLATE( '', '404', 'guest' );
|
||||
$tmpl->printPage();
|
||||
|
|
|
@ -31,9 +31,6 @@ require_once('../lib/base.php');
|
|||
// We need the file system although we said do not load it! Do it by hand now
|
||||
OC_UTIL::setupFS();
|
||||
|
||||
// We load OC_TEMPLATE, too. This one is not loaded by base
|
||||
require( 'template.php' );
|
||||
|
||||
// The user should have admin rights. This is an admin page!
|
||||
if( !OC_USER::isLoggedIn() || !OC_USER::ingroup( $_SESSION['username'], 'admin' )){
|
||||
// Bad boy! Go to the very first page of owncloud
|
||||
|
|
|
@ -24,7 +24,6 @@
|
|||
|
||||
// Init owncloud
|
||||
require_once('../lib/base.php');
|
||||
require( 'template.php' );
|
||||
|
||||
// Check if we are a user
|
||||
if( !OC_USER::isLoggedIn()){
|
||||
|
|
|
@ -24,7 +24,6 @@
|
|||
|
||||
// Init owncloud
|
||||
require_once('../lib/base.php');
|
||||
require( 'template.php' );
|
||||
|
||||
|
||||
// Check if we are a user
|
||||
|
|
|
@ -2,7 +2,6 @@
|
|||
|
||||
// Init owncloud
|
||||
require_once('../../lib/base.php');
|
||||
require_once('../../lib/template.php');
|
||||
|
||||
// We send json data
|
||||
header( "Content-Type: application/jsonrequest" );
|
||||
|
|
|
@ -23,7 +23,6 @@
|
|||
|
||||
// Init owncloud
|
||||
require_once('../lib/base.php');
|
||||
require( 'template.php' );
|
||||
|
||||
// Check if we are a user
|
||||
if( !OC_USER::isLoggedIn()){
|
||||
|
|
|
@ -24,7 +24,6 @@
|
|||
|
||||
// Init owncloud
|
||||
require_once('../lib/base.php');
|
||||
require( 'template.php' );
|
||||
|
||||
// Check if we are a user
|
||||
if( !OC_USER::isLoggedIn()){
|
||||
|
|
|
@ -24,7 +24,6 @@
|
|||
|
||||
// Init owncloud
|
||||
require_once('../lib/base.php');
|
||||
require( 'template.php' );
|
||||
|
||||
// Check if we are a user
|
||||
if( !OC_USER::isLoggedIn()){
|
||||
|
|
|
@ -28,11 +28,6 @@ $RUNTIME_NOSETUPFS = true;
|
|||
|
||||
require_once('../lib/base.php');
|
||||
require_once('Sabre/autoload.php');
|
||||
require_once('Connector/Sabre/auth.php');
|
||||
require_once('Connector/Sabre/node.php');
|
||||
require_once('Connector/Sabre/file.php');
|
||||
require_once('Connector/Sabre/directory.php');
|
||||
require_once('Connector/Sabre/locks.php');
|
||||
|
||||
// Create ownCloud Dir
|
||||
$publicDir = new OC_Connector_Sabre_Directory('');
|
||||
|
|
|
@ -1,7 +1,6 @@
|
|||
<?php
|
||||
|
||||
require_once('../lib/base.php');
|
||||
require( 'template.php' );
|
||||
if( !OC_USER::isLoggedIn()){
|
||||
header( "Location: ".OC_HELPER::linkTo( "index.php" ));
|
||||
exit();
|
||||
|
|
|
@ -23,9 +23,7 @@
|
|||
|
||||
$RUNTIME_NOAPPS = TRUE; //no apps, yet
|
||||
|
||||
require_once(dirname(__FILE__).'/lib/base.php');
|
||||
require_once('appconfig.php');
|
||||
require_once('template.php');
|
||||
require_once('lib/base.php');
|
||||
|
||||
OC_UTIL::addScript('setup');
|
||||
|
||||
|
|
|
@ -23,7 +23,6 @@
|
|||
|
||||
//require_once('../../config/config.php');
|
||||
require_once('../lib/base.php');
|
||||
require_once( 'template.php' );
|
||||
|
||||
if( !OC_USER::isLoggedIn()){
|
||||
header( 'Location: '.OC_HELPER::linkTo( 'index.php' ));
|
||||
|
|
|
@ -24,7 +24,6 @@
|
|||
|
||||
// Init owncloud
|
||||
require_once('../lib/base.php');
|
||||
require( 'template.php' );
|
||||
|
||||
// Check if we are a user
|
||||
if( !OC_USER::isLoggedIn()){
|
||||
|
|
|
@ -1,7 +1,6 @@
|
|||
<?php
|
||||
|
||||
require_once('../lib/base.php');
|
||||
require( 'template.php' );
|
||||
if( !OC_USER::isLoggedIn()){
|
||||
header( "Location: ".OC_HELPER::linkTo( "index.php" ));
|
||||
exit();
|
||||
|
|
|
@ -26,8 +26,6 @@
|
|||
*/
|
||||
$RUNTIME_NOSETUPFS=true;
|
||||
require_once('../lib/base.php');
|
||||
require_once('testcase.php');
|
||||
require_once('template.php');
|
||||
|
||||
$testCases=loadFiles(__DIR__,array('index.php','templates'));
|
||||
ob_end_clean();
|
||||
|
|
Loading…
Reference in New Issue