WP Photo Album Plus - Version 7.5.11.003

Version Description

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

Code changes from version 7.5.11.002 to 7.5.11.003

changelog.txt CHANGED
@@ -7,8 +7,8 @@ If ticked, the moderate links etc. on the frontend will only be shown to admins,
7
  The owners still need to have the capability moderate in Table VII-A.
8
  * Fixed links to the wp plugins page when 'gallery not album' is activated in Table IV-A36.
9
  * New setting Table IX-D11.4: Grant restrict. Only create albums for users with Album Admin rights, See Table VII-A, first column. They need no upload rigts.
10
- * New setting Table IV-A27.3: Admins Choice action. You can now select the action for Admins Choice. Either add to personal zip (default), or copy to grant album if available.
11
- In this case, the links are only shown to users who have album admin rights.
12
  * Non admins/superusers can only delete their own photos.
13
  * New setting Table VII-C10: Album Admin separate. Restrict album admin to separate albums for non administrators
14
 
7
  The owners still need to have the capability moderate in Table VII-A.
8
  * Fixed links to the wp plugins page when 'gallery not album' is activated in Table IV-A36.
9
  * New setting Table IX-D11.4: Grant restrict. Only create albums for users with Album Admin rights, See Table VII-A, first column. They need no upload rigts.
10
+ * New setting Table IV-A27.3: Admins Choice action. You can now select the action for Admins Choice. Either add to personal zip (default), copy to grant album if available or both.
11
+ In case of album only, the links are only shown to users who have album admin rights.
12
  * Non admins/superusers can only delete their own photos.
13
  * New setting Table VII-C10: Album Admin separate. Restrict album admin to separate albums for non administrators
14
 
wppa-ajax.php CHANGED
@@ -710,27 +710,31 @@ global $wppa;
710
 
711
  $photo = wppa_decrypt_photo( $_REQUEST['photo-id'], false, true );
712
  $photo = strval( intval( $photo ) );
 
713
 
714
- if ( wppa_opt( 'admins_choice_action' ) == 'album' ) {
715
  if ( current_user_can( 'wppa_admin' ) ) {
716
  $album = wppa_my_get_first_grant_album();
717
- if ( $album ) {
718
- $err = wppa_copy_photo( $photo, $album );
719
- if ( $err ) {
720
- echo 'ER||Could not copy photo';
721
- }
722
- else {
723
- echo 'OK||Photo copied to album '.$album;
724
- }
725
  }
726
  else {
727
- echo 'ER||No album available to copy to';
728
-
729
  }
730
  }
 
 
 
 
 
731
  else {
732
  echo 'ER||You are not allowed to do this (1)';
733
  }
 
 
734
  wppa_exit();
735
  }
736
 
@@ -788,7 +792,12 @@ global $wppa;
788
  wppa_clear_taglist();
789
  }
790
 
791
- echo 'OK||'.__('Selected', 'wp-photo-album-plus');
 
 
 
 
 
792
  wppa_exit();
793
  break;
794
 
710
 
711
  $photo = wppa_decrypt_photo( $_REQUEST['photo-id'], false, true );
712
  $photo = strval( intval( $photo ) );
713
+ $donetoalbum = false;
714
 
715
+ if ( wppa_opt( 'admins_choice_action' ) == 'album' || wppa_opt( 'admins_choice_action' ) == 'both' ) {
716
  if ( current_user_can( 'wppa_admin' ) ) {
717
  $album = wppa_my_get_first_grant_album();
718
+ if ( $album ) {
719
+ $err = wppa_copy_photo( $photo, $album );
720
+ if ( $err ) {
721
+ echo 'ER||Could not copy photo';
 
 
 
 
722
  }
723
  else {
724
+ echo 'OK||Photo copied to album '.$album.' ';
725
+ $donetoalbum = true;
726
  }
727
  }
728
+ else {
729
+ echo 'ER||No album available to copy to';
730
+
731
+ }
732
+ }
733
  else {
734
  echo 'ER||You are not allowed to do this (1)';
735
  }
736
+ }
737
+ if ( wppa_opt( 'admins_choice_action' ) == 'album' ) {
738
  wppa_exit();
739
  }
740
 
792
  wppa_clear_taglist();
793
  }
794
 
795
+ if ( $donetoalbum ) {
796
+ echo __('And to zipfile', 'wp-photo-album-plus');
797
+ }
798
+ else {
799
+ echo 'OK||'.__('Selected', 'wp-photo-album-plus');
800
+ }
801
  wppa_exit();
802
  break;
803
 
wppa-functions.php CHANGED
@@ -2727,7 +2727,7 @@ static $user;
2727
  ' />';
2728
  }
2729
  $choice = wppa_opt( 'admins_choice' );
2730
- if ( current_user_can( 'wppa_admin' ) || wppa_opt( 'admins_choice_action' ) == 'zip' ) {
2731
  if ( ( wppa_user_is( 'administrator' ) && $choice != 'none' ) ||
2732
  ( is_user_logged_in() && $choice == 'login' ) ) {
2733
 
@@ -2739,7 +2739,7 @@ static $user;
2739
  ' style="float:right;margin-right:6px;text-decoration:line-through;cursor:pointer;"' .
2740
  ' onclick="' .
2741
  'wppaStopShow( ' . wppa( 'mocc' ) . ' );' .
2742
- esc_attr( 'if ( confirm( "' . __( 'Are you sure you want to remove this photo from your selection?' , 'wp-photo-album-plus') . '" ) ) ' .
2743
  'wppaAjaxRemovePhotoFromZip( '.wppa( 'mocc' ).', '.esc_js('\''.wppa_encrypt_photo($thumb['id']).'\'').', false ); return false;' ).'"' .
2744
 
2745
  ' value="' . esc_attr( __( 'MyChoice', 'wp-photo-album-plus' ) ) . '"' .
2727
  ' />';
2728
  }
2729
  $choice = wppa_opt( 'admins_choice' );
2730
+ if ( current_user_can( 'wppa_admin' ) || wppa_opt( 'admins_choice_action' ) != 'album' ) {
2731
  if ( ( wppa_user_is( 'administrator' ) && $choice != 'none' ) ||
2732
  ( is_user_logged_in() && $choice == 'login' ) ) {
2733
 
2739
  ' style="float:right;margin-right:6px;text-decoration:line-through;cursor:pointer;"' .
2740
  ' onclick="' .
2741
  'wppaStopShow( ' . wppa( 'mocc' ) . ' );' .
2742
+ esc_attr( 'if ( confirm( "' . __( 'Are you sure you want to remove this photo from your zipfile?' , 'wp-photo-album-plus') . '" ) ) ' .
2743
  'wppaAjaxRemovePhotoFromZip( '.wppa( 'mocc' ).', '.esc_js('\''.wppa_encrypt_photo($thumb['id']).'\'').', false ); return false;' ).'"' .
2744
 
2745
  ' value="' . esc_attr( __( 'MyChoice', 'wp-photo-album-plus' ) ) . '"' .
wppa-settings-autosave.php CHANGED
@@ -4519,8 +4519,8 @@ global $wppa_supported_camara_brands;
4519
  $desc = __('Select the action to be taken after clicking the "My Choice" link', 'wp-photo-album-plus');
4520
  $help = __('If set to album, the link is only shown to users who have album admin rights', 'wp-photo-album-plus');
4521
  $slug = 'wppa_admins_choice_action';
4522
- $opts = array(__('To zipfile', 'wp-photo-album-plus'), __('To album', 'wp-photo-album-plus'));
4523
- $vals = array('zip', 'album');
4524
  $html = wppa_select($slug, $opts, $vals);
4525
  $clas = '';
4526
  $tags = 'system,meta';
4519
  $desc = __('Select the action to be taken after clicking the "My Choice" link', 'wp-photo-album-plus');
4520
  $help = __('If set to album, the link is only shown to users who have album admin rights', 'wp-photo-album-plus');
4521
  $slug = 'wppa_admins_choice_action';
4522
+ $opts = array(__('To zipfile', 'wp-photo-album-plus'), __('To album', 'wp-photo-album-plus'), __('To album and zip', 'wp-photo-album-plus'));
4523
+ $vals = array('zip', 'album', 'both');
4524
  $html = wppa_select($slug, $opts, $vals);
4525
  $clas = '';
4526
  $tags = 'system,meta';
wppa-thumbnails.php CHANGED
@@ -5,7 +5,7 @@
5
  * Various funcions to display a thumbnail image
6
  * Contains all possible frontend thumbnail types
7
  *
8
- * Version 7.5.10
9
  *
10
  */
11
 
@@ -659,7 +659,7 @@ global $wpdb;
659
 
660
  // The admins choice link
661
  $choice = wppa_opt( 'admins_choice' );
662
- if ( current_user_can( 'wppa_admin' ) || wppa_opt( 'admins_choice_action' ) == 'zip' ) {
663
  if ( ( wppa_user_is( 'administrator' ) && $choice != 'none' ) ||
664
  ( is_user_logged_in() && $choice == 'login' ) ) {
665
 
@@ -673,7 +673,7 @@ global $wpdb;
673
  '<a' .
674
  ' style="color:blue;cursor:pointer;"' .
675
  ' onclick="' .
676
- esc_attr( 'if ( confirm( "' . __( 'Are you sure you want to add this photo to your zip?' , 'wp-photo-album-plus') . '" ) ) ' .
677
  'wppaAjaxAddPhotoToZip( '.$mocc.', \''.wppa_encrypt_photo($thumb['id']).'\', false ); return false;' ).'"' .
678
  '>' .
679
  __( 'MyChoice' , 'wp-photo-album-plus') .
5
  * Various funcions to display a thumbnail image
6
  * Contains all possible frontend thumbnail types
7
  *
8
+ * Version 7.5.11
9
  *
10
  */
11
 
659
 
660
  // The admins choice link
661
  $choice = wppa_opt( 'admins_choice' );
662
+ if ( current_user_can( 'wppa_admin' ) || wppa_opt( 'admins_choice_action' ) != 'album' ) {
663
  if ( ( wppa_user_is( 'administrator' ) && $choice != 'none' ) ||
664
  ( is_user_logged_in() && $choice == 'login' ) ) {
665
 
673
  '<a' .
674
  ' style="color:blue;cursor:pointer;"' .
675
  ' onclick="' .
676
+ esc_attr( 'if ( confirm( "' . __( 'Are you sure you want to add this photo to your selection?' , 'wp-photo-album-plus') . '" ) ) ' .
677
  'wppaAjaxAddPhotoToZip( '.$mocc.', \''.wppa_encrypt_photo($thumb['id']).'\', false ); return false;' ).'"' .
678
  '>' .
679
  __( 'MyChoice' , 'wp-photo-album-plus') .
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.5.11.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,7 +24,7 @@ global $wp_version;
24
 
25
  /* WPPA GLOBALS */
26
  global $wppa_revno; $wppa_revno = '7511'; // WPPA db version
27
- global $wppa_api_version; $wppa_api_version = '7.5.11.002'; // 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.5.11.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/
24
 
25
  /* WPPA GLOBALS */
26
  global $wppa_revno; $wppa_revno = '7511'; // WPPA db version
27
+ global $wppa_api_version; $wppa_api_version = '7.5.11.003'; // WPPA software version
28
 
29
  /* Init page js data */
30
  global $wppa_js_page_data; $wppa_js_page_data = '';