WP Photo Album Plus - Version 7.2.13.004

Version Description

= 7.2.13 =

  • This version addresses various bug fixes and feature requests.

= 7.2.12 =

  • This version addresses various bug fixes and feature requests.

= 7.2.11 =

  • This version addresses various bug fixes and feature requests.

= 7.2.10 =

  • This version addresses various bug fixes and feature requests.

= 7.2.09 =

  • This version addresses various bug fixes and feature requests.

= 7.2.08 =

  • This version addresses various bug fixes.

= 7.2.07 =

  • This version addresses various bug fixes.

= 7.2.06 =

  • This version addresses various bug fixes and feature requests.
  • This version addresses various security issues.

= 7.2.05 =

  • This version addresses various bug fixes and feature requests.
  • This version addresses various security issues.

= 7.2.04 =

  • This version addresses various bug fixes and feature requests.

= 7.2.03 =

  • This version addresses various bug fixes and feature requests.

= 7.2.02 =

  • This version addresses various bug fixes and feature requests.

= 7.2.01 =

  • This version addresses various bug fixes and feature requests.

= 7.2.00 =

  • This version addresses various bug fixes and feature requests.

= 7.1.11 =

  • This version addresses various bug fixes and feature requests.

= 7.1.10 =

  • This version addresses various bug fixes and feature requests.

= 7.1.09 =

  • This version addresses various bug fixes and feature requests.

= 7.1.08 =

  • This version addresses various bug fixes and feature requests.

= 7.1.07 =

  • This version addresses various bug fixes and feature requests.

= 7.1.06 =

  • This version addresses various bug fixes and feature requests.

= 7.1.05 =

  • This version addresses various security issues.
  • This version addresses various bug fixes.

= 7.1.04 =

  • This version addresses various bug fixes.

= 7.1.03 =

  • This version addresses various security issues.
  • This version addresses various bug fixes.

= 7.1.02 =

  • This version addresses various security issues.
  • This version addresses various bug fixes and feature requests.

= 7.1.01 =

  • This version addresses various bug fixes and feature requests.

= 7.1.00 =

  • This version addresses various bug fixes and feature requests.
  • The Photo Album -> Upload Photos and Import Photos admin pages have been substantially improved. Read the changelog for details.

= 7.0.11 =

  • This version addresses various bug fixes and feature requests.

= 7.0.11 =

  • This version addresses various bug fixes

= 7.0.10 =

  • This version addresses various bug fixes

= 7.0.09 =

  • This version addresses various security issues.
  • This version addresses various bug fixes and feature requests.

= 7.0.08 =

  • This version addresses various security issues.
  • This version addresses various bug fixes

= 7.0.07 =

  • This version addresses various security issues.
  • This version addresses various bug fixes

= 7.0.06 =

  • This version addresses various bug fixes
  • This version addresses various security issues.

= 7.0.05 =

  • This version addresses various minor bug fixes and feature requests.
  • This version addresses various security issues.

= 7.0.04 =

  • This version addresses various bug fixes
  • This version addresses various security issues.

= 7.0.03 =

  • This version addresses various minor bug fixes and feature requests.

= 7.0.02 =

  • This version addresses various bug fixes
  • This version addresses various security issues.

= 7.0.01 =

  • This version addresses various minor bug fixes and feature requests.

= 7.0.00 =

  • Shortcode generators for Gutenberg added.
  • This version addresses various minor bug fixes and feature requests.
  • This version addresses various security issues.
  • To prevent spamming and give the users the opportunity to decide when they want us to email them, the mailing system has been revised. Configure Table IX-M to enable various mailing lists, and use the WPPA+ Notify widget for full user flexibility.

= 6.9.21 =

  • This version addresses various bug fixes
  • This version addresses various security issues.

= 6.9.20 =

  • This version addresses various bug fixes

= 6.9.19 =

  • This version addresses various minor bug fixes

= 6.9.18 =

  • This version addresses various minor bug fixes

= 6.9.17 =

  • This version addresses various minor bug fixes and feature requests.
  • This version addresses various security issues.

= 6.9.16 =

  • This version addresses various minor bug fixes and feature requests.
  • This version addresses various security issues.

= 6.9.15 =

  • This version addresses various minor bug fixes and feature requests.
  • This version addresses various security issues.

= 6.9.14 =

  • This version addresses various minor bug fixes and feature requests.
  • This version addresses various security issues.

= 6.9.13 =

  • Security release.

= 6.9.12 =

  • This version addresses various minor bug fixes and performance improvements.

= 6.9.11 =

  • This version addresses various minor bug fixes and performance improvements.

= 6.9.10 =

  • This version addresses various minor bug fixes and performance improvements.

= 6.9.09 =

  • Panorama support phase III.

= 6.9.08 =

  • This version addresses various minor bug fixes and feature requests.
  • Panorama support phase II.

= 6.9.07 =

  • This version addresses various minor bug fixes and feature requests.
  • Panorama support phase I.

= 6.9.06 =

  • This version addresses various minor bug fixes and feature requests.

= 6.9.05 =

  • This version addresses various minor bug fixes and feature requests.

= 6.9.04 =

  • This version addresses various minor bug fixes and feature requests.
  • Local CDN functionality has been added.

= 6.9.03 =

  • This version addresses various minor bug fixes and feature requests.

= 6.9.02 =

  • This version addresses various minor bug fixes and feature requests.

= 6.9.01 =

  • This version addresses various minor bug fixes and feature requests.

= 6.9.00 =

  • This version includes the code for the privacy policy requirements.

= 6.8.09

  • This version addresses various bug fixes and code edits.

= 6.8.08 =

  • This version addresses various minor bug fixes and feature requests.
  • This version offers substantial performance improvements when the box in Table IV-A13: Defer Javascript is ticked. This setting is now recommended and set ticked as the default.
  • For more info on performance improvements and compatibility with optimizers: see the changelog.txt

= 6.8.07 =

  • This version addresses various minor bug fixes and enhancements, and a new widget: Statistics.

= 6.8.06 =

  • This version addresses various minor bug fixes and improved cache handling.

= 6.8.05 =

  • This version addresses various minor bug fixes and feture requests.

= 6.8.04 =

  • This version addresses various display issues and a few fixes of bugs that seldom affected the plugins behaviour.
Download this release

Release Info

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

Code changes from version 7.2.12.002 to 7.2.13.004

changelog.txt CHANGED
@@ -1,5 +1,14 @@
1
  WP Photo Album Plus Changelog
2
 
 
 
 
 
 
 
 
 
 
3
  = 7.2.12 =
4
 
5
  * Fixed a warning in the TopTen widget.
1
  WP Photo Album Plus Changelog
2
 
3
+ = 7.2.13 =
4
+
5
+ * Changed algorithm and texts around 'Awaiting moderaion' for cxomments to more descriptive ones.
6
+ * Only mailintypes 'newalbumnotify', 'feuploadnotify', 'commentnotify' are now skipped for admin if Table IX-M97 is ticked.
7
+ * Added classes to the album navigator widget to enable css customization.
8
+ * The creation of .htacces file for photo permalinks is now always triggered on album creation.
9
+ * The numbers of photos in the titles in the tagcloud were not alwais correct on large systems. Fixed.
10
+ * Rating change did no longer work, a new rating was added. Fixed.
11
+
12
  = 7.2.12 =
13
 
14
  * Fixed a warning in the TopTen widget.
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: 7.2.12.002
6
- Stable tag: 7.2.11.005
7
  Author: J.N. Breetvelt
8
  Author URI: http://www.opajaap.nl/
9
  Requires at least: 3.9
@@ -137,6 +137,10 @@ See for the full changelog: <a href="http://www.wppa.nl/changelog/" >The documen
137
 
138
  == Upgrade Notice ==
139
 
 
 
 
 
140
  = 7.2.12 =
141
 
142
  * This version addresses various bug fixes and feature requests.
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.2.13.004
6
+ Stable tag: 7.2.12.002
7
  Author: J.N. Breetvelt
8
  Author URI: http://www.opajaap.nl/
9
  Requires at least: 3.9
137
 
138
  == Upgrade Notice ==
139
 
140
+ = 7.2.13 =
141
+
142
+ * This version addresses various bug fixes and feature requests.
143
+
144
  = 7.2.12 =
145
 
146
  * This version addresses various bug fixes and feature requests.
wppa-album-navigator-widget.php CHANGED
@@ -3,7 +3,7 @@
3
  * Package: wp-photo-album-plus
4
  *
5
  * display album names linking to content
6
- * Version 6.9.21
7
  */
8
 
9
  class AlbumNavigatorWidget extends WP_Widget {
@@ -203,49 +203,55 @@ class AlbumNavigatorWidget extends WP_Widget {
203
 
204
  if ( ! empty( $albums ) ) {
205
  wppa_cache_album( 'add', $albums );
206
- $result .= '<ul>';
 
207
  foreach ( $albums as $album ) {
208
  $a = $album['id'];
209
  $treecount = wppa_get_treecounts_a( $a );
210
  if ( $treecount['treealbums'] || $treecount['selfphotos'] > wppa_opt( 'min_thumbs' ) || ! $skip ) {
211
  $has_children = wppa_has_children($a);
212
  $result .= '
213
- <li' .
214
- ' class="anw-'.$w.'-'.$p.$propclass.'"' .
215
- ' style="' .
216
- 'list-style:none;' .
217
- ( $level == '1' ? '' : 'display:none;' ) .
218
- '"' .
219
- ' >';
220
- if ( $has_children ) $result .= '
221
- <span' .
222
- ' style="padding:0;margin:0 2px 0 -4px;cursor:default;font-weight:bold;"' .
223
- ' class="anw-'.$w.'-'.$a.'-"' .
224
- ' onclick="' .
225
- 'jQuery(\'.anw-'.$w.'-'.$a.'\').css(\'display\',\'\');' .
226
- 'jQuery(\'.anw-'.$w.'-'.$a.'-\').css(\'display\',\'none\');' .
227
- '" >' .
 
228
  ( $a == $ca ? '&raquo;' : '+') .
229
  '</span>
230
- <span' .
231
- ' style="padding:0;margin:0 2px 0 -4px;cursor:default;font-weight:bold;display:none;"' .
232
- ' class="anw-'.$w.'-'.$a.'"' .
233
- ' onclick="' .
234
- 'jQuery(\'.anw-'.$w.'-'.$a.'-\').css(\'display\',\'\');' .
235
- 'jQuery(\'.anw-'.$w.'-'.$a.'\').css(\'display\',\'none\');' .
236
- 'jQuery(\'.p-'.$w.'-'.$a.'\').css(\'display\',\'none\');' .
237
- '" >' .
238
  ( $a == $ca ? '&raquo;' : '-') .
239
  '</span>';
240
- else $result .= '
 
 
241
  <span style="padding:0;margin:0 2px 0 -4px;cursor:default;font-weight:bold;" >' .
242
  ( $a == $ca ? '&raquo;' : '&nbsp;' ) .
243
  '</span>';
 
244
  $result .= '
245
- <a' .
246
- ' href="'.wppa_encrypt_url(wppa_get_permalink( $page ).'&amp;wppa-album='.$a.'&amp;wppa-cover=0&amp;wppa-occur=1'.$slide).'"' .
247
- ' style=""' .
248
- ' >' .
 
249
  wppa_get_album_name( $a ) .
250
  '</a>
251
  </li>';
@@ -253,7 +259,14 @@ class AlbumNavigatorWidget extends WP_Widget {
253
 
254
  $next_level = $this->do_album_navigator( $a, $page, $skip, $newpropclass, $extraclause );
255
  if ( $next_level ) {
256
- $result .= '<li id="anw-'.$w.'-'.$a.'" class="anw-'.$w.'-'.$a.$propclass.'" style="list-style:none;display:none;background-image:none;" >' . $next_level . '</li>';
 
 
 
 
 
 
 
257
  }
258
  }
259
  }
3
  * Package: wp-photo-album-plus
4
  *
5
  * display album names linking to content
6
+ * Version 7.2.13
7
  */
8
 
9
  class AlbumNavigatorWidget extends WP_Widget {
203
 
204
  if ( ! empty( $albums ) ) {
205
  wppa_cache_album( 'add', $albums );
206
+ $result .= '
207
+ <ul class="albnav-ul albnav-ul-' . $level . ' " >';
208
  foreach ( $albums as $album ) {
209
  $a = $album['id'];
210
  $treecount = wppa_get_treecounts_a( $a );
211
  if ( $treecount['treealbums'] || $treecount['selfphotos'] > wppa_opt( 'min_thumbs' ) || ! $skip ) {
212
  $has_children = wppa_has_children($a);
213
  $result .= '
214
+ <li
215
+ class="anw-'.$w.'-'.$p.$propclass.' albnav albnav-li albnav-li-' . $level . ' "
216
+ style="
217
+ list-style:none;' .
218
+ ( $level == '1' ? '' : 'display:none;' ) . '
219
+ "
220
+ >';
221
+ if ( $has_children ) {
222
+ $result .= '
223
+ <span
224
+ class="anw-'.$w.'-'.$a.'- albnav albnav-span albnav-span-' . $level . ' albnav-x"
225
+ style="padding:0;margin:0 2px 0 -4px;cursor:default;font-weight:bold;"
226
+ onclick="
227
+ jQuery(\'.anw-'.$w.'-'.$a.'\').css(\'display\',\'\');
228
+ jQuery(\'.anw-'.$w.'-'.$a.'-\').css(\'display\',\'none\');
229
+ " >' .
230
  ( $a == $ca ? '&raquo;' : '+') .
231
  '</span>
232
+ <span
233
+ class="anw-'.$w.'-'.$a.' albnav albnav-span albnav-span-' . $level . ' albnav-link"
234
+ style="padding:0;margin:0 2px 0 -4px;cursor:default;font-weight:bold;display:none;"
235
+ onclick="
236
+ jQuery(\'.anw-'.$w.'-'.$a.'-\').css(\'display\',\'\');
237
+ jQuery(\'.anw-'.$w.'-'.$a.'\').css(\'display\',\'none\');
238
+ jQuery(\'.p-'.$w.'-'.$a.'\').css(\'display\',\'none\');
239
+ " >' .
240
  ( $a == $ca ? '&raquo;' : '-') .
241
  '</span>';
242
+ }
243
+ else {
244
+ $result .= '
245
  <span style="padding:0;margin:0 2px 0 -4px;cursor:default;font-weight:bold;" >' .
246
  ( $a == $ca ? '&raquo;' : '&nbsp;' ) .
247
  '</span>';
248
+ }
249
  $result .= '
250
+ <a
251
+ class="albnav albnav-albumlink"
252
+ href="'.wppa_encrypt_url(wppa_get_permalink( $page ).'&amp;wppa-album='.$a.'&amp;wppa-cover=0&amp;wppa-occur=1'.$slide).'"
253
+ style=""
254
+ >' .
255
  wppa_get_album_name( $a ) .
256
  '</a>
257
  </li>';
259
 
260
  $next_level = $this->do_album_navigator( $a, $page, $skip, $newpropclass, $extraclause );
261
  if ( $next_level ) {
262
+ $result .= '
263
+ <li
264
+ class="anw-'.$w.'-'.$a.$propclass.' albnav albnax-next"
265
+ id="anw-'.$w.'-'.$a.'"
266
+ style="list-style:none;display:none;background-image:none;"
267
+ >' .
268
+ $next_level . '
269
+ </li>';
270
  }
271
  }
272
  }
wppa-boxes-html.php CHANGED
@@ -3,7 +3,7 @@
3
  * Package: wp-photo-album-plus
4
  *
5
  * Various wppa boxes
6
- * Version 7.2.12
7
  *
8
  */
9
 
@@ -3712,6 +3712,7 @@ global $wpdb;
3712
  $c . '
3713
  </blockquote>';
3714
 
 
3715
  if ( $comment['status'] != 'approved' && ( current_user_can( 'wppa_moderate' ) || current_user_can( 'wppa_comments' ) ) ) {
3716
  if ( wppa( 'no_esc' ) ) {
3717
  $commentblock .= wppa_moderate_links( 'comment', $id, $comment['id'] );
@@ -3720,25 +3721,41 @@ global $wpdb;
3720
  $commentblock .= wppa_html( esc_js( wppa_moderate_links( 'comment', $id, $comment['id'] ) ) );
3721
  }
3722
  }
3723
- elseif ( $comment['status'] == 'pending' && stripslashes( $comment['user'] ) == wppa( 'comment_user' ) ) {
3724
 
3725
- if ( wppa( 'comneedsvote' ) && ! current_user_can( 'wppa_moderate' ) ) {
 
 
 
 
3726
  $commentblock .=
3727
  '<script>
3728
  alert(\'' .
3729
  esc_js( str_replace( '\'', ' ', __( "Please also give the photo a rating to get your comment published." , 'wp-photo-album-plus' ) ) ) .
3730
  '\');
3731
- </script>
3732
- <span style="color:red;" >' .
3733
- __( 'Awaiting your rating', 'wp-photo-album-plus' ) .
3734
- '</span>';
3735
  }
3736
- elseif ( wppa( 'comneedsvote' ) ) {
3737
- $commentblock .=
3738
- '<span style="color:red;" >' .
3739
- __( 'Awaiting a rating', 'wp-photo-album-plus' ) .
3740
- '</span>';
 
 
 
 
 
 
 
 
 
 
 
 
 
 
3741
  }
 
 
3742
  else {
3743
  $commentblock .=
3744
  '<span style="color:red;" >' .
@@ -3746,6 +3763,8 @@ global $wpdb;
3746
  '</span>';
3747
  }
3748
  }
 
 
3749
  elseif ( $comment['status'] == 'spam' && stripslashes( $comment['user'] ) == wppa( 'comment_user' ) ) {
3750
  $commentblock .= '<br /><span style="color:red; font-size:9px;" >'.__( 'Marked as spam', 'wp-photo-album-plus' ).'</span>';
3751
  }
3
  * Package: wp-photo-album-plus
4
  *
5
  * Various wppa boxes
6
+ * Version 7.2.13
7
  *
8
  */
9
 
3712
  $c . '
3713
  </blockquote>';
3714
 
3715
+ // Status approved
3716
  if ( $comment['status'] != 'approved' && ( current_user_can( 'wppa_moderate' ) || current_user_can( 'wppa_comments' ) ) ) {
3717
  if ( wppa( 'no_esc' ) ) {
3718
  $commentblock .= wppa_moderate_links( 'comment', $id, $comment['id'] );
3721
  $commentblock .= wppa_html( esc_js( wppa_moderate_links( 'comment', $id, $comment['id'] ) ) );
3722
  }
3723
  }
 
3724
 
3725
+ // Status pending
3726
+ if ( $comment['status'] == 'pending' ) {
3727
+
3728
+ // Com needs vote message pending (from wppa_do_comment() in wppa_functions.php)
3729
+ if ( wppa( 'comneedsvote' ) ) {
3730
  $commentblock .=
3731
  '<script>
3732
  alert(\'' .
3733
  esc_js( str_replace( '\'', ' ', __( "Please also give the photo a rating to get your comment published." , 'wp-photo-album-plus' ) ) ) .
3734
  '\');
3735
+ </script>';
 
 
 
3736
  }
3737
+
3738
+ // If awaiting ratinmg
3739
+ if ( wppa_switch( 'comment_need_vote' ) ) {
3740
+
3741
+ // If its is the current users comment, say Awaiting YOUR rating
3742
+ if ( wppa_get_user( 'display' ) == $comment['user'] ) {
3743
+ $commentblock .=
3744
+ '<span style="color:red;" >' .
3745
+ __( 'Awaiting your rating', 'wp-photo-album-plus' ) .
3746
+ '</span>';
3747
+ }
3748
+
3749
+ // Other users comment (only seen by moderators)
3750
+ else {
3751
+ $commentblock .=
3752
+ '<span style="color:red;" >' .
3753
+ __( 'Awaiting a rating', 'wp-photo-album-plus' ) .
3754
+ '</span>';
3755
+ }
3756
  }
3757
+
3758
+ // Not awaiting rating, just pending
3759
  else {
3760
  $commentblock .=
3761
  '<span style="color:red;" >' .
3763
  '</span>';
3764
  }
3765
  }
3766
+
3767
+ // Spam?
3768
  elseif ( $comment['status'] == 'spam' && stripslashes( $comment['user'] ) == wppa( 'comment_user' ) ) {
3769
  $commentblock .= '<br /><span style="color:red; font-size:9px;" >'.__( 'Marked as spam', 'wp-photo-album-plus' ).'</span>';
3770
  }
wppa-links.php CHANGED
@@ -3,7 +3,7 @@
3
  * Package: wp-photo-album-plus
4
  *
5
  * Frontend links
6
- * Version 7.2.10
7
  */
8
 
9
  if ( ! defined( 'ABSPATH' ) ) die( "Can't load this file directly" );
@@ -994,7 +994,7 @@ function wppa_moderate_links( $type, $id, $comid = '' ) {
994
  $the_id = $type == 'comment' ? $comid : $id;
995
 
996
  if ( $type == 'comment' || $thumb['status'] != 'scheduled' ) {
997
- $result .= '<div class="wppa-approve-'.$the_id.'" style="clear:both; color:red">'.__('Awaiting moderation', 'wp-photo-album-plus').'</div>';
998
  }
999
  else {
1000
  $result .= '<div class="wppa-approve-'.$the_id.'" style="clear:both; color:red">'.sprintf( __( 'Scheduled for %s' , 'wp-photo-album-plus'), wppa_format_scheduledtm( $thumb['scheduledtm'] ) ).'</div>';
3
  * Package: wp-photo-album-plus
4
  *
5
  * Frontend links
6
+ * Version 7.2.13
7
  */
8
 
9
  if ( ! defined( 'ABSPATH' ) ) die( "Can't load this file directly" );
994
  $the_id = $type == 'comment' ? $comid : $id;
995
 
996
  if ( $type == 'comment' || $thumb['status'] != 'scheduled' ) {
997
+ // $result .= '<div class="wppa-approve-'.$the_id.'" style="clear:both; color:red">'.__('Awaiting moderation', 'wp-photo-album-plus').'</div>';
998
  }
999
  else {
1000
  $result .= '<div class="wppa-approve-'.$the_id.'" style="clear:both; color:red">'.sprintf( __( 'Scheduled for %s' , 'wp-photo-album-plus'), wppa_format_scheduledtm( $thumb['scheduledtm'] ) ).'</div>';
wppa-mailing.php CHANGED
@@ -4,7 +4,7 @@
4
  *
5
  * Contains mailing functions
6
  *
7
- * Version 7.2.12
8
  *
9
  */
10
 
@@ -23,11 +23,13 @@ add_action( 'wppa_do_mailinglist_cron', 'wppa_do_mailinglist', 10, 6 );
23
 
24
  // Call this function to schedule a mailinglist emission
25
  function wppa_schedule_mailinglist( $type, $alb = 0, $pho = 0, $com = 0, $url = '', $start = 0, $delay = 120 ) {
26
-
27
  // If user is an admin and void_admin is active, do nothing
28
  if ( wppa_user_is( 'administrator' ) && wppa_switch( 'void_admin_email' ) ) {
29
- wppa_log( 'dbg', 'Admin email skipped' );
30
- return;
 
 
31
  }
32
 
33
  // If feuploadnotify, see if one is pending, if so, do nothing
4
  *
5
  * Contains mailing functions
6
  *
7
+ * Version 7.2.13
8
  *
9
  */
10
 
23
 
24
  // Call this function to schedule a mailinglist emission
25
  function wppa_schedule_mailinglist( $type, $alb = 0, $pho = 0, $com = 0, $url = '', $start = 0, $delay = 120 ) {
26
+
27
  // If user is an admin and void_admin is active, do nothing
28
  if ( wppa_user_is( 'administrator' ) && wppa_switch( 'void_admin_email' ) ) {
29
+ if ( in_array( $type, array( 'newalbumnotify', 'feuploadnotify', 'commentnotify' ) ) ) {
30
+ wppa_log( 'dbg', "Admin email $type skipped" );
31
+ return;
32
+ }
33
  }
34
 
35
  // If feuploadnotify, see if one is pending, if so, do nothing
wppa-privacy-policy.php CHANGED
@@ -4,7 +4,7 @@
4
  *
5
  * This file contains all procedures related to the privacy policy.
6
  *
7
- * Version 6.9.21
8
  */
9
 
10
  function wppa_comment_exporter( $email_address, $page = 1 ) {
@@ -123,11 +123,12 @@ global $wpdb;
123
  $group_label = __( 'Ratings on photos', 'wp-photo-album-plus' );
124
  $user = get_user_by( 'email', $email_address );
125
  $owner = $user->user_login;
126
- $ratings = $wpdb->get_results( $wpdb->prepare(
127
- "SELECT * FROM $wpdb->wppa_rating " .
128
- "WHERE user = %s " .
129
- "ORDER BY id " .
130
- "LIMIT %d,%d", $owner, ( $page - 1 ) * $number, $number
 
131
  ), ARRAY_A );
132
 
133
  wppa_log( 'obs', count($ratings) .' ratings found to export' );
@@ -186,13 +187,14 @@ global $wpdb;
186
 
187
  $user = get_user_by( 'email', $email_address );
188
  $owner = $user->user_login;
189
- $count = $wpdb->get_var( $wpdb->prepare(
190
- "SELECT COUNT(*) FROM $wpdb->wppa_rating " .
191
- "WHERE user = %s ", $owner ) );
192
-
193
- $wpdb->query( $wpdb->prepare(
194
- "DELETE FROM $wpdb->wppa_rating " .
195
- "WHERE user = %s ", $owner ) );
 
196
 
197
  wppa_log( 'obs', $count . ' ratings found to remove' );
198
 
4
  *
5
  * This file contains all procedures related to the privacy policy.
6
  *
7
+ * Version 7.2.13
8
  */
9
 
10
  function wppa_comment_exporter( $email_address, $page = 1 ) {
123
  $group_label = __( 'Ratings on photos', 'wp-photo-album-plus' );
124
  $user = get_user_by( 'email', $email_address );
125
  $owner = $user->user_login;
126
+ $owner_display = $user->display_name;
127
+ $ratings = $wpdb->get_results( $wpdb->prepare( "SELECT * FROM $wpdb->wppa_rating
128
+ WHERE user = %s
129
+ OR user = %s
130
+ ORDER BY id
131
+ LIMIT %d,%d", $owner, $owner_display, ( $page - 1 ) * $number, $number
132
  ), ARRAY_A );
133
 
134
  wppa_log( 'obs', count($ratings) .' ratings found to export' );
187
 
188
  $user = get_user_by( 'email', $email_address );
189
  $owner = $user->user_login;
190
+ $owner_display = $user->display_name;
191
+ $count = $wpdb->get_var( $wpdb->prepare( "SELECT COUNT(*) FROM $wpdb->wppa_rating
192
+ WHERE user = %s
193
+ OR user = %s", $owner, $owner_display ) );
194
+
195
+ $wpdb->query( $wpdb->prepare( "DELETE FROM $wpdb->wppa_rating
196
+ WHERE user = %s
197
+ OR user = %s", $owner, $owner_display ) );
198
 
199
  wppa_log( 'obs', $count . ' ratings found to remove' );
200
 
wppa-utils.php CHANGED
@@ -3,7 +3,7 @@
3
  * Package: wp-photo-album-plus
4
  *
5
  * Contains low-level utility routines
6
- * Version 7.2.11
7
  *
8
  */
9
 
@@ -673,76 +673,42 @@ function wppa_clear_taglist() {
673
  function wppa_create_taglist() {
674
  global $wpdb;
675
 
676
- // Initialize
677
- $result = false;
678
- $total = '0';
679
- $done = false;
680
- $skip = '0';
681
- $pagsize = '10000';
682
-
683
- // To avoid out of memory, we do all the photos in chunks of $pagsize
684
- while ( ! $done ) {
685
-
686
- // Get the chunk
687
- $photos = $wpdb->get_results( "SELECT id, tags " .
688
- "FROM $wpdb->wppa_photos " .
689
- "WHERE status <> 'pending' " .
690
- "AND status <> 'scheduled' " .
691
- "AND album > 0 " .
692
- "AND tags <> '' " .
693
- "LIMIT " . $skip . "," . $pagsize,
694
- ARRAY_A );
695
-
696
- // If photos found, process the tags, if any
697
- if ( $photos ) foreach ( $photos as $photo ) {
698
- $tags = explode( ',', $photo['tags'] );
699
-
700
- // Tags found?
701
- if ( $tags ) foreach ( $tags as $tag ) {
702
- if ( $tag ) {
703
- if ( ! isset( $result[$tag] ) ) { // A new tag
704
- $result[$tag]['tag'] = $tag;
705
- $result[$tag]['count'] = '1';
706
- $result[$tag]['ids'][] = $photo['id'];
707
- }
708
- else { // An existing tag
709
- $result[$tag]['count']++;
710
- $result[$tag]['ids'][] = $photo['id'];
711
- }
712
- }
713
- $total++;
714
- }
715
- }
716
-
717
- // If no more photos, we are done
718
- else {
719
- $done = true;
720
- }
721
- $skip += $pagsize;
722
- }
723
-
724
- // Add the minimum existing tags
725
- $minimum_tags = wppa_opt( 'minimum_tags' );
726
- if ( $minimum_tags ) {
727
- $tags = explode( ',', $minimum_tags );
728
- foreach ( $tags as $tag ) {
729
- if ( $tag ) {
730
- if ( ! isset( $result[$tag] ) ) { // A not occurring tag
731
- $result[$tag]['tag'] = $tag;
732
- $result[$tag]['count'] = '0';
733
- $result[$tag]['ids'] = array();
734
- }
735
- }
736
  }
737
  }
 
 
 
738
 
739
  // If any tags found, calculate fractions
740
  $tosave = array();
741
  if ( is_array( $result ) ) {
742
  foreach ( array_keys( $result ) as $key ) {
743
- $result[$key]['fraction'] = sprintf( '%4.2f', $result[$key]['count'] / $total );
744
  }
745
- $result = wppa_array_sort( $result, 'tag' );
746
  $tosave = $result;
747
 
748
  // Convert the arrays to compressed enumerations
@@ -757,6 +723,10 @@ global $wpdb;
757
  wppa_log( 'Err', 'Unable to save taglist' );
758
  }
759
 
 
 
 
 
760
  // And return the result
761
  return $result;
762
  }
@@ -3367,7 +3337,7 @@ global $wpdb;
3367
  "ORDER BY id DESC " .
3368
  "LIMIT 1 ",
3369
  $id,
3370
- wppa_get_user()
3371
  )
3372
  );
3373
  return $result;
3
  * Package: wp-photo-album-plus
4
  *
5
  * Contains low-level utility routines
6
+ * Version 7.2.13
7
  *
8
  */
9
 
673
  function wppa_create_taglist() {
674
  global $wpdb;
675
 
676
+ // Init
677
+ $time = time();
678
+ $total = 0;
679
+
680
+ // Get the existing tags raw
681
+ $raw_tagcol = $wpdb->get_col( "SELECT DISTINCT tags FROM $wpdb->wppa_photos
682
+ WHERE status NOT IN ('pending','scheduled')
683
+ AND album > 0
684
+ AND tags <> ''" );
685
+ $raw_tags = implode( ',', $raw_tagcol ) . wppa_opt( 'minimum_tags' );
686
+ $san_tags = trim( wppa_sanitize_tags( $raw_tags ), ',' );
687
+ $tag_arr = explode( ',', $san_tags );
688
+
689
+ // Process all existing tags
690
+ if ( count( $tag_arr ) ) {
691
+ $result = array();
692
+ foreach( $tag_arr as $tag ) {
693
+ $result[$tag]['tag'] = $tag;
694
+ $result[$tag]['ids'] = $wpdb->get_col( $wpdb->prepare( "SELECT id FROM $wpdb->wppa_photos
695
+ WHERE status NOT IN ('pending','scheduled')
696
+ AND album > 0
697
+ AND tags LIKE %s", '%' . $wpdb->esc_like( ',' . $tag . ',' ) . '%' ) );
698
+ $result[$tag]['count'] = count( $result[$tag]['ids'] );
699
+ $total += $result[$tag]['count'];
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
700
  }
701
  }
702
+ else {
703
+ $result = false;
704
+ }
705
 
706
  // If any tags found, calculate fractions
707
  $tosave = array();
708
  if ( is_array( $result ) ) {
709
  foreach ( array_keys( $result ) as $key ) {
710
+ $result[$key]['fraction'] = $total ? sprintf( '%4.2f', $result[$key]['count'] / $total ) : '0.00';
711
  }
 
712
  $tosave = $result;
713
 
714
  // Convert the arrays to compressed enumerations
723
  wppa_log( 'Err', 'Unable to save taglist' );
724
  }
725
 
726
+ $dtime = time() - $time;
727
+ $mem = memory_get_peak_usage( true );
728
+ wppa_log( 'dbg', "Creating taglist took $dtime seconds and $mem bytes memory" );
729
+
730
  // And return the result
731
  return $result;
732
  }
3337
  "ORDER BY id DESC " .
3338
  "LIMIT 1 ",
3339
  $id,
3340
+ wppa_get_user( 'display' )
3341
  )
3342
  );
3343
  return $result;
wppa-wpdb-insert.php CHANGED
@@ -502,10 +502,11 @@ global $wpdb;
502
  if ( $iret ) {
503
  wppa_invalidate_treecounts( $args['id'] );
504
 
505
- // Update index
506
  wppa_schedule_maintenance_proc( 'wppa_remake_index_albums' );
507
  wppa_clear_cache();
508
  wppa_schedule_mailinglist( 'newalbumnotify', $args['id'] );
 
509
 
510
  return $args['id'];
511
  }
502
  if ( $iret ) {
503
  wppa_invalidate_treecounts( $args['id'] );
504
 
505
+ // Housekeeping
506
  wppa_schedule_maintenance_proc( 'wppa_remake_index_albums' );
507
  wppa_clear_cache();
508
  wppa_schedule_mailinglist( 'newalbumnotify', $args['id'] );
509
+ wppa_create_pl_htaccess();
510
 
511
  return $args['id'];
512
  }
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.2.12.002
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 = '7212'; // WPPA db version
26
- global $wppa_api_version; $wppa_api_version = '7.2.12.002'; // WPPA software version
27
 
28
  /* Init page js data */
29
  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.2.13.004
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 = '7213'; // WPPA db version
26
+ global $wppa_api_version; $wppa_api_version = '7.2.13.004'; // WPPA software version
27
 
28
  /* Init page js data */
29
  global $wppa_js_page_data; $wppa_js_page_data = '';