mirror of
https://github.com/mainwp/mainwp-child.git
synced 2025-09-05 09:19:53 +08:00
fix backup issue
This commit is contained in:
parent
6c41b5b03b
commit
5907f65e06
4 changed files with 86 additions and 87 deletions
|
@ -595,11 +595,11 @@ class MainWP_Helper {
|
|||
|
||||
public static function endsWith( $haystack, $needle ) {
|
||||
$length = strlen( $needle );
|
||||
if ( 0 === $length ) {
|
||||
if ( 0 == $length ) {
|
||||
return true;
|
||||
}
|
||||
|
||||
return ( substr( $haystack, - $length ) === $needle );
|
||||
return ( substr( $haystack, - $length ) == $needle );
|
||||
}
|
||||
|
||||
public static function getNiceURL( $pUrl, $showHttp = false ) {
|
||||
|
@ -927,13 +927,13 @@ class MainWP_Helper {
|
|||
return false;
|
||||
}
|
||||
|
||||
if ( null !== $excludes ) {
|
||||
if ( null != $excludes ) {
|
||||
foreach ( $excludes as $exclude ) {
|
||||
if ( MainWP_Helper::endsWith( $exclude, '*' ) ) {
|
||||
if ( MainWP_Helper::startsWith( $value, substr( $exclude, 0, strlen( $exclude ) - 1 ) ) ) {
|
||||
return true;
|
||||
}
|
||||
} else if ( $value === $exclude ) {
|
||||
} else if ( $value == $exclude ) {
|
||||
return true;
|
||||
} else if ( MainWP_Helper::startsWith( $value, $exclude . '/' ) ) {
|
||||
return true;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue