Page Menu
Home
Phabricator
Search
Configure Global Search
Log In
Files
F1879102
disable.php
No One
Temporary
Actions
Download File
Edit File
Delete File
View Transforms
Subscribe
Mute Notifications
Size
797 B
Subscribers
None
disable.php
View Options
<?php
/**
* DokuWiki DAVCal PlugIn - Disable component
*/
if
(!
defined
(
'DOKU_INC'
))
die
();
class
action_plugin_davcal_disable
extends
DokuWiki_Action_Plugin
{
/**
* @var helper_plugin_davcal
*/
private
$hlp
=
null
;
function
__construct
()
{
$this
->
hlp
=&
plugin_load
(
'helper'
,
'davcal'
);
}
function
register
(
Doku_Event_Handler
$controller
)
{
$controller
->
register_hook
(
'IO_WIKIPAGE_WRITE'
,
'BEFORE'
,
$this
,
'handle_wikipage_write'
);
}
function
handle_wikipage_write
(&
$event
,
$param
)
{
$data
=
$event
->
data
;
if
(
strpos
(
$data
[
0
][
1
],
'{{davcal'
)
!==
false
)
return
;
// Plugin is still enabled
$id
=
ltrim
(
$data
[
1
].
':'
.
$data
[
2
],
':'
);
$this
->
hlp
->
disableCalendarForPage
(
$id
);
}
};
File Metadata
Details
Attached
Mime Type
text/x-php
Expires
Thu, Jan 23, 6:10 PM (8 h, 21 m ago)
Storage Engine
blob
Storage Format
Raw Data
Storage Handle
901528
Default Alt Text
disable.php (797 B)
Attached To
rDAVCAL DokuWiki DAVCal PlugIn
Event Timeline
Log In to Comment