Skip to content
GitLab
Menu
Projects
Groups
Snippets
/
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Menu
Open sidebar
RRZE Webteam
RRZE Cache
Commits
6ccce0c1
Commit
6ccce0c1
authored
Nov 25, 2021
by
Rolf Forst
Browse files
Merge branch 'dev' into 'master'
Dev See merge request
!20
parents
4f3f6e51
f69e4f81
Changes
3
Hide whitespace changes
Inline
Side-by-side
includes/Cache.php
View file @
6ccce0c1
...
...
@@ -31,11 +31,6 @@ class Cache
{
$this
->
setCacheFiles
();
if
(
apply_filters
(
'rrzecache_skip_cache'
,
false
))
{
Flush
::
flushCache
();
return
;
}
add_action
(
'init'
,
[
$this
,
'add_publish_hooks'
],
99
);
add_action
(
'pre_comment_approved'
,
[
$this
,
'pre_comment_approved'
],
99
,
2
);
add_action
(
'transition_comment_status'
,
[
$this
,
'transition_comment_status'
],
10
,
3
);
...
...
@@ -276,6 +271,10 @@ class Cache
return
true
;
}
if
(
apply_filters
(
'rrzecache_skip_cache'
,
false
))
{
return
true
;
}
if
(
is_search
()
||
is_404
()
||
is_feed
()
||
is_trackback
()
||
is_robots
()
||
is_preview
()
||
post_password_required
())
{
return
true
;
}
...
...
includes/File.php
View file @
6ccce0c1
...
...
@@ -197,7 +197,7 @@ final class File
protected
static
function
createFiles
(
string
$data
):
bool
{
$filePath
=
self
::
filePath
();
if
(
!
wp_mkdir_p
(
$filePath
))
{
if
(
!
$filePath
||
!
wp_mkdir_p
(
$filePath
))
{
do_action
(
'rrze.log.error'
,
__
(
'{plugin}: The directory could not be created.'
,
'rrze-cache'
),
[
'plugin'
=>
'rrze-cache'
,
'method'
=>
__METHOD__
,
'$filePath'
=>
$filePath
]);
return
false
;
}
...
...
@@ -252,7 +252,6 @@ final class File
parse_url
(
'http://'
.
strtolower
(
$_SERVER
[
'HTTP_HOST'
]),
PHP_URL_HOST
);
if
(
validate_file
(
$path
)
>
0
)
{
do_action
(
'rrze.log.error'
,
__
(
'{plugin}: Invalid file path.'
),
[
'plugin'
=>
'rrze-cache'
,
'method'
=>
__METHOD__
,
'$path'
=>
$path
]);
return
false
;
}
...
...
@@ -272,7 +271,6 @@ final class File
parse_url
((
$path
?
$path
:
$_SERVER
[
'REQUEST_URI'
]),
PHP_URL_PATH
);
if
(
validate_file
(
$path
)
>
0
)
{
do_action
(
'rrze.log.error'
,
__
(
'{plugin}: Invalid file path.'
,
'rrze-cache'
),
[
'plugin'
=>
'rrze-cache'
,
'method'
=>
__METHOD__
,
'$path'
=>
$path
]);
return
false
;
}
...
...
rrze-cache.php
View file @
6ccce0c1
...
...
@@ -4,7 +4,7 @@
Plugin Name: RRZE Cache
Plugin URI: https://gitlab.rrze.fau.de/rrze-webteam/rrze-cache
Description: Advanced cache management.
Version: 2.7.
2
Version: 2.7.
3
Author: RRZE-Webteam
Author URI: https://blogs.fau.de/webworking/
License: GNU General Public License v2
...
...
Write
Preview
Supports
Markdown
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment