WP Photo Album Plus - Version 8.2.03.005

Version Description

= 8.1.08 =

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

Release Info

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

Code changes from version 8.2.03.004 to 8.2.03.005

changelog.txt CHANGED
@@ -1,5 +1,11 @@
1
  WP Photo Album Plus Changelog
2
 
 
 
 
 
 
 
3
  = 8.2.02 =
4
 
5
  * Introduction of native blocks: Photo of the day, upload and simple slideshow. Usable for posts/pages and widgets.
1
  WP Photo Album Plus Changelog
2
 
3
+ = 8.3.01 =
4
+
5
+ * The display of the album and photo admin page has been restructured. Phase II
6
+ * You can now enter exif dates ending in 00 min and 00 sec.
7
+ * New album setting: Max children. This setting only limits the creation of child albums at the frontend and looks at first generation children only.
8
+
9
  = 8.2.02 =
10
 
11
  * Introduction of native blocks: Photo of the day, upload and simple slideshow. Usable for posts/pages and widgets.
wppa-ajax.php CHANGED
@@ -2,7 +2,7 @@
2
  /* wppa-ajax.php
3
  *
4
  * Functions used in ajax requests
5
- * Version 8.2.03.004
6
  *
7
  */
8
 
@@ -2084,11 +2084,11 @@ global $wppa;
2084
  if ( ! $err && $temp['1'] > '12' ) $err = '14'; // After december
2085
  if ( ! $err && $temp['2'] < '1' ) $err = '15'; // Before first of month
2086
  if ( ! $err && $temp['2'] > '31' ) $err = '17'; // After 31st ( forget about feb and months with 30 days )
2087
- if ( ! $err && $temp['3'] < '1' ) $err = '18'; // Before first hour
2088
- if ( ! $err && $temp['3'] > '24' ) $err = '19'; // Hour > 24
2089
- if ( ! $err && $temp['4'] < '1' ) $err = '20'; // Min < 1
2090
  if ( ! $err && $temp['4'] > '59' ) $err = '21'; // Min > 59
2091
- if ( ! $err && $temp['5'] < '1' ) $err = '22'; // Sec < 1
2092
  if ( ! $err && $temp['5'] > '59' ) $err = '23'; // Sec > 59
2093
  }
2094
  if ( $err ) {
2
  /* wppa-ajax.php
3
  *
4
  * Functions used in ajax requests
5
+ * Version 8.2.03.005
6
  *
7
  */
8
 
2084
  if ( ! $err && $temp['1'] > '12' ) $err = '14'; // After december
2085
  if ( ! $err && $temp['2'] < '1' ) $err = '15'; // Before first of month
2086
  if ( ! $err && $temp['2'] > '31' ) $err = '17'; // After 31st ( forget about feb and months with 30 days )
2087
+ if ( ! $err && $temp['3'] < '0' ) $err = '18'; // Before first hour
2088
+ if ( ! $err && $temp['3'] > '23' ) $err = '19'; // Hour > 23
2089
+ if ( ! $err && $temp['4'] < '0' ) $err = '20'; // Min < 0
2090
  if ( ! $err && $temp['4'] > '59' ) $err = '21'; // Min > 59
2091
+ if ( ! $err && $temp['5'] < '0' ) $err = '22'; // Sec < 0
2092
  if ( ! $err && $temp['5'] > '59' ) $err = '23'; // Sec > 59
2093
  }
2094
  if ( $err ) {
wppa-album-admin-autosave.php CHANGED
@@ -3,7 +3,7 @@
3
  * Package: wp-photo-album-plus
4
  *
5
  * create, edit and delete albums
6
- * Version 8.2.03.004
7
  *
8
  */
9
 
@@ -415,6 +415,7 @@ global $wppa_revno;
415
  $displayopts = $albuminfo['displayopts'];
416
  $scheduledel = $albuminfo['scheduledel'];
417
  $status = $albuminfo['status'];
 
418
 
419
  $treecounts = wppa_get_treecounts_a( $id, true );
420
  $pviews = $treecounts['selfphotoviews'];
@@ -612,7 +613,7 @@ jQuery(document).ready(function(){wppaGetCoverPreview( '.$id.', "cover-preview-"
612
 
613
  /* Main body album admin */
614
  wppa_echo( '
615
- <details class="wppa-toplevel-details">
616
  <summary class="toplevel wppa-summary-toplevel"> ' .
617
  __( 'the gallery settings', 'wp-photo-album-plus' ) . '
618
  </summary>' );
@@ -1038,6 +1039,38 @@ jQuery(document).ready(function(){wppaGetCoverPreview( '.$id.', "cover-preview-"
1038
  </div>' );
1039
  }
1040
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1041
  // Upload limit
1042
  {
1043
  $result = '
3
  * Package: wp-photo-album-plus
4
  *
5
  * create, edit and delete albums
6
+ * Version 8.2.03.005
7
  *
8
  */
9
 
415
  $displayopts = $albuminfo['displayopts'];
416
  $scheduledel = $albuminfo['scheduledel'];
417
  $status = $albuminfo['status'];
418
+ $max_children = $albuminfo['max_children'];
419
 
420
  $treecounts = wppa_get_treecounts_a( $id, true );
421
  $pviews = $treecounts['selfphotoviews'];
613
 
614
  /* Main body album admin */
615
  wppa_echo( '
616
+ <details class="wppa-toplevel-details" ' . ( $timestamp > time() - 3600 ? 'open' : '' ) . '>
617
  <summary class="toplevel wppa-summary-toplevel"> ' .
618
  __( 'the gallery settings', 'wp-photo-album-plus' ) . '
619
  </summary>' );
1039
  </div>' );
1040
  }
1041
 
1042
+ // Max children
1043
+ {
1044
+ $sel = ' selected';
1045
+ $val = $albuminfo['max_children'];
1046
+ wppa_echo( '
1047
+ <div class="left"
1048
+ style="max-width: 200px;margin-right: 4px;">
1049
+ <label
1050
+ for="altthumb">' .
1051
+ __( 'Max children', 'wp-photo-album-plus' ) . '
1052
+ </label><br>
1053
+ <select
1054
+ id="maxchild"
1055
+ onchange="wppaAjaxUpdateAlbum( ' . $id . ', \'max_children\', this )"
1056
+ title="' . esc_attr( 'This setting can only llimit the creation of child albums at the frontend and looks at first generation children only', 'wp-photo-album-plus' ) . '"
1057
+ >
1058
+ <option value="0"' . ( $val == '0' ? $sel : '' ) . ' >' .
1059
+ __( 'unlimited', 'wp-photo-album-plus' ) . '
1060
+ </option>
1061
+ <option value="-1"' . ( $val == '-1' ? $sel : '' ) . ' >' .
1062
+ __( 'none', 'wp-photo-album-plus' ) . '
1063
+ </option>
1064
+ <option value="1"' . ( $val == '1' ? $sel : '' ) . '>1</option>
1065
+ <option value="2"' . ( $val == '2' ? $sel : '' ) . '>2</option>
1066
+ <option value="3"' . ( $val == '3' ? $sel : '' ) . '>3</option>
1067
+ <option value="4"' . ( $val == '4' ? $sel : '' ) . '>4</option>
1068
+ <option value="5"' . ( $val == '5' ? $sel : '' ) . '>5</option>
1069
+ <option value="10"' . ( $val == '10' ? $sel : '' ) . '>10</option>
1070
+ </select>
1071
+ </div>' );
1072
+ }
1073
+
1074
  // Upload limit
1075
  {
1076
  $result = '
wppa-boxes-html.php CHANGED
@@ -3,7 +3,7 @@
3
  * Package: wp-photo-album-plus
4
  *
5
  * Various wppa boxes
6
- * Version 8.2.02.002
7
  *
8
  */
9
 
@@ -2554,6 +2554,18 @@ function wppa_get_user_create_html( $alb, $width, $where = '', $mcr = false ) {
2554
  return '';
2555
  }
2556
 
 
 
 
 
 
 
 
 
 
 
 
 
2557
  // In a widget or multi column responsive?
2558
  $small = ( wppa_in_widget() == 'upload' || $mcr );
2559
 
@@ -2656,6 +2668,7 @@ function wppa_get_user_create_html( $alb, $width, $where = '', $mcr = false ) {
2656
  'tagonchange' => '',
2657
  'multiple' => false,
2658
  'tagstyle' => '',
 
2659
  ) ) . '
2660
  </select>
2661
  <div style="clear:both"></div>';
@@ -2675,16 +2688,14 @@ function wppa_get_user_create_html( $alb, $width, $where = '', $mcr = false ) {
2675
  class="wppa-box-text wppa-td"
2676
  style="width:100%;clear:both;float:left;text-align:left;"
2677
  >' .
2678
- __( 'Enter album name.', 'wp-photo-album-plus' ) . '&nbsp;
2679
- <span style="font-size:10px">' .
2680
- __( 'Don\'t leave this blank!', 'wp-photo-album-plus' ) . '
2681
- </span>
2682
  </div>
2683
  <input
2684
  type="text"
2685
  class="wppa-box-text"
2686
  style="padding:0; width:100%;"
2687
  name="wppa-album-name"
 
2688
  />';
2689
 
2690
  // Description
3
  * Package: wp-photo-album-plus
4
  *
5
  * Various wppa boxes
6
+ * Version 8.2.03.005
7
  *
8
  */
9
 
2554
  return '';
2555
  }
2556
 
2557
+ // Test for max children of parent
2558
+ if ( $parent > '0' ) {
2559
+
2560
+ $max = wppa_get_album_item( $parent, 'max_children' );
2561
+ if ( $max == '-1' ) return ''; // None alowed
2562
+ if ( $max > '0' ) { // See if max reached ( 0 = unlimited )
2563
+ $tc = wppa_get_treecounts_a( $parent );
2564
+ $nchild = $tc['selfalbums'];
2565
+ if ( $nchild >= $max ) return '';
2566
+ }
2567
+ }
2568
+
2569
  // In a widget or multi column responsive?
2570
  $small = ( wppa_in_widget() == 'upload' || $mcr );
2571
 
2668
  'tagonchange' => '',
2669
  'multiple' => false,
2670
  'tagstyle' => '',
2671
+ 'checkcreate' => true,
2672
  ) ) . '
2673
  </select>
2674
  <div style="clear:both"></div>';
2688
  class="wppa-box-text wppa-td"
2689
  style="width:100%;clear:both;float:left;text-align:left;"
2690
  >' .
2691
+ __( 'Enter album name.', 'wp-photo-album-plus' ) . '
 
 
 
2692
  </div>
2693
  <input
2694
  type="text"
2695
  class="wppa-box-text"
2696
  style="padding:0; width:100%;"
2697
  name="wppa-album-name"
2698
+ placeholder="' . esc_attr( 'New Album', 'wp-photo-album-plus' ) . '"
2699
  />';
2700
 
2701
  // Description
wppa-common-functions.php CHANGED
@@ -2,7 +2,7 @@
2
  /* wppa-common-functions.php
3
  *
4
  * Functions used in admin and in themes
5
- * Version 8.2.01.005
6
  *
7
  */
8
 
@@ -1208,12 +1208,7 @@ global $wpdb;
1208
  FROM $wpdb->wppa_photos
1209
  WHERE album IN ($alb_list)
1210
  AND owner = %s", $me ) );
1211
- if ( $count >= $tree_limit ) {
1212
- return '0'; // No more left
1213
- }
1214
- else {
1215
- return $tree_limit - $count;
1216
- }
1217
  }
1218
  }
1219
 
@@ -1259,14 +1254,7 @@ global $wpdb;
1259
  }
1260
 
1261
  // Compute the allowed number of photos
1262
- if ( $curcount >= $limit_max ) {
1263
- $result = '0'; // No more allowed
1264
- }
1265
- else {
1266
- $result = $limit_max - $curcount;
1267
- }
1268
-
1269
- return $result;
1270
  }
1271
  function wppa_get_user_upload_limits() {
1272
  global $wp_roles;
@@ -1604,6 +1592,7 @@ global $wpdb;
1604
  'tagonchange' => '',
1605
  'multiple' => false,
1606
  'tagstyle' => '',
 
1607
  ) );
1608
 
1609
  // See if new format is used
@@ -1741,7 +1730,7 @@ global $wpdb;
1741
  // $albums = $args['array'];
1742
  $albums = array();
1743
 
1744
- $temp = $wpdb->get_results( "SELECT id, name " .
1745
  "FROM $wpdb->wppa_albums " .
1746
  "WHERE id IN (" . implode( ',', $args['array'] ) . ") " .
1747
  ( $args['checkowner'] && ! wppa_user_is( 'administrator' ) ? "AND owner IN ( '--- public ---', '" . wppa_get_user() . "' ) " : "" ) .
@@ -1759,7 +1748,7 @@ global $wpdb;
1759
  }
1760
  }
1761
  else {
1762
- $albums = $wpdb->get_results( "SELECT id, name " .
1763
  "FROM $wpdb->wppa_albums " .
1764
  ( $args['checkowner'] && ! wppa_user_is( 'administrator' ) ? "WHERE owner IN ( '--- public ---', '" . wppa_get_user() . "' ) " : "" ) .
1765
  wppa_get_album_order( $args['root'] ),
@@ -1896,7 +1885,14 @@ global $wpdb;
1896
  if ( $args['checkaccess'] && ! wppa_have_access( $album['id'] ) ) {
1897
  $ok = false;
1898
  }
1899
-
 
 
 
 
 
 
 
1900
  if ( $selected && $args['addselected'] ) {
1901
  $ok = true;
1902
  }
2
  /* wppa-common-functions.php
3
  *
4
  * Functions used in admin and in themes
5
+ * Version 8.2.03.005
6
  *
7
  */
8
 
1208
  FROM $wpdb->wppa_photos
1209
  WHERE album IN ($alb_list)
1210
  AND owner = %s", $me ) );
1211
+ return max( '0', $tree_limit - $count );
 
 
 
 
 
1212
  }
1213
  }
1214
 
1254
  }
1255
 
1256
  // Compute the allowed number of photos
1257
+ return max( '0', $limit_max - $curcount );
 
 
 
 
 
 
 
1258
  }
1259
  function wppa_get_user_upload_limits() {
1260
  global $wp_roles;
1592
  'tagonchange' => '',
1593
  'multiple' => false,
1594
  'tagstyle' => '',
1595
+ 'checkcreate' => false,
1596
  ) );
1597
 
1598
  // See if new format is used
1730
  // $albums = $args['array'];
1731
  $albums = array();
1732
 
1733
+ $temp = $wpdb->get_results( "SELECT id, name, max_children " .
1734
  "FROM $wpdb->wppa_albums " .
1735
  "WHERE id IN (" . implode( ',', $args['array'] ) . ") " .
1736
  ( $args['checkowner'] && ! wppa_user_is( 'administrator' ) ? "AND owner IN ( '--- public ---', '" . wppa_get_user() . "' ) " : "" ) .
1748
  }
1749
  }
1750
  else {
1751
+ $albums = $wpdb->get_results( "SELECT id, name, max_children " .
1752
  "FROM $wpdb->wppa_albums " .
1753
  ( $args['checkowner'] && ! wppa_user_is( 'administrator' ) ? "WHERE owner IN ( '--- public ---', '" . wppa_get_user() . "' ) " : "" ) .
1754
  wppa_get_album_order( $args['root'] ),
1885
  if ( $args['checkaccess'] && ! wppa_have_access( $album['id'] ) ) {
1886
  $ok = false;
1887
  }
1888
+ if ( $args['checkcreate'] ) {
1889
+ $mc = $album['max_children'];
1890
+ if ( $mc == '-1' ) $ok = false;
1891
+ elseif ( $mc ) {
1892
+ $cnt = wppa_get_treecounts_a( $album['id'] );
1893
+ if ( $cnt['selfalbums'] >= $mc ) $disabled = ' disabled';
1894
+ }
1895
+ }
1896
  if ( $selected && $args['addselected'] ) {
1897
  $ok = true;
1898
  }
wppa-functions.php CHANGED
@@ -3,7 +3,7 @@
3
  * Package: wp-photo-album-plus
4
  *
5
  * Various functions
6
- * Version 8.2.01.006
7
  *
8
  */
9
 
@@ -4985,6 +4985,12 @@ global $wppa_upload_succes_id;
4985
  if ( ! is_user_logged_in() ) $may_create = false; // Must login
4986
  if ( $may_create ) {
4987
 
 
 
 
 
 
 
4988
  // If roles specified and i am not an admin, see if i have one
4989
  if ( wppa_opt( 'user_create_roles' ) && ! wppa_user_is( 'administrator' ) ) {
4990
 
@@ -4998,6 +5004,18 @@ global $wppa_upload_succes_id;
4998
  $may_create = false;
4999
  }
5000
  }
 
 
 
 
 
 
 
 
 
 
 
 
5001
  }
5002
 
5003
  // Edit album possible?
@@ -5007,11 +5025,9 @@ global $wppa_upload_succes_id;
5007
  if ( $may_create ) {
5008
  if ( wppa_get( 'fe-create' ) ) { // Create album
5009
  $nonce = wppa_get( 'nonce' );
5010
- if ( wppa_get( 'album-name' ) ) {
5011
- $albumname = trim( strip_tags( wppa_get( 'album-name' ) ) );
5012
- }
5013
- if ( ! wppa_sanitize_file_name( $albumname ) ) {
5014
- $albumname = __('New Album', 'wp-photo-album-plus' );
5015
  }
5016
  $ok = wp_verify_nonce( $nonce, 'wppa-album-check' );
5017
  if ( ! $ok ) die( '<b>' . __( 'ERROR: Illegal attempt to create an album.', 'wp-photo-album-plus' ) . '</b>' );
@@ -5027,10 +5043,7 @@ global $wppa_upload_succes_id;
5027
  }
5028
  }
5029
 
5030
- $parent = strval( intval( wppa_get( 'album-parent' ) ) );
5031
- if ( ! wppa_user_is( 'administrator' ) && wppa_switch( 'default_parent_always' ) ) {
5032
- $parent = wppa_opt( 'default_parent' );
5033
- }
5034
  $album = wppa_create_album_entry( array( 'name' => $albumname,
5035
  'description' => strip_tags( wppa_get( 'album-desc' ) ),
5036
  'a_parent' => $parent,
3
  * Package: wp-photo-album-plus
4
  *
5
  * Various functions
6
+ * Version 8.2.03.005
7
  *
8
  */
9
 
4985
  if ( ! is_user_logged_in() ) $may_create = false; // Must login
4986
  if ( $may_create ) {
4987
 
4988
+ // Find the parent
4989
+ $parent = strval( intval( wppa_get( 'album-parent' ) ) );
4990
+ if ( ! wppa_user_is( 'administrator' ) && wppa_switch( 'default_parent_always' ) ) {
4991
+ $parent = wppa_opt( 'default_parent' );
4992
+ }
4993
+
4994
  // If roles specified and i am not an admin, see if i have one
4995
  if ( wppa_opt( 'user_create_roles' ) && ! wppa_user_is( 'administrator' ) ) {
4996
 
5004
  $may_create = false;
5005
  }
5006
  }
5007
+
5008
+ // Test for max children of parent
5009
+ if ( $parent > '0' ) {
5010
+
5011
+ $max = wppa_get_album_item( $parent, 'max_children' );
5012
+ if ( $max == '-1' ) $may_create = false; // None alowed
5013
+ elseif ( $max ) { // See if max reached ( 0 = unlimited )
5014
+ $tc = wppa_get_treecounts_a( $parent );
5015
+ $nchild = $tc['selfalbums'];
5016
+ if ( $nchild >= $max ) $may_create = false;;
5017
+ }
5018
+ }
5019
  }
5020
 
5021
  // Edit album possible?
5025
  if ( $may_create ) {
5026
  if ( wppa_get( 'fe-create' ) ) { // Create album
5027
  $nonce = wppa_get( 'nonce' );
5028
+ $albumname = wppa_sanitize_file_name( trim( strip_tags( wppa_get( 'album-name', __( 'New Album', 'wp-photo-album-plus' ) ) ) ) );
5029
+ if ( ! $albumname ) {
5030
+ $albumname = __( 'New Album', 'wp-photo-album-plus' );
 
 
5031
  }
5032
  $ok = wp_verify_nonce( $nonce, 'wppa-album-check' );
5033
  if ( ! $ok ) die( '<b>' . __( 'ERROR: Illegal attempt to create an album.', 'wp-photo-album-plus' ) . '</b>' );
5043
  }
5044
  }
5045
 
5046
+
 
 
 
5047
  $album = wppa_create_album_entry( array( 'name' => $albumname,
5048
  'description' => strip_tags( wppa_get( 'album-desc' ) ),
5049
  'a_parent' => $parent,
wppa-photo-admin-autosave.php CHANGED
@@ -3,7 +3,7 @@
3
  * Package: wp-photo-album-plus
4
  *
5
  * edit and delete photos
6
- * Version 8.2.03.004
7
  *
8
  */
9
 
@@ -814,7 +814,7 @@ function wppaTryScheduledel( id ) {
814
 
815
  // Open the details area
816
  wppa_echo( '
817
- <details class="wppa-toplevel-details">
818
  <summary class="toplevel wppa-summary-sublevel"> ' .
819
  $details . '
820
  </summary>' );
@@ -1113,7 +1113,7 @@ function wppaTryScheduledel( id ) {
1113
  <input
1114
  id="exifdtm-' . $id . '"
1115
  type="text"
1116
- style="width:125px"
1117
  onchange="wppaAjaxUpdatePhoto( ' . $id . ', \'exifdtm\', this.value)"
1118
  value="' . esc_attr( $exifdtm ) . '"
1119
  />
3
  * Package: wp-photo-album-plus
4
  *
5
  * edit and delete photos
6
+ * Version 8.2.03.005
7
  *
8
  */
9
 
814
 
815
  // Open the details area
816
  wppa_echo( '
817
+ <details class="wppa-toplevel-details" ' . ( $timestamp > time() - 3600 ? 'open' : '' ) . '>
818
  <summary class="toplevel wppa-summary-sublevel"> ' .
819
  $details . '
820
  </summary>' );
1113
  <input
1114
  id="exifdtm-' . $id . '"
1115
  type="text"
1116
+ style="width:150px"
1117
  onchange="wppaAjaxUpdatePhoto( ' . $id . ', \'exifdtm\', this.value)"
1118
  value="' . esc_attr( $exifdtm ) . '"
1119
  />
wppa-scripts.php CHANGED
@@ -4,7 +4,7 @@
4
  *
5
  * This file contains all functions for activating javascript
6
  *
7
- * Version 8.2.03.002
8
  */
9
 
10
  // Place all wppa related js declarations in the header, both admin and frontend
@@ -504,13 +504,13 @@ global $wpdb;
504
  }
505
 
506
  // Format
507
- // $result = wppa_compress_js( $result );
508
- // if ( is_admin() ) {
509
- // if ( wp_add_inline_script( 'wppa-admin', $result ) ) return;
510
- // }
511
 
512
- // if ( wp_add_inline_script( 'jquery-core', $result ) ) return;
 
 
513
 
 
514
  echo( '<script>' . $result . '</script>' );
515
 
516
  }
4
  *
5
  * This file contains all functions for activating javascript
6
  *
7
+ * Version 8.2.03.005
8
  */
9
 
10
  // Place all wppa related js declarations in the header, both admin and frontend
504
  }
505
 
506
  // Format
507
+ $result = wppa_compress_js( $result );
 
 
 
508
 
509
+ // This works almost always, but not always
510
+ // wp_add_inline_script( 'wppa-admin', $result );
511
+ // wp_add_inline_script( 'jquery-core', $result );
512
 
513
+ // This works always
514
  echo( '<script>' . $result . '</script>' );
515
 
516
  }
wppa-setup.php CHANGED
@@ -3,7 +3,7 @@
3
  * Package: wp-photo-album-plus
4
  *
5
  * Contains all the setup stuff
6
- * Version 8.1.09.005
7
  *
8
  */
9
 
@@ -74,6 +74,7 @@ global $wppa_error;
74
  upload_limit_tree tinytext NOT NULL,
75
  scheduledel tinytext NOT NULL,
76
  status tinytext NOT NULL,
 
77
  PRIMARY KEY (id),
78
  KEY parentkey (a_parent)
79
  ) DEFAULT CHARACTER SET utf8;";
3
  * Package: wp-photo-album-plus
4
  *
5
  * Contains all the setup stuff
6
+ * Version 8.2.03.005
7
  *
8
  */
9
 
74
  upload_limit_tree tinytext NOT NULL,
75
  scheduledel tinytext NOT NULL,
76
  status tinytext NOT NULL,
77
+ max_children tinytext NOT NULL,
78
  PRIMARY KEY (id),
79
  KEY parentkey (a_parent)
80
  ) DEFAULT CHARACTER SET utf8;";
wppa-wpdb-insert.php CHANGED
@@ -3,7 +3,7 @@
3
  * Package: wp-photo-album-plus
4
  *
5
  * Contains low-level wpdb routines that add new records
6
- * Version 8.1.08.002
7
  *
8
  */
9
 
@@ -473,6 +473,7 @@ global $wpdb;
473
  'upload_limit_tree' => '0',
474
  'scheduledel' => '',
475
  'status' => 'publish',
 
476
  ) );
