Commit 3642de6b authored by changi67's avatar changi67

[MOD] access check: deploy some accesslib check functions

parent af98dcd5
......@@ -7,15 +7,7 @@
// Licensed under the GNU LESSER GENERAL PUBLIC LICENSE. See license.txt for details.
require_once ('tiki-setup.php');
if ($prefs['wiki_feature_copyrights'] != 'y') {
$smarty->assign('msg', tra("The copyright management feature is not enabled."));
$smarty->display("error.tpl");
die;
}
$access->check_feature('wiki_feature_copyrights');
$access->check_permission(array('tiki_p_edit_copyrights'), tra("Copyright management"));
include_once ("lib/copyrights/copyrightslib.php");
......
......@@ -7,17 +7,9 @@
$section = 'directory';
require_once ('tiki-setup.php');
include_once ('lib/directory/dirlib.php');
if ($prefs['feature_directory'] != 'y') {
$smarty->assign('msg', tra("This feature is disabled") . ": feature_directory");
$smarty->display("error.tpl");
die;
}
if ($tiki_p_submit_link != 'y') {
$smarty->assign('errortype', 401);
$smarty->assign('msg', tra("Permission denied"));
$smarty->display("error.tpl");
die;
}
$access->check_feature('feature_directory');
$access->check_permission('tiki_p_submit_link');
// If no parent category then the parent category is 0
if (!isset($_REQUEST["parent"])) $_REQUEST["parent"] = 0;
// If no site category then the site category is -1
......
......@@ -7,11 +7,7 @@
$section = 'directory';
require_once ('tiki-setup.php');
include_once ('lib/directory/dirlib.php');
if ($prefs['feature_directory'] != 'y') {
$smarty->assign('msg', tra("This feature is disabled"));
$smarty->display("error.tpl");
die;
}
$access->check_feature('feature_directory');
// Set parent category to 2 ("tiki sites")
$_REQUEST["parent"] = 2;
$smarty->assign('parent', $_REQUEST["parent"]);
......
......@@ -7,17 +7,8 @@
$section = 'directory';
require_once ('tiki-setup.php');
include_once ('lib/directory/dirlib.php');
if ($prefs['feature_directory'] != 'y') {
$smarty->assign('msg', tra("This feature is disabled") . ": feature_directory");
$smarty->display("error.tpl");
die;
}
if ($tiki_p_view_directory != 'y') {
$smarty->assign('errortype', 401);
$smarty->assign('msg', tra("Permission denied"));
$smarty->display("error.tpl");
die;
}
$access->check_feature('feature_directory');
$access->check_permission('tiki_p_view_directory');
// If no parent category then the parent category is 0
if (!isset($_REQUEST["parent"])) $_REQUEST["parent"] = 0;
$smarty->assign('parent', $_REQUEST["parent"]);
......
......@@ -7,17 +7,8 @@
$section = 'directory';
require_once ('tiki-setup.php');
include_once ('lib/directory/dirlib.php');
if ($prefs['feature_directory'] != 'y') {
$smarty->assign('msg', tra("This feature is disabled") . ": feature_directory");
$smarty->display("error.tpl");
die;
}
if ($tiki_p_view_directory != 'y') {
$smarty->assign('errortype', 401);
$smarty->assign('msg', tra("Permission denied"));
$smarty->display("error.tpl");
die;
}
$access->check_feature('feature_directory');
$access->check_permission('tiki_p_view_directory');
if (isset($_REQUEST['maxRecords'])) {
$maxRecords = $_REQUEST['maxRecords'];
}
......
......@@ -6,17 +6,8 @@
// $Id: /cvsroot/tikiwiki/tiki/tiki-directory_redirect.php,v 1.11 2007-10-12 07:55:26 nyloth Exp $
require_once ('tiki-setup.php');
include_once ('lib/directory/dirlib.php');
if ($prefs['feature_directory'] != 'y') {
$smarty->assign('msg', tra("This feature is disabled") . ": feature_directory");
$smarty->display("error.tpl");
die;
}
if ($tiki_p_view_directory != 'y') {
$smarty->assign('errortype', 401);
$smarty->assign('msg', tra("Permission denied"));
$smarty->display("error.tpl");
die;
}
$access->check_feature('feature_directory');
$access->check_permission('tiki_p_view_directory');
if (!isset($_REQUEST['siteId'])) {
$smarty->assign('msg', tra("No site indicated"));
$smarty->display("error.tpl");
......
......@@ -7,17 +7,8 @@
$section = 'directory';
require_once ('tiki-setup.php');
include_once ('lib/directory/dirlib.php');
if ($prefs['feature_directory'] != 'y') {
$smarty->assign('msg', tra("This feature is disabled") . ": feature_directory");
$smarty->display("error.tpl");
die;
}
if ($tiki_p_view_directory != 'y') {
$smarty->assign('errortype', 401);
$smarty->assign('msg', tra("Permission denied"));
$smarty->display("error.tpl");
die;
}
$access->check_feature('feature_directory');
$access->check_permission('tiki_p_view_directory');
$smarty->assign('words', $_REQUEST['words']);
$smarty->assign('where', $_REQUEST['where']);
$smarty->assign('how', $_REQUEST['how']);
......
......@@ -6,17 +6,8 @@
// $Id: /cvsroot/tikiwiki/tiki/tiki-directory_validate_sites.php,v 1.18 2007-10-12 07:55:26 nyloth Exp $
require_once ('tiki-setup.php');
include_once ('lib/directory/dirlib.php');
if ($prefs['feature_directory'] != 'y') {
$smarty->assign('msg', tra("This feature is disabled") . ": feature_directory");
$smarty->display("error.tpl");
die;
}
if ($tiki_p_validate_links != 'y') {
$smarty->assign('errortype', 401);
$smarty->assign('msg', tra("Permission denied"));
$smarty->display("error.tpl");
die;
}
$access->check_feature('feature_directory');
$access->check_permission('tiki_p_validate_links');
if (isset($_REQUEST["validate"]) && isset($_REQUEST['sites'])) {
check_ticket('dir-validate');
foreach(array_keys($_REQUEST["sites"]) as $siteId) {
......
......@@ -45,12 +45,7 @@ if ( isset($_GET['fileId']) && isset($_GET['thumbnail']) && isset($_COOKIE[ sess
if (!$skip) {
require_once('tiki-setup.php');
include_once('lib/filegals/filegallib.php');
if ( $prefs['feature_file_galleries'] != 'y' ) {
$smarty->assign('msg', tra('This feature is disabled'));
$smarty->display('error.tpl');
die;
}
$access->check_feature('feature_file_galleries');
}
if ( ! ini_get('safe_mode') ) {
......
......@@ -17,13 +17,7 @@ $smarty->assign('headtitle',tra('Edit article'));
if ($prefs['feature_freetags'] == 'y') {
global $freetaglib;include_once('lib/freetag/freetaglib.php');
}
if ($prefs['feature_articles'] != 'y') {
$smarty->assign('msg', tra("This feature is disabled").": feature_articles");
$smarty->display("error.tpl");
die;
}
$access->check_feature('feature_articles');
if ($tiki_p_admin != 'y') {
if ($tiki_p_use_HTML != 'y') {
......
......@@ -16,21 +16,8 @@ if (!isset($bannerlib)) {
$bannerlib = new BannerLib;
}
// CHECK FEATURE BANNERS AND ADMIN PERMISSION HERE
if ($prefs['feature_banners'] != 'y') {
$smarty->assign('msg', tra("This feature is disabled").": feature_banners");
$smarty->display("error.tpl");
die;
}
if ($tiki_p_admin_banners != 'y') {
$smarty->assign('errortype', 401);
$smarty->assign('msg', tra("You do not have permissions to edit banners"));
$smarty->display("error.tpl");
die;
}
$access->check_feature('feature_banners');
$access->check_permission('tiki_p_admin_banners');
if (isset($_REQUEST["bannerId"]) && $_REQUEST["bannerId"] > 0) {
$info = $bannerlib->get_banner($_REQUEST["bannerId"]);
......
......@@ -12,22 +12,8 @@ require_once ('tiki-setup.php');
include_once ('lib/blogs/bloglib.php');
$smarty->assign('headtitle',tra('Create Blog'));
if ($prefs['feature_blogs'] != 'y') {
$smarty->assign('msg', tra("This feature is disabled").": feature_blogs");
$smarty->display("error.tpl");
die;
}
// Now check permissions to access this page
if ($tiki_p_create_blogs != 'y') {
$smarty->assign('errortype', 401);
$smarty->assign('msg', tra("Permission denied you cannot create or edit blogs"));
$smarty->display("error.tpl");
die;
}
$access->check_feature('feature_blogs');
$access->check_permission('tiki_p_create_blogs');
if (isset($_REQUEST["blogId"])) {
$blogId = $_REQUEST["blogId"];
......
......@@ -45,21 +45,8 @@ if (!isset($prefs['feature_editcss']))
if (!isset($tiki_p_create_css))
$tiki_p_create_css = 'n';
if ($prefs['feature_editcss'] != 'y') {
$smarty->assign('msg', tra("Feature disabled"));
$smarty->display("error.tpl");
die;
}
if ($tiki_p_create_css != 'y') {
$smarty->assign('errortype', 401);
$smarty->assign('msg', tra("You do not have permission to use this feature"));
$smarty->display("error.tpl");
die;
}
$access->check_feature('feature_editcss');
$access->check_permission('tiki_p_create_css');
if (!isset($_REQUEST["editstyle"]))
$_REQUEST["editstyle"] = '';
......
......@@ -18,12 +18,7 @@ if ($prefs['feature_categories'] == 'y') {
}
}
if ($prefs['feature_galleries'] != 'y') {
$smarty->assign('msg', tra("This feature is disabled").": feature_galleries");
$smarty->display("error.tpl");
die;
}
$access->check_feature('feature_galleries');
// Sanity anyone?
if (!$_REQUEST['edit'] or !$_REQUEST['galleryId']) {
......@@ -35,14 +30,7 @@ if (!$_REQUEST['edit'] or !$_REQUEST['galleryId']) {
$tikilib->get_perm_object( $_REQUEST['galleryId'], 'image gallery' );
// Now check permissions to access this page
if ($tiki_p_upload_images != 'y') {
$smarty->assign('errortype', 401);
$smarty->assign('msg', tra("Permission denied you cannot edit images"));
$smarty->display("error.tpl");
die;
}
$access->check_permission('tiki_p_upload_images');
$imageId=$_REQUEST['edit'];
$foo = parse_url($_SERVER["REQUEST_URI"]);
......@@ -61,13 +49,7 @@ $smarty->assign('sort_mode', $sort_mode);
if (isset($_REQUEST["editimage"]) || isset($_REQUEST["editimage_andgonext"])) {
check_ticket('edit-image');
if ( $tiki_p_upload_images != 'y' ) {
$smarty->assign('errortype', 401);
$smarty->assign('msg', tra("Permission denied you cannot edit images"));
$smarty->display("error.tpl");
die;
}
$access->check_permission('tiki_p_upload_images');
if ($gal_info["thumbSizeX"] == 0)
$gal_info["thumbSizeX"] = 80;
......
......@@ -9,18 +9,8 @@
// Initialization
require_once ('tiki-setup.php');
if ($prefs['lang_use_db'] != 'y') {
$smarty->assign('msg', tra("This feature is disabled").": lang_use_db");
$smarty->display("error.tpl");
die;
}
if ($tiki_p_edit_languages != 'y') {
$smarty->assign('errortype', 401);
$smarty->assign('msg', tra("Permission denied to use this feature"));
$smarty->display("error.tpl");
die;
}
$access->check_feature('lang_use_db');
$access->check_permission('tiki_p_edit_languages');
// Create a language
if (isset($_REQUEST["createlang"])) {
......
......@@ -14,21 +14,8 @@ $auto_query_args = array('contentId','sort_mode','offset','find');
if (!isset($dcslib)) {
$dcslib = new DCSLib;
}
if ($prefs['feature_dynamic_content'] != 'y') {
$smarty->assign('msg', tra("This feature is disabled").": feature_dynamic_content");
$smarty->display("error.tpl");
die;
}
if ($tiki_p_admin_dynamic != 'y') {
$smarty->assign('errortype', 401);
$smarty->assign('msg', tra("You do not have permission to use this feature"));
$smarty->display("error.tpl");
die;
}
$access->check_feature('feature_dynamic_content');
$access->check_permission('tiki_p_admin_dynamic');
if (!isset($_REQUEST["contentId"])) {
$smarty->assign('msg', tra("No content id indicated"));
......
......@@ -11,13 +11,7 @@ require_once ('tiki-setup.php');
include_once ('lib/quizzes/quizlib.php');
$auto_query_args = array('sort_mode', 'offset', 'find', 'questionId', 'quizId', 'optionId');
if ($prefs['feature_quizzes'] != 'y') {
$smarty->assign('msg', tra("This feature is disabled").": feature_quizzes");
$smarty->display("error.tpl");
die;
}
$access->check_feature('feature_quizzes');
if (!isset($_REQUEST["questionId"])) {
$smarty->assign('msg', tra("No question indicated"));
......@@ -36,13 +30,7 @@ $smarty->assign('individual', 'n');
$tikilib->get_perm_object($_REQUEST["quizId"], 'quiz');
if ($tiki_p_admin_quizzes != 'y') {
$smarty->assign('errortype', 401);
$smarty->assign('msg', tra("You do not have permission to use this feature"));
$smarty->display("error.tpl");
die;
}
$access->check_permission('tiki_p_admin_quizzes');
if (!isset($_REQUEST["optionId"])) {
$_REQUEST["optionId"] = 0;
......
......@@ -9,12 +9,7 @@
require_once ('tiki-setup.php');
include_once ('lib/quizzes/quizlib.php');
if ($prefs['feature_quizzes'] != 'y') {
$smarty->assign('msg', tra("This feature is disabled").": feature_quizzes");
$smarty->display("error.tpl");
die;
}
$access->check_feature('feature_quizzes');
if (!isset($_REQUEST["quizId"])) {
$_REQUEST["quizId"] = 0;
......@@ -26,13 +21,7 @@ $smarty->assign('individual', 'n');
$tikilib->get_perm_object($_REQUEST["quizId"], 'quiz');
if ($tiki_p_admin_quizzes != 'y') {
$smarty->assign('errortype', 401);
$smarty->assign('msg', tra("You do not have permission to use this feature"));
$smarty->display("error.tpl");
die;
}
$access->check_permission('tiki_p_admin_quizzes');
$auto_query_args = array(
'quizId',
......
......@@ -11,13 +11,7 @@ require_once('tiki-setup.php');
include_once('lib/quizzes/quizlib.php');
$auto_query_args = array('quizId', 'questionId', 'sort_mode', 'offset', 'find');
if ($prefs['feature_quizzes'] != 'y') {
$smarty->assign('msg', tra("This feature is disabled").": feature_quizzes");
$smarty->display("error.tpl");
die;
}
$access->check_feature('feature_quizzes');
if (!isset($_REQUEST["quizId"])) {
$smarty->assign('msg', tra("No quiz indicated"));
......@@ -28,13 +22,7 @@ if (!isset($_REQUEST["quizId"])) {
$tikilib->get_perm_object($_REQUEST["quizId"], 'quiz');
if ($tiki_p_admin_quizzes != 'y') {
$smarty->assign('errortype', 401);
$smarty->assign('msg', tra("You don't have permission to use this feature"));
$smarty->display("error.tpl");
die;
}
$access->check_permission('tiki_p_admin_quizzes');
$smarty->assign('quizId', $_REQUEST["quizId"]);
......
......@@ -11,13 +11,7 @@ require_once ('tiki-setup.php');
include_once ('lib/quizzes/quizlib.php');
$auto_query_args = array('quizId', 'resultId', 'sort_mode', 'offset', 'find');
if ($prefs['feature_quizzes'] != 'y') {
$smarty->assign('msg', tra("This feature is disabled").": feature_quizzes");
$smarty->display("error.tpl");
die;
}
$access->check_feature('feature_quizzes');
if (!isset($_REQUEST["quizId"])) {
$smarty->assign('msg', tra("No quiz indicated"));
......@@ -29,14 +23,7 @@ if (!isset($_REQUEST["quizId"])) {
$tikilib->get_perm_object($_REQUEST["quizId"], 'quiz');
$smarty->assign('individual', 'n');
if ($tiki_p_admin_quizzes != 'y') {
$smarty->assign('errortype', 401);
$smarty->assign('msg', tra("You do not have permission to use this feature"));
$smarty->display("error.tpl");
die;
}
$access->check_permission('tiki_p_admin_quizzes');
$smarty->assign('quizId', $_REQUEST["quizId"]);
$quiz_info = $quizlib->get_quiz_result($_REQUEST["quizId"]);
......
......@@ -12,30 +12,14 @@ $section = 'wiki page';
require_once ('tiki-setup.php');
include_once ('lib/structures/structlib.php');
if($prefs['feature_wiki'] != 'y') {
$smarty->assign('msg', tra('This feature is disabled').': feature_wiki');
$smarty->display('error.tpl');
die;
}
if($prefs['feature_wiki_structure'] != 'y') {
$smarty->assign('msg', tra('This feature is disabled').': feature_wiki_structure');
$smarty->display('error.tpl');
die;
}
$access->check_feature('feature_wiki');
$access->check_feature('feature_wiki_structure');
if (!isset($_REQUEST["page_ref_id"])) {
$smarty->assign('msg', tra("No structure indicated"));
$smarty->display("error.tpl");
die;
}
if ($tiki_p_view != 'y') {
// This allows tiki_p_view in, in order to see structure tree - security hardening for editing features below.
$smarty->assign('errortype', 401);
$smarty->assign('msg', tra("You do not have permission to use this feature"));
$smarty->display("error.tpl");
die;
}
$access->check_permission('tiki_p_view');
if (isset($_REQUEST['move_to'])) {
check_ticket('edit-structure');
......
......@@ -14,22 +14,8 @@ include_once ('lib/articles/artlib.php');
if ($prefs['feature_freetags'] == 'y') {
include_once('lib/freetag/freetaglib.php');
}
if ($prefs['feature_submissions'] != 'y') {
$smarty->assign('msg', tra("This feature is disabled").": feature_submissions");
$smarty->display("error.tpl");
die;
}
// Now check permissions to access this page
if ($tiki_p_submit_article != 'y') {
$smarty->assign('errortype', 401);
$smarty->assign('msg', tra("Permission denied you cannot send submissions"));
$smarty->display("error.tpl");
die;
}
$access->check_feature('feature_submissions');
$access->check_permission('tiki_p_submit_article');
if ($tiki_p_admin != 'y') {
if ($tiki_p_use_HTML != 'y') {
......
......@@ -9,11 +9,7 @@
// Initialization
require_once ('tiki-setup.php');
if ($prefs['feature_edit_templates'] != 'y' && $prefs['feature_view_tpl'] != 'y') {
$smarty->assign('msg', tra("Feature disabled"));
$smarty->display("error.tpl");
die;
}
$access->check_feature(array('feature_edit_templates','feature_view_tpl'));
// you have to have the perm view and edit to continue:
// if view perm is set: continue
......
......@@ -4,21 +4,8 @@ $section = 'cms';
require_once('tiki-setup.php');
include_once('lib/articles/artlib.php');
if($prefs['feature_articles'] != 'y') {
$smarty->assign('msg', tra("This feature is disabled").": feature_articles");
$smarty->display("error.tpl");
die;
}
// PERMISSIONS: NEEDS p_admin
if($tiki_p_admin_cms != 'y') {
$smarty->assign('errortype', 401);
$smarty->assign('msg',tra("You do not have permission to use this feature"));
$smarty->display("error.tpl");
die;
}
$access->check_feature('feature_articles');
$access->check_permission('tiki_p_admin_cms');
if (!isset($_REQUEST["topicid"])) {
$smarty->assign('msg', tra("No topic id specified"));
......
......@@ -25,11 +25,7 @@ if ($tracesOn) {
execute_module_translation();
if ($prefs['feature_multilingual'] != 'y') {
$smarty->assign('msg', tra("This feature is disabled").": feature_multilingual");
$smarty->display("error.tpl");
die;
}
$access->check_feature('feature_multilingual');
if (isset($_REQUEST['page'])) {
$smarty->assign('page', $_REQUEST['page']);
......@@ -315,4 +311,4 @@ function execute_module_translation() {
$out = $modlib->execute_module( $module_reference );
$smarty->assign('content_of_update_translation_section', $out);
}
\ No newline at end of file
}
......@@ -11,11 +11,7 @@ if (isset($_REQUEST['type']))
require_once ('tiki-setup.php');
global $objectlib; include_once('lib/objectlib.php');
if ($prefs['feature_wiki'] != 'y') {
$smarty->assign('msg', tra("This feature is disabled").": feature_wiki");
$smarty->display("error.tpl");
die;
}
$access->check_feature('feature_wiki');
if (isset($_REQUEST['page']))
$_REQUEST['object'] = $_REQUEST['page'];
......
......@@ -133,11 +133,7 @@ function execute_module_translation() {
// Define all templates files that may be used with the 'zoom' feature
$zoom_templates = array('wiki_edit', 'tiki-editpage');
if ($prefs['feature_wiki'] != 'y') {
$smarty->assign('msg', tra('This feature is disabled').': feature_wiki');
$smarty->display('error.tpl');
die;
}
$access->check_feature('feature_wiki');
if ($editlib->isNewTranslationMode() || $editlib->isUpdateTranslationMode()) {
$translation_mode = 'y';
......
......@@ -12,12 +12,7 @@ $section = 'sheet';
require_once ('tiki-setup.php');
require_once ('lib/sheet/grid.php');
if ($prefs['feature_sheet'] != 'y') {
$smarty->assign('msg', tra("This feature is disabled").": feature_sheet");
$smarty->display("error.tpl");
die;
}
$access->check_feature('feature_sheet');
if ($tiki_p_admin != 'y' && $tiki_p_admin_sheet != 'y' && !$tikilib->user_has_perm_on_object($user, $_REQUEST['sheetId'], 'sheet', 'tiki_p_view_sheet')) {
$smarty->assign('msg', tra("Access Denied").": feature_sheet");
......
......@@ -29,12 +29,7 @@ $smarty->assign_by_ref('trackerId', $_REQUEST['trackerId']);
$smarty->assign_by_ref('tracker_info', $tracker_info);
$tikilib->get_perm_object($_REQUEST['trackerId'], 'tracker', $tracker_info);
if ($tiki_p_view_trackers != 'y') {
$smarty->assign('errortype', 401);
$smarty->assign('msg', tra('You do not have permission to use this feature'));
$smarty->display("error.tpl");
die;
}
$access->check_permission('tiki_p_view_trackers');
$filters = array();
if (!empty($_REQUEST['listfields'])) {
......
......@@ -40,12 +40,7 @@ if ($t = $trklib->get_tracker_options($_REQUEST['trackerId'])) {
}
$tikilib->get_perm_object($_REQUEST['trackerId'], 'tracker', $tracker_info);
if ($tiki_p_view_trackers != 'y') {
$smarty->assign('errortype', 401);
$smarty->assign('msg', tra('You do not have permission to use this feature'));
$smarty->display("error.tpl");
die;
}
$access->check_permission('tiki_p_view_trackers');
$filters = array();
if (!empty($_REQUEST['listfields'])) {
......
......@@ -12,12 +12,7 @@ require_once ('tiki-setup.php');
include_once ("lib/ziplib.php");
include_once ('lib/wiki/exportlib.php');
if ($tiki_p_admin_wiki != 'y' && $tiki_p_export_wiki != 'y') {
$smarty->assign('errortype', 401);
$smarty->assign('msg', tra("Permission denied"));
$smarty->display("error.tpl");
die;
}
$access->check_permission(array('tiki_p_admin_wiki','tiki_p_export_wiki'));
if (!isset($_REQUEST["page"])) {
$exportlib->MakeWikiZip();
......
......@@ -12,20 +12,8 @@ require_once ('tiki-setup.php');
include_once ('lib/faqs/faqlib.php');
if ($prefs['feature_faqs'] != 'y') {
$smarty->assign('msg', tra("This feature is disabled").": feature_faqs");
$smarty->display("error.tpl");
die;
}
if ($tiki_p_admin_faqs != 'y') {
$smarty->assign('errortype', 401);
$smarty->assign('msg', tra("You do not have permission to use this feature"));
$smarty->display("error.tpl");
die;
}
$access->check_feature('feature_faqs');
$access->check_permission('tiki_p_admin_faqs');
if (!isset($_REQUEST["faqId"])) {
$smarty->assign('msg', tra("No questions group indicated"));
......
......@@ -6,15 +6,9 @@
// All Rights Reserved. See copyright.txt for details and a complete list of authors.
// Licensed under the GNU LESSER GENERAL PUBLIC LICENSE. See license.txt for details.
require_once ('tiki-setup.php');
include_once ('lib/featured_links/flinkslib.php');
if ($prefs['feature_featuredLinks'] != 'y') {
$smarty->assign('msg', tra("This feature is disabled").": feature_featuredLinks");
$smarty->display("error.tpl");
die;