Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- Index: w3-total-cache/lib/W3/Plugin/PgCache.php
- ===================================================================
- --- w3-total-cache/lib/W3/Plugin/PgCache.php (revision 249851)
- +++ w3-total-cache/lib/W3/Plugin/PgCache.php (working copy)
- @@ -139,7 +139,7 @@
- $this->_config->save();
- } else {
- if (!w3_is_wpmu() && !$this->write_rules_core()) {
- - w3_writable_error(ABSPATH . '.htaccess');
- + w3_writable_error(get_home_path() . '.htaccess');
- }
- if (!$this->write_rules_cache()) {
- @@ -614,7 +614,7 @@
- */
- function write_rules_core()
- {
- - $path = ABSPATH . '.htaccess';
- + $path = get_home_path() . '.htaccess';
- if (file_exists($path)) {
- if (($data = @file_get_contents($path)) !== false) {
- @@ -699,7 +699,7 @@
- */
- function remove_rules_core()
- {
- - $path = ABSPATH . '.htaccess';
- + $path = get_home_path() . '.htaccess';
- if (file_exists($path)) {
- if (($data = @file_get_contents($path)) !== false) {
- @@ -733,7 +733,7 @@
- */
- function check_rules_core()
- {
- - $path = ABSPATH . '.htaccess';
- + $path = get_home_path() . '.htaccess';
- $search = $this->generate_rules_core();
- return (($data = @file_get_contents($path)) && strstr(w3_clean_rules($data), w3_clean_rules($search)) !== false && $this->check_rules_wp());
- @@ -763,7 +763,7 @@
- return true;
- }
- - $path = ABSPATH . '/.htaccess';
- + $path = get_home_path() . '.htaccess';
- return (($data = @file_get_contents($path)) && preg_match('~# BEGIN WordPress.*# END WordPress~s', w3_clean_rules($data)));
- }
- Index: w3-total-cache/lib/W3/Plugin/TotalCache.php
- ===================================================================
- --- w3-total-cache/lib/W3/Plugin/TotalCache.php (revision 249851)
- +++ w3-total-cache/lib/W3/Plugin/TotalCache.php (working copy)
- @@ -1277,7 +1277,7 @@
- {
- $pgcache_rules_core = '';
- $pgcache_rules_cache = '';
- - $pgcache_htaccess_core = ABSPATH . '.htaccess';
- + $pgcache_htaccess_core = get_home_path() . '.htaccess';
- $pgcache_htaccess_cache = W3TC_CACHE_FILE_PGCACHE_DIR . '/.htaccess';
- $minify_rules = '';
- Index: w3-total-cache/inc/define.php
- ===================================================================
- --- w3-total-cache/inc/define.php (revision 249851)
- +++ w3-total-cache/inc/define.php (working copy)
- @@ -37,11 +37,11 @@
- define('W3TC_PREFIX', (W3TC_BLOGNAME != '' ? '-' . W3TC_BLOGNAME : ''));
- defined('WP_CONTENT_DIR') || define('WP_CONTENT_DIR', realpath(W3TC_DIR . '/../..'));
- -define('WP_CONTENT_DIR_NAME', basename(WP_CONTENT_DIR));
- -define('W3TC_CONTENT_DIR_NAME', WP_CONTENT_DIR_NAME . '/w3tc' . W3TC_PREFIX);
- -define('W3TC_CONTENT_DIR', ABSPATH . W3TC_CONTENT_DIR_NAME);
- +define('WP_CONTENT_DIR_NAME', basename(WP_CONTENT_DIR)); // irrelevant?
- +define('W3TC_CONTENT_DIR_NAME', 'w3tc' . W3TC_PREFIX);
- +define('W3TC_CONTENT_DIR', WP_CONTENT_DIR . '/' . W3TC_CONTENT_DIR_NAME);
- define('W3TC_CONTENT_MINIFY_DIR_NAME', W3TC_CONTENT_DIR_NAME . '/min');
- -define('W3TC_CONTENT_MINIFY_DIR', ABSPATH . W3TC_CONTENT_DIR_NAME . '/min');
- +define('W3TC_CONTENT_MINIFY_DIR', W3TC_CONTENT_DIR . '/min');
- define('W3TC_CACHE_FILE_DBCACHE_DIR', W3TC_CONTENT_DIR . '/dbcache');
- define('W3TC_CACHE_FILE_PGCACHE_DIR', W3TC_CONTENT_DIR . '/pgcache');
- define('W3TC_CACHE_FILE_MINIFY_DIR', W3TC_CONTENT_DIR . '/min');
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement