WP Photo Album Plus - Version 7.6.10.002

Version Description

= 7.6.10 =

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

Release Info

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

Code changes from version 7.6.10.001 to 7.6.10.002

changelog.txt CHANGED
@@ -3,7 +3,9 @@ WP Photo Album Plus Changelog
3
  = 7.6.10 =
4
 
5
  * Childlist cache did not got updated when a 'granted' album was created. Fixed.
 
6
  * New setting: Table IX-A19: CSV file separator. You can now select ; vs , for csv import and export.
 
7
 
8
  = 7.6.09 =
9
 
3
  = 7.6.10 =
4
 
5
  * Childlist cache did not got updated when a 'granted' album was created. Fixed.
6
+ * Fixed childlist for certain album ids.
7
  * New setting: Table IX-A19: CSV file separator. You can now select ; vs , for csv import and export.
8
+ * Overall performance improvement.
9
 
10
  = 7.6.09 =
11
 
readme.txt CHANGED
@@ -134,9 +134,9 @@ See for the full changelog: <a href="http://www.wppa.nl/changelog/" >The documen
134
 
135
  == Upgrade Notice ==
136
 
137
- = 7.6.09 =
138
 
139
- * This version addresses various minor bug fixes.
140
 
141
  == Screenshots ==
142
 
134
 
135
  == Upgrade Notice ==
136
 
137
+ = 7.6.10 =
138
 
139
+ * This version addresses various minor bug fixes and feature requests.
140
 
141
  == Screenshots ==
142
 
wppa-admin-functions.php CHANGED
@@ -3,7 +3,7 @@
3
  * Package: wp-photo-album-plus
4
  *
5
  * gp admin functions
6
- * Version 7.6.10.001
7
  *
8
  */
9
 
@@ -1049,7 +1049,9 @@ global $wpdb;
1049
  $lastphotoalbum = $wpdb->get_row($wpdb->prepare( "SELECT id, name FROM $wpdb->wppa_albums WHERE id = %s", $album), ARRAY_A );
1050
  if ( $lastphoto ) {
1051
  echo '<br />'.sprintf(__('The most recently added photo is <strong>%s</strong> (%d)', 'wp-photo-album-plus'), __(stripslashes($lastphoto['name']), 'wp-photo-album-plus'), $lastphoto['id']);
1052
- echo ' '.sprintf(__('in album <strong>%s</strong> (%d).', 'wp-photo-album-plus'), __(stripslashes($lastphotoalbum['name']), 'wp-photo-album-plus'), $lastphotoalbum['id']);
 
 
1053
  if ( $trashed ) {
1054
  echo ' <span style="color:red" >' . __('Deleted', 'wp-photo-album-plus' ) . '</span>';
1055
  }
3
  * Package: wp-photo-album-plus
4
  *
5
  * gp admin functions
6
+ * Version 7.6.10.002
7
  *
8
  */
9
 
1049
  $lastphotoalbum = $wpdb->get_row($wpdb->prepare( "SELECT id, name FROM $wpdb->wppa_albums WHERE id = %s", $album), ARRAY_A );
1050
  if ( $lastphoto ) {
1051
  echo '<br />'.sprintf(__('The most recently added photo is <strong>%s</strong> (%d)', 'wp-photo-album-plus'), __(stripslashes($lastphoto['name']), 'wp-photo-album-plus'), $lastphoto['id']);
1052
+ if ( $lastphotoalbum ) {
1053
+ echo ' '.sprintf(__('in album <strong>%s</strong> (%d).', 'wp-photo-album-plus'), __(stripslashes($lastphotoalbum['name']), 'wp-photo-album-plus'), $lastphotoalbum['id']);
1054
+ }
1055
  if ( $trashed ) {
1056
  echo ' <span style="color:red" >' . __('Deleted', 'wp-photo-album-plus' ) . '</span>';
1057
  }
wppa-functions.php CHANGED
@@ -3,7 +3,7 @@
3
  * Package: wp-photo-album-plus
4
  *
5
  * Various functions
6
- * Version 7.6.08.009
7
  *
8
  */
9
 
@@ -648,7 +648,6 @@ global $locale;
648
  $allalbs = $wpdb->get_col( "SELECT id FROM $wpdb->wppa_albums" );
649
  $parent_arr = array_intersect( array_merge( array('0','-1'), $allalbs ), $parent_arr );
650
  $parent = implode( '.', $parent_arr );
651
-
652
  $id = wppa_alb_to_enum_children( $parent );
653
 
654
  // Verify all albums are owned by $owner and are directly under a parent album
@@ -663,6 +662,7 @@ global $locale;
663
  }
664
  }
