-
Notifications
You must be signed in to change notification settings - Fork 3
/
Copy pathical.php
73 lines (55 loc) · 2.13 KB
/
ical.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
<?php
/**
* Main wiki script; see docs/design.txt
* @package MediaWiki
*/
$wgRequestTime = microtime();
# getrusage() does not exist on the Microsoft Windows platforms, catching this
if ( function_exists ( 'getrusage' ) ) {
$wgRUstart = getrusage();
} else {
$wgRUstart = array();
}
unset( $IP );
@ini_set( 'allow_url_fopen', 0 ); # For security...
if ( isset( $_REQUEST['GLOBALS'] ) ) {
die( '<a href="http://www.hardened-php.net/index.76.html">$GLOBALS overwrite vulnerability</a>');
}
# Valid web server entry point, enable includes.
# Please don't move this line to includes/Defines.php. This line essentially
# defines a valid entry point. If you put it in includes/Defines.php, then
# any script that includes it becomes an entry point, thereby defeating
# its purpose.
define( 'MEDIAWIKI', true );
# Load up some global defines.
require_once( '../../includes/Defines.php' );
# Include this site setttings
require_once( './LocalSettings.php' );
# Prepare MediaWiki
require_once( 'includes/Setup.php' );
require_once('extensions/CalendarClass.php');
require_once("extensions/WikiCalendarFormatIcal.php");
# Initialize MediaWiki base class
require_once( "includes/Wiki.php" );
$mediaWiki = new MediaWiki();
# Setting global variables in mediaWiki
$mediaWiki->setVal( 'Server', $wgServer );
$mediaWiki->setVal( 'DisableInternalSearch', $wgDisableInternalSearch );
$mediaWiki->setVal( 'action', $action );
$mediaWiki->setVal( 'SquidMaxage', $wgSquidMaxage );
$mediaWiki->setVal( 'EnableDublinCoreRdf', $wgEnableDublinCoreRdf );
$mediaWiki->setVal( 'EnableCreativeCommonsRdf', $wgEnableCreativeCommonsRdf );
$mediaWiki->setVal( 'CommandLineMode', $wgCommandLineMode );
$mediaWiki->setVal( 'UseExternalEditor', $wgUseExternalEditor );
$mediaWiki->setVal( 'DisabledActions', $wgDisabledActions );
header("Content-Type: text/plain;charset=us-ascii");
$cal = new WikiCalendarClass();
$cal->weekformat = new WikiCalendarFormatIcal();
$cal->name = "krass";
$cal->format = "%day.%month.%year";
$cal->formattitle = "%day.%month.%year";
$cal->skipempty = 0;
$cal->showempty = 1;
$cal->merge = array();
echo $cal->displayDays(60);
?>