WP Photo Album Plus - Version 7.0.04.003

Version Description

= 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.0.04.003
Comparing to
See all releases

Code changes from version 7.0.03.006 to 7.0.04.003

changelog.txt CHANGED
@@ -1,5 +1,17 @@
1
  WP Photo Album Plus Changelog
2
 
 
 
 
 
 
 
 
 
 
 
 
 
3
  = 7.0.03 =
4
 
5
  = Bug Fixes =
1
  WP Photo Album Plus Changelog
2
 
3
+ = 7.0.04 =
4
+
5
+ = Bug Fixes =
6
+
7
+ * Fixed a problem in commenting.
8
+ * Fixed a problem in changing photo information.
9
+ * Fixed a problem in comment status.
10
+
11
+ = Other Changes =
12
+
13
+ * Added error messages on the admin dashboard in case of certain configuration conflicts.
14
+
15
  = 7.0.03 =
16
 
17
  = Bug Fixes =
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.0.03
6
- Stable tag: 7.0.02.002
7
  Author: J.N. Breetvelt
8
  Author URI: http://www.opajaap.nl/
9
  Requires at least: 3.9
@@ -137,7 +137,12 @@ See for the full changelog: <a href="http://www.wppa.nl/changelog/" >The documen
137
 
138
  == Upgrade Notice ==
139
 
140
- = 7,0,03 =
 
 
 
 
 
141
 
142
  * This version addresses various minor bug fixes and feature requests.
143
 
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.0.04
6
+ Stable tag: 7.0.03.006
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.0.04 =
141
+
142
+ * This version addresses various bug fixes
143
+ * This version addresses various security issues.
144
+
145
+ = 7.0.03 =
146
 
147
  * This version addresses various minor bug fixes and feature requests.
148
 
wppa-admin.php CHANGED
@@ -3,7 +3,7 @@
3
  * Package: wp-photo-album-plus
4
  *
5
  * Contains the admin menu and startups the admin pages
6
- * Version 7.0.00
7
  *
8
  */
9
 
@@ -35,7 +35,7 @@ function wppa_add_admin() {
35
 
36
  // See if there are comments pending moderation
37
  $com_pending = '';
38
- $com_pending_count = $wpdb->get_var( "SELECT COUNT(*) FROM $wpdb->wppa_comments WHERE status = 'pending' OR status = 'spam'" );
39
  if ( $com_pending_count ) $com_pending = '<span class="update-plugins"><span class="plugin-count">'.$com_pending_count.'</span></span>';
40
 
41
  // See if there are uploads pending moderation
@@ -231,6 +231,9 @@ add_action('admin_notices', 'wppa_verify_multisite_config');
231
  /* Check for pending maintenance procs */
232
  add_action('admin_notices', 'wppa_maintenance_messages');
233
 
 
 
 
234
  // Check if tags system needs conversion
235
  add_action( 'admin_init', 'wppa_check_tag_system' );
236
 
3
  * Package: wp-photo-album-plus
4
  *
5
  * Contains the admin menu and startups the admin pages
6
+ * Version 7.0.04
7
  *
8
  */
9
 
35
 
36
  // See if there are comments pending moderation
37
  $com_pending = '';
38
+ $com_pending_count = $wpdb->get_var( "SELECT COUNT(*) FROM $wpdb->wppa_comments WHERE status = 'pending' OR status = 'spam' OR status = ''" );
39
  if ( $com_pending_count ) $com_pending = '<span class="update-plugins"><span class="plugin-count">'.$com_pending_count.'</span></span>';
40
 
41
  // See if there are uploads pending moderation
231
  /* Check for pending maintenance procs */
232
  add_action('admin_notices', 'wppa_maintenance_messages');
233
 
234
+ // Check for configuration conflicts
235
+ add_action( 'admin_notices', 'wppa_check_config_conflicts' );
236
+
237
  // Check if tags system needs conversion
238
  add_action( 'admin_init', 'wppa_check_tag_system' );
239
 
wppa-ajax.php CHANGED
@@ -2,7 +2,7 @@
2
  /* wppa-ajax.php
3
  *
4
  * Functions used in ajax requests
5
- * Version 7.0.03
6
  *
7
  */
8
 
@@ -433,7 +433,7 @@ global $wppa_log_file;
433
  // Validate args
434
  $mocc = isset( $_REQUEST['moccur'] ) ? strval( intval( $_REQUEST['moccur'] ) ) : '0';
435
  $nonce = isset( $_REQUEST['wppa-nonce'] ) ? $_REQUEST['wppa-nonce'] : '0';
436
- $photoid = isset( $_REQUEST['photo-id'] ) ? wppa_decrypt_photo( $_REQUEST['photo-id'] ) : '0';
437
  $commentid = isset( $_REQUEST['comment-edit'] ) ? strval( intval( $_REQUEST['comment-edit'] ) ) : '0';
438
 
439
  // Security check
@@ -452,7 +452,7 @@ global $wppa_log_file;
452
  wppa_secfail( '71' );
453
  }
454
  }
455
-
456
  // Check login
457
  if ( wppa_switch( 'comment_login' ) && ! is_user_logged_in() ) {
458
  wppa_secfail( '72' );
2
  /* wppa-ajax.php
3
  *
4
  * Functions used in ajax requests
5
+ * Version 7.0.04
6
  *
7
  */
8
 
433
  // Validate args
434
  $mocc = isset( $_REQUEST['moccur'] ) ? strval( intval( $_REQUEST['moccur'] ) ) : '0';
435
  $nonce = isset( $_REQUEST['wppa-nonce'] ) ? $_REQUEST['wppa-nonce'] : '0';
436
+ $photoid = isset( $_REQUEST['photo-id'] ) ? wppa_decrypt_photo( trim( $_REQUEST['photo-id'], '/' ) ) : '0';
437
  $commentid = isset( $_REQUEST['comment-edit'] ) ? strval( intval( $_REQUEST['comment-edit'] ) ) : '0';
438
 
439
  // Security check
452
  wppa_secfail( '71' );
453
  }
454
  }
455
+
456
  // Check login
457
  if ( wppa_switch( 'comment_login' ) && ! is_user_logged_in() ) {
458
  wppa_secfail( '72' );
wppa-comment-admin.php CHANGED
@@ -306,7 +306,7 @@ class WPPA_Comment_table extends WP_List_Table {
306
  $filter = "WHERE status = 'spam'";
307
  break;
308
  case 'pending':
309
- $filter = "WHERE status = 'pending'";
310
  break;
311
  case 'approved':
312
  $filter = "WHERE status = 'approved'";
@@ -413,7 +413,7 @@ function _wppa_comment_admin() {
413
  </tr>
414
  <tr>
415
  <td style="margin:0; font-weight:bold; color:#e66f00;">' . __( 'Pending:', 'wp-photo-album-plus' ) . '</td>
416
- <td style="margin:0; font-weight:bold;">' . $wpdb->get_var( "SELECT COUNT(*) FROM $wpdb->wppa_comments WHERE status = 'pending'" ) . '</td>
417
  <td></td>
418
  </tr>
419
  <tr>
306
  $filter = "WHERE status = 'spam'";
307
  break;
308
  case 'pending':
309
+ $filter = "WHERE status = 'pending' OR status = ''";
310
  break;
311
  case 'approved':
312
  $filter = "WHERE status = 'approved'";
413
  </tr>
414
  <tr>
415
  <td style="margin:0; font-weight:bold; color:#e66f00;">' . __( 'Pending:', 'wp-photo-album-plus' ) . '</td>
416
+ <td style="margin:0; font-weight:bold;">' . $wpdb->get_var( "SELECT COUNT(*) FROM $wpdb->wppa_comments WHERE status = 'pending' OR status = ''" ) . '</td>
417
  <td></td>
418
  </tr>
419
  <tr>
wppa-encrypt.php CHANGED
@@ -3,7 +3,7 @@
3
  * Package: wp-photo-album-plus
4
  *
5
  * Contains all ecryption/decryption logic
6
- * Version 7.0.03
7
  *
8
  */
9
 
@@ -154,6 +154,9 @@ function wppa_encrypt_album( $album ) {
154
  function wppa_decrypt_photo( $photo, $report_error = true, $no_refuse = false ) {
155
  global $wpdb;
156
 
 
 
 
157
  // Feature enabled?
158
  if ( ! wppa_switch( 'use_encrypted_links' ) ) {
159
  return intval( $photo );
@@ -169,11 +172,6 @@ global $wpdb;
169
  return intval( $photo );
170
  }
171
 
172
- // Wrapped in / by js?
173
- if ( strlen( $photo ) > 12 ) {
174
- $photo = trim( $photo, '/' );
175
- }
176
-
177
  // Just do it
178
  $id = $wpdb->get_var( $wpdb->prepare( "SELECT id FROM $wpdb->wppa_photos WHERE crypt = %s", substr( $photo, 0, 12 ) ) );
179
  if ( ! $id ) {
3
  * Package: wp-photo-album-plus
4
  *
5
  * Contains all ecryption/decryption logic
6
+ * Version 7.0.04
7
  *
8
  */
9
 
154
  function wppa_decrypt_photo( $photo, $report_error = true, $no_refuse = false ) {
155
  global $wpdb;
156
 
157
+ // Fix js trick
158
+ $photo = trim( $photo, '/' );
159
+
160
  // Feature enabled?
161
  if ( ! wppa_switch( 'use_encrypted_links' ) ) {
162
  return intval( $photo );
172
  return intval( $photo );
173
  }
174
 
 
 
 
 
 
175
  // Just do it
176
  $id = $wpdb->get_var( $wpdb->prepare( "SELECT id FROM $wpdb->wppa_photos WHERE crypt = %s", substr( $photo, 0, 12 ) ) );
177
  if ( ! $id ) {
wppa-featen-widget.php CHANGED
@@ -3,7 +3,7 @@
3
  * Package: wp-photo-album-plus
4
  *
5
  * display the featured photos
6
- * Version 7.0.00
7
  */
8
 
9
  if ( ! defined( 'ABSPATH' ) ) die( "Can't load this file directly" );
3
  * Package: wp-photo-album-plus
4
  *
5
  * display the featured photos
6
+ * Version 7.0.04
7
  */
8
 
9
  if ( ! defined( 'ABSPATH' ) ) die( "Can't load this file directly" );
wppa-filter.php CHANGED
@@ -3,7 +3,7 @@
3
  * Package: wp-photo-album-plus
4
  *
5
  * get the albums via shortcode handler
6
- * Version 7.0.03
7
  *
8
  */
9
 
@@ -33,16 +33,17 @@ function wppa_add_shortcode_to_post( $post ) {
33
  }
34
 
35
  // Shortcode [wppa_div style="{style specs}"][/wppa_div]
36
- function wppa_shordcode_div( $xatts, $content = '' ) {
37
 
38
  $atts = shortcode_atts( array(
39
- 'style' => 'clear:both;position:relative;',
40
- 'class' => '',
 
41
  ), $xatts );
42
 
43
  $style = $atts['style'];
44
 
45
- $allowed_chars = array( 'a','b','c','d','e','f','g','h','i','j','k','l','m','n','o','p','q','r','s','t','u','v','w','x','y','z','0','1','2','3','4','5','6','7','8','9',':',';','-','%' );
46
 
47
  $n = strlen( $style );
48
  $i = 0;
@@ -56,15 +57,22 @@ function wppa_shordcode_div( $xatts, $content = '' ) {
56
  }
57
  $i++;
58
  }
59
-
60
- $result = '<div style="' . esc_attr( $style ) . '" class="' . esc_attr( $atts['class'] ) . '" >' .
61
- do_shortcode( $content ) .
 
 
 
 
 
 
 
62
  '</div>';
63
 
64
  return $result;
65
  }
66
 
67
- add_shortcode( 'wppa_div', 'wppa_shordcode_div' );
68
 
69
  // The shortcode handler
70
  function wppa_shortcodes( $xatts, $content = '' ) {
3
  * Package: wp-photo-album-plus
4
  *
5
  * get the albums via shortcode handler
6
+ * Version 7.0.04
7
  *
8
  */
9
 
33
  }
34
 
35
  // Shortcode [wppa_div style="{style specs}"][/wppa_div]
36
+ function wppa_shortcode_div( $xatts, $content = '' ) {
37
 
38
  $atts = shortcode_atts( array(
39
+ 'style' => 'clear:both;position:relative;',
40
+ 'class' => '',
41
+ 'nicescroll' => '',
42
  ), $xatts );
43
 
44
  $style = $atts['style'];
45
 
46
+ $allowed_chars = array( 'a','b','c','d','e','f','g','h','i','j','k','l','m','n','o','p','q','r','s','t','u','v','w','x','y','z','0','1','2','3','4','5','6','7','8','9',':',';','-','%','#',' ' );
47
 
48
  $n = strlen( $style );
49
  $i = 0;
57
  }
58
  $i++;
59
  }
60
+
61
+ $result = '<div style="' . esc_attr( $style ) . '" class="wppa-div ' . esc_attr( $atts['class'] ) . '" >' .
62
+ ( $atts['nicescroll'] ? '<div class="wppa-divnicewrap" >': '' ) .
63
+ do_shortcode( $content ) .
64
+ ( $atts['nicescroll'] ? '
65
+ <script type="text/javascript" >
66
+ jQuery(document).ready(function(){
67
+ jQuery(".wppa-div").niceScroll(".wppa-divnicewrap",{' . wppa_opt( 'nicescroll_opts' ) . '});' .
68
+ '});
69
+ </script>' : '' ) .
70
  '</div>';
71
 
72
  return $result;
73
  }
74
 
75
+ add_shortcode( 'wppa_div', 'wppa_shortcode_div' );
76
 
77
  // The shortcode handler
78
  function wppa_shortcodes( $xatts, $content = '' ) {
wppa-functions.php CHANGED
@@ -2419,7 +2419,7 @@ global $wppa_done;
2419
  case 'logout':
2420
  $status = is_user_logged_in() ? 'approved' : 'pending';
2421
  break;
2422
- case 'none':
2423
  $status = 'approved';
2424
  break;
2425
  case 'wprules':
2419
  case 'logout':
2420
  $status = is_user_logged_in() ? 'approved' : 'pending';
2421
  break;
2422
+ case '-none-':
2423
  $status = 'approved';
2424
  break;
2425
  case 'wprules':
wppa-init.php CHANGED
@@ -4,7 +4,7 @@
4
  *
5
  * This file loads required php files and contains all functions used in init actions.
6
  *
7
- * Version 7.0.01
8
  */
9
 
10
  /* LOAD SIDEBAR WIDGETS */
@@ -309,6 +309,36 @@ function wppa_cat_message() {
309
  wppa_error_message( __('</strong>The cats system needs to be converted. Please run <b>Photo Albums -> Settings</b> admin page <b>Table VIII-B17</b><strong>' , 'wp-photo-album-plus') );
310
  }
311
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
312
 
313
  /* This function will add "donate" link to main plugins page */
314
  function wppa_donate_link($links, $file) {
4
  *
5
  * This file loads required php files and contains all functions used in init actions.
6
  *
7
+ * Version 7.0.04
8
  */
9
 
10
  /* LOAD SIDEBAR WIDGETS */
309
  wppa_error_message( __('</strong>The cats system needs to be converted. Please run <b>Photo Albums -> Settings</b> admin page <b>Table VIII-B17</b><strong>' , 'wp-photo-album-plus') );
310
  }
311
 
312
+ // Print admin messages on config conflicts
313
+ function wppa_check_config_conflicts() {
314
+ global $wpdb;
315
+
316
+ $any = false;
317
+ $text = __( 'WPPA detected the following configuration conflict(s)', 'wp-photo-album-plus' ) . '<br />';
318
+
319
+ // Album names in urls
320
+ if ( wppa_switch( 'use_album_names_in_urls' ) ) {
321
+ $nalbs = $wpdb->get_var( "SELECT COUNT(*) FROM {$wpdb->wppa_albums}" );
322
+ $ualbs = $wpdb->get_col( "SELECT DISTINCT name FROM {$wpdb->wppa_albums}" );
323
+ if ( $nalbs > count ( $ualbs ) ) {
324
+ $text .= '<br />' . __( 'Table IV-A4: Album names in urls is activated, but there are duplicate album names.', 'wp-photo-album-plus' );
325
+ $any = true;
326
+ }
327
+ }
328
+
329
+ // Direct comment/ratings
330
+ if ( wppa_switch( 'direct_comment' ) ) {
331
+ if ( ! wppa_switch( 'use_encrypted_links' ) || ! wppa_switch( 'refuse_unencrypted' ) ) {
332
+ $text .= '<br />' . __( 'Table IX-A14: Direct comment is activated. This requires Table IV-A6.1: Enable encrypted links and Table IV-A6.2: Refuse unencrypted to be activated.', 'wp-photo-album-plus' );
333
+ $any = true;
334
+ }
335
+ }
336
+
337
+ // Output
338
+ if ( $any ) {
339
+ wppa_error_message( $text );
340
+ }
341
+ }
342
 
343
  /* This function will add "donate" link to main plugins page */
344
  function wppa_donate_link($links, $file) {
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 7.0.03
7
  *
8
  */
9
 
@@ -1215,10 +1215,10 @@ global $wppa_log_file;
1215
  foreach ( $indexes as $index ) {
1216
  $result .= '
1217
  <tr>
1218
- <td>'.$index['id'].'</td>
1219
- <td>'.$index['slug'].'</td>
1220
- <td style="max-width:400px; word-wrap: break-word;" >'.$index['albums'].'</td>
1221
- <td>'.$index['photos'].'</td>
1222
  </tr>';
1223
  }
1224
 
@@ -1248,6 +1248,12 @@ global $wppa_log_file;
1248
  $size = filesize( $wppa_log_file );
1249
  $data = fread( $file, $size );
1250
  $data = strip_tags( $data );
 
 
 
 
 
 
1251
  $data = str_replace( array( '{b}', '{/b}', '{i}', '{/i}', "\n", '{span', '{/span}', '" }' ), array( '<b>', '</b>', '<i>', '</i>', '<br />', '<span', '</span>', '" >' ), $data );
1252
  $result .= $data;
1253
  fclose( $file );
@@ -1335,7 +1341,6 @@ global $wppa_log_file;
1335
  <thead>
1336
  <tr>
1337
  <th>Id</th>
1338
-
1339
  <th>IP</th>
1340
  <th>Started</th>
1341
  <th>Count</th>
@@ -1351,12 +1356,11 @@ global $wppa_log_file;
1351
  $result .= '
1352
  <tr>
1353
  <td>'.$session['id'].'</td>
1354
-
1355
- <td>' . ( strlen( $session['ip'] ) > 15 ? substr( $session['ip'], 0, 12 ) . '...' : $session['ip'] ) . '</td>
1356
  <td style="width:150px;" >'.wppa_local_date(get_option('date_format', "F j, Y,").' '.get_option('time_format', "g:i a"), $session['timestamp']).'</td>
1357
- <td>'.$session['count'].'</td>' .
1358
- '<td>'.$session['status'].'</td>' .
1359
- '<td style="border-bottom:1px solid gray;max-width:300px;" >';
1360
  if ( is_array( $data ) ) foreach ( array_keys( $data ) as $key ) {
1361
  if ( $key != 'uris' ) {
1362
  if ( is_array( $data[$key] ) ) {
@@ -1366,8 +1370,6 @@ global $wppa_log_file;
1366
  }
1367
  elseif ( is_object( $data[$key] ) ) {
1368
  $temp = var_export( $data[$key], true );
1369
- // $temp = str_replace( "\n", '<br />', $temp );
1370
- // $temp = str_replace( "\t", '&nbsp;&nbsp;', $temp );
1371
  $result .= '['.$key.'] => ' . $temp;
1372
  }
1373
  else {
@@ -1436,18 +1438,22 @@ global $wppa_log_file;
1436
  $thumb = wppa_cache_thumb( $comment['photo'] );
1437
  $result .= '
1438
  <tr>
1439
- <td>'.$comment['id'].'</td>
1440
- <td>'.$comment['timestamp'].'</td>
1441
- <td>'.( $comment['timestamp'] ? wppa_local_date(get_option('date_format', "F j, Y,").' '.get_option('time_format', "g:i a"), $comment['timestamp']) : 'pre-historic' ).'</td>
1442
- <td>'.$comment['status'].'</td>
1443
- <td>'.$comment['user'].'</td>
1444
- <td>'.$comment['email'].'</td>
1445
- <td>'.$comment['photo'].'</td>
1446
- <td style="width:250px; text-align:center;"><img src="'.wppa_get_thumb_url($comment['photo']).'"
1447
- style="height: 40px;"
1448
- onmouseover="jQuery(this).stop().animate({height:this.naturalHeight}, 200);"
1449
- onmouseout="jQuery(this).stop().animate({height:\'40px\'}, 200);" /></td>
1450
- <td>'.$comment['comment'].'</td>
 
 
 
 
1451
  </tr>';
1452
  }
1453
 
3
  * Package: wp-photo-album-plus
4
  *
5
  * Contains (not yet, but in the future maybe) all the maintenance routines
6
+ * Version 7.0.04
7
  *
8
  */
9
 
1215
  foreach ( $indexes as $index ) {
1216
  $result .= '
1217
  <tr>
1218
+ <td>' . htmlentities( $index['id'] ) . '</td>
1219
+ <td>' . htmlentities( $index['slug'] ) . '</td>
1220
+ <td style="max-width:400px; word-wrap: break-word;" >' . htmlentities( $index['albums'] ) . '</td>
1221
+ <td>' . htmlentities( $index['photos'] ) . '</td>
1222
  </tr>';
1223
  }
1224
 
1248
  $size = filesize( $wppa_log_file );
1249
  $data = fread( $file, $size );
1250
  $data = strip_tags( $data );
1251
+
1252
+ // Trim leading partial logline
1253
+ if ( substr( $data, 0, 1 ) != '{' ) {
1254
+ $brpos = strpos( $data, "\n" );
1255
+ $data = substr( $data, $brpos + 1 );
1256
+ }
1257
  $data = str_replace( array( '{b}', '{/b}', '{i}', '{/i}', "\n", '{span', '{/span}', '" }' ), array( '<b>', '</b>', '<i>', '</i>', '<br />', '<span', '</span>', '" >' ), $data );
1258
  $result .= $data;
1259
  fclose( $file );
1341
  <thead>
1342
  <tr>
1343
  <th>Id</th>
 
1344
  <th>IP</th>
1345
  <th>Started</th>
1346
  <th>Count</th>
1356
  $result .= '
1357
  <tr>
1358
  <td>'.$session['id'].'</td>
1359
+ <td>' . htmlentities( strlen( $session['ip'] ) > 15 ? substr( $session['ip'], 0, 12 ) . '...' : $session['ip'] ) . '</td>
 
1360
  <td style="width:150px;" >'.wppa_local_date(get_option('date_format', "F j, Y,").' '.get_option('time_format', "g:i a"), $session['timestamp']).'</td>
1361
+ <td>' . htmlentities( $session['count'] ) . '</td>
1362
+ <td>' . htmlentities( $session['status'] ) . '</td>
1363
+ <td style="border-bottom:1px solid gray;max-width:300px;" >';
1364
  if ( is_array( $data ) ) foreach ( array_keys( $data ) as $key ) {
1365
  if ( $key != 'uris' ) {
1366
  if ( is_array( $data[$key] ) ) {
1370
  }
1371
  elseif ( is_object( $data[$key] ) ) {
1372
  $temp = var_export( $data[$key], true );
 
 
1373
  $result .= '['.$key.'] => ' . $temp;
1374
  }
1375
  else {
1438
  $thumb = wppa_cache_thumb( $comment['photo'] );
1439
  $result .= '
1440
  <tr>
1441
+ <td>' . htmlentities( $comment['id'] ) . '</td>
1442
+ <td>' . htmlentities( $comment['timestamp'] ) . '</td>
1443
+ <td>' . htmlentities( $comment['timestamp'] ? wppa_local_date( '', $comment['timestamp'] ) : 'pre-historic' ) . '</td>
1444
+ <td>' . htmlentities( $comment['status'] ) . '</td>
1445
+ <td>' . htmlentities( $comment['user'] ) . '</td>
1446
+ <td>' . htmlentities( $comment['email'] ) . '</td>
1447
+ <td>' . htmlentities( $comment['photo'] ) . '</td>
1448
+ <td style="width:250px; text-align:center;" >
1449
+ <img
1450
+ src="' . esc_url( wppa_get_thumb_url( $comment['photo'] ) ) . '"
1451
+ style="height: 40px;"
1452
+ onmouseover="jQuery(this).stop().animate({height:this.naturalHeight}, 200);"
1453
+ onmouseout="jQuery(this).stop().animate({height:\'40px\'}, 200);"
1454
+ />
1455
+ </td>
1456
+ <td>' . htmlentities( $comment['comment'] ) . '</td>
1457
  </tr>';
1458
  }
1459
 
wppa-setup.php CHANGED
@@ -3,7 +3,7 @@
3
  * Package: wp-photo-album-plus
4
  *
5
  * Contains all the setup stuff
6
- * Version 7.0.03
7
  *
8
  */
9
 
@@ -674,6 +674,14 @@ global $wppa_error;
674
  wppa_unlink ( WPPA_PATH.'/dynamic/wppa-dynamic.css' ); // Will be auto re-created
675
  }
676
 
 
 
 
 
 
 
 
 
677
  // Done!
678
  if ( ! $wppa_error ) {
679
  $old_rev = round($old_rev); // might be 0.01 off
3
  * Package: wp-photo-album-plus
4
  *
5
  * Contains all the setup stuff
6
+ * Version 7.0.04
7
  *
8
  */
9
 
674
  wppa_unlink ( WPPA_PATH.'/dynamic/wppa-dynamic.css' ); // Will be auto re-created
675
  }
676
 
677
+ // Make sure virtual album crypt exist
678
+ $albs = array( '0', '1', '2', '3', '9' );
679
+ foreach( $albs as $alb ) {
680
+ if ( ! get_option( 'wppa_album_crypt_' . $alb ) ) {
681
+ update_option( 'wppa_album_crypt_' . $alb, wppa_get_unique_album_crypt() );
682
+ }
683
+ }
684
+
685
  // Done!
686
  if ( ! $wppa_error ) {
687
  $old_rev = round($old_rev); // might be 0.01 off
wppa-thumbnails.php CHANGED
@@ -1597,7 +1597,7 @@ function wppa_get_the_widget_thumb( $type, $image, $album, $display, $link, $tit
1597
  // Open container if an image must be displayed
1598
  if ( $display == 'thumbs' ) {
1599
  $size = max( $imgstyle_a['width'], $imgstyle_a['height'] );
1600
- $result .= '<div style="width:' . $size . 'px; height:' . $size . 'px; overflow:hidden;" >';
1601
  }
1602
 
1603
  // The medals if on top
@@ -1610,8 +1610,8 @@ function wppa_get_the_widget_thumb( $type, $image, $album, $display, $link, $tit
1610
 
1611
  if ( $link ) {
1612
  if ( $link['is_url'] ) { // Is a href
1613
- $result .= "\n\t" . '<a href="' . $link['url'] . '" title="' . $title . '" target="' . $link['target'] . '" >';
1614
- $result .= "\n\t\t";
1615
  if ( $display == 'thumbs' ) {
1616
  if ( $is_video ) {
1617
  $result .= wppa_get_video_html( array(
@@ -1630,10 +1630,10 @@ function wppa_get_the_widget_thumb( $type, $image, $album, $display, $link, $tit
1630
  else {
1631
  $result .= '<img' .
1632
  ' id="i-' . $xid . '-' . wppa( 'mocc' ) . '"' .
1633
- ( $title ? ' title="' . $title . '"' : '' ) .
1634
- ' ' . ( wppa_switch( 'lazy' ) ? 'data-' : '' ) . 'src="' . $imgurl . '"' .
1635
- ' width="' . $imgstyle_a['width'] . '"' .
1636
- ' height="' . $imgstyle_a['height'] . '"' .
1637
  ' style="' . $imgstyle_a['style'] . ' cursor:pointer;"' .
1638
  ' ' . $imgevents .
1639
  ' ' . wppa_get_imgalt( $id ) .
@@ -1762,8 +1762,8 @@ function wppa_get_the_widget_thumb( $type, $image, $album, $display, $link, $tit
1762
  else {
1763
  $result .= '<img' .
1764
  ' id="i-' . $xid . '-' . wppa( 'mocc' ) . '"' .
1765
- ( $title ? ' title="' . $title . '"' : '' ) .
1766
- ' ' . ( wppa_switch( 'lazy' ) ? 'data-' : '' ) . 'src="' . $imgurl . '"' .
1767
  ' width="' . $imgstyle_a['width'] . '"' .
1768
  ' height="' . $imgstyle_a['height'] . '"' .
1769
  ' style="' . $imgstyle_a['style'] . '"' .
1597
  // Open container if an image must be displayed
1598
  if ( $display == 'thumbs' ) {
1599
  $size = max( $imgstyle_a['width'], $imgstyle_a['height'] );
1600
+ $result .= '<div style="width:' . strval( intval( $size ) ) . 'px; height:' . strval( intval( $size ) ) . 'px; overflow:hidden;" >';
1601
  }
1602
 
1603
  // The medals if on top
1610
 
1611
  if ( $link ) {
1612
  if ( $link['is_url'] ) { // Is a href
1613
+ $result .= '
1614
+ <a href="' . esc_url( $link['url'] ) . '" title="' . esc_attr( $title ) . '" target="' . esc_attr( $link['target'] ) . '" >';
1615
  if ( $display == 'thumbs' ) {
1616
  if ( $is_video ) {
1617
  $result .= wppa_get_video_html( array(
1630
  else {
1631
  $result .= '<img' .
1632
  ' id="i-' . $xid . '-' . wppa( 'mocc' ) . '"' .
1633
+ ( $title ? ' title="' . esc_attr( $title ) . '"' : '' ) .
1634
+ ' ' . ( wppa_switch( 'lazy' ) ? 'data-' : '' ) . 'src="' . esc_url( $imgurl ) . '"' .
1635
+ ' width="' . strval( intval( $imgstyle_a['width'] ) ) . '"' .
1636
+ ' height="' . strval( intval( $imgstyle_a['height'] ) ) . '"' .
1637
  ' style="' . $imgstyle_a['style'] . ' cursor:pointer;"' .
1638
  ' ' . $imgevents .
1639
  ' ' . wppa_get_imgalt( $id ) .
1762
  else {
1763
  $result .= '<img' .
1764
  ' id="i-' . $xid . '-' . wppa( 'mocc' ) . '"' .
1765
+ ( $title ? ' title="' . esc_attr( $title ) . '"' : '' ) .
1766
+ ' ' . ( wppa_switch( 'lazy' ) ? 'data-' : '' ) . 'src="' . esc_url( $imgurl ) . '"' .
1767
  ' width="' . $imgstyle_a['width'] . '"' .
1768
  ' height="' . $imgstyle_a['height'] . '"' .
1769
  ' style="' . $imgstyle_a['style'] . '"' .
wppa-utils.php CHANGED
@@ -3,7 +3,7 @@
3
  * Package: wp-photo-album-plus
4
  *
5
  * Contains low-level utility routines
6
- * Version 7.0.03
7
  *
8
  */
9
 
@@ -1025,8 +1025,8 @@ function wppa_vfy_arg($arg, $txt = false) {
1025
  else {
1026
  $reason = ( defined('WP_DEBUG') && WP_DEBUG ) ? ': '.$arg.' is not numeric.' : '';
1027
  $value = $_REQUEST[$arg];
1028
- if ( $arg == 'photo-id' && strlen($value) >= 12 ) {
1029
- $value = wppa_decrypt_photo( trim( $value. '/' ) );
1030
  }
1031
  if ( ! is_numeric($value) ) wp_die('Security check failue'.$reason);
1032
  }
3
  * Package: wp-photo-album-plus
4
  *
5
  * Contains low-level utility routines
6
+ * Version 7.0.04
7
  *
8
  */
9
 
1025
  else {
1026
  $reason = ( defined('WP_DEBUG') && WP_DEBUG ) ? ': '.$arg.' is not numeric.' : '';
1027
  $value = $_REQUEST[$arg];
1028
+ if ( $arg == 'photo-id' ) {
1029
+ $value = wppa_decrypt_photo( trim( $value. '/' ), false, true );
1030
  }
1031
  if ( ! is_numeric($value) ) wp_die('Security check failue'.$reason);
1032
  }
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.0.03.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/
@@ -22,8 +22,8 @@ global $wpdb;
22
  global $wp_version;
23
 
24
  /* WPPA GLOBALS */
25
- global $wppa_revno; $wppa_revno = '7003'; // WPPA db version
26
- global $wppa_api_version; $wppa_api_version = '7-0-03-006'; // 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: 7.0.04.003
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 = '7004'; // WPPA db version
26
+ global $wppa_api_version; $wppa_api_version = '7-0-04-003'; // WPPA software version
27
 
28
  /* start timers */
29
  global $wppa_starttime; $wppa_starttime = microtime( true );