665
  $id = implode ( '.', $albs );
 
666
  // if ( $id ) {
667
  // wppa( 'start_album', $id );
668
  // }
3
  * Package: wp-photo-album-plus
4
  *
5
  * Various functions
6
+ * Version 7.6.10.002
7
  *
8
  */
9
 
648
  $allalbs = $wpdb->get_col( "SELECT id FROM $wpdb->wppa_albums" );
649
  $parent_arr = array_intersect( array_merge( array('0','-1'), $allalbs ), $parent_arr );
650
  $parent = implode( '.', $parent_arr );
 
651
  $id = wppa_alb_to_enum_children( $parent );
652
 
653
  // Verify all albums are owned by $owner and are directly under a parent album
662
  }
663
  }
664
  $id = implode ( '.', $albs );
665
+
666
  // if ( $id ) {
667
  // wppa( 'start_album', $id );
668
  // }
wppa-items.php CHANGED
@@ -3,7 +3,7 @@
3
  * Package: wp-photo-album-plus
4
  *
5
  * Contains functions to retrieve album and photo items
6
- * Version 7.6.09.001
7
  *
8
  */
9
 
@@ -375,10 +375,16 @@ function wppa_translate_photo_keywords( $id, $text ) {
375
  $thumb = wppa_cache_thumb( $id );
376
 
377
  // General keywords
378
- $result = str_replace( 'w#albumname', wppa_get_album_name( $thumb['album'] ), $result );
379
- $result = str_replace( 'w#albumdesc', wppa_get_album_desc( $thumb['album'] ), $result );
 
 
 
 
380
  $result = str_replace( 'w#albumid', $thumb['album'], $result );
381
- $result = str_replace( 'w#owner', wppa_bp_userlink( $thumb['owner'] ), $result );
 
 
382
  if ( $thumb['location'] && strpos( $result, 'w#gpx' ) !== false ) {
383
  $geo = explode( '/', $thumb['location'] );
384
  $loc = str_replace( '&deg;', '<sup>o</sup>', $geo['0'].' '.$geo['1'] );
@@ -417,20 +423,16 @@ function wppa_translate_photo_keywords( $id, $text ) {
417
 
418
  // Urls
419
  if ( strpos( $result, 'w#url' ) !== false ) {
420
- $w_url = wppa_get_lores_url( $id );
421
- $result = str_replace( 'w#url', $w_url, $result );
422
  }
423
  if ( strpos( $result, 'w#hrurl' ) !== false ) {
424
- $w_hrurl = wppa_get_hires_url( $id );
425
- $result = str_replace( 'w#hrurl', $w_hrurl, $result );
426
  }
427
  if ( strpos( $result, 'w#tnurl' ) !== false ) {
428
- $w_tnurl = wppa_get_tnres_url( $id );
429
- $result = str_replace( 'w#tnurl', $w_tnurl, $result );
430
  }
431
  if ( strpos( $result, 'w#pl' ) !== false ) {
432
- $w_pl = wppa_get_source_pl( $id );
433
- $result = str_replace( 'w#pl', $w_pl, $result );
434
  }
435
 
436
  // Rating
@@ -663,7 +665,7 @@ function wppa_get_album_desc( $id, $xargs = array() ) {
663
 
664
  // Sanitize args
665
  if ( ! is_numeric( $id ) || $id < '1' ) {
666
- wppa_dbg_msg( 'Invalid arg wppa_get_album_desc(' . $id . ')', 'red' );
667
  return '';
668
  }
669
 
@@ -675,6 +677,10 @@ function wppa_get_album_desc( $id, $xargs = array() ) {
675
  $album = wppa_cache_album( $id );
676
 
677
  // Raw data
 
 
 
 
678
  $desc = $album['description'];
679
 
680
  // No content, need no filtering
3
  * Package: wp-photo-album-plus
4
  *
5
  * Contains functions to retrieve album and photo items
6
+ * Version 7.6.10.002
7
  *
8
  */
9
 
375
  $thumb = wppa_cache_thumb( $id );
376
 
377
  // General keywords
378
+ if ( strpos( $result, 'w#albumname' ) !== false ) {
379
+ $result = str_replace( 'w#albumname', wppa_get_album_name( $thumb['album'] ), $result );
380
+ }
381
+ if ( strpos( $result, 'w#albumdesc' ) !== false ) {
382
+ $result = str_replace( 'w#albumdesc', wppa_get_album_desc( $thumb['album'] ), $result );
383
+ }
384
  $result = str_replace( 'w#albumid', $thumb['album'], $result );
385
+ if ( strpos( $result, 'w#owner' ) !== false ) {
386
+ $result = str_replace( 'w#owner', wppa_bp_userlink( $thumb['owner'] ), $result );
387
+ }
388
  if ( $thumb['location'] && strpos( $result, 'w#gpx' ) !== false ) {
389
  $geo = explode( '/', $thumb['location'] );
390
  $loc = str_replace( '&deg;', '<sup>o</sup>', $geo['0'].' '.$geo['1'] );
423
 
424
  // Urls
425
  if ( strpos( $result, 'w#url' ) !== false ) {
426
+ $result = str_replace( 'w#url', wppa_get_lores_url( $id ), $result );
 
427
  }
428
  if ( strpos( $result, 'w#hrurl' ) !== false ) {
429
+ $result = str_replace( 'w#hrurl', wppa_get_hires_url( $id ), $result );
 
430
  }
431
  if ( strpos( $result, 'w#tnurl' ) !== false ) {
432
+ $result = str_replace( 'w#tnurl', wppa_get_tnres_url( $id ), $result );
 
433
  }
434
  if ( strpos( $result, 'w#pl' ) !== false ) {
435
+ $result = str_replace( 'w#pl', wppa_get_source_pl( $id ), $result );
 
436
  }
437
 
438
  // Rating
665
 
666
  // Sanitize args
667
  if ( ! is_numeric( $id ) || $id < '1' ) {
668
+ wppa_log( 'dbg', 'Invalid arg wppa_get_album_desc(' . $id . ')' );
669
  return '';
670
  }
671
 
677
  $album = wppa_cache_album( $id );
678
 
679
  // Raw data
680
+ if ( ! $album ) {
681
+ wppa_log( 'dbg', 'Album desc of non existent album #' . $id . ' requested', true );
682
+ return '';
683
+ }
684
  $desc = $album['description'];
685
 
686
  // No content, need no filtering
wppa-utils.php CHANGED
@@ -3,7 +3,7 @@
3
  * Package: wp-photo-album-plus
4
  *
5
  * Contains low-level utility routines
6
- * Version 7.6.09.001
7
  *
8
  */
9
 
@@ -2487,8 +2487,6 @@ function wppa_alb_to_enum_children( $xparents ) {
2487
  $result .= _wppa_alb_to_enum_children( $alb );
2488
  $result = trim( $result, '.' ).'.';
2489
  }
2490
- $result = str_replace( '-1', '', $result );
2491
- $result = str_replace( '0', '', $result );
2492
  $result = str_replace( '..', '.', $result );
2493
  $result = trim( $result, '.' );
2494
 
3
  * Package: wp-photo-album-plus
4
  *
5
  * Contains low-level utility routines
6
+ * Version 7.6.10.002
7
  *
8
  */
9
 
2487
  $result .= _wppa_alb_to_enum_children( $alb );
2488
  $result = trim( $result, '.' ).'.';
2489
  }
 
 
2490
  $result = str_replace( '..', '.', $result );
2491
  $result = trim( $result, '.' );
2492
 
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.6.10.001
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 = '7610'; // WPPA db version
27
- global $wppa_api_version; $wppa_api_version = '7.6.10.001'; // 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.6.10.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/
24
 
25
  /* WPPA GLOBALS */
26
  global $wppa_revno; $wppa_revno = '7610'; // WPPA db version
27
+ global $wppa_api_version; $wppa_api_version = '7.6.10.002'; // WPPA software version
28
 
29
  /* Init page js data */
30
  global $wppa_js_page_data; $wppa_js_page_data = '';