-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathtiki-admin_include_cms.php
executable file
·75 lines (68 loc) · 1.93 KB
/
tiki-admin_include_cms.php
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
<?php
// $Id: /cvsroot/tikiwiki/tiki/tiki-admin_include_cms.php,v 1.18.2.1 2007-12-14 16:42:07 sylvieg Exp $
// Copyright (c) 2002-2007, Luis Argerich, Garland Foster, Eduardo Polidor, et. al.
// 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.
//this script may only be included - so its better to die if called directly.
if (strpos($_SERVER["SCRIPT_NAME"],basename(__FILE__)) !== false) {
header("location: index.php");
exit;
}
if (isset($_REQUEST["cmsfeatures"])) {
check_ticket('admin-inc-cms');
$pref_toggles = array(
'feature_submissions',
'feature_cms_rankings',
'cms_spellcheck',
'feature_article_comments',
'feature_cms_templates',
'feature_cms_print',
'feature_cms_emails'
);
foreach ($pref_toggles as $toggle) {
simple_set_toggle ($toggle);
}
}
if (isset($_REQUEST["cmsprefs"])) {
check_ticket('admin-inc-cms');
simple_set_value ("maxArticles");
simple_set_value('art_home_title');
}
if (isset($_REQUEST["articlecomprefs"])) {
check_ticket('admin-inc-cms');
simple_set_value ("article_comments_per_page");
simple_set_value ("article_comments_default_ordering");
}
if (isset($_REQUEST['artlist'])) {
check_ticket('admin-inc-cms');
$pref_toggles = array(
'art_list_title',
'art_list_type',
'art_list_topic',
'art_list_date',
'art_list_expire',
'art_list_visible',
'art_list_lang',
'art_list_author',
'art_list_reads',
'art_list_size',
'art_list_img'
);
foreach ($pref_toggles as $toggle) {
simple_set_toggle ($toggle);
}
simple_set_int("art_list_title_len");
}
if (isset($_REQUEST['import'])) {
global $artlib; include_once('lib/articles/artlib.php');
check_ticket('admin-inc-cms');
$fname = $_FILES['csvlist']['tmp_name'];
$msgs = array();
$artlib->import_csv($fname, $msgs);
if (!empty($msgs)) {
print_r($msgs);
$smarty->assign_by_ref('msgs', $msgs);
}
}
ask_ticket('admin-inc-cms');
?>