Browse Source

Delete requires in applications where possible

tags/v3.0
Jakob Sack 13 years ago
parent
commit
2f807a3c7f

+ 0
- 2
admin/apps.php View File

@@ -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();

+ 0
- 1
admin/system.php View File

@@ -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();

+ 0
- 1
admin/users.php View File

@@ -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();

+ 0
- 1
apps/files_publiclink/admin.php View File

@@ -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

+ 0
- 1
apps/files_publiclink/get.php View File

@@ -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';


+ 0
- 1
apps/media/index.php View File

@@ -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');

+ 0
- 1
apps/media/settings.php View File

@@ -29,7 +29,6 @@ if( !OC_USER::isLoggedIn()){
exit();
}

require( 'template.php' );
require( 'lib_collection.php' );

OC_UTIL::addStyle('media','style');

+ 0
- 1
apps/user_ldap/settings.php View File

@@ -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" ));

+ 0
- 2
apps/user_ldap/user_ldap.php View File

@@ -21,8 +21,6 @@
*
*/

require_once('User/backend.php');

class OC_USER_LDAP extends OC_USER_BACKEND {

protected $ds;

+ 0
- 3
apps/user_openid/phpmyid.php View File

@@ -12,9 +12,6 @@
* @version 0.9
*/

require( 'template.php' );


/**
* Set a constant to indicate that phpMyID is running
*/

+ 0
- 1
apps/user_openid/settings.php View File

@@ -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();

+ 0
- 1
apps/user_openid/user_openid.php View File

@@ -21,7 +21,6 @@
*
*/

require_once('User/backend.php');
require_once('class.openid.v3.php');

/**

+ 0
- 1
core/templates/404.php View File

@@ -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();

+ 0
- 3
docs/skeleton/admin.php View File

@@ -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

+ 0
- 1
docs/skeleton/index.php View File

@@ -24,7 +24,6 @@

// Init owncloud
require_once('../lib/base.php');
require( 'template.php' );

// Check if we are a user
if( !OC_USER::isLoggedIn()){

+ 0
- 1
files/admin.php View File

@@ -24,7 +24,6 @@

// Init owncloud
require_once('../lib/base.php');
require( 'template.php' );


// Check if we are a user

+ 0
- 1
files/ajax/list.php View File

@@ -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" );

+ 0
- 1
files/download.php View File

@@ -23,7 +23,6 @@

// Init owncloud
require_once('../lib/base.php');
require( 'template.php' );

// Check if we are a user
if( !OC_USER::isLoggedIn()){

+ 0
- 1
files/index.php View File

@@ -24,7 +24,6 @@

// Init owncloud
require_once('../lib/base.php');
require( 'template.php' );

// Check if we are a user
if( !OC_USER::isLoggedIn()){

+ 0
- 1
files/settings.php View File

@@ -24,7 +24,6 @@

// Init owncloud
require_once('../lib/base.php');
require( 'template.php' );

// Check if we are a user
if( !OC_USER::isLoggedIn()){

+ 0
- 5
files/webdav.php View File

@@ -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('');

+ 0
- 1
help/index.php View File

@@ -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();

+ 1
- 3
index.php View File

@@ -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');


+ 0
- 1
log/index.php View File

@@ -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' ));

+ 0
- 1
search/index.php View File

@@ -24,7 +24,6 @@

// Init owncloud
require_once('../lib/base.php');
require( 'template.php' );

// Check if we are a user
if( !OC_USER::isLoggedIn()){

+ 0
- 1
settings/index.php View File

@@ -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();

+ 0
- 2
tests/index.php View File

@@ -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…
Cancel
Save