diff options
Diffstat (limited to 'files')
-rw-r--r-- | files/admin.php | 7 | ||||
-rw-r--r-- | files/ajax/download.php | 5 | ||||
-rw-r--r-- | files/download.php | 5 | ||||
-rw-r--r-- | files/index.php | 5 | ||||
-rw-r--r-- | files/settings.php | 5 |
5 files changed, 5 insertions, 22 deletions
diff --git a/files/admin.php b/files/admin.php index db47bc7c033..09237dfc1d5 100644 --- a/files/admin.php +++ b/files/admin.php @@ -25,12 +25,7 @@ // Init owncloud require_once('../lib/base.php'); - -// Check if we are a user -if( !OC_User::isLoggedIn() || !OC_Group::inGroup( OC_User::getUser(), 'admin' )){ - header( "Location: ".OC_Helper::linkTo( "files", "index.php" )); - exit(); -} +OC_User::checkAdminUser(); $htaccessWorking=(getenv('htaccessWorking')=='true'); if(isset($_POST['maxUploadSize'])){ diff --git a/files/ajax/download.php b/files/ajax/download.php index 4c756f9b190..198069f3fa1 100644 --- a/files/ajax/download.php +++ b/files/ajax/download.php @@ -25,10 +25,7 @@ require_once('../../lib/base.php'); // Check if we are a user -if( !OC_User::isLoggedIn()){ - header( "Location: ".OC_Helper::linkTo( "", "index.php" )); - exit(); -} +OC_Util::checkLoggedIn(); $files = $_GET["files"]; $dir = $_GET["dir"]; diff --git a/files/download.php b/files/download.php index ccd3eb43d8e..c8a2692d015 100644 --- a/files/download.php +++ b/files/download.php @@ -25,10 +25,7 @@ require_once('../lib/base.php'); // Check if we are a user -if( !OC_User::isLoggedIn()){ - header( "Location: ".OC_Helper::linkTo( "", "index.php" )); - exit(); -} +OC_Util::checkLoggedIn(); $filename = $_GET["file"]; diff --git a/files/index.php b/files/index.php index 3d62c3385fa..bba8dc4951e 100644 --- a/files/index.php +++ b/files/index.php @@ -26,10 +26,7 @@ require_once('../lib/base.php'); // Check if we are a user -if( !OC_User::isLoggedIn()){ - header( "Location: ".OC_Helper::linkTo( '', 'index.php' )); - exit(); -} +OC_Util::checkLoggedIn(); // Load the files we need OC_Util::addStyle( "files", "files" ); diff --git a/files/settings.php b/files/settings.php index 2bbcb2acd3a..c47eb130095 100644 --- a/files/settings.php +++ b/files/settings.php @@ -26,10 +26,7 @@ require_once('../lib/base.php'); // Check if we are a user -if( !OC_User::isLoggedIn()){ - header( "Location: ".OC_Helper::linkTo( "", "index.php" )); - exit(); -} +OC_Util::checkLoggedIn(); // Load the files we need OC_Util::addStyle( "files", "files" ); |