Delete requires in applications where possible

This commit is contained in:
Jakob Sack 2011-07-27 19:25:49 +02:00
parent f5c0dbd947
commit 2f807a3c7f
27 changed files with 1 additions and 40 deletions

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

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

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

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

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

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

View File

@ -29,7 +29,6 @@ if( !OC_USER::isLoggedIn()){
exit();
}
require( 'template.php' );
require( 'lib_collection.php' );
OC_UTIL::addStyle('media','style');

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

View File

@ -21,8 +21,6 @@
*
*/
require_once('User/backend.php');
class OC_USER_LDAP extends OC_USER_BACKEND {
protected $ds;

View File

@ -12,9 +12,6 @@
* @version 0.9
*/
require( 'template.php' );
/**
* Set a constant to indicate that phpMyID is running
*/

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

View File

@ -21,7 +21,6 @@
*
*/
require_once('User/backend.php');
require_once('class.openid.v3.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();

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

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()){

View File

@ -24,7 +24,6 @@
// Init owncloud
require_once('../lib/base.php');
require( 'template.php' );
// Check if we are a user

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

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()){

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()){

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()){

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

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

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

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

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()){

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

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