Skip to content
Snippets Groups Projects
Commit 31e32e3c authored by Frank Karlitschek's avatar Frank Karlitschek
Browse files

ported checkLoggedIn and checkAdmin

parent e2fb0946
No related branches found
No related tags found
No related merge requests found
Showing
with 20 additions and 20 deletions
...@@ -22,7 +22,7 @@ ...@@ -22,7 +22,7 @@
* License along with this library. If not, see <http://www.gnu.org/licenses/>. * License along with this library. If not, see <http://www.gnu.org/licenses/>.
* *
*/ */
OC_Util::checkAdminUser(); OCP\User::checkAdminUser();
OC_Util::checkAppEnabled('admin_migrate'); OC_Util::checkAppEnabled('admin_migrate');
// Export? // Export?
......
...@@ -24,7 +24,7 @@ ...@@ -24,7 +24,7 @@
// Check if we are a user // Check if we are a user
OC_Util::checkLoggedIn(); OCP\User::checkLoggedIn();
OC_Util::checkAppEnabled('bookmarks'); OC_Util::checkAppEnabled('bookmarks');
require_once('bookmarksHelper.php'); require_once('bookmarksHelper.php');
......
...@@ -24,7 +24,7 @@ ...@@ -24,7 +24,7 @@
// Check if we are a user // Check if we are a user
OC_Util::checkLoggedIn(); OCP\User::checkLoggedIn();
OC_Util::checkAppEnabled('bookmarks'); OC_Util::checkAppEnabled('bookmarks');
OC_App::setActiveNavigationEntry( 'bookmarks_index' ); OC_App::setActiveNavigationEntry( 'bookmarks_index' );
......
...@@ -7,7 +7,7 @@ ...@@ -7,7 +7,7 @@
*/ */
OC_Util::checkLoggedIn(); OCP\User::checkLoggedIn();
OC_Util::checkAppEnabled('calendar'); OC_Util::checkAppEnabled('calendar');
$cal = isset($_GET['calid']) ? $_GET['calid'] : NULL; $cal = isset($_GET['calid']) ? $_GET['calid'] : NULL;
$event = isset($_GET['eventid']) ? $_GET['eventid'] : NULL; $event = isset($_GET['eventid']) ? $_GET['eventid'] : NULL;
......
...@@ -7,7 +7,7 @@ ...@@ -7,7 +7,7 @@
*/ */
OC_Util::checkLoggedIn(); OCP\User::checkLoggedIn();
OC_Util::checkAppEnabled('calendar'); OC_Util::checkAppEnabled('calendar');
// Create default calendar ... // Create default calendar ...
......
...@@ -7,7 +7,7 @@ ...@@ -7,7 +7,7 @@
*/ */
OC_Util::checkLoggedIn(); OCP\User::checkLoggedIn();
OC_Util::checkAppEnabled('contacts'); OC_Util::checkAppEnabled('contacts');
$bookid = isset($_GET['bookid']) ? $_GET['bookid'] : NULL; $bookid = isset($_GET['bookid']) ? $_GET['bookid'] : NULL;
$contactid = isset($_GET['contactid']) ? $_GET['contactid'] : NULL; $contactid = isset($_GET['contactid']) ? $_GET['contactid'] : NULL;
......
...@@ -9,7 +9,7 @@ ...@@ -9,7 +9,7 @@
// Check if we are a user // Check if we are a user
OC_Util::checkLoggedIn(); OCP\User::checkLoggedIn();
OC_Util::checkAppEnabled('contacts'); OC_Util::checkAppEnabled('contacts');
// Get active address books. This creates a default one if none exists. // Get active address books. This creates a default one if none exists.
......
...@@ -10,7 +10,7 @@ ...@@ -10,7 +10,7 @@
// Init owncloud // Init owncloud
OC_Util::checkLoggedIn(); OCP\User::checkLoggedIn();
OC_Util::checkAppEnabled('contacts'); OC_Util::checkAppEnabled('contacts');
function getStandardImage(){ function getStandardImage(){
......
...@@ -23,7 +23,7 @@ ...@@ -23,7 +23,7 @@
// Init owncloud // Init owncloud
OC_JSON::checkLoggedIn(); OC_JSON::checkLoggedIn();
//OC_Util::checkLoggedIn(); //OCP\User::checkLoggedIn();
OC_Util::checkAppEnabled('contacts'); OC_Util::checkAppEnabled('contacts');
function getStandardImage(){ function getStandardImage(){
......
...@@ -7,7 +7,7 @@ ...@@ -7,7 +7,7 @@
*/ */
OC_Util::checkAdminUser(); OCP\User::checkAdminUser();
$sites = array(); $sites = array();
for ($i = 0; $i < sizeof($_POST['site_name']); $i++) { for ($i = 0; $i < sizeof($_POST['site_name']); $i++) {
......
...@@ -23,7 +23,7 @@ ...@@ -23,7 +23,7 @@
require_once('lib/external.php'); require_once('lib/external.php');
OC_Util::checkLoggedIn(); OCP\User::checkLoggedIn();
if (isset($_GET['id'])) { if (isset($_GET['id'])) {
......
<?php <?php
OC_Util::checkAdminUser(); OCP\User::checkAdminUser();
OCP\Util::addscript( "external", "admin" ); OCP\Util::addscript( "external", "admin" );
......
...@@ -25,7 +25,7 @@ ...@@ -25,7 +25,7 @@
// Init owncloud // Init owncloud
OC_Util::checkAdminUser(); OCP\User::checkAdminUser();
$htaccessWorking=(getenv('htaccessWorking')=='true'); $htaccessWorking=(getenv('htaccessWorking')=='true');
......
...@@ -28,7 +28,7 @@ $RUNTIME_APPTYPES=array('filesystem'); ...@@ -28,7 +28,7 @@ $RUNTIME_APPTYPES=array('filesystem');
// Check if we are a user // Check if we are a user
OC_Util::checkLoggedIn(); OCP\User::checkLoggedIn();
$files = $_GET["files"]; $files = $_GET["files"];
$dir = $_GET["dir"]; $dir = $_GET["dir"];
......
...@@ -25,7 +25,7 @@ ...@@ -25,7 +25,7 @@
// Check if we are a user // Check if we are a user
OC_Util::checkLoggedIn(); OCP\User::checkLoggedIn();
$filename = $_GET["file"]; $filename = $_GET["file"];
......
...@@ -22,7 +22,7 @@ ...@@ -22,7 +22,7 @@
*/ */
// Check if we are a user // Check if we are a user
OC_Util::checkLoggedIn(); OCP\User::checkLoggedIn();
// Load the files we need // Load the files we need
OCP\Util::addStyle( "files", "files" ); OCP\Util::addStyle( "files", "files" );
......
...@@ -26,7 +26,7 @@ ...@@ -26,7 +26,7 @@
// Check if we are a user // Check if we are a user
OC_Util::checkLoggedIn(); OCP\User::checkLoggedIn();
// Load the files we need // Load the files we need
OCP\Util::addStyle( "files", "files" ); OCP\Util::addStyle( "files", "files" );
......
...@@ -23,7 +23,7 @@ ...@@ -23,7 +23,7 @@
require_once('lib_share.php'); require_once('lib_share.php');
OC_Util::checkLoggedIn(); OCP\User::checkLoggedIn();
OC_Util::checkAppEnabled('files_sharing'); OC_Util::checkAppEnabled('files_sharing');
OC_App::setActiveNavigationEntry("files_sharing_list"); OC_App::setActiveNavigationEntry("files_sharing_list");
......
<?php <?php
OC_Util::checkAdminUser(); OCP\User::checkAdminUser();
OCP\Util::addscript('files_sharing', 'settings'); OCP\Util::addscript('files_sharing', 'settings');
$tmpl = new OC_Template('files_sharing', 'settings'); $tmpl = new OC_Template('files_sharing', 'settings');
$tmpl->assign('allowResharing', OC_Appconfig::getValue('files_sharing', 'resharing', 'yes')); $tmpl->assign('allowResharing', OC_Appconfig::getValue('files_sharing', 'resharing', 'yes'));
......
...@@ -22,7 +22,7 @@ ...@@ -22,7 +22,7 @@
*/ */
require_once( '../../lib/base.php' ); require_once( '../../lib/base.php' );
OC_Util::checkLoggedIn( ); OCP\User::checkLoggedIn( );
OCP\Util::addStyle('files_versions','versions'); OCP\Util::addStyle('files_versions','versions');
$tmpl = new OC_Template( 'files_versions', 'history', 'user' ); $tmpl = new OC_Template( 'files_versions', 'history', 'user' );
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment