-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathtiki-admin_include_blogs.php
executable file
·77 lines (63 loc) · 2.08 KB
/
tiki-admin_include_blogs.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
76
77
<?php
// $Id: /cvsroot/tikiwiki/tiki/tiki-admin_include_blogs.php,v 1.20.2.1 2007-10-20 05:21:41 pkdille 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["blogset"]) && isset($_REQUEST["homeBlog"])) {
check_ticket('admin-inc-blogs');
$tikilib->set_preference("home_blog", $_REQUEST["homeBlog"]);
}
if (isset($_REQUEST["blogfeatures"])) {
check_ticket('admin-inc-blogs');
$pref_toggles = array(
"feature_blog_rankings",
"blog_spellcheck",
"feature_blog_comments",
"feature_blogposts_comments",
"feature_blog_heading",
"feature_trackbackpings",
"feature_blogposts_pings"
);
foreach ($pref_toggles as $toggle) {
simple_set_toggle ($toggle);
}
simple_set_value ("blog_list_order");
simple_set_value ("blog_list_user");
simple_set_value ('feature_blog_mandatory_category');
}
if (isset($_REQUEST['bloglistconf'])) {
check_ticket('admin-inc-blogs');
$pref_toggles = array(
"blog_list_title",
"blog_list_description",
"blog_list_activity",
"blog_list_visits",
"blog_list_posts",
"blog_list_created",
"blog_list_lastmodif"
);
foreach ($pref_toggles as $toggle) {
simple_set_toggle ($toggle);
}
simple_set_value ("blog_list_user");
simple_set_int("blog_list_title_len");
}
if (isset($_REQUEST["blogcomprefs"])) {
check_ticket('admin-inc-blogs');
simple_set_value ("blog_comments_per_page");
simple_set_value ("blog_comments_default_ordering");
}
if ($prefs['feature_categories'] == 'y') {
include_once('lib/categories/categlib.php');
$catree = $categlib->get_all_categories();
$smarty->assign('catree', $catree);
}
ask_ticket('admin-inc-blogs');
$blogs = $tikilib->list_blogs(0, -1, 'created_desc', '');
$smarty->assign_by_ref('blogs', $blogs["data"]);
?>