Commit 903c9b79 authored by sept_7's avatar sept_7

[ENH] use access lib function for feature and permission checks

parent fa411966
......@@ -7,26 +7,8 @@
$section = 'user_messages';
require_once ('tiki-setup.php');
include_once ('lib/messu/messulib.php');
if (!$user) {
if ($prefs['feature_redirect_on_error'] == 'y') {
header('location: ' . $prefs['tikiIndex']);
die;
} else {
$smarty->assign('msg', tra("You are not logged in"));
$smarty->display("error.tpl");
die;
}
}
if ($prefs['feature_messages'] != 'y') {
if ($prefs['feature_redirect_on_error'] == 'y') {
header('location: ' . $prefs['tikiIndex']);
die;
} else {
$smarty->assign('msg', tra("This feature is disabled") . ": feature_messages");
$smarty->display("error.tpl");
die;
}
}
$access->check_user($user);
$access->check_feature('feature_messages');
$access->check_permission('tiki_p_messages');
$maxRecords = $messulib->get_user_preference($user, 'maxRecords', 20);
// Delete messages if the delete button was pressed
......
......@@ -7,28 +7,9 @@
$section = 'user_messages';
require_once ('tiki-setup.php');
include_once ('lib/messu/messulib.php');
if (!$user) {
if ($prefs['feature_redirect_on_error'] == 'y') {
header('location: ' . $prefs['tikiIndex']);
die;
} else {
$smarty->assign('msg', tra("You are not logged in"));
$smarty->display("error.tpl");
die;
}
}
if ($prefs['feature_messages'] != 'y') {
if ($prefs['feature_redirect_on_error'] == 'y') {
header('location: ' . $prefs['tikiIndex']);
die;
} else {
$smarty->assign('msg', tra("This feature is disabled") . ": feature_messages");
$smarty->display("error.tpl");
die;
}
}
$access->check_user($user);
$access->check_feature('feature_messages');
$access->check_permission('tiki_p_broadcast');
$auto_query_args = array('to', 'cc', 'bcc', 'subject', 'body', 'priority', 'replyto_hash', 'groupbr');
if (!isset($_REQUEST['to'])) $_REQUEST['to'] = '';
if (!isset($_REQUEST['cc'])) $_REQUEST['cc'] = '';
......
......@@ -7,26 +7,8 @@
$section = 'user_messages';
require_once ('tiki-setup.php');
include_once ('lib/messu/messulib.php');
if (!$user) {
if ($prefs['feature_redirect_on_error'] == 'y') {
header('location: ' . $prefs['tikiIndex']);
die;
} else {
$smarty->assign('msg', tra("You are not logged in"));
$smarty->display("error.tpl");
die;
}
}
if ($prefs['feature_messages'] != 'y') {
if ($prefs['feature_redirect_on_error'] == 'y') {
header('location: ' . $prefs['tikiIndex']);
die;
} else {
$smarty->assign('msg', tra("This feature is disabled") . ": feature_messages");
$smarty->display("error.tpl");
die;
}
}
$access->check_user($user);
$access->check_feature('feature_messages');
$access->check_permission('tiki_p_messages');
if ($prefs['allowmsg_is_optional'] == 'y') {
if ($tikilib->get_user_preference($user, 'allowMsgs', 'y') != 'y') {
......
......@@ -10,27 +10,8 @@ if ($prefs['feature_ajax'] == "y") {
require_once ('lib/ajax/ajaxlib.php');
}
include_once ('lib/messu/messulib.php');
if (!$user) {
if ($prefs['feature_redirect_on_error'] == 'y') {
header('location: ' . $prefs['tikiIndex']);
die;
} else {
$smarty->assign('msg', tra("You are not logged in"));
$smarty->assign('errortype', '402');
$smarty->display("error.tpl");
die;
}
}
if ($prefs['feature_messages'] != 'y') {
if ($prefs['feature_redirect_on_error'] == 'y') {
header('location: ' . $prefs['tikiIndex']);
die;
} else {
$smarty->assign('msg', tra("This feature is disabled") . ": feature_messages");
$smarty->display("error.tpl");
die;
}
}
$access->check_user($user);
$access->check_feature('feature_messages');
$access->check_permission('tiki_p_messages');
$maxRecords = $messulib->get_user_preference($user, 'mess_maxRecords', 20);
// auto-archiving of read mails?
......
......@@ -7,26 +7,8 @@
$section = 'user_messages';
require_once ('tiki-setup.php');
include_once ('lib/messu/messulib.php');
if (!$user) {
if ($prefs['feature_redirect_on_error'] == 'y') {
header('location: ' . $prefs['tikiIndex']);
die;
} else {
$smarty->assign('msg', tra("You are not logged in"));
$smarty->display("error.tpl");
die;
}
}
if ($prefs['feature_messages'] != 'y') {
if ($prefs['feature_redirect_on_error'] == 'y') {
header('location: ' . $prefs['tikiIndex']);
die;
} else {
$smarty->assign('msg', tra("This feature is disabled") . ": feature_messages");
$smarty->display("error.tpl");
die;
}
}
$access->check_user($user);
$access->check_feature('feature_messages');
$access->check_permission('tiki_p_messages');
if (isset($_REQUEST["delete"])) {
check_ticket('messu-read');
......
......@@ -7,26 +7,8 @@
$section = 'user_messages';
require_once ('tiki-setup.php');
include_once ('lib/messu/messulib.php');
if (!$user) {
if ($prefs['feature_redirect_on_error'] == 'y') {
header('location: ' . $prefs['tikiIndex']);
die;
} else {
$smarty->assign('msg', tra("You are not logged in"));
$smarty->display("error.tpl");
die;
}
}
if ($prefs['feature_messages'] != 'y') {
if ($prefs['feature_redirect_on_error'] == 'y') {
header('location: ' . $prefs['tikiIndex']);
die;
} else {
$smarty->assign('msg', tra("This feature is disabled") . ": feature_messages");
$smarty->display("error.tpl");
die;
}
}
$access->check_user($user);
$access->check_feature('feature_messages');
$access->check_permission('tiki_p_messages');
if (isset($_REQUEST["delete"])) {
......
......@@ -7,26 +7,8 @@
$section = 'user_messages';
require_once ('tiki-setup.php');
include_once ('lib/messu/messulib.php');
if (!$user) {
if ($prefs['feature_redirect_on_error'] == 'y') {
header('location: ' . $prefs['tikiIndex']);
die;
} else {
$smarty->assign('msg', tra("You are not logged in"));
$smarty->display("error.tpl");
die;
}
}
if ($prefs['feature_messages'] != 'y') {
if ($prefs['feature_redirect_on_error'] == 'y') {
header('location: ' . $prefs['tikiIndex']);
die;
} else {
$smarty->assign('msg', tra("This feature is disabled") . ": feature_messages");
$smarty->display("error.tpl");
die;
}
}
$access->check_user($user);
$access->check_feature('feature_messages');
$access->check_permission('tiki_p_messages');
if (isset($_REQUEST["delete"])) {
check_ticket('messu-read_sent');
......
......@@ -7,26 +7,8 @@
$section = 'user_messages';
require_once ('tiki-setup.php');
include_once ('lib/messu/messulib.php');
if (!$user) {
if ($prefs['feature_redirect_on_error'] == 'y') {
header('location: ' . $prefs['tikiIndex']);
die;
} else {
$smarty->assign('msg', tra("You are not logged in"));
$smarty->display("error.tpl");
die;
}
}
if ($prefs['feature_messages'] != 'y') {
if ($prefs['feature_redirect_on_error'] == 'y') {
header('location: ' . $prefs['tikiIndex']);
die;
} else {
$smarty->assign('msg', tra("This feature is disabled") . ": feature_messages");
$smarty->display("error.tpl");
die;
}
}
$access->check_user($user);
$access->check_feature('feature_messages');
$access->check_permission('tiki_p_messages');
$maxRecords = $messulib->get_user_preference($user, 'maxRecords', 20);
// Delete messages if the delete button was pressed
......
......@@ -11,12 +11,8 @@ $tikifeedback = array();
$auto_query_args = array(
'page'
);
if ($tiki_p_admin != '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');
function add_feedback( $name, $message, $st, $num = null ) {
global $tikifeedback;
$tikifeedback[] = array(
......
......@@ -16,14 +16,9 @@ include_once ('lib/commentslib.php');
include_once ('lib/categories/categlib.php');
include_once ('lib/contribution/contributionlib.php');
$commentslib = new Comments($dbTiki);
$access->check_user($user);
$access->check_feature('feature_actionlog');
if (empty($user) || ($tiki_p_view_actionlog != 'y' && $tiki_p_view_actionlog_owngroups != '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(array('tiki_p_view_actionlog', 'tiki_p_view_actionlog_owngroups'));
$auto_query_args = array(
'actionId',
'startDate_Day',
......
......@@ -7,18 +7,9 @@
require_once ('tiki-setup.php');
include_once ('lib/mailin/mailinlib.php');
//check if feature is on
if ($prefs['feature_mailin'] != 'y') {
$smarty->assign('msg', tra("This feature is disabled") . ": feature_mailin");
$smarty->display("error.tpl");
die;
}
//check permissions
if ($tiki_p_admin_mailin != 'y' and $tiki_p_admin != '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_mailin');
$access->check_permission(array('tiki_p_admin_mailin', 'tiki_p_admin'));
function account_ok($pop, $user, $pass) {
//include_once ("lib/webmail/pop3.php");
include_once ("lib/webmail/net_pop3.php");
......
......@@ -6,12 +6,7 @@
// $Id: /cvsroot/tikiwiki/tiki/tiki-admin_menu_options.php,v 1.31.2.3 2007-11-27 14:53:11 sylvieg Exp $
require_once ('tiki-setup.php');
include_once ('lib/menubuilder/menulib.php');
if ($tiki_p_admin != 'y' && $tiki_p_edit_menu_option != '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(array('tiki_p_admin', 'tiki_p_edit_menu_option'));
if (!isset($_REQUEST["menuId"])) {
$smarty->assign('msg', tra("No menu indicated"));
$smarty->display("error.tpl");
......
......@@ -11,12 +11,8 @@ $auto_query_args = array(
'sort_mode',
'menuId'
);
if ($tiki_p_admin != 'y' && $tiki_p_edit_menu != '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(array('tiki_p_admin', 'tiki_p_edit_menu'));
if (!isset($_REQUEST["menuId"])) {
$_REQUEST["menuId"] = 0;
}
......
......@@ -32,12 +32,8 @@ if (isset($_REQUEST['wysiwyg']) && $_REQUEST['wysiwyg'] == 'y') {
$smarty->assign('wysiwyg', 'y');
}
// PERMISSIONS: NEEDS p_admin
if ($tiki_p_admin != 'y' && $tiki_p_admin_modules != 'y') {
$smarty->assign('errortype', 401);
$smarty->assign('msg', tra('You do not have permission to use this feature'));
$smarty->display('error.tpl');
die;
}
$access->chack_permission(array('tiki_p_admin', 'tiki_p_admin_modules'));
$auto_query_args = array();
// Values for the user_module edit/create form
......
......@@ -17,11 +17,7 @@ $auto_query_args = array(
'offset_g',
'find_g'
);
if ($prefs['feature_newsletters'] != 'y') {
$smarty->assign('msg', tra("This feature is disabled") . ": feature_newsletters");
$smarty->display("error.tpl");
die;
}
$access->check_feature('feature_newsletters');
if (!isset($_REQUEST["nlId"])) {
$smarty->assign('msg', tra("No newsletter indicated"));
$smarty->display("error.tpl");
......@@ -45,12 +41,7 @@ if ($userlib->object_has_one_permission($_REQUEST["nlId"], 'newsletter')) {
}
}
}
if ($tiki_p_admin_newsletters != '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_newsletters');
if ($_REQUEST["nlId"]) {
$info = $nllib->get_newsletter($_REQUEST["nlId"]);
} else {
......
......@@ -7,11 +7,8 @@
// Initialization
$section = 'newsletters';
require_once ('tiki-setup.php');
if ($prefs['feature_newsletters'] != 'y') {
$smarty->assign('msg', tra("This feature is disabled") . ": feature_newsletters");
$smarty->display("error.tpl");
die;
}
$access->check_feature('feature_newsletters');
global $nllib;
include_once ('lib/newsletters/nllib.php');
$auto_query_args = array(
......
......@@ -29,12 +29,8 @@ $inputConfiguration = array(
// Initialization
require_once ('tiki-setup.php');
include_once ('lib/notifications/notificationlib.php');
if ($tiki_p_admin != 'y' && $tiki_p_admin_notifications != '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(array('tiki_p_admin', 'tiki_p_admin_notifications'));
$auto_query_args = array(
'offset',
'sort_mode',
......
......@@ -10,12 +10,8 @@ include_once ('lib/polls/polllib.php');
if (!isset($polllib)) {
$polllib = new PollLib;
}
if ($tiki_p_admin_polls != '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('tiki_p_admin_polls');
if (!isset($_REQUEST["pollId"])) {
$smarty->assign('msg', tra("No poll indicated"));
$smarty->display("error.tpl");
......
......@@ -9,17 +9,8 @@ include_once ('lib/polls/polllib.php');
if (!isset($polllib)) {
$polllib = new PollLib;
}
if ($prefs['feature_polls'] != 'y') {
$smarty->assign('msg', tra("This feature is disabled") . ": feature_polls");
$smarty->display("error.tpl");
die;
}
if ($tiki_p_admin_polls != '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_polls');
$access->check_permission('tiki_p_admin_polls');
$auto_query_args = array('pollId', 'sort_mode', 'offset', 'find');
......
......@@ -16,12 +16,8 @@ $auto_query_args = array(
if (!isset($rsslib)) {
$rsslib = new RssLib;
}
if ($tiki_p_admin_rssmodules != '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_rssmodules');
if (isset($_REQUEST["rssId"])) {
$smarty->assign('rssId', $_REQUEST["rssId"]);
}
......
......@@ -7,12 +7,8 @@
require_once ('tiki-setup.php');
// do we need it?
require_once ('lib/admin/adminlib.php');
if ($tiki_p_admin != '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');
// get all dangerous php settings and check them
$phpsettings = array();
// register globals
......
......@@ -9,17 +9,9 @@
// Initialization
require_once ('tiki-setup.php');
include_once ('lib/shoutbox/shoutboxlib.php');
if ($prefs['feature_shoutbox'] != 'y') {
$smarty->assign('msg', tra("This feature is disabled") . ": feature_shoutbox");
$smarty->display("error.tpl");
die;
}
if ($tiki_p_admin_shoutbox != 'y') {
$smarty->assign('errortype', 401);
$smarty->assign('msg', tra("You do not have permission to use this feature"));
$smarty->display("error.tpl");
die;
}
$access->cheack_feature('feature_shoutbox');
$access->check_ermission('tiki_p_admin_shoutbox');
// Do the add bad word form here
if (isset($_REQUEST["add"])) {
check_ticket('admin-shoutboxwords');
......
......@@ -9,23 +9,9 @@ require_once ('tiki-setup.php');
include_once ('lib/structures/structlib.php');
include_once ('lib/categories/categlib.php');
include_once ("lib/ziplib.php");
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;
}
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(array('feature_wiki', 'feature_wiki_structure'));
$access->check_permission('tiki_p_view');
// start security hardened section
if ($tiki_p_edit_structures == 'y') {
if (isset($_REQUEST['rremove'])) {
......
......@@ -14,11 +14,8 @@ $auto_query_args = array(
'sort_mode',
'maxRecords'
);
if ($prefs['feature_surveys'] != 'y') {
$smarty->assign('msg', tra("This feature is disabled") . ": feature_surveys");
$smarty->display("error.tpl");
die;
}
$access->check_feature('feature_surveys');
if (!isset($_REQUEST["surveyId"])) {
$smarty->assign('msg', tra("No survey indicated"));
$smarty->display("error.tpl");
......@@ -42,12 +39,8 @@ if ($userlib->object_has_one_permission($_REQUEST["surveyId"], 'survey')) {
}
}
}
if ($tiki_p_admin_surveys != '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_surveys');
$survey_info = $srvlib->get_survey($_REQUEST["surveyId"]);
$smarty->assign('survey_info', $survey_info);
if (!isset($_REQUEST["questionId"])) {
......
......@@ -7,11 +7,7 @@
$section = 'surveys';
require_once ('tiki-setup.php');
include_once ('lib/surveys/surveylib.php');
if ($prefs['feature_surveys'] != 'y') {
$smarty->assign('msg', tra("This feature is disabled") . ": feature_surveys");
$smarty->display("error.tpl");
die;
}
$access->check_feature('feature_surveys');
$auto_query_args = array(
'surveyId',
......@@ -42,12 +38,7 @@ if ($userlib->object_has_one_permission($_REQUEST["surveyId"], 'survey')) {
}
}
}
if ($tiki_p_admin_surveys != '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_surveys');
if (isset($_REQUEST["save"])) {
check_ticket('admin-surveys');
$sid = $srvlib->replace_survey($_REQUEST["surveyId"], $_REQUEST["name"], $_REQUEST["description"], $_REQUEST["status"]);
......
......@@ -5,12 +5,8 @@
// Licensed under the GNU LESSER GENERAL PUBLIC LICENSE. See license.txt for details.
// $Id: /cvsroot/tikiwiki/tiki/tiki-admin_system.php,v 1.28.2.5 2008/03/24 14:51:10 sylvieg Exp $
require_once ('tiki-setup.php');
if ($tiki_p_admin != 'y' && $tiki_p_clean_cache != 'y') { // admin test needed for the first inclusion of this perm before clearing the cache
$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(array('tiki_p_admin', 'tiki_p_clean_cache'));
$done = '';
$output = '';
$buf = '';
......
......@@ -20,12 +20,7 @@ require_once 'tiki-setup.php';
require_once 'lib/toolbars/toolbarslib.php';
$access->check_permission('tiki_p_admin');
if ($prefs['javascript_enabled'] != 'y') {
$smarty->assign('msg', tra("JavaScript is required for this page"));
$smarty->display("error.tpl");
die;
}
$access->check_feature('javascript_enabled');
$sections = array( 'global', 'wiki page', 'trackers', 'blogs', 'calendar', 'cms', 'faqs', 'newsletters', 'forums', 'maps', 'admin');
......
......@@ -8,18 +8,10 @@ $section = 'cms';
require_once ('tiki-setup.php');
include_once ('lib/articles/artlib.php');
$smarty->assign('headtitle', tra('Admin topics'));
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');
// PERMISSIONS: NEEDS p_admin or tiki_p_articles_admin_topics
if ($tiki_p_admin_cms != 'y' && $tiki_p_articles_admin_topics != '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(arrey('tiki_p_admin_cms', 'tiki_p_articles_admin_topics'));
if (isset($_REQUEST["addtopic"])) {
check_ticket('admin-topics');
if (isset($_FILES['userfile1']) && is_uploaded_file($_FILES['userfile1']['tmp_name'])) {
......
......@@ -7,11 +7,7 @@
require_once ('tiki-setup.php');
include_once ('lib/trackers/trackerlib.php');
if ($prefs['feature_trackers'] != 'y') {
$smarty->assign('msg', tra('This feature is disabled') . ': feature_trackers');
$smarty->display('error.tpl');
die;
}
$access->check_feature('feature_trackers');
if (!isset($_REQUEST['trackerId'])) {
$smarty->assign('msg', tra('No tracker indicated'));
......
......@@ -7,17 +7,8 @@
require_once ('tiki-setup.php');
include_once ('lib/trackers/trackerlib.php');
include_once ('lib/groupalert/groupalertlib.php');
if ($prefs['feature_trackers'] != 'y') {
$smarty->assign('msg', tra("This feature is disabled") . ": feature_trackers");
$smarty->display("error.tpl");
die;
}
if ($tiki_p_admin_trackers != 'y') {
$smarty->assign('errortype', 401);
$smarty->assign('msg', tra("You don't have permission to use this feature"));
$smarty->display("error.tpl");
die;
}
$acess->check_feature('feature_trackers');
$acess->check_permission('tiki_p_admin_trackers');
$auto_query_args = array();
if (!isset($_REQUEST["trackerId"])) {
......
......@@ -6,12 +6,11 @@
// $Id: /cvsroot/tikiwiki/tiki/tiki-adminusers.php,v 1.76.2.6 2008-03-13 16:54:36 sylvieg Exp $
$tikifeedback = array();
require_once ('tiki-setup.php');
if (!($tiki_p_admin == 'y' || $tiki_p_admin_users == 'y')) { // temporary patch: tiki_p_admin includes tiki_p_admin_users but if you don't clean the temp/cache each time you sqlupgrade the perms setting is not synchornous with the cache
$smarty->assign('errortype', 401);
$smarty->assign('msg', tra("You do not have permission to use this feature"));
$smarty->display("error.tpl");
die;
}
// temporary patch: tiki_p_admin includes tiki_p_admin_users but if you don't
// clean the temp/cache each time you sqlupgrade the perms setting is not
// synchornous with the cache
$access->check_permission(array('tiki_p_admin', 'tiki_p_admin_users'));
if ($tiki_p_admin != 'y') {
$userGroups = $userlib->get_user_groups_inclusion($user);
$smarty->assign_by_ref('userGroups', $userGroups);
......
......@@ -7,17 +7,7 @@ include_once('lib/multilingual/multilinguallib.php');
include_once('lib/wiki/wikilib.php');
include_once('lib/wiki/renderlib.php');
if ($prefs['feature_multilingual'] != 'y') {
$smarty->assign('msg', tra("This feature is disabled").": feature_multilingual");
$smarty->display("error.tpl");
die;
}
if ($prefs['feature_multilingual_one_page'] != 'y') {
$smarty->assign('msg', tra("This feature is disabled").": feature_multilingual_one_page");
$smarty->display("error.tpl");
die;
}
$access->check_feature(array('feature_multilingual', 'feature_multilingual_one_page'));
if( !isset($_REQUEST['page']) ) {
header('Location: tiki-index.php');
......
......@@ -17,19 +17,7 @@ if ($prefs['feature_multilingual'] == 'y') {
include_once("lib/multilingual/multilinguallib.php");
}