477
 
478
  if ( ! wppa_is_id_free( WPPA_ALBUMS, $args['id'] ) ) $args['id'] = wppa_nextkey( WPPA_ALBUMS );
@@ -509,9 +510,10 @@ global $wpdb;
509
  displayopts,
510
  upload_limit_tree,
511
  scheduledel,
512
- status
 
513
  )
514
- VALUES ( %s, %s, %s, %s, %s, %s, %s, %s, %s, %s, %s, %s, %s, %s, %s, %s, %s, %s ,%s, %s, %s, %s, %s, %s, %s, %s, %s, %s, %s, %s, %s, %s, %s )",
515
  $args['id'],
516
  trim( $args['name'] ),
517
  trim( $args['description'] ),
@@ -544,7 +546,8 @@ global $wpdb;
544
  $args['displayopts'],
545
  $args['upload_limit_tree'],
546
  $args['scheduledel'],
547
- $args['status']
 
548
  );
549
  $iret = $wpdb->query( $query );
550
 
3
  * Package: wp-photo-album-plus
4
  *
5
  * Contains low-level wpdb routines that add new records
6
+ * Version 8.2.03.005
7
  *
8
  */
9
 
473
  'upload_limit_tree' => '0',
474
  'scheduledel' => '',
475
  'status' => 'publish',
