From 2f807a3c7f6e5a3a8a8e8317a3b3b627d3d68952 Mon Sep 17 00:00:00 2001 From: Jakob Sack Date: Wed, 27 Jul 2011 19:25:49 +0200 Subject: [PATCH] Delete requires in applications where possible --- admin/apps.php | 2 -- admin/system.php | 1 - admin/users.php | 1 - apps/files_publiclink/admin.php | 1 - apps/files_publiclink/get.php | 1 - apps/media/index.php | 1 - apps/media/settings.php | 1 - apps/user_ldap/settings.php | 1 - apps/user_ldap/user_ldap.php | 2 -- apps/user_openid/phpmyid.php | 3 --- apps/user_openid/settings.php | 1 - apps/user_openid/user_openid.php | 1 - core/templates/404.php | 1 - docs/skeleton/admin.php | 3 --- docs/skeleton/index.php | 1 - files/admin.php | 1 - files/ajax/list.php | 1 - files/download.php | 1 - files/index.php | 1 - files/settings.php | 1 - files/webdav.php | 5 ----- help/index.php | 1 - index.php | 4 +--- log/index.php | 1 - search/index.php | 1 - settings/index.php | 1 - tests/index.php | 2 -- 27 files changed, 1 insertion(+), 40 deletions(-) diff --git a/admin/apps.php b/admin/apps.php index bc598a6991..4bbf1c813b 100644 --- a/admin/apps.php +++ b/admin/apps.php @@ -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(); diff --git a/admin/system.php b/admin/system.php index 284509144e..9286ab9c2b 100644 --- a/admin/system.php +++ b/admin/system.php @@ -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(); diff --git a/admin/users.php b/admin/users.php index 8237d06da0..4065cc471f 100644 --- a/admin/users.php +++ b/admin/users.php @@ -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(); diff --git a/apps/files_publiclink/admin.php b/apps/files_publiclink/admin.php index afb726da31..9a1a9ce03c 100644 --- a/apps/files_publiclink/admin.php +++ b/apps/files_publiclink/admin.php @@ -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 diff --git a/apps/files_publiclink/get.php b/apps/files_publiclink/get.php index d3e3022e76..3bc961bc37 100644 --- a/apps/files_publiclink/get.php +++ b/apps/files_publiclink/get.php @@ -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'; diff --git a/apps/media/index.php b/apps/media/index.php index 26e008acab..fbf1c395d9 100644 --- a/apps/media/index.php +++ b/apps/media/index.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'); diff --git a/apps/media/settings.php b/apps/media/settings.php index 30276601a2..4bd9acfd80 100644 --- a/apps/media/settings.php +++ b/apps/media/settings.php @@ -29,7 +29,6 @@ if( !OC_USER::isLoggedIn()){ exit(); } -require( 'template.php' ); require( 'lib_collection.php' ); OC_UTIL::addStyle('media','style'); diff --git a/apps/user_ldap/settings.php b/apps/user_ldap/settings.php index f7aff1b461..8f9d282d2b 100644 --- a/apps/user_ldap/settings.php +++ b/apps/user_ldap/settings.php @@ -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" )); diff --git a/apps/user_ldap/user_ldap.php b/apps/user_ldap/user_ldap.php index a2fd48cdf0..a197c0a10e 100644 --- a/apps/user_ldap/user_ldap.php +++ b/apps/user_ldap/user_ldap.php @@ -21,8 +21,6 @@ * */ -require_once('User/backend.php'); - class OC_USER_LDAP extends OC_USER_BACKEND { protected $ds; diff --git a/apps/user_openid/phpmyid.php b/apps/user_openid/phpmyid.php index 146eb380f7..f35e6811b8 100644 --- a/apps/user_openid/phpmyid.php +++ b/apps/user_openid/phpmyid.php @@ -12,9 +12,6 @@ * @version 0.9 */ -require( 'template.php' ); - - /** * Set a constant to indicate that phpMyID is running */ diff --git a/apps/user_openid/settings.php b/apps/user_openid/settings.php index 76316de100..29c18eaa49 100644 --- a/apps/user_openid/settings.php +++ b/apps/user_openid/settings.php @@ -1,7 +1,6 @@ printPage(); diff --git a/docs/skeleton/admin.php b/docs/skeleton/admin.php index aaf6136692..723c7f7612 100644 --- a/docs/skeleton/admin.php +++ b/docs/skeleton/admin.php @@ -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 diff --git a/docs/skeleton/index.php b/docs/skeleton/index.php index 6d237ed615..5402990e4c 100644 --- a/docs/skeleton/index.php +++ b/docs/skeleton/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()){ diff --git a/files/admin.php b/files/admin.php index 5c9923aff8..c0a41335f5 100644 --- a/files/admin.php +++ b/files/admin.php @@ -24,7 +24,6 @@ // Init owncloud require_once('../lib/base.php'); -require( 'template.php' ); // Check if we are a user diff --git a/files/ajax/list.php b/files/ajax/list.php index ef43e72fca..26462eb5ab 100644 --- a/files/ajax/list.php +++ b/files/ajax/list.php @@ -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" ); diff --git a/files/download.php b/files/download.php index f7fbcd0f85..ab3dee5134 100644 --- a/files/download.php +++ b/files/download.php @@ -23,7 +23,6 @@ // Init owncloud require_once('../lib/base.php'); -require( 'template.php' ); // Check if we are a user if( !OC_USER::isLoggedIn()){ diff --git a/files/index.php b/files/index.php index 550f23541a..4f40e70393 100644 --- a/files/index.php +++ b/files/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()){ diff --git a/files/settings.php b/files/settings.php index 23aed4d1b8..447a38b181 100644 --- a/files/settings.php +++ b/files/settings.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()){ diff --git a/files/webdav.php b/files/webdav.php index 7dce0b4819..a59dee70c2 100644 --- a/files/webdav.php +++ b/files/webdav.php @@ -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(''); diff --git a/help/index.php b/help/index.php index de461c2941..adcb47f08f 100644 --- a/help/index.php +++ b/help/index.php @@ -1,7 +1,6 @@