diff --git a/addBm.php b/addBm.php index 2dab33af..b62fcdfb 100644 --- a/addBm.php +++ b/addBm.php @@ -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(); \ No newline at end of file +$tmpl->printPage(); diff --git a/index.php b/index.php index ba9f7cc0..45c9a52f 100644 --- a/index.php +++ b/index.php @@ -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(); \ No newline at end of file +$tmpl->printPage();