476
+ 'max_children' => '0',
477
  ) );
478
 
479
  if ( ! wppa_is_id_free( WPPA_ALBUMS, $args['id'] ) ) $args['id'] = wppa_nextkey( WPPA_ALBUMS );
510
  displayopts,
511
  upload_limit_tree,
512
  scheduledel,
513
+ status,
514
+ max_children
515
  )
516
+ VALUES ( %s, %s, %s, %s, %s, %s, %s, %s, %s, %s, %s, %s, %s, %s, %s, %s, %s, %s, %s ,%s, %s, %s, %s, %s, %s, %s, %s, %s, %s, %s, %s, %s, %s, %s )",
517
  $args['id'],
518
  trim( $args['name'] ),
519
  trim( $args['description'] ),
546
  $args['displayopts'],
547
  $args['upload_limit_tree'],
548
  $args['scheduledel'],
549
+ $args['status'],
550
+ $args['max_children'],
551
  );
552
  $iret = $wpdb->query( $query );
553
 
wppa-wpdb-update.php CHANGED
@@ -3,7 +3,7 @@
3
  * Package: wp-photo-album-plus
4
  *
5
  * Contains low-level wpdb routines that update records
6
- * Version 8.2.01.002
7
  *
8
  */
9
 
@@ -123,6 +123,10 @@ global $wpdb;
123
  if ( in_array( $itemvalue, array( 'publish', 'private', 'hidden' ) ) ) {
124
  $doit = true;
125
  }
 
 
 
 
126
  default:
127
  wppa_log( 'Error', 'Not implemented in wppa_update_album(): '.$itemname );
128
  return false;
3
  * Package: wp-photo-album-plus
4
  *
5
  * Contains low-level wpdb routines that update records
6
+ * Version 8.2.03.005
7
  *
8
  */
9
 
123
  if ( in_array( $itemvalue, array( 'publish', 'private', 'hidden' ) ) ) {
124
  $doit = true;
125
  }
126
+ case 'max_children':
127
+ if ( is_numeric( $itemvalue ) ) {
128
+ $doit = true;
129
+ }
130
  default:
131
  wppa_log( 'Error', 'Not implemented in wppa_update_album(): '.$itemname );
132
  return false;
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: 8.2.03.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/
@@ -24,7 +24,7 @@ global $wp_version;
24
 
25
  /* WPPA GLOBALS */
26
  global $wppa_api_version;
27
- $wppa_api_version = '8.2.03.004'; // WPPA software version
28
  global $wppa_revno;
29
  $wppa_revno = str_replace( '.', '', $wppa_api_version ); // WPPA db version
30
 
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: 8.2.03.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
 
25
  /* WPPA GLOBALS */
26
  global $wppa_api_version;
27
+ $wppa_api_version = '8.2.03.005'; // WPPA software version
28
  global $wppa_revno;
29
  $wppa_revno = str_replace( '.', '', $wppa_api_version ); // WPPA db version
30