mirror of
https://github.com/owncloud/bookmarks.git
synced 2025-03-21 12:29:14 +01:00
Move some common code to OC_Util
Created the following function: - checkLoggedIn - checkAdminUser - redirectToDefaultPage
This commit is contained in:
parent
5de34c29c8
commit
70208c5b92
@ -24,10 +24,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();
|
||||
|
||||
require_once('bookmarksHelper.php');
|
||||
|
||||
@ -45,4 +42,4 @@ $tmpl->assign('URL', htmlentities($metadata['url']));
|
||||
$tmpl->assign('TITLE', htmlentities($metadata['title']));
|
||||
$tmpl->assign('DESCRIPTION', htmlentities($metadata['description']));
|
||||
|
||||
$tmpl->printPage();
|
||||
$tmpl->printPage();
|
||||
|
@ -24,10 +24,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();
|
||||
|
||||
OC_App::setActiveNavigationEntry( 'bookmarks_index' );
|
||||
|
||||
@ -36,4 +33,4 @@ OC_Util::addStyle('bookmarks', 'bookmarks');
|
||||
|
||||
$tmpl = new OC_Template( 'bookmarks', 'list', 'user' );
|
||||
|
||||
$tmpl->printPage();
|
||||
$tmpl->printPage();
|
||||
|
Loading…
x
Reference in New Issue
Block a user