WP Photo Album Plus - Version 6.7.04

Version Description

Download this release

Release Info

Developer opajaap
Plugin Icon wp plugin WP Photo Album Plus
Version 6.7.04
Comparing to
See all releases

Code changes from version 6.7.03 to 6.7.04

readme.txt CHANGED
@@ -2,8 +2,8 @@
2
  Contributors: opajaap
3
  Donate link: https://www.paypal.com/cgi-bin/webscr?cmd=_donations&business=OpaJaap@OpaJaap.nl&item_name=WP-Photo-Album-Plus&item_number=Support-Open-Source&currency_code=USD&lc=US
4
  Tags: photo, album, slideshow, video, audio, lightbox, iptc, exif, cloudinary, fotomoto, imagemagick, pdf
5
- Version: 6.7.03
6
- Stable tag: 6.7.02
7
  Author: J.N. Breetvelt
8
  Author URI: http://www.opajaap.nl/
9
  Requires at least: 3.9
@@ -131,6 +131,18 @@ The tokens must be at least 3 characters in length.
131
 
132
  See for additional information: <a href="http://www.wppa.nl/changelog/" >The documentation website</a>
133
 
 
 
 
 
 
 
 
 
 
 
 
 
134
  = 6.7.03 =
135
 
136
  = Bug Fixes =
2
  Contributors: opajaap
3
  Donate link: https://www.paypal.com/cgi-bin/webscr?cmd=_donations&business=OpaJaap@OpaJaap.nl&item_name=WP-Photo-Album-Plus&item_number=Support-Open-Source&currency_code=USD&lc=US
4
  Tags: photo, album, slideshow, video, audio, lightbox, iptc, exif, cloudinary, fotomoto, imagemagick, pdf
5
+ Version: 6.7.04
6
+ Stable tag: 6.7.03
7
  Author: J.N. Breetvelt
8
  Author URI: http://www.opajaap.nl/
9
  Requires at least: 3.9
131
 
132
  See for additional information: <a href="http://www.wppa.nl/changelog/" >The documentation website</a>
133
 
134
+ = 6.7.04 =
135
+
136
+ = Bug Fixes =
137
+
138
+ * Fixed a filesystem rights issue.
139
+ * Table IV-A18: cretae .htaccess file now works as expected.
140
+
141
+ = Other Changes =
142
+
143
+ * Fixed photo search form for mis-behaving themes like weaver ii.
144
+ * Logging of filesystem events. Table IX-A9.4.
145
+
146
  = 6.7.03 =
147
 
148
  = Bug Fixes =
theme/wppa-style.css CHANGED
@@ -478,5 +478,8 @@ display:none;
478
  }
479
 
480
  .wppa-searchsel-item label {
481
- display:inline !important;
 
 
 
482
  }
478
  }
479
 
480
  .wppa-searchsel-item label {
481
+ display:inline;
482
+ }
483
+ .wppa-searchsel-item .screen-reader-text {
484
+ display:none;
485
  }
wppa-ajax.php CHANGED
@@ -2,7 +2,7 @@
2
  /* wppa-ajax.php
3
  *
4
  * Functions used in ajax requests
5
- * Version 6.7.01
6
  *
7
  */
8
 
@@ -3043,10 +3043,6 @@ global $wppa_log_file;
3043
  }
3044
  break;
3045
 
3046
- case 'wppa_cre_uploads_htaccess':
3047
- wppa_create_wppa_htaccess();
3048
- break;
3049
-
3050
  case 'wppa_search_numbers_void':
3051
  case 'wppa_index_ignore_slash':
3052
  ob_start();
@@ -3130,6 +3126,10 @@ global $wppa_log_file;
3130
  // Something to do after changing the setting?
3131
  wppa_initialize_runtime( true ); // force reload new values
3132
 
 
 
 
 
3133
  // Thumbsize
3134
  $new_minisize = wppa_get_minisize();
3135
  if ( $old_minisize != $new_minisize ) {
2
  /* wppa-ajax.php
3
  *
4
  * Functions used in ajax requests
5
+ * Version 6.7.04
6
  *
7
  */
8
 
3043
  }
3044
  break;
3045
 
 
 
 
 
3046
  case 'wppa_search_numbers_void':
3047
  case 'wppa_index_ignore_slash':
3048
  ob_start();
3126
  // Something to do after changing the setting?
3127
  wppa_initialize_runtime( true ); // force reload new values
3128
 
3129
+ if ( $option == 'wppa_cre_uploads_htaccess' ) {
3130
+ wppa_create_wppa_htaccess();
3131
+ }
3132
+
3133
  // Thumbsize
3134
  $new_minisize = wppa_get_minisize();
3135
  if ( $old_minisize != $new_minisize ) {
wppa-boxes-html.php CHANGED
@@ -3,7 +3,7 @@
3
  * Package: wp-photo-album-plus
4
  *
5
  * Various wppa boxes
6
- * Version 6.7.03
7
  *
8
  */
9
 
@@ -277,12 +277,47 @@ global $wppa_session;
277
  // form core
278
  $form_core = get_search_form( false );
279
 
280
- // Fix it
281
- $form_core = strip_tags( $form_core, '<input><span><button><label><svg><use>' );
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
282
  $form_core = str_replace( 'for="s"', 'for="wppa_s-'.$mocc.'"', $form_core );
283
  $form_core = str_replace( 'id="s"', 'id="wppa_s-'.$mocc.'"', $form_core );
284
  $form_core = str_replace( 'name="s"', 'name="wppa-searchstring"', $form_core );
 
 
285
  $form_core = str_replace( 'value=""', 'value="' . esc_attr( isset( $_REQUEST['wppa-searchstring'] ) ? $_REQUEST['wppa-searchstring'] : '' ) . '"', $form_core );
 
 
286
  $form_core = preg_replace( '/placeholder=\"[^\"]*/', 'placeholder="' . esc_attr( __( 'Search photos &hellip;', 'wp-photo-album-plus' ) ), $form_core );
287
 
288
  // Insert
3
  * Package: wp-photo-album-plus
4
  *
5
  * Various wppa boxes
6
+ * Version 6.7.04
7
  *
8
  */
9
 
277
  // form core
278
  $form_core = get_search_form( false );
279
 
280
+ // Themes like weaver ii return nothing at this point. Some do echo get_search_form(), try this first
281
+ ob_start();
282
+ get_search_form();
283
+ $form_core = ob_get_clean();
284
+
285
+ // If still no luck, use wp default
286
+ if ( ! $form_core ) {
287
+ $format = current_theme_supports( 'html5', 'search-form' ) ? 'html5' : 'xhtml';
288
+ $format = apply_filters( 'search_form_format', $format );
289
+
290
+ if ( 'html5' == $format ) {
291
+ $form_core = '<form role="search" method="get" class="search-form" action="' . esc_url( home_url( '/' ) ) . '">
292
+ <label>
293
+ <span class="screen-reader-text">' . _x( 'Search for:', 'label' ) . '</span>
294
+ <input type="search" class="search-field" placeholder="' . esc_attr_x( 'Search &hellip;', 'placeholder' ) . '" value="' . get_search_query() . '" name="s" />
295
+ </label>
296
+ <input type="submit" class="search-submit" value="'. esc_attr_x( 'Search', 'submit button' ) .'" />
297
+ </form>';
298
+ } else {
299
+ $form_core = '<form role="search" method="get" id="searchform" class="searchform" action="' . esc_url( home_url( '/' ) ) . '">
300
+ <div>
301
+ <label class="screen-reader-text" for="s">' . _x( 'Search for:', 'label' ) . '</label>
302
+ <input type="text" value="' . get_search_query() . '" name="s" id="s" />
303
+ <input type="submit" id="searchsubmit" value="'. esc_attr_x( 'Search', 'submit button' ) .'" />
304
+ </div>
305
+ </form>';
306
+ }
307
+ }
308
+
309
+ // Remove form tag, we are already in a form
310
+ $form_core = preg_replace( array( '/<form[^>]*>/siu', '/<\/form[^>]*>/siu' ), '', $form_core );
311
+
312
+ // Fix id and name
313
  $form_core = str_replace( 'for="s"', 'for="wppa_s-'.$mocc.'"', $form_core );
314
  $form_core = str_replace( 'id="s"', 'id="wppa_s-'.$mocc.'"', $form_core );
315
  $form_core = str_replace( 'name="s"', 'name="wppa-searchstring"', $form_core );
316
+
317
+ // Fix previous input
318
  $form_core = str_replace( 'value=""', 'value="' . esc_attr( isset( $_REQUEST['wppa-searchstring'] ) ? $_REQUEST['wppa-searchstring'] : '' ) . '"', $form_core );
319
+
320
+ // Fix placeholder
321
  $form_core = preg_replace( '/placeholder=\"[^\"]*/', 'placeholder="' . esc_attr( __( 'Search photos &hellip;', 'wp-photo-album-plus' ) ), $form_core );
322
 
323
  // Insert
wppa-htaccess.php CHANGED
@@ -3,7 +3,7 @@
3
  * Package: wp-photo-album-plus
4
  *
5
  * Various funcions
6
- * Version 6.7.01
7
  *
8
  */
9
 
@@ -32,6 +32,10 @@ function wppa_create_wppa_htaccess_( $filename ) {
32
  fwrite( $file, "\n" . 'Order Allow,Deny' );
33
  fwrite( $file, "\n" . 'Allow from all' );
34
  fclose( $file );
 
 
 
 
35
  }
36
  break;
37
 
@@ -66,13 +70,19 @@ RewriteRule \.(jpg|jpeg|png|gif)$ - [NC,F]
66
  fwrite( $file, "\n" . 'RewriteRule \.(jpg|jpeg|png|gif|mp4|ogv|webm|mp3|wav|ogg)$ - [NC,F]' );
67
  fwrite( $file, "\n" . '</IfModule>' );
68
  fclose( $file );
 
 
 
 
69
  }
 
70
  break;
71
 
72
  // Destroy it
73
  case 'remove':
74
  if ( is_file( $filename ) ) {
75
  unlink( $filename );
 
76
  }
77
  break;
78
 
3
  * Package: wp-photo-album-plus
4
  *
5
  * Various funcions
6
+ * Version 6.7.04
7
  *
8
  */
9
 
32
  fwrite( $file, "\n" . 'Order Allow,Deny' );
33
  fwrite( $file, "\n" . 'Allow from all' );
34
  fclose( $file );
35
+ wppa_log( 'Fso', 'File ' . $filename . ' created.' );
36
+ }
37
+ else {
38
+ wppa_log( 'Err', 'Can not create ' . $filename );
39
  }
40
  break;
41
 
70
  fwrite( $file, "\n" . 'RewriteRule \.(jpg|jpeg|png|gif|mp4|ogv|webm|mp3|wav|ogg)$ - [NC,F]' );
71
  fwrite( $file, "\n" . '</IfModule>' );
72
  fclose( $file );
73
+ wppa_log( 'Fso', 'File ' . $filename . ' created.' );
74
+ }
75
+ else {
76
+ wppa_log( 'Err', 'Can not create ' . $filename );
77
  }
78
+
79
  break;
80
 
81
  // Destroy it
82
  case 'remove':
83
  if ( is_file( $filename ) ) {
84
  unlink( $filename );
85
+ wppa_log( 'Fso', 'File ' . $filename . ' removed.' );
86
  }
87
  break;
88
 
wppa-maintenance.php CHANGED
@@ -3,7 +3,7 @@
3
  * Package: wp-photo-album-plus
4
  *
5
  * Contains (not yet, but in the future maybe) all the maintenance routines
6
- * Version 6.7.02
7
  *
8
  */
9
 
3
  * Package: wp-photo-album-plus
4
  *
5
  * Contains (not yet, but in the future maybe) all the maintenance routines
6
+ * Version 6.7.04
7
  *
8
  */
9
 
wppa-settings-autosave.php CHANGED
@@ -3,7 +3,7 @@
3
  * Package: wp-photo-album-plus
4
  *
5
  * manage all options
6
- * Version 6.7.03
7
  *
8
  */
9
 
@@ -8034,6 +8034,15 @@ global $wp_version;
8034
  $tags = 'system';
8035
  wppa_setting($slug, '9.3', $name, $desc, $html, $help, $clas, $tags);
8036
 
 
 
 
 
 
 
 
 
 
8037
  $name = __('Retry failed mails', 'wp-photo-album-plus');
8038
  $desc = __('Select number of retries for failed mails', 'wp-photo-album-plus');
8039
  $help = esc_js(__('Retries occur at the background every hour', 'wp-photo-album-plus'));
3
  * Package: wp-photo-album-plus
4
  *
5
  * manage all options
6
+ * Version 6.7.04
7
  *
8
  */
9
 
8034
  $tags = 'system';
8035
  wppa_setting($slug, '9.3', $name, $desc, $html, $help, $clas, $tags);
8036
 
8037
+ $name = __('Log File events', 'wp-photo-album-plus');
8038
+ $desc = __('Keep track of dir/file creations and chmod.', 'wp-photo-album-plus');
8039
+ $help = '';
8040
+ $slug = 'wppa_log_fso';
8041
+ $html = wppa_checkbox($slug);
8042
+ $clas = '';
8043
+ $tags = 'system';
8044
+ wppa_setting($slug, '9.4', $name, $desc, $html, $help, $clas, $tags);
8045
+
8046
  $name = __('Retry failed mails', 'wp-photo-album-plus');
8047
  $desc = __('Select number of retries for failed mails', 'wp-photo-album-plus');
8048
  $help = esc_js(__('Retries occur at the background every hour', 'wp-photo-album-plus'));
wppa-setup.php CHANGED
@@ -3,7 +3,7 @@
3
  * Package: wp-photo-album-plus
4
  *
5
  * Contains all the setup stuff
6
- * Version 6.7.03
7
  *
8
  */
9
 
@@ -1585,6 +1585,7 @@ Hide Camera info
1585
  'wppa_log_cron' => 'no', // A9.1
1586
  'wppa_log_ajax' => 'no', // A9.2
1587
  'wppa_log_comments' => 'no', // A9.3
 
1588
  'wppa_moderate_bulk' => 'no', // B20
1589
  'wppa_retry_mails' => '0', // A10
1590
  'wppa_minimum_tags' => '', // A11
3
  * Package: wp-photo-album-plus
4
  *
5
  * Contains all the setup stuff
6
+ * Version 6.7.04
7
  *
8
  */
9
 
1585
  'wppa_log_cron' => 'no', // A9.1
1586
  'wppa_log_ajax' => 'no', // A9.2
1587
  'wppa_log_comments' => 'no', // A9.3
1588
+ 'wppa_log_fso' => 'no', // A9.4
1589
  'wppa_moderate_bulk' => 'no', // B20
1590
  'wppa_retry_mails' => '0', // A10
1591
  'wppa_minimum_tags' => '', // A11
wppa-utils.php CHANGED
@@ -3,7 +3,7 @@
3
  * Package: wp-photo-album-plus
4
  *
5
  * Contains low-level utility routines
6
- * Version 6.7.02
7
  *
8
  */
9
 
@@ -1645,7 +1645,17 @@ global $wppa_log_file;
1645
  $type = '{span style="color:red;" }Err{/span}';
1646
  break;
1647
  case 'f':
1648
- $type = 'Fix';
 
 
 
 
 
 
 
 
 
 
1649
  break;
1650
  case 'o':
1651
  $type = 'Obs';
@@ -2404,7 +2414,7 @@ function wppa_mkdir( $path ) {
2404
  if ( ! is_dir( $path ) ) {
2405
  mkdir( $path );
2406
  if ( is_dir( $path ) ) {
2407
- wppa_log( 'Obs', 'Created path: ' .$path );
2408
  }
2409
  else {
2410
  wppa_log( 'Err', 'Could not create: ' . $path );
@@ -3605,10 +3615,10 @@ function wppa_chmod( $fso ) {
3605
 
3606
  // If still no luck
3607
  if ( 0755 !== ( fileperms( $fso ) & 0755 ) ) {
3608
- wppa_log( 'Err', sprintf( 'Unable to set filepermissions on %s from %o to 0755', $fso, $perms ) );
3609
  }
3610
  else {
3611
- wppa_log( 'Obs', sprintf( 'Successfully set filepermissions on %s from %o to 0755', $fso, $perms ) );
3612
  }
3613
  }
3614
  }
@@ -3616,15 +3626,18 @@ function wppa_chmod( $fso ) {
3616
  if ( is_file( $fso ) ) {
3617
 
3618
  // Check file permissions
3619
- if ( 0640 !== ( fileperms( $fso ) & 0640 ) ) {
3620
 
3621
  // If not sufficient, try to change
3622
- @ chmod( $fso, 0640 );
3623
  clearstatcache();
3624
 
3625
  // If still no luck
3626
- if ( 0640 !== ( fileperms( $fso ) & 0640 ) ) {
3627
- wppa_log( 'Err', sprintf( 'Unable to set filepermissions on %s from %o to 0644', $fso, $perms ) );
 
 
 
3628
  }
3629
  }
3630
  }
3
  * Package: wp-photo-album-plus
4
  *
5
  * Contains low-level utility routines
6
+ * Version 6.7.04
7
  *
8
  */
9
 
1645
  $type = '{span style="color:red;" }Err{/span}';
1646
  break;
1647
  case 'f':
1648
+ switch ( $u ) {
1649
+ case 's':
1650
+ $type = '{span style="color:blue;" }Fso{/span}';
1651
+ if ( ! wppa_switch( 'log_fso' ) ) {
1652
+ return;
1653
+ }
1654
+ break;
1655
+ case 'i':
1656
+ $type = 'Fix';
1657
+ break;
1658
+ }
1659
  break;
1660
  case 'o':
1661
  $type = 'Obs';
2414
  if ( ! is_dir( $path ) ) {
2415
  mkdir( $path );
2416
  if ( is_dir( $path ) ) {
2417
+ wppa_log( 'Fso', 'Created path: ' . $path );
2418
  }
2419
  else {
2420
  wppa_log( 'Err', 'Could not create: ' . $path );
3615
 
3616
  // If still no luck
3617
  if ( 0755 !== ( fileperms( $fso ) & 0755 ) ) {
3618
+ wppa_log( 'Fso', sprintf( 'Unable to set filepermissions on %s from %o to 0755', $fso, $perms ) );
3619
  }
3620
  else {
3621
+ wppa_log( 'Fso', sprintf( 'Successfully set filepermissions on %s from %o to 0755', $fso, $perms ) );
3622
  }
3623
  }
3624
  }
3626
  if ( is_file( $fso ) ) {
3627
 
3628
  // Check file permissions
3629
+ if ( 0644 !== ( fileperms( $fso ) & 0644 ) ) {
3630
 
3631
  // If not sufficient, try to change
3632
+ @ chmod( $fso, 0644 );
3633
  clearstatcache();
3634
 
3635
  // If still no luck
3636
+ if ( 0644 !== ( fileperms( $fso ) & 0644 ) ) {
3637
+ wppa_log( 'Fso', sprintf( 'Unable to set filepermissions on %s from %o to 0644', $fso, $perms ) );
3638
+ }
3639
+ else {
3640
+ wppa_log( 'Fso', sprintf( 'Successfully set filepermissions on %s from %o to 0644', $fso, $perms ) );
3641
  }
3642
  }
3643
  }
wppa.php CHANGED
@@ -2,7 +2,7 @@
2
  /*
3
  * Plugin Name: WP Photo Album Plus
4
  * Description: Easily manage and display your photo albums and slideshows within your WordPress site.
5
- * Version: 6.7.03
6
  * Author: J.N. Breetvelt a.k.a. OpaJaap
7
  * Author URI: http://wppa.opajaap.nl/
8
  * Plugin URI: http://wordpress.org/extend/plugins/wp-photo-album-plus/
@@ -22,8 +22,8 @@ global $wpdb;
22
  global $wp_version;
23
 
24
  /* WPPA GLOBALS */
25
- global $wppa_revno; $wppa_revno = '6703'; // WPPA db version
26
- global $wppa_api_version; $wppa_api_version = '6-7-03-005'; // WPPA software version
27
 
28
  /* start timers */
29
  global $wppa_starttime; $wppa_starttime = microtime( true );
2
  /*
3
  * Plugin Name: WP Photo Album Plus
4
  * Description: Easily manage and display your photo albums and slideshows within your WordPress site.
5
+ * Version: 6.7.04
6
  * Author: J.N. Breetvelt a.k.a. OpaJaap
7
  * Author URI: http://wppa.opajaap.nl/
8
  * Plugin URI: http://wordpress.org/extend/plugins/wp-photo-album-plus/
22
  global $wp_version;
23
 
24
  /* WPPA GLOBALS */
25
+ global $wppa_revno; $wppa_revno = '6704'; // WPPA db version
26
+ global $wppa_api_version; $wppa_api_version = '6-7-04-002'; // WPPA software version
27
 
28
  /* start timers */
29
  global $wppa_starttime; $wppa_starttime = microtime( true );