Page Menu
Home
Phabricator
Search
Configure Global Search
Log In
Files
F1879948
cache.php
No One
Temporary
Actions
Download File
Edit File
Delete File
View Transforms
Subscribe
Mute Notifications
Size
1 KB
Subscribers
None
cache.php
View Options
<?php
/**
* DokuWiki DAVCal PlugIn - Ajax component
*/
if
(!
defined
(
'DOKU_INC'
))
die
();
class
action_plugin_davcard_cache
extends
DokuWiki_Action_Plugin
{
function
__construct
()
{
}
function
register
(
Doku_Event_Handler
$controller
)
{
$controller
->
register_hook
(
'PARSER_CACHE_USE'
,
'BEFORE'
,
$this
,
'handle_parser_cache_use'
);
}
function
handle_parser_cache_use
(
Doku_Event
$event
,
$param
)
{
$cache
=
&
$event
->
data
;
if
(!
isset
(
$cache
->
page
))
return
;
//purge only xhtml cache
if
(
$cache
->
mode
!=
"xhtml"
)
return
;
$meta
=
p_get_metadata
(
$cache
->
page
,
'plugin_davcard'
);
if
(
$meta
===
null
)
return
;
// Force re-caching if the webdavclient has synced
if
(
isset
(
$meta
[
'webdavclient'
]))
{
$wdc
=&
plugin_load
(
'helper'
,
'webdavclient'
);
if
(
is_null
(
$wdc
))
return
;
foreach
(
$meta
[
'webdavclient'
]
as
$connectionId
)
{
$cache
->
depends
[
'files'
][]
=
$wdc
->
getLastSyncChangeFileForConnection
(
$connectionId
);
}
}
}
}
File Metadata
Details
Attached
Mime Type
text/x-php
Expires
Thu, Jan 23, 6:33 PM (23 h, 28 m)
Storage Engine
blob
Storage Format
Raw Data
Storage Handle
925686
Default Alt Text
cache.php (1 KB)
Attached To
rDAVCARD DokuWiki davcard PlugIn
Event Timeline
Log In to Comment