Fast Velocity Minify - Version 2.6.9

Version Description

[2019.07.15] = * custom cache path permissions fix (thanks to @fariazz)

Download this release

Release Info

Developer Alignak
Plugin Icon 128x128 Fast Velocity Minify
Version 2.6.9
Comparing to
See all releases

Code changes from version 2.6.8 to 2.6.9

Files changed (3) hide show
  1. fvm.php +2 -2
  2. inc/functions-cache.php +7 -6
  3. readme.txt +4 -1
fvm.php CHANGED
@@ -5,7 +5,7 @@ Plugin URI: http://fastvelocity.com
5
  Description: Improve your speed score on GTmetrix, Pingdom Tools and Google PageSpeed Insights by merging and minifying CSS and JavaScript files into groups, compressing HTML and other speed optimizations.
6
  Author: Raul Peixoto
7
  Author URI: http://fastvelocity.com
8
- Version: 2.6.8
9
  License: GPL2
10
 
11
  ------------------------------------------------------------------------
@@ -303,7 +303,7 @@ function fastvelocity_min_files_callback() {
303
  $file = $cachedir.'/'.$file;
304
  $ext = pathinfo($file, PATHINFO_EXTENSION);
305
  if (in_array($ext, array('js', 'css'))) {
306
- $log = file_get_contents($file.'.txt');
307
  $mincss = substr($file, 0, -4).'.min.css';
308
  $minjs = substr($file, 0, -3).'.min.js';
309
  $filename = basename($file);
5
  Description: Improve your speed score on GTmetrix, Pingdom Tools and Google PageSpeed Insights by merging and minifying CSS and JavaScript files into groups, compressing HTML and other speed optimizations.
6
  Author: Raul Peixoto
7
  Author URI: http://fastvelocity.com
8
+ Version: 2.6.9
9
  License: GPL2
10
 
11
  ------------------------------------------------------------------------
303
  $file = $cachedir.'/'.$file;
304
  $ext = pathinfo($file, PATHINFO_EXTENSION);
305
  if (in_array($ext, array('js', 'css'))) {
306
+ $log = ''; if (file_exists($file.'.txt')) { $log = file_get_contents($file.'.txt'); }
307
  $mincss = substr($file, 0, -4).'.min.css';
308
  $minjs = substr($file, 0, -3).'.min.js';
309
  $filename = basename($file);
inc/functions-cache.php CHANGED
@@ -36,10 +36,11 @@ function fastvelocity_fix_permission_bits($file){
36
  function fvm_cachepath() {
37
 
38
  # custom directory
39
- $fvm_change_cache_path = get_option('fastvelocity_min_change_cache_path');
40
- $fvm_change_cache_base = get_option('fastvelocity_min_change_cache_base_url');
41
  $upload = array();
42
- if($fvm_change_cache_path !== false && $fvm_change_cache_base !== false && strlen($fvm_change_cache_path) > 1 && is_dir($fvm_change_cache_path) && is_writable(dirname($fvm_change_cache_path))) {
 
43
  $upload['basedir'] = trim($fvm_change_cache_path);
44
  $upload['baseurl'] = trim($fvm_change_cache_base);
45
  } else {
@@ -143,7 +144,7 @@ function fvm_purge_old() {
143
  $dir = $cachebaseparent.'/'.$d;
144
  if(is_dir($dir)) {
145
  fastvelocity_rrmdir($dir);
146
- if(is_dir($dir)) { rmdir($dir); }
147
  }
148
  }
149
  }
@@ -224,12 +225,12 @@ function fastvelocity_rrmdir($path) {
224
  if($f->isFile()){ unlink($f->getRealPath());
225
  } else if(!$f->isDot() && $f->isDir()){
226
  fastvelocity_rrmdir($f->getRealPath());
227
- if(is_dir($f->getRealPath())) { rmdir($f->getRealPath()); }
228
  }
229
  }
230
 
231
  # self
232
- if(is_dir($path)) { rmdir($path); }
233
  }
234
  }
235
 
36
  function fvm_cachepath() {
37
 
38
  # custom directory
39
+ $fvm_change_cache_path = trim(rtrim(get_option('fastvelocity_min_change_cache_path', ''), '/'));
40
+ $fvm_change_cache_base = trim(rtrim(get_option('fastvelocity_min_change_cache_base_url', ''), '/'));
41
  $upload = array();
42
+
43
+ if(strlen($fvm_change_cache_path) > 1 && strlen($fvm_change_cache_base) > 10 && is_dir($fvm_change_cache_path) && is_writable($fvm_change_cache_path)) {
44
  $upload['basedir'] = trim($fvm_change_cache_path);
45
  $upload['baseurl'] = trim($fvm_change_cache_base);
46
  } else {
144
  $dir = $cachebaseparent.'/'.$d;
145
  if(is_dir($dir)) {
146
  fastvelocity_rrmdir($dir);
147
+ if(is_dir($dir)) { @rmdir($dir); }
148
  }
149
  }
150
  }
225
  if($f->isFile()){ unlink($f->getRealPath());
226
  } else if(!$f->isDot() && $f->isDir()){
227
  fastvelocity_rrmdir($f->getRealPath());
228
+ if(is_dir($f->getRealPath())) { @rmdir($f->getRealPath()); }
229
  }
230
  }
231
 
232
  # self
233
+ if(is_dir($path)) { @rmdir($path); }
234
  }
235
  }
236
 
readme.txt CHANGED
@@ -3,7 +3,7 @@ Contributors: Alignak
3
  Tags: PHP Minify, Lighthouse, GTmetrix, Pingdom, Pagespeed, CSS Merging, JS Merging, CSS Minification, JS Minification, Speed Optimization, HTML Minification, Performance, Optimization, Speed, Fast
4
  Requires at least: 4.5
5
  Requires PHP: 5.5
6
- Stable tag: 2.6.8
7
  Tested up to: 5.2.2
8
  License: GPLv3 or later
9
  License URI: http://www.gnu.org/licenses/gpl-3.0.html
@@ -198,6 +198,9 @@ Please backup your site before updating. Version 3.0 will have a major code rewr
198
 
199
  == Changelog ==
200
 
 
 
 
201
  = 2.6.8 [2019.07.06] =
202
  * header preload fixes (thanks to @vandreev)
203
 
3
  Tags: PHP Minify, Lighthouse, GTmetrix, Pingdom, Pagespeed, CSS Merging, JS Merging, CSS Minification, JS Minification, Speed Optimization, HTML Minification, Performance, Optimization, Speed, Fast
4
  Requires at least: 4.5
5
  Requires PHP: 5.5
6
+ Stable tag: 2.6.9
7
  Tested up to: 5.2.2
8
  License: GPLv3 or later
9
  License URI: http://www.gnu.org/licenses/gpl-3.0.html
198
 
199
  == Changelog ==
200
 
201
+ = 2.6.9 [2019.07.15] =
202
+ * custom cache path permissions fix (thanks to @fariazz)
203
+
204
  = 2.6.8 [2019.07.06] =
205
  * header preload fixes (thanks to @vandreev)
206