restore require once command for non app files

This commit is contained in:
Georg Ehrke 2012-04-18 17:49:50 +02:00
Родитель b44bc9f4b2
Коммит 3fb91a7411
35 изменённых файлов: 35 добавлений и 35 удалений

Просмотреть файл

@ -5,7 +5,7 @@
* See the COPYING-README file. * See the COPYING-README file.
*/ */
require_once ("../../lib/base.php");
OC_JSON::checkLoggedIn(); OC_JSON::checkLoggedIn();
$action=isset($_POST['action'])?$_POST['action']:$_GET['action']; $action=isset($_POST['action'])?$_POST['action']:$_GET['action'];
$result=false; $result=false;

Просмотреть файл

@ -22,7 +22,7 @@
*/ */
$RUNTIME_NOAPPS = TRUE; //no apps, yet $RUNTIME_NOAPPS = TRUE; //no apps, yet
require_once('../../lib/base.php');
if(!OC_User::isLoggedIn()){ if(!OC_User::isLoggedIn()){
if(!isset($_SERVER['PHP_AUTH_USER'])){ if(!isset($_SERVER['PHP_AUTH_USER'])){

Просмотреть файл

@ -22,7 +22,7 @@
*/ */
// Init owncloud // Init owncloud
require_once('../../lib/base.php');
$app = $_POST["app"]; $app = $_POST["app"];

Просмотреть файл

@ -22,7 +22,7 @@
*/ */
$RUNTIME_NOAPPS = TRUE; //no apps, yet $RUNTIME_NOAPPS = TRUE; //no apps, yet
require_once('../../lib/base.php');
if(!OC_User::isLoggedIn()){ if(!OC_User::isLoggedIn()){
if(!isset($_SERVER['PHP_AUTH_USER'])){ if(!isset($_SERVER['PHP_AUTH_USER'])){

Просмотреть файл

@ -22,7 +22,7 @@
*/ */
$RUNTIME_NOAPPS = TRUE; //no apps, yet $RUNTIME_NOAPPS = TRUE; //no apps, yet
require_once('../../lib/base.php');
if(!isset($_SERVER['PHP_AUTH_USER'])){ if(!isset($_SERVER['PHP_AUTH_USER'])){
header('WWW-Authenticate: Basic realm="ownCloud Server"'); header('WWW-Authenticate: Basic realm="ownCloud Server"');

Просмотреть файл

@ -14,7 +14,7 @@ function debug($msg) {
OC_Log::write('core','ajax/vcategories/add.php: '.$msg, OC_Log::DEBUG); OC_Log::write('core','ajax/vcategories/add.php: '.$msg, OC_Log::DEBUG);
} }
require_once('../../../lib/base.php');
OC_JSON::checkLoggedIn(); OC_JSON::checkLoggedIn();
$category = isset($_GET['category'])?strip_tags($_GET['category']):null; $category = isset($_GET['category'])?strip_tags($_GET['category']):null;
$app = isset($_GET['app'])?$_GET['app']:null; $app = isset($_GET['app'])?$_GET['app']:null;

Просмотреть файл

@ -15,7 +15,7 @@ function debug($msg) {
OC_Log::write('core','ajax/vcategories/delete.php: '.$msg, OC_Log::DEBUG); OC_Log::write('core','ajax/vcategories/delete.php: '.$msg, OC_Log::DEBUG);
} }
require_once('../../../lib/base.php');
OC_JSON::checkLoggedIn(); OC_JSON::checkLoggedIn();
$app = isset($_POST['app'])?$_POST['app']:null; $app = isset($_POST['app'])?$_POST['app']:null;
$categories = isset($_POST['categories'])?$_POST['categories']:null; $categories = isset($_POST['categories'])?$_POST['categories']:null;

Просмотреть файл

@ -15,7 +15,7 @@ function debug($msg) {
OC_Log::write('core','ajax/vcategories/edit.php: '.$msg, OC_Log::DEBUG); OC_Log::write('core','ajax/vcategories/edit.php: '.$msg, OC_Log::DEBUG);
} }
require_once('../../../lib/base.php');
OC_JSON::checkLoggedIn(); OC_JSON::checkLoggedIn();
$app = isset($_GET['app'])?$_GET['app']:null; $app = isset($_GET['app'])?$_GET['app']:null;

Просмотреть файл

@ -7,7 +7,7 @@
*/ */
$RUNTIME_NOAPPS = TRUE; //no apps $RUNTIME_NOAPPS = TRUE; //no apps
require_once('../../lib/base.php');
// Someone lost their password: // Someone lost their password:
if (isset($_POST['user'])) { if (isset($_POST['user'])) {

Просмотреть файл

@ -7,7 +7,7 @@
*/ */
$RUNTIME_NOAPPS = TRUE; //no apps $RUNTIME_NOAPPS = TRUE; //no apps
require_once('../../lib/base.php');
// Someone wants to reset their password: // Someone wants to reset their password:
if(isset($_GET['token']) && isset($_GET['user']) && OC_Preferences::getValue($_GET['user'], 'owncloud', 'lostpassword') === $_GET['token']) { if(isset($_GET['token']) && isset($_GET['user']) && OC_Preferences::getValue($_GET['user'], 'owncloud', 'lostpassword') === $_GET['token']) {

Просмотреть файл

@ -21,7 +21,7 @@
* *
*/ */
require_once('../lib/base.php');
$url='http://'.substr($_SERVER['HTTP_HOST'].$_SERVER['REQUEST_URI'],0,-17).'ocs/v1.php/'; $url='http://'.substr($_SERVER['HTTP_HOST'].$_SERVER['REQUEST_URI'],0,-17).'ocs/v1.php/';

Просмотреть файл

@ -21,7 +21,7 @@
* *
*/ */
require_once('../lib/base.php');
@ob_clean(); @ob_clean();
OC_OCS::handle(); OC_OCS::handle();

Просмотреть файл

@ -23,7 +23,7 @@
// Init owncloud // Init owncloud
require_once('../../lib/base.php');
// Check if we are a user // Check if we are a user
OC_JSON::checkLoggedIn(); OC_JSON::checkLoggedIn();

Просмотреть файл

@ -23,7 +23,7 @@
// Init owncloud // Init owncloud
require_once('../lib/base.php');
// Check if we are a user // Check if we are a user
OC_Util::checkLoggedIn(); OC_Util::checkLoggedIn();

Просмотреть файл

@ -5,7 +5,7 @@
* See the COPYING-README file. * See the COPYING-README file.
*/ */
require_once('../lib/base.php');
OC_Util::checkAdminUser(); OC_Util::checkAdminUser();
OC_Util::addStyle( "settings", "settings" ); OC_Util::addStyle( "settings", "settings" );

Просмотреть файл

@ -1,7 +1,7 @@
<?php <?php
// Init owncloud // Init owncloud
require_once('../../lib/base.php');
$username = isset($_POST["username"]) ? $_POST["username"] : OC_User::getUser(); $username = isset($_POST["username"]) ? $_POST["username"] : OC_User::getUser();
$password = $_POST["password"]; $password = $_POST["password"];

Просмотреть файл

@ -1,7 +1,7 @@
<?php <?php
// Init owncloud // Init owncloud
require_once('../../lib/base.php');
// Check if we are a user // Check if we are a user
if( !OC_User::isLoggedIn() || !OC_Group::inGroup( OC_User::getUser(), 'admin' )){ if( !OC_User::isLoggedIn() || !OC_Group::inGroup( OC_User::getUser(), 'admin' )){

Просмотреть файл

@ -1,7 +1,7 @@
<?php <?php
// Init owncloud // Init owncloud
require_once('../../lib/base.php');
// Check if we are a user // Check if we are a user
if( !OC_User::isLoggedIn() || !OC_Group::inGroup( OC_User::getUser(), 'admin' )){ if( !OC_User::isLoggedIn() || !OC_Group::inGroup( OC_User::getUser(), 'admin' )){

Просмотреть файл

@ -1,6 +1,6 @@
<?php <?php
// Init owncloud // Init owncloud
require_once('../../lib/base.php');
OC_JSON::checkAdminUser(); OC_JSON::checkAdminUser();
OC_JSON::setContentTypeHeader(); OC_JSON::setContentTypeHeader();

Просмотреть файл

@ -1,7 +1,7 @@
<?php <?php
// Init owncloud // Init owncloud
require_once('../../lib/base.php');
OC_JSON::checkAdminUser(); OC_JSON::checkAdminUser();
OC_JSON::setContentTypeHeader(); OC_JSON::setContentTypeHeader();

Просмотреть файл

@ -6,7 +6,7 @@
*/ */
// Init owncloud // Init owncloud
require_once('../../lib/base.php');
OC_JSON::checkAdminUser(); OC_JSON::checkAdminUser();

Просмотреть файл

@ -1,7 +1,7 @@
<?php <?php
// Init owncloud // Init owncloud
require_once('../../lib/base.php');
OC_JSON::checkLoggedIn(); OC_JSON::checkLoggedIn();

Просмотреть файл

@ -1,7 +1,7 @@
<?php <?php
// Init owncloud // Init owncloud
require_once('../../lib/base.php');
$l=OC_L10N::get('settings'); $l=OC_L10N::get('settings');

Просмотреть файл

@ -1,7 +1,7 @@
<?php <?php
// Init owncloud // Init owncloud
require_once('../../lib/base.php');
OC_JSON::checkAdminUser(); OC_JSON::checkAdminUser();

Просмотреть файл

@ -1,7 +1,7 @@
<?php <?php
// Init owncloud // Init owncloud
require_once('../../lib/base.php');
OC_JSON::checkAdminUser(); OC_JSON::checkAdminUser();

Просмотреть файл

@ -1,7 +1,7 @@
<?php <?php
// Init owncloud // Init owncloud
require_once('../../lib/base.php');
$l=OC_L10N::get('settings'); $l=OC_L10N::get('settings');

Просмотреть файл

@ -5,7 +5,7 @@
* See the COPYING-README file. * See the COPYING-README file.
*/ */
require_once('../../lib/base.php');
OC_Util::checkAdminUser(); OC_Util::checkAdminUser();
OC_Config::setValue( 'loglevel', $_POST['level'] ); OC_Config::setValue( 'loglevel', $_POST['level'] );

Просмотреть файл

@ -6,7 +6,7 @@
*/ */
// Init owncloud // Init owncloud
require_once('../../lib/base.php');
OC_JSON::checkAdminUser(); OC_JSON::checkAdminUser();

Просмотреть файл

@ -1,7 +1,7 @@
<?php <?php
// Init owncloud // Init owncloud
require_once('../../lib/base.php');
OC_JSON::checkAdminUser(); OC_JSON::checkAdminUser();

Просмотреть файл

@ -21,7 +21,7 @@
* *
*/ */
require_once('../lib/base.php');
OC_Util::checkAdminUser(); OC_Util::checkAdminUser();
// Load the files we need // Load the files we need

Просмотреть файл

@ -5,7 +5,7 @@
* See the COPYING-README file. * See the COPYING-README file.
*/ */
require_once('../lib/base.php');
OC_Util::checkLoggedIn(); OC_Util::checkLoggedIn();

Просмотреть файл

@ -20,7 +20,7 @@
* *
*/ */
require_once('../lib/base.php');
OC_Util::checkAdminUser(); OC_Util::checkAdminUser();
// Load the files we need // Load the files we need

Просмотреть файл

@ -5,7 +5,7 @@
* See the COPYING-README file. * See the COPYING-README file.
*/ */
require_once('../lib/base.php');
OC_Util::checkLoggedIn(); OC_Util::checkLoggedIn();
// Highlight navigation entry // Highlight navigation entry

Просмотреть файл

@ -5,7 +5,7 @@
* See the COPYING-README file. * See the COPYING-README file.
*/ */
require_once('../lib/base.php');
OC_Util::checkLoggedIn(); OC_Util::checkLoggedIn();
OC_Util::addStyle( 'settings', 'settings' ); OC_Util::addStyle( 'settings', 'settings' );

Просмотреть файл

@ -5,7 +5,7 @@
* See the COPYING-README file. * See the COPYING-README file.
*/ */
require_once('../lib/base.php');
OC_Util::checkAdminUser(); OC_Util::checkAdminUser();
// We have some javascript foo! // We have some javascript foo!