WP Photo Album Plus - Version 7.3.12.006

Version Description

= 7.3.11 =

  • This version addresses various bug fixes and feature requests.
Download this release

Release Info

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

Code changes from version 7.3.12.005 to 7.3.12.006

Files changed (6) hide show
  1. changelog.txt +3 -0
  2. readme.txt +1 -1
  3. wppa-import.php +5 -5
  4. wppa-topten-widget.php +12 -1
  5. wppa-utils.php +6 -1
  6. wppa.php +2 -2
changelog.txt CHANGED
@@ -12,6 +12,9 @@ provided that the settings on the album admin pages are set to the default, prev
12
  * The album and parent attributes in the wppa shortcodes with type="acount" and type="pcount" can now also be an album enumeration.
13
  * Added class wppa-thumbarea-albdesc for album description on thmbnail area.
14
  * If there is no posterfile for a pdf, there will mow be a dummy image as thumbnail, derived from ../uploads/wppa/documentstub.png.
 
 
 
15
 
16
  = 7.3.11 =
17
 
12
  * The album and parent attributes in the wppa shortcodes with type="acount" and type="pcount" can now also be an album enumeration.
13
  * Added class wppa-thumbarea-albdesc for album description on thmbnail area.
14
  * If there is no posterfile for a pdf, there will mow be a dummy image as thumbnail, derived from ../uploads/wppa/documentstub.png.
15
+ * When the status of a photo is private, it will no longer show up in the topten widget for users not being logged in.
16
+ In this case one should not cache the widget.
17
+ * If Table IX-D19 and IX-D20 are both unticked, there will now also be no check for utf-8 encoding on filenames during upload/import.
18
 
19
  = 7.3.11 =
20
 
readme.txt CHANGED
@@ -2,7 +2,7 @@
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: 7.3.12.005
6
  Stable tag: 7.3.11.006
7
  Author: J.N. Breetvelt
8
  Author URI: http://www.opajaap.nl/
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: 7.3.12.006
6
  Stable tag: 7.3.11.006
7
  Author: J.N. Breetvelt
8
  Author URI: http://www.opajaap.nl/
wppa-import.php CHANGED
@@ -3,7 +3,7 @@
3
  * Package: wp-photo-album-plus
4
  *
5
  * Contains all the import pages and functions
6
- * Version 7.3.08
7
  *
8
  */
9
 
@@ -836,10 +836,10 @@ global $wppa_session;
836
 
837
  if ( wppa( 'is_wppa_tree' ) ) {
838
  $t = explode( 'uploads/wppa/', $file );
839
- echo sanitize_file_name( basename( str_replace( '/', '', $t[1] ) ) );
840
  }
841
  else {
842
- echo htmlspecialchars( wppa_sanitize_file_name( basename( $file ) ) );
843
  }
844
 
845
  if ( $meta ) {
@@ -988,7 +988,7 @@ global $wppa_session;
988
  ' id="name-file-' . $idx . '"' .
989
  ' >' .
990
  '  ' .
991
- htmlspecialchars( wppa_sanitize_file_name( basename( $file ) ) ) .
992
  ' (' . sprintf( '%3.1f', wppa_filesize( $file ) / 1024 ) . ' kb)' .
993
  '</span>' .
994
  '</td>';
@@ -1101,7 +1101,7 @@ global $wppa_session;
1101
  ' id="name-file-' . $idx . '"' .
1102
  ' >' .
1103
  '&nbsp;&nbsp;' .
1104
- htmlspecialchars( wppa_sanitize_file_name( basename( $file ) ) ) .
1105
  ' (' . sprintf( '%3.1f', wppa_filesize( $file ) / 1024 ) . ' kb)' .
1106
  '</span>' .
1107
  '</td>';
3
  * Package: wp-photo-album-plus
4
  *
5
  * Contains all the import pages and functions
6
+ * Version 7.3.12
7
  *
8
  */
9
 
836
 
837
  if ( wppa( 'is_wppa_tree' ) ) {
838
  $t = explode( 'uploads/wppa/', $file );
839
+ echo wppa_sanitize_file_name( basename( str_replace( '/', '', $t[1] ) ) );
840
  }
841
  else {
842
+ echo wppa_sanitize_file_name( basename( $file ) );
843
  }
844
 
845
  if ( $meta ) {
988
  ' id="name-file-' . $idx . '"' .
989
  ' >' .
990
  '&nbsp;&nbsp;' .
991
+ wppa_sanitize_file_name( basename( $file ) ) .
992
  ' (' . sprintf( '%3.1f', wppa_filesize( $file ) / 1024 ) . ' kb)' .
993
  '</span>' .
994
  '</td>';
1101
  ' id="name-file-' . $idx . '"' .
1102
  ' >' .
1103
  '&nbsp;&nbsp;' .
1104
+ wppa_sanitize_file_name( basename( $file ) ) .
1105
  ' (' . sprintf( '%3.1f', wppa_filesize( $file ) / 1024 ) . ' kb)' .
1106
  '</span>' .
1107
  '</td>';
wppa-topten-widget.php CHANGED
@@ -3,7 +3,7 @@
3
  * Package: wp-photo-album-plus
4
  *
5
  * display the top rated photos
6
- * Version 7.3.03
7
  */
8
 
9
  class TopTenWidget extends WP_Widget {
@@ -92,6 +92,9 @@ class TopTenWidget extends WP_Widget {
92
  }
93
  }
94
 
 
 
 
95
  // Album specified?
96
  if ( $album ) {
97
 
@@ -165,6 +168,7 @@ class TopTenWidget extends WP_Widget {
165
  $query = "SELECT * FROM $wpdb->wppa_photos
166
  WHERE album IN ( aaaa )
167
  $non_zero
 
168
  ORDER BY rating_count DESC, mean_rating DESC, views DESC
169
  LIMIT %d";
170
  break;
@@ -173,6 +177,7 @@ class TopTenWidget extends WP_Widget {
173
  $query = "SELECT * FROM $wpdb->wppa_photos
174
  WHERE album IN ( aaaa )
175
  $non_zero
 
176
  ORDER BY views DESC, mean_rating DESC, rating_count DESC
177
  LIMIT %d";
178
  break;
@@ -181,6 +186,7 @@ class TopTenWidget extends WP_Widget {
181
  $query = "SELECT * FROM $wpdb->wppa_photos
182
  WHERE album IN ( aaaa )
183
  $non_zero
 
184
  ORDER BY mean_rating DESC, rating_count DESC, views DESC
185
  LIMIT %d";
186
  break;
@@ -190,6 +196,7 @@ class TopTenWidget extends WP_Widget {
190
  $query = "SELECT * FROM $wpdb->wppa_photos
191
  WHERE album IN ( aaa )
192
  $non_zero
 
193
  ORDER BY dlcount DESC, mean_rating DESC, rating_count DESC, views DESC
194
  LIMIT %d";
195
  break;
@@ -250,6 +257,7 @@ class TopTenWidget extends WP_Widget {
250
  $query = "SELECT * FROM $wpdb->wppa_photos
251
  WHERE album > 0
252
  $non_zero
 
253
  ORDER BY rating_count DESC, mean_rating DESC, views DESC
254
  LIMIT %d";
255
  break;
@@ -258,6 +266,7 @@ class TopTenWidget extends WP_Widget {
258
  $query = "SELECT * FROM $wpdb->wppa_photos
259
  WHERE album > 0
260
  $non_zero
 
261
  ORDER BY views DESC, mean_rating DESC, rating_count DESC
262
  LIMIT %d";
263
  break;
@@ -266,6 +275,7 @@ class TopTenWidget extends WP_Widget {
266
  $query = "SELECT * FROM $wpdb->wppa_photos
267
  WHERE album > 0
268
  $non_zero
 
269
  ORDER BY mean_rating DESC, rating_count DESC, views DESC
270
  LIMIT %d";
271
  break;
@@ -275,6 +285,7 @@ class TopTenWidget extends WP_Widget {
275
  $query = "SELECT * FROM $wpdb->wppa_photos
276
  WHERE album > 0
277
  $non_zero
 
278
  ORDER BY dlcount DESC, mean_rating DESC, rating_count DESC, views DESC
279
  LIMIT %d";
280
  break;
3
  * Package: wp-photo-album-plus
4
  *
5
  * display the top rated photos
6
+ * Version 7.3.12
7
  */
8
 
9
  class TopTenWidget extends WP_Widget {
92
  }
93
  }
94
 
95
+ // Non-private
96
+ $non_private = is_user_logged_in() ? "" : "AND status <> 'private' ";
97
+
98
  // Album specified?
99
  if ( $album ) {
100
 
168
  $query = "SELECT * FROM $wpdb->wppa_photos
169
  WHERE album IN ( aaaa )
170
  $non_zero
171
+ $non_private
172
  ORDER BY rating_count DESC, mean_rating DESC, views DESC
173
  LIMIT %d";
174
  break;
177
  $query = "SELECT * FROM $wpdb->wppa_photos
178
  WHERE album IN ( aaaa )
179
  $non_zero
180
+ $non_private
181
  ORDER BY views DESC, mean_rating DESC, rating_count DESC
182
  LIMIT %d";
183
  break;
186
  $query = "SELECT * FROM $wpdb->wppa_photos
187
  WHERE album IN ( aaaa )
188
  $non_zero
189
+ $non_private
190
  ORDER BY mean_rating DESC, rating_count DESC, views DESC
191
  LIMIT %d";
192
  break;
196
  $query = "SELECT * FROM $wpdb->wppa_photos
197
  WHERE album IN ( aaa )
198
  $non_zero
199
+ $non_private
200
  ORDER BY dlcount DESC, mean_rating DESC, rating_count DESC, views DESC
201
  LIMIT %d";
202
  break;
257
  $query = "SELECT * FROM $wpdb->wppa_photos
258
  WHERE album > 0
259
  $non_zero
260
+ $non_private
261
  ORDER BY rating_count DESC, mean_rating DESC, views DESC
262
  LIMIT %d";
263
  break;
266
  $query = "SELECT * FROM $wpdb->wppa_photos
267
  WHERE album > 0
268
  $non_zero
269
+ $non_private
270
  ORDER BY views DESC, mean_rating DESC, rating_count DESC
271
  LIMIT %d";
272
  break;
275
  $query = "SELECT * FROM $wpdb->wppa_photos
276
  WHERE album > 0
277
  $non_zero
278
+ $non_private
279
  ORDER BY mean_rating DESC, rating_count DESC, views DESC
280
  LIMIT %d";
281
  break;
285
  $query = "SELECT * FROM $wpdb->wppa_photos
286
  WHERE album > 0
287
  $non_zero
288
+ $non_private
289
  ORDER BY dlcount DESC, mean_rating DESC, rating_count DESC, views DESC
290
  LIMIT %d";
291
  break;
wppa-utils.php CHANGED
@@ -3,7 +3,7 @@
3
  * Package: wp-photo-album-plus
4
  *
5
  * Contains low-level utility routines
6
- * Version 7.3.11
7
  *
8
  */
9
 
@@ -2601,6 +2601,11 @@ function wppa_force_numeric_else( $value, $default ) {
2601
  // If a pathname: only the basename of the path is sanitized.
2602
  function wppa_sanitize_file_name( $file, $check_length = true ) {
2603
 
 
 
 
 
 
2604
  // Make sure its utf8
2605
  if ( ! seems_utf8( $file ) ) {
2606
  $file = utf8_encode( $file );
3
  * Package: wp-photo-album-plus
4
  *
5
  * Contains low-level utility routines
6
+ * Version 7.3.12
7
  *
8
  */
9
 
2601
  // If a pathname: only the basename of the path is sanitized.
2602
  function wppa_sanitize_file_name( $file, $check_length = true ) {
2603
 
2604
+ // Any sanitize required?
2605
+ if ( ! ( wppa_switch( 'remove_accents' ) || wppa_switch( 'sanitize_import' ) ) ) {
2606
+ return $file;
2607
+ }
2608
+
2609
  // Make sure its utf8
2610
  if ( ! seems_utf8( $file ) ) {
2611
  $file = utf8_encode( $file );
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: 7.3.12.005
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/
@@ -24,7 +24,7 @@ global $wp_version;
24
 
25
  /* WPPA GLOBALS */
26
  global $wppa_revno; $wppa_revno = '7311'; // WPPA db version
27
- global $wppa_api_version; $wppa_api_version = '7.3.12.005'; // WPPA software version
28
 
29
  /* Init page js data */
30
  global $wppa_js_page_data; $wppa_js_page_data = '';
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: 7.3.12.006
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/
24
 
25
  /* WPPA GLOBALS */
26
  global $wppa_revno; $wppa_revno = '7311'; // WPPA db version
27
+ global $wppa_api_version; $wppa_api_version = '7.3.12.006'; // WPPA software version
28
 
29
  /* Init page js data */
30
  global $wppa_js_page_data; $wppa_js_page_data = '';