WP Photo Album Plus - Version 6.6.24

Version Description

Download this release

Release Info

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

Code changes from version 6.6.23 to 6.6.24

js/wppa-admin-scripts.js CHANGED
@@ -1,7 +1,7 @@
1
  /* admin-scripts.js */
2
  /* Package: wp-photo-album-plus
3
  /*
4
- /* Version 6.6.22
5
  /* Various js routines used in admin pages
6
  */
7
 
@@ -302,7 +302,7 @@ function wppaRefreshAfter() {
302
 
303
  function wppaFollow( id, clas ) {
304
 
305
- if ( jQuery('#'+id).attr('checked') ) {
306
  jQuery('.'+clas).css('display', '');
307
  }
308
  else {
@@ -2013,11 +2013,11 @@ function wppaAjaxUpdateOptionValue(slug, elem, multisel) {
2013
  // on-unit to process the result
2014
  xmlhttp.onreadystatechange=function() {
2015
  if (xmlhttp.readyState != 4) {
2016
- document.getElementById('img_'+slug).src = wppaImageDirectory+'spinner.gif';
 
2017
  }
2018
  else { // Ready
2019
  var str = wppaTrim(xmlhttp.responseText);
2020
- //alert(str);
2021
  var ArrValues = str.split("||");
2022
 
2023
  if (ArrValues[0] != '') {
@@ -2026,7 +2026,8 @@ function wppaAjaxUpdateOptionValue(slug, elem, multisel) {
2026
  if (xmlhttp.status!=404) { // No Not found
2027
  switch (ArrValues[1]) {
2028
  case '0': // No error
2029
- document.getElementById('img_'+slug).src = wppaImageDirectory+'tick.png';
 
2030
  if ( ArrValues[3] != '' ) alert(ArrValues[3]);
2031
  if ( _wppaRefreshAfter ) {
2032
  _wppaRefreshAfter = false;
@@ -2034,13 +2035,35 @@ function wppaAjaxUpdateOptionValue(slug, elem, multisel) {
2034
  }
2035
  break;
2036
  default:
2037
- document.getElementById('img_'+slug).src = wppaImageDirectory+'cross.png';
 
2038
  if ( ArrValues[3] != '' ) alert(ArrValues[3]);
2039
  }
2040
- document.getElementById('img_'+slug).title = ArrValues[2];
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
2041
  }
2042
  else { // Not found
2043
- document.getElementById('img_'+slug).src = wppaImageDirectory+'cross.png';
 
2044
  document.getElementById('img_'+slug).title = 'Communication error';
2045
  }
2046
  wppaCheckInconsistencies();
@@ -2102,7 +2125,7 @@ function wppaEncode(xtext) {
2102
  function wppaCheckInconsistencies() {
2103
 
2104
  // Uses thumb popup and thumb lightbox?
2105
- if ( jQuery('#use_thumb_popup').attr('checked') && jQuery('#thumb_linktype').val() == 'lightbox' ) {
2106
  jQuery('.popup-lightbox-err').css('display', '');
2107
  }
2108
  else {
@@ -2438,9 +2461,22 @@ function wppaAjaxUpdateTogo(slug) {
2438
  beforesend: function( xhr ) {
2439
  },
2440
  success: function( result, status, xhr ) {
 
 
2441
  var data = result.split('|');
 
 
2442
  jQuery( '#' + slug + '_togo' ).html( data[0] );
2443
- jQuery( '#' + slug + '_status' ).html( data[1] );
 
 
 
 
 
 
 
 
 
2444
  setTimeout( function() {wppaAjaxUpdateTogo(slug);}, 5000 );
2445
  },
2446
  error: function( xhr ) {
1
  /* admin-scripts.js */
2
  /* Package: wp-photo-album-plus
3
  /*
4
+ /* Version 6.6.24
5
  /* Various js routines used in admin pages
6
  */
7
 
302
 
303
  function wppaFollow( id, clas ) {
304
 
305
+ if ( jQuery('#'+id).prop('checked') ) {
306
  jQuery('.'+clas).css('display', '');
307
  }
308
  else {
2013
  // on-unit to process the result
2014
  xmlhttp.onreadystatechange=function() {
2015
  if (xmlhttp.readyState != 4) {
2016
+ jQuery( '#img_'+slug ).attr( 'src', wppaImageDirectory+'spinner.gif' );
2017
+ // document.getElementById('img_'+slug).src = wppaImageDirectory+'spinner.gif';
2018
  }
2019
  else { // Ready
2020
  var str = wppaTrim(xmlhttp.responseText);
 
2021
  var ArrValues = str.split("||");
2022
 
2023
  if (ArrValues[0] != '') {
2026
  if (xmlhttp.status!=404) { // No Not found
2027
  switch (ArrValues[1]) {
2028
  case '0': // No error
2029
+ jQuery( '#img_'+slug ).attr( 'src', wppaImageDirectory+'tick.png' );
2030
+ // document.getElementById('img_'+slug).src = wppaImageDirectory+'tick.png';
2031
  if ( ArrValues[3] != '' ) alert(ArrValues[3]);
2032
  if ( _wppaRefreshAfter ) {
2033
  _wppaRefreshAfter = false;
2035
  }
2036
  break;
2037
  default:
2038
+ jQuery( '#img_'+slug ).attr( 'src', wppaImageDirectory+'cross.png' );
2039
+ // document.getElementById('img_'+slug).src = wppaImageDirectory+'cross.png';
2040
  if ( ArrValues[3] != '' ) alert(ArrValues[3]);
2041
  }
2042
+ jQuery( '#img_'+slug ).attr( 'title', ArrValues[2] );
2043
+ // document.getElementById('img_'+slug).title = ArrValues[2];
2044
+
2045
+ // Update cron statusses
2046
+ if ( ArrValues[4] ) {
2047
+ var tokens = ArrValues[4].split( ';' );
2048
+ var i = 0;
2049
+ var temp;
2050
+ var Old, New;
2051
+ while ( i < tokens.length ) {
2052
+ temp = tokens[i].split( ':' );
2053
+ Old = jQuery( '#'+ temp[0] ).html();
2054
+ New = temp[1];
2055
+ if ( Old != '' && New == '' ) {
2056
+ // New = '<span style="color:red;font-weight:bold;" onclick="document.location.reload(true)" >Reload page</span>';
2057
+ New = '<input type="button" class="button-secundary" style="border-radius:3px;font-size:11px;height:18px;margin: 0 4px;padding:0px;color:red;background-color:pink;" onclick="document.location.reload(true)" value="Reload" />';
2058
+ }
2059
+ jQuery( '#'+ temp[0] ).html( New );
2060
+ i++;
2061
+ }
2062
+ }
2063
  }
2064
  else { // Not found
2065
+ jQuery( '#img_'+slug ).attr( 'src', wppaImageDirectory+'cross.png' );
2066
+ // document.getElementById('img_'+slug).src = wppaImageDirectory+'cross.png';
2067
  document.getElementById('img_'+slug).title = 'Communication error';
2068
  }
2069
  wppaCheckInconsistencies();
2125
  function wppaCheckInconsistencies() {
2126
 
2127
  // Uses thumb popup and thumb lightbox?
2128
+ if ( jQuery('#use_thumb_popup').prop('checked') && jQuery('#thumb_linktype').val() == 'lightbox' ) {
2129
  jQuery('.popup-lightbox-err').css('display', '');
2130
  }
2131
  else {
2461
  beforesend: function( xhr ) {
2462
  },
2463
  success: function( result, status, xhr ) {
2464
+
2465
+ // Split status and togo
2466
  var data = result.split('|');
2467
+
2468
+ // Update togo
2469
  jQuery( '#' + slug + '_togo' ).html( data[0] );
2470
+
2471
+ // Update status when not changing to empty, else request user to reload page
2472
+ var Old = jQuery( '#' + slug + '_status' ).html();
2473
+ var New = data[1];
2474
+ if ( Old != '' && New == '' ) {
2475
+ // New = '<span style="color:red;font-weight:bold;" onclick="document.location.reload(true)" >Reload page</span>';
2476
+ New = '<input type="button" class="button-secundary" style="border-radius:3px;font-size:11px;height:18px;margin: 0 4px;padding:0px;color:red;background-color:pink;" onclick="document.location.reload(true)" value="Reload" />';
2477
+ }
2478
+ jQuery( '#' + slug + '_status' ).html( New );
2479
+
2480
  setTimeout( function() {wppaAjaxUpdateTogo(slug);}, 5000 );
2481
  },
2482
  error: function( xhr ) {
js/wppa.js CHANGED
@@ -2,7 +2,7 @@
2
  //
3
  // conatins common vars and functions
4
  //
5
- var wppaJsVersion = '6.6.22';
6
 
7
  // Important notice:
8
  // All external vars that may be given a value in wppa-non-admin.php must be declared here and not in other front-end js files!!
@@ -298,6 +298,18 @@ function wppaDoInit( autoOnly ) {
298
  // Make sure ovl spinner dies
299
  jQuery( '.wppa-ovl-spin' ).stop().fadeOut();
300
  setTimeout( function() {jQuery( '.wppa-ovl-spin' ).stop().fadeOut();}, 1000 );
 
 
 
 
 
 
 
 
 
 
 
 
301
  }
302
 
303
  // Initialize Ajax render partial page content with history update
2
  //
3
  // conatins common vars and functions
4
  //
5
+ var wppaJsVersion = '6.6.24';
6
 
7
  // Important notice:
8
  // All external vars that may be given a value in wppa-non-admin.php must be declared here and not in other front-end js files!!
298
  // Make sure ovl spinner dies
299
  jQuery( '.wppa-ovl-spin' ).stop().fadeOut();
300
  setTimeout( function() {jQuery( '.wppa-ovl-spin' ).stop().fadeOut();}, 1000 );
301
+
302
+ // Fade ubbs out
303
+ setTimeout( function() {
304
+ var i = 1;
305
+ while( i < wppaTopMoc ) {
306
+ if ( jQuery( 'ubb-'+i+'-l' ) ) {
307
+ wppaUbb(i,'l','hide');
308
+ wppaUbb(i,'r','hide');
309
+ }
310
+ i++;
311
+ }
312
+ }, 3000 );
313
  }
314
 
315
  // Initialize Ajax render partial page content with history update
js/wppa.min.js CHANGED
@@ -3,9 +3,10 @@
3
  // conatins common vars and functions
4
  //
5
 
6
- var wppaJsVersion='6.6.22';var wppaVersion='0';var wppaIsIe=false;var wppaDebug;var wppaFullValign=[];var wppaFullHalign=[];var wppaFullFrameDelta=[];var wppaAnimationSpeed;var wppaImageDirectory;var wppaAutoColumnWidth=[];var wppaAutoColumnFrac=[];var wppaThumbnailAreaDelta;var wppaSlideShowTimeOut=2500;var wppaFadeInAfterFadeOut=false;var wppaTextFrameDelta=0;var wppaBoxDelta=0;var wppaPreambule;var wppaHideWhenEmpty=false;var wppaThumbnailPitch=[];var wppaFilmStripLength=[];var wppaFilmStripMargin=[];var wppaFilmStripAreaDelta=[];var wppaFilmShowGlue=false;var wppaIsMini=[];var wppaPortraitOnly=[];var wppaSlideShow;var wppaPhoto;var wppaOf;var wppaNextPhoto;var wppaPreviousPhoto;var wppaNextP;var wppaPrevP;var wppaAvgRating;var wppaMyRating;var wppaAvgRat;var wppaMyRat;var wppaDislikeMsg;var wppaMiniTreshold=300;var wppaStart='Start';var wppaStop='Stop';var wppaPleaseName;var wppaPleaseEmail;var wppaPleaseComment;var wppaRatingOnce=true;var wppaBGcolorNumbar='transparent';var wppaBcolorNumbar='transparent';var wppaBGcolorNumbarActive='transparent';var wppaBcolorNumbarActive='transparent';var wppaFontFamilyNumbar='';var wppaFontSizeNumbar='';var wppaFontColorNumbar='';var wppaFontWeightNumbar='';var wppaFontFamilyNumbarActive='';var wppaFontSizeNumbarActive='';var wppaFontColorNumbarActive='';var wppaFontWeightNumbarActive='';var wppaNumbarMax='10';var wppaAjaxUrl='';var wppaLang='';var wppaNextOnCallback=false;var wppaStarOpacity=0.2;var wppaSlideWrap=true;var wppaLightBox=[];var wppaEmailRequired='required';var wppaSlideBorderWidth=0;var wppaSlideInitRunning=[];var wppaAnimationType='fadeover';var wppaSlidePause=[];var wppaSlideBlank=[];var wppaRatingMax=5;var wppaRatingDisplayType='graphic';var wppaRatingPrec=2;var wppaFilmPageSize=[];var wppaAspectRatio=[];var wppaFullSize=[];var wppaStretch=false;var wppaThumbSpaceAuto=false;var wppaMinThumbSpace=4;var wppaMagnifierCursor='';var wppaArtMonkyLink='none';var wppaAutoOpenComments=false;var wppaUpdateAddressLine=false;var wppaFilmThumbTitle='';var wppaClickToView='';var wppaUploadUrl='';var wppaVoteForMe='';var wppaVotedForMe='';var wppaSlideSwipe=true;var wppaLightboxSingle=[];var wppaMaxCoverWidth=300;var wppaDownLoad='Download';var wppaSiteUrl='';var wppaWppaUrl='';var wppaIncludeUrl='';var wppaSlideToFullpopup=false;var wppaComAltSize=75;var wppaBumpViewCount=true;var wppaBumpClickCount=false;var wppaFotomoto=false;var wppaArtMonkeyButton=true;var wppaShortQargs=false;var wppaOvlHires=false;var wppaMasonryCols=[];var wppaVideoPlaying=[];var wppaAudioPlaying=[];var wppaSlideVideoStart=false;var wppaSlideAudioStart=false;var wppaAudioHeight=28;var wppaHis=0;var wppaStartHtml=[];var wppaCanAjaxRender=false;var wppaCanPushState=false;var wppaAllowAjax=true;var wppaMaxOccur=0;var wppaFirstOccur=0;var wppaUsePhotoNamesInUrls=false;var wppaShareHideWhenRunning=false;var wppaCommentRequiredAfterVote=true;var wppaTopMoc=0;var wppaColWidth=[];var wppaFotomotoHideWhenRunning=false;var wppaFotomotoMinWidth=400;var wppaPhotoView=[];var wppaBackgroundColorImage='';var wppaPopupLinkType='';var wppaPopupOnclick=[];var wppaThumbTargetBlank=false;var wppaRel='rel';var wppaEditPhotoWidth='960';var wppaThemeStyles='';var wppaStickyHeaderHeight=0;var wppaRenderModal=false;var wppaModalBgColor='#ffffff';var wppaBoxRadius=0;var wppaModalQuitImg;var wppaUploadEdit='none';var wppaPageArg='';var wppaSlideshowNavigationType='icons';var wppaCoverImageResponsive=[];var _wppaId=[];var _wppaAvg=[];var _wppaDisc=[];var _wppaMyr=[];var _wppaVRU=[];var _wppaLinkUrl=[];var _wppaLinkTitle=[];var _wppaLinkTarget=[];var _wppaCommentHtml=[];var _wppaIptcHtml=[];var _wppaExifHtml=[];var _wppaToTheSame=false;var _wppaSlides=[];var _wppaNames=[];var _wppaFullNames=[];var _wppaDsc=[];var _wppaOgDsc=[];var _wppaCurIdx=[];var _wppaNxtIdx=[];var _wppaTimeOut=[];var _wppaSSRuns=[];var _wppaFg=[];var _wppaTP=[];var _wppaIsBusy=[];var _wppaFirst=[];var _wppaVoteInProgress=false;var _wppaTextDelay;var _wppaUrl=[];var _wppaSkipRated=[];var _wppaLbTitle=[];var _wppaStateCount=0;var _wppaDidGoto=[];var _wppaShareUrl=[];var _wppaShareHtml=[];var _wppaFilmNoMove=[];var _wppaHiresUrl=[];var _wppaIsVideo=[];var _wppaVideoHtml=[];var _wppaAudioHtml=[];var _wppaVideoNatWidth=[];var _wppaVideoNatHeight=[];var _wppaWaitTexts=[];var _wppaImageAlt=[];var __wppaOverruleRun=false;var wppaOvlUrls;var wppaOvlTitles;var wppaOvlAlts;var wppaOvlIdx=0;var wppaOvlFirst=true;var wppaOvlKbHandler='';var wppaOvlSizeHandler='';var wppaOvlPadTop=5;var wppaOvlIsSingle;var wppaOvlRunning=false;var wppaOvlVideoHtmls;var wppaOvlAudioHtmls;var wppaOvlVideoNaturalWidths;var wppaOvlVideoNaturalHeights;var wppaOvlModeInitial='normal';var wppaOvlVideoPlaying=false;var wppaOvlAudioPlaying=false;var wppaOvlShowLegenda=true;var wppaOvlShowStartStop=true;var wppaOvlRadius=0;var wppaOvlBorderWidth=16;var wppaOvlTxtHeight=36;var wppaOvlOpacity=0.8;var wppaOvlOnclickType='none';var wppaOvlTheme='black';var wppaOvlAnimSpeed=300;var wppaOvlSlideSpeed=3000;var wppaVer4WindowWidth=800;var wppaVer4WindowHeight=600;var wppaOvlFontFamily='Helvetica';var wppaOvlFontSize='10';var wppaOvlFontColor='';var wppaOvlFontWeight='bold';var wppaOvlLineHeight='12';var wppaOvlShowCounter=true;var wppaOvlIsVideo=false;var wppaShowLegenda='';var wppaOvlFsPhotoId=0;var wppaPhotoId=0;var wppaOvlVideoStart=false;var wppaOvlAudioStart=false;var wppaLastIptc='';var wppaLastExif='';var wppaIsMobile=false;var wppaSvgFillcolor='gray';var wppaSvgBgcolor='transparent';var wppaSvgCornerStyle='light';jQuery(document).ready(function(){wppaDoInit(false);setTimeout(function(){wppaDoInit(true);},1000);});function wppaDoInit(autoOnly){var anyAutocol=false;for(mocc=1;mocc<=wppaTopMoc;mocc++){if(wppaAutoColumnWidth[mocc]){wppaColWidth[mocc]=0;_wppaDoAutocol(mocc);anyAutocol=true;}}
7
  if(!autoOnly){_wppaTextDelay=wppaAnimationSpeed;if(wppaFadeInAfterFadeOut)_wppaTextDelay*=2;if(anyAutocol){jQuery(window).resize(function(){for(mocc=1;mocc<=wppaTopMoc;mocc++){if(wppaAutoColumnWidth[mocc]){wppaColWidth[mocc]=0;_wppaDoAutocol(mocc);}}});}}
8
- wppaReplaceSvg();jQuery('.wppa-ajax-spin').stop().fadeOut();setTimeout(function(){jQuery('.wppa-ajax-spin').stop().fadeOut();},1000);jQuery('.wppa-ovl-spin').stop().fadeOut();setTimeout(function(){jQuery('.wppa-ovl-spin').stop().fadeOut();},1000);}
 
9
  jQuery(document).ready(function(e){if(wppaAllowAjax&&jQuery.ajax){wppaCanAjaxRender=true;}
10
  if(typeof(history.pushState)!='undefined'){var i=1;while(i<=wppaMaxOccur){wppaStartHtml[i]=jQuery('#wppa-container-'+i).html();i++;}
11
  wppaCanPushState=true;}});function wppaUpdateLightboxes(){if(typeof(wppaInitOverlay)=='function'){wppaInitOverlay();}
3
  // conatins common vars and functions
4
  //
5
 
6
+ var wppaJsVersion='6.6.24';var wppaVersion='0';var wppaIsIe=false;var wppaDebug;var wppaFullValign=[];var wppaFullHalign=[];var wppaFullFrameDelta=[];var wppaAnimationSpeed;var wppaImageDirectory;var wppaAutoColumnWidth=[];var wppaAutoColumnFrac=[];var wppaThumbnailAreaDelta;var wppaSlideShowTimeOut=2500;var wppaFadeInAfterFadeOut=false;var wppaTextFrameDelta=0;var wppaBoxDelta=0;var wppaPreambule;var wppaHideWhenEmpty=false;var wppaThumbnailPitch=[];var wppaFilmStripLength=[];var wppaFilmStripMargin=[];var wppaFilmStripAreaDelta=[];var wppaFilmShowGlue=false;var wppaIsMini=[];var wppaPortraitOnly=[];var wppaSlideShow;var wppaPhoto;var wppaOf;var wppaNextPhoto;var wppaPreviousPhoto;var wppaNextP;var wppaPrevP;var wppaAvgRating;var wppaMyRating;var wppaAvgRat;var wppaMyRat;var wppaDislikeMsg;var wppaMiniTreshold=300;var wppaStart='Start';var wppaStop='Stop';var wppaPleaseName;var wppaPleaseEmail;var wppaPleaseComment;var wppaRatingOnce=true;var wppaBGcolorNumbar='transparent';var wppaBcolorNumbar='transparent';var wppaBGcolorNumbarActive='transparent';var wppaBcolorNumbarActive='transparent';var wppaFontFamilyNumbar='';var wppaFontSizeNumbar='';var wppaFontColorNumbar='';var wppaFontWeightNumbar='';var wppaFontFamilyNumbarActive='';var wppaFontSizeNumbarActive='';var wppaFontColorNumbarActive='';var wppaFontWeightNumbarActive='';var wppaNumbarMax='10';var wppaAjaxUrl='';var wppaLang='';var wppaNextOnCallback=false;var wppaStarOpacity=0.2;var wppaSlideWrap=true;var wppaLightBox=[];var wppaEmailRequired='required';var wppaSlideBorderWidth=0;var wppaSlideInitRunning=[];var wppaAnimationType='fadeover';var wppaSlidePause=[];var wppaSlideBlank=[];var wppaRatingMax=5;var wppaRatingDisplayType='graphic';var wppaRatingPrec=2;var wppaFilmPageSize=[];var wppaAspectRatio=[];var wppaFullSize=[];var wppaStretch=false;var wppaThumbSpaceAuto=false;var wppaMinThumbSpace=4;var wppaMagnifierCursor='';var wppaArtMonkyLink='none';var wppaAutoOpenComments=false;var wppaUpdateAddressLine=false;var wppaFilmThumbTitle='';var wppaClickToView='';var wppaUploadUrl='';var wppaVoteForMe='';var wppaVotedForMe='';var wppaSlideSwipe=true;var wppaLightboxSingle=[];var wppaMaxCoverWidth=300;var wppaDownLoad='Download';var wppaSiteUrl='';var wppaWppaUrl='';var wppaIncludeUrl='';var wppaSlideToFullpopup=false;var wppaComAltSize=75;var wppaBumpViewCount=true;var wppaBumpClickCount=false;var wppaFotomoto=false;var wppaArtMonkeyButton=true;var wppaShortQargs=false;var wppaOvlHires=false;var wppaMasonryCols=[];var wppaVideoPlaying=[];var wppaAudioPlaying=[];var wppaSlideVideoStart=false;var wppaSlideAudioStart=false;var wppaAudioHeight=28;var wppaHis=0;var wppaStartHtml=[];var wppaCanAjaxRender=false;var wppaCanPushState=false;var wppaAllowAjax=true;var wppaMaxOccur=0;var wppaFirstOccur=0;var wppaUsePhotoNamesInUrls=false;var wppaShareHideWhenRunning=false;var wppaCommentRequiredAfterVote=true;var wppaTopMoc=0;var wppaColWidth=[];var wppaFotomotoHideWhenRunning=false;var wppaFotomotoMinWidth=400;var wppaPhotoView=[];var wppaBackgroundColorImage='';var wppaPopupLinkType='';var wppaPopupOnclick=[];var wppaThumbTargetBlank=false;var wppaRel='rel';var wppaEditPhotoWidth='960';var wppaThemeStyles='';var wppaStickyHeaderHeight=0;var wppaRenderModal=false;var wppaModalBgColor='#ffffff';var wppaBoxRadius=0;var wppaModalQuitImg;var wppaUploadEdit='none';var wppaPageArg='';var wppaSlideshowNavigationType='icons';var wppaCoverImageResponsive=[];var _wppaId=[];var _wppaAvg=[];var _wppaDisc=[];var _wppaMyr=[];var _wppaVRU=[];var _wppaLinkUrl=[];var _wppaLinkTitle=[];var _wppaLinkTarget=[];var _wppaCommentHtml=[];var _wppaIptcHtml=[];var _wppaExifHtml=[];var _wppaToTheSame=false;var _wppaSlides=[];var _wppaNames=[];var _wppaFullNames=[];var _wppaDsc=[];var _wppaOgDsc=[];var _wppaCurIdx=[];var _wppaNxtIdx=[];var _wppaTimeOut=[];var _wppaSSRuns=[];var _wppaFg=[];var _wppaTP=[];var _wppaIsBusy=[];var _wppaFirst=[];var _wppaVoteInProgress=false;var _wppaTextDelay;var _wppaUrl=[];var _wppaSkipRated=[];var _wppaLbTitle=[];var _wppaStateCount=0;var _wppaDidGoto=[];var _wppaShareUrl=[];var _wppaShareHtml=[];var _wppaFilmNoMove=[];var _wppaHiresUrl=[];var _wppaIsVideo=[];var _wppaVideoHtml=[];var _wppaAudioHtml=[];var _wppaVideoNatWidth=[];var _wppaVideoNatHeight=[];var _wppaWaitTexts=[];var _wppaImageAlt=[];var __wppaOverruleRun=false;var wppaOvlUrls;var wppaOvlTitles;var wppaOvlAlts;var wppaOvlIdx=0;var wppaOvlFirst=true;var wppaOvlKbHandler='';var wppaOvlSizeHandler='';var wppaOvlPadTop=5;var wppaOvlIsSingle;var wppaOvlRunning=false;var wppaOvlVideoHtmls;var wppaOvlAudioHtmls;var wppaOvlVideoNaturalWidths;var wppaOvlVideoNaturalHeights;var wppaOvlModeInitial='normal';var wppaOvlVideoPlaying=false;var wppaOvlAudioPlaying=false;var wppaOvlShowLegenda=true;var wppaOvlShowStartStop=true;var wppaOvlRadius=0;var wppaOvlBorderWidth=16;var wppaOvlTxtHeight=36;var wppaOvlOpacity=0.8;var wppaOvlOnclickType='none';var wppaOvlTheme='black';var wppaOvlAnimSpeed=300;var wppaOvlSlideSpeed=3000;var wppaVer4WindowWidth=800;var wppaVer4WindowHeight=600;var wppaOvlFontFamily='Helvetica';var wppaOvlFontSize='10';var wppaOvlFontColor='';var wppaOvlFontWeight='bold';var wppaOvlLineHeight='12';var wppaOvlShowCounter=true;var wppaOvlIsVideo=false;var wppaShowLegenda='';var wppaOvlFsPhotoId=0;var wppaPhotoId=0;var wppaOvlVideoStart=false;var wppaOvlAudioStart=false;var wppaLastIptc='';var wppaLastExif='';var wppaIsMobile=false;var wppaSvgFillcolor='gray';var wppaSvgBgcolor='transparent';var wppaSvgCornerStyle='light';jQuery(document).ready(function(){wppaDoInit(false);setTimeout(function(){wppaDoInit(true);},1000);});function wppaDoInit(autoOnly){var anyAutocol=false;for(mocc=1;mocc<=wppaTopMoc;mocc++){if(wppaAutoColumnWidth[mocc]){wppaColWidth[mocc]=0;_wppaDoAutocol(mocc);anyAutocol=true;}}
7
  if(!autoOnly){_wppaTextDelay=wppaAnimationSpeed;if(wppaFadeInAfterFadeOut)_wppaTextDelay*=2;if(anyAutocol){jQuery(window).resize(function(){for(mocc=1;mocc<=wppaTopMoc;mocc++){if(wppaAutoColumnWidth[mocc]){wppaColWidth[mocc]=0;_wppaDoAutocol(mocc);}}});}}
8
+ wppaReplaceSvg();jQuery('.wppa-ajax-spin').stop().fadeOut();setTimeout(function(){jQuery('.wppa-ajax-spin').stop().fadeOut();},1000);jQuery('.wppa-ovl-spin').stop().fadeOut();setTimeout(function(){jQuery('.wppa-ovl-spin').stop().fadeOut();},1000);setTimeout(function(){var i=1;while(i<wppaTopMoc){if(jQuery('ubb-'+i+'-l')){wppaUbb(i,'l','hide');wppaUbb(i,'r','hide');}
9
+ i++;}},3000);}
10
  jQuery(document).ready(function(e){if(wppaAllowAjax&&jQuery.ajax){wppaCanAjaxRender=true;}
11
  if(typeof(history.pushState)!='undefined'){var i=1;while(i<=wppaMaxOccur){wppaStartHtml[i]=jQuery('#wppa-container-'+i).html();i++;}
12
  wppaCanPushState=true;}});function wppaUpdateLightboxes(){if(typeof(wppaInitOverlay)=='function'){wppaInitOverlay();}
readme.txt CHANGED
@@ -2,7 +2,7 @@
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, gallery, slideshow, video, audio, lightbox, iptc, exif, cloudinary, fotomoto, imagemagick
5
- Version: 6.6.23
6
  Stable tag: 6.6.23
7
  Author: J.N. Breetvelt
8
  Author URI: http://www.opajaap.nl/
@@ -180,11 +180,27 @@ Oh, just Google on 'picture resizer' and you will find a bunch of free programs
180
 
181
  See for additional information: <a href="http://www.wppa.nl/changelog/" >The documentation website</a>
182
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
183
  = 6.6.23 =
184
 
185
  = Bug Fixes =
186
 
187
- * Fixed db version number
188
 
189
  = 6.6.22 =
190
 
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, gallery, slideshow, video, audio, lightbox, iptc, exif, cloudinary, fotomoto, imagemagick
5
+ Version: 6.6.24
6
  Stable tag: 6.6.23
7
  Author: J.N. Breetvelt
8
  Author URI: http://www.opajaap.nl/
180
 
181
  See for additional information: <a href="http://www.wppa.nl/changelog/" >The documentation website</a>
182
 
183
+ = 6.6.24 =
184
+
185
+ = Bug Fixes =
186
+
187
+ * Scheduled cron jobs that never actually started are now re-animated automaticly.
188
+
189
+ = New Features =
190
+
191
+ * You can now specify categories and default tags that new granted albums will get. Table IX-D11.2 and 11.3
192
+
193
+ = Other Chsnges =
194
+
195
+ * On the Settings screen: the status and togo info about scheduled cronjobs is now more accurate and will be updated at least once per minute.
196
+ * The automatic index maintanance at the background (cron processes) is greatly enhanced in speed and lowered in server load.
197
+ * It is no longer required to enter your @twitterName in Table II-C13.1 to get the twitter metatags into the page source.
198
+
199
  = 6.6.23 =
200
 
201
  = Bug Fixes =
202
 
203
+ * Fixed db version number
204
 
205
  = 6.6.22 =
206
 
wppa-ajax.php CHANGED
@@ -2,7 +2,7 @@
2
  /* wppa-ajax.php
3
  *
4
  * Functions used in ajax requests
5
- * Version 6.6.22
6
  *
7
  */
8
 
@@ -331,6 +331,9 @@ global $wppa_log_file;
331
  }
332
  }
333
  if ( $iret ) {
 
 
 
334
  echo 'OK';
335
  }
336
  else {
@@ -382,8 +385,14 @@ global $wppa_log_file;
382
  wppa_exit();
383
  }
384
  if ( isset( $_REQUEST['comment-id'] ) ) { // Remove comment
 
385
  $iret = $wpdb->query( $wpdb->prepare( "DELETE FROM `".WPPA_COMMENTS."` WHERE `id`= %s", $_REQUEST['comment-id'] ) );
386
- if ( $iret ) echo 'OK||'.__( 'Comment removed' , 'wp-photo-album-plus');
 
 
 
 
 
387
  else _e( 'Could not remove comment' , 'wp-photo-album-plus');
388
  wppa_exit();
389
  }
@@ -1325,7 +1334,9 @@ global $wppa_log_file;
1325
  }
1326
 
1327
  $iret = $wpdb->query( $wpdb->prepare( 'UPDATE `'.WPPA_COMMENTS.'` SET `status` = %s WHERE `id` = %s', $comstat, $comid ) );
1328
- if ( wppa_switch( 'search_comments' ) ) wppa_index_update( 'photo', $photo );
 
 
1329
 
1330
  if ( $iret !== false ) {
1331
  if ( $comstat == 'approved' ) {
@@ -2209,6 +2220,7 @@ global $wppa_log_file;
2209
  wppa_exit();
2210
  break; // End update qr setting
2211
  }
 
2212
  else switch ( $option ) {
2213
 
2214
  // Changing potd_album_type ( physical / virtual ) also clears potd_album
@@ -2746,10 +2758,14 @@ global $wppa_log_file;
2746
  $value = 'done';
2747
  break;
2748
 
 
2749
  case 'wppa_search_tags':
2750
  case 'wppa_search_cats':
2751
  case 'wppa_search_comments':
2752
- update_option( 'wppa_index_need_remake', 'yes' );
 
 
 
2753
  break;
2754
 
2755
  case 'wppa_blacklist_user':
@@ -2939,7 +2955,7 @@ global $wppa_log_file;
2939
  case 'wppa_twitter_account':
2940
  $value = sanitize_text_field( $value );
2941
  $value = str_replace( ' ', '', $value );
2942
- if ( substr( $value, 0, 1 ) != '@' ) {
2943
  wppa( 'error', '4712' );
2944
  $alert .= __( 'A Twitter account name must start with an at sign: @', 'wp-photo-album-plus' );
2945
  }
@@ -2997,6 +3013,10 @@ global $wppa_log_file;
2997
  $alert .= __( 'This path does not contain ImageMagick commands', 'wp-photo-album-plus' );
2998
  }
2999
  break;
 
 
 
 
3000
 
3001
  default:
3002
 
@@ -3008,6 +3028,11 @@ global $wppa_log_file;
3008
  if ( ! $title ) $title = sprintf( __( 'Failed to set %s to %s', 'wp-photo-album-plus'), $option, $value );
3009
  if ( ! $alert ) $alert .= wppa( 'out' );
3010
  }
 
 
 
 
 
3011
  else {
3012
  wppa_update_option( $option, $value );
3013
  if ( ! $title ) $title = sprintf( __( 'Setting %s updated to %s', 'wp-photo-album-plus'), $option, $value );
@@ -3019,9 +3044,6 @@ global $wppa_log_file;
3019
  // Something to do after changing the setting?
3020
  wppa_initialize_runtime( true ); // force reload new values
3021
 
3022
- // .htaccess
3023
- // wppa_create_wppa_htaccess();
3024
-
3025
  // Thumbsize
3026
  $new_minisize = wppa_get_minisize();
3027
  if ( $old_minisize != $new_minisize ) {
@@ -3030,8 +3052,17 @@ global $wppa_log_file;
3030
  $alert .= ' '.__( 'Please run the appropriate action in Table VIII.' , 'wp-photo-album-plus');
3031
  }
3032
 
 
 
 
 
 
 
 
 
 
3033
  // Produce the response text
3034
- $output = '||'.$error.'||'.esc_attr( $title ).'||'.esc_js( $alert );
3035
 
3036
  echo $output;
3037
  wppa_clear_cache();
2
  /* wppa-ajax.php
3
  *
4
  * Functions used in ajax requests
5
+ * Version 6.6.24
6
  *
7
  */
8
 
331
  }
332
  }
333
  if ( $iret ) {
334
+ if ( wppa_opt( 'search_comments' ) ) {
335
+ wppa_update_photo( $_REQUEST['photo-id'] );
336
+ }
337
  echo 'OK';
338
  }
339
  else {
385
  wppa_exit();
386
  }
387
  if ( isset( $_REQUEST['comment-id'] ) ) { // Remove comment
388
+ $photo = $wpdb->get_var( $wpdb->prepare( "SELECT `photo` FROM `" . WPPA_COMMENTS . "` WHERE `id` = %s", $_REQUEST['comment-id'] ) );
389
  $iret = $wpdb->query( $wpdb->prepare( "DELETE FROM `".WPPA_COMMENTS."` WHERE `id`= %s", $_REQUEST['comment-id'] ) );
390
+ if ( $iret ) {
391
+ if ( wppa_opt( 'search_comments' ) ) {
392
+ wppa_update_photo( $photo );
393
+ }
394
+ echo 'OK||'.__( 'Comment removed' , 'wp-photo-album-plus');
395
+ }
396
  else _e( 'Could not remove comment' , 'wp-photo-album-plus');
397
  wppa_exit();
398
  }
1334
  }
1335
 
1336
  $iret = $wpdb->query( $wpdb->prepare( 'UPDATE `'.WPPA_COMMENTS.'` SET `status` = %s WHERE `id` = %s', $comstat, $comid ) );
1337
+ if ( wppa_opt( 'search_comments' ) ) {
1338
+ wppa_update_photo( $photo );
1339
+ }
1340
 
1341
  if ( $iret !== false ) {
1342
  if ( $comstat == 'approved' ) {
2220
  wppa_exit();
2221
  break; // End update qr setting
2222
  }
2223
+
2224
  else switch ( $option ) {
2225
 
2226
  // Changing potd_album_type ( physical / virtual ) also clears potd_album
2758
  $value = 'done';
2759
  break;
2760
 
2761
+ case 'wppa_excl_sep':
2762
  case 'wppa_search_tags':
2763
  case 'wppa_search_cats':
2764
  case 'wppa_search_comments':
2765
+ $wpdb->query( "UPDATE `" . WPPA_PHOTOS . "` SET `indexdtm` = ''" );
2766
+ wppa_schedule_maintenance_proc( 'wppa_remake_index_photos' );
2767
+ $wpdb->query( "UPDATE `" . WPPA_ALBUMS . "` SET `indexdtm` = ''" );
2768
+ wppa_schedule_maintenance_proc( 'wppa_remake_index_albums' );
2769
  break;
2770
 
2771
  case 'wppa_blacklist_user':
2955
  case 'wppa_twitter_account':
2956
  $value = sanitize_text_field( $value );
2957
  $value = str_replace( ' ', '', $value );
2958
+ if ( $value != '' && substr( $value, 0, 1 ) != '@' ) {
2959
  wppa( 'error', '4712' );
2960
  $alert .= __( 'A Twitter account name must start with an at sign: @', 'wp-photo-album-plus' );
2961
  }
3013
  $alert .= __( 'This path does not contain ImageMagick commands', 'wp-photo-album-plus' );
3014
  }
3015
  break;
3016
+ case 'wppa_grant_cats':
3017
+ case 'wppa_grant_tags':
3018
+ $value = wppa_sanitize_tags( $value );
3019
+ break;
3020
 
3021
  default:
3022
 
3028
  if ( ! $title ) $title = sprintf( __( 'Failed to set %s to %s', 'wp-photo-album-plus'), $option, $value );
3029
  if ( ! $alert ) $alert .= wppa( 'out' );
3030
  }
3031
+
3032
+ // Do not re-init dynamic files on heartbeat: no wppa_update_option() call
3033
+ elseif ( $option == 'wppa_heartbeat' ) {
3034
+ update_option( $option, $value );
3035
+ }
3036
  else {
3037
  wppa_update_option( $option, $value );
3038
  if ( ! $title ) $title = sprintf( __( 'Setting %s updated to %s', 'wp-photo-album-plus'), $option, $value );
3044
  // Something to do after changing the setting?
3045
  wppa_initialize_runtime( true ); // force reload new values
3046
 
 
 
 
3047
  // Thumbsize
3048
  $new_minisize = wppa_get_minisize();
3049
  if ( $old_minisize != $new_minisize ) {
3052
  $alert .= ' '.__( 'Please run the appropriate action in Table VIII.' , 'wp-photo-album-plus');
3053
  }
3054
 
3055
+ // Compose the cron job status and togo fields
3056
+ $crondata = '';
3057
+ global $wppa_cron_maintenance_slugs;
3058
+ foreach ( $wppa_cron_maintenance_slugs as $slug ) {
3059
+ $crondata .= $slug . '_status:' . get_option( $slug . '_status' ) . ';';
3060
+ $crondata .= $slug . '_togo:' . get_option( $slug . '_togo' ) . ';';
3061
+ }
3062
+ $crondata = rtrim ( $crondata, ';' );
3063
+
3064
  // Produce the response text
3065
+ $output = '||'.$error.'||'.esc_attr( $title ).'||'.esc_js( $alert ).'||'.$crondata;
3066
 
3067
  echo $output;
3068
  wppa_clear_cache();
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 6.6.22
6
  *
7
  */
8
 
@@ -49,8 +49,10 @@ global $wppa_defaults;
49
  }
50
 
51
  // If there is only one grant parent, make sure the granted album is created regardless of if it is used.
52
- if ( wppa_is_int( wppa_opt( 'grant_parent' ) ) ) {
53
- wppa_grant_albums();
 
 
54
  }
55
 
56
  if ( isset( $_GET['debug'] ) && wppa_switch( 'allow_debug' ) ) {
2
  /* wppa-common-functions.php
3
  *
4
  * Functions used in admin and in themes
5
+ * Version 6.6.24
6
  *
7
  */
8
 
49
  }
50
 
51
  // If there is only one grant parent, make sure the granted album is created regardless of if it is used.
52
+ if ( ! wppa_is_cron() && ! wppa( 'ajax' ) ) {
53
+ if ( wppa_is_int( wppa_opt( 'grant_parent' ) ) ) {
54
+ wppa_grant_albums();
55
+ }
56
  }
57
 
58
  if ( isset( $_GET['debug'] ) && wppa_switch( 'allow_debug' ) ) {
wppa-cron.php CHANGED
@@ -3,7 +3,7 @@
3
  * Package: wp-photo-album-plus
4
  *
5
  * Contains all cron functions
6
- * Version 6.6.19
7
  *
8
  *
9
  */
@@ -25,6 +25,7 @@ add_action( 'wppa_cron_event', 'wppa_do_maintenance_proc', 10, 1 );
25
 
26
  // Schedule maintenance proc
27
  function wppa_schedule_maintenance_proc( $slug, $from_settings_page = false ) {
 
28
 
29
  // Schedule cron job
30
  if ( ! wp_next_scheduled( 'wppa_cron_event', array( $slug ) ) ) {
@@ -38,6 +39,7 @@ function wppa_schedule_maintenance_proc( $slug, $from_settings_page = false ) {
38
  }
39
  $args .= str_replace( "\n", '', var_export( $arg, true ) );
40
  }
 
41
  if ( $args ) {
42
  $args = ' ' . str_replace( ',)', ', )', $args ) . ' ';
43
  }
@@ -46,16 +48,17 @@ function wppa_schedule_maintenance_proc( $slug, $from_settings_page = false ) {
46
  $args = " '" . $backtrace[1]['args'] . "' ";
47
  }
48
 
49
- wppa_log( 'Cron', '{b}' . $slug . '{/b} scheduled by {b}' . $backtrace[1]['function'] . '(' . $args . '){/b} on line {b}' . $backtrace[0]['line'] . '{/b} of ' . basename( $backtrace[0]['file'] ) . ' called by ' . $backtrace[2]['function'] );
 
50
  }
51
 
52
  // Update appropriate options
53
- update_option( $slug . '_status', 'Scheduled cron job' );
54
  update_option( $slug . '_user', 'cron-job' );
55
 
56
  // Inform calling Ajax proc about the results
57
  if ( $from_settings_page ) {
58
- echo '||' . $slug . '||' . __( 'Scheduled cron job', 'wp-photo-album-plus' ) . '||0||reload';
59
  }
60
 
61
  }
@@ -66,12 +69,12 @@ function wppa_is_maintenance_cron_job_crashed( $slug ) {
66
  // Asume not
67
  $result = false;
68
 
69
- // If there is a last timestamp longer than 15 minutes ago...
70
- $last = get_option( $slug.'_lasttimestamp', '0' );
71
- if ( $last && $last < ( time() - 900 ) ) {
72
 
73
  // And the user is cron
74
- if ( get_option( $slug . '_user' ) == 'cron-job' ){
75
 
76
  // And proc is not scheduled
77
  if ( ! wp_next_scheduled( 'wppa_cron_event', array( $slug ) ) ) {
@@ -82,6 +85,29 @@ function wppa_is_maintenance_cron_job_crashed( $slug ) {
82
  }
83
  }
84
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
85
  return $result;
86
  }
87
 
@@ -104,9 +130,8 @@ function wppa_schedule_cleanup( $now = false ) {
104
  // The actual cleaner
105
  function wppa_do_cleanup() {
106
  global $wpdb;
107
- global $wppa_all_maintenance_slugs;
108
 
109
- wppa_log( 'Cron', 'Cron job {b}wppa_cleanup{/b} started.' );
110
 
111
  // Cleanup session db table
112
  $lifetime = 3600; // Sessions expire after one hour
@@ -126,14 +151,7 @@ global $wppa_all_maintenance_slugs;
126
  }
127
 
128
  // Re-animate crashed cronjobs
129
- foreach ( $wppa_all_maintenance_slugs as $slug ) {
130
- if ( wppa_is_maintenance_cron_job_crashed( $slug ) ) {
131
- $last = get_option( $slug . '_last' );
132
- update_option( $slug . '_last', $last + 1 );
133
- wppa_schedule_maintenance_proc( $slug );
134
- wppa_log( 'Cron', 'Crashed cron job {b}' . $slug . '{/b} re-animated at item {b}#' . $last . '{/b}' );
135
- }
136
- }
137
 
138
  // Find lost photos, update their album to -9, meaning trashed
139
  $album_ids = $wpdb->get_col( "SELECT `id` FROM `" . WPPA_ALBUMS . "`" );
@@ -152,8 +170,8 @@ global $wppa_all_maintenance_slugs;
152
  wppa_create_pl_htaccess();
153
 
154
  // Cleanup index
155
- wppa_index_compute_skips();
156
- wppa_schedule_maintenance_proc( 'wppa_cleanup_index' );
157
 
158
  // Retry failed mails
159
  if ( wppa_opt( 'retry_mails' ) ) {
@@ -192,7 +210,11 @@ global $wppa_all_maintenance_slugs;
192
  update_option( 'wppa_failed_mails', $failed_mails );
193
  }
194
 
195
- wppa_log( 'Cron', 'Cron job {b}wppa_cleanup{/b} completed.' );
 
 
 
 
196
  }
197
 
198
  // Activate treecount update proc
@@ -224,4 +246,18 @@ global $wpdb;
224
  exit();
225
  }
226
  }
 
 
 
 
 
 
 
 
 
 
 
 
 
 
227
  }
3
  * Package: wp-photo-album-plus
4
  *
5
  * Contains all cron functions
6
+ * Version 6.6.24
7
  *
8
  *
9
  */
25
 
26
  // Schedule maintenance proc
27
  function wppa_schedule_maintenance_proc( $slug, $from_settings_page = false ) {
28
+ global $is_reschedule;
29
 
30
  // Schedule cron job
31
  if ( ! wp_next_scheduled( 'wppa_cron_event', array( $slug ) ) ) {
39
  }
40
  $args .= str_replace( "\n", '', var_export( $arg, true ) );
41
  }
42
+ $args = trim( $args );
43
  if ( $args ) {
44
  $args = ' ' . str_replace( ',)', ', )', $args ) . ' ';
45
  }
48
  $args = " '" . $backtrace[1]['args'] . "' ";
49
  }
50
 
51
+ $re = $is_reschedule ? 're-' : '';
52
+ wppa_log( 'Cron', '{b}' . $slug . '{/b} ' . $re . 'scheduled by {b}' . $backtrace[1]['function'] . '(' . $args . '){/b} on line {b}' . $backtrace[0]['line'] . '{/b} of ' . basename( $backtrace[0]['file'] ) . ' called by ' . $backtrace[2]['function'] );
53
  }
54
 
55
  // Update appropriate options
56
+ update_option( $slug . '_status', 'Cron job' );
57
  update_option( $slug . '_user', 'cron-job' );
58
 
59
  // Inform calling Ajax proc about the results
60
  if ( $from_settings_page ) {
61
+ echo '||' . $slug . '||' . 'Cron job' . '||0||reload';
62
  }
63
 
64
  }
69
  // Asume not
70
  $result = false;
71
 
72
+ // If there is a last timestamp longer than 5 minutes ago...
73
+ $lasttime = get_option( $slug.'_lasttimestamp', '0' );
74
+ if ( $lasttime && $lasttime < ( time() - 300 ) ) {
75
 
76
  // And the user is cron
77
+ if ( get_option( $slug . '_user' ) == 'cron-job' ) {
78
 
79
  // And proc is not scheduled
80
  if ( ! wp_next_scheduled( 'wppa_cron_event', array( $slug ) ) ) {
85
  }
86
  }
87
 
88
+ // No last timestamp, maybe never started?
89
+ elseif ( ! $lasttime ) {
90
+
91
+ // Nothing done yet
92
+ if ( get_option( $slug . 'last' ) == '0' ) {
93
+
94
+ // Togo not calculated yet
95
+ if ( get_option( $slug . 'togo' ) == '' ) {
96
+
97
+ // If the user is cron
98
+ if ( get_option( $slug . '_user' ) == 'cron-job' ) {
99
+
100
+ // And proc is not scheduled
101
+ if ( ! wp_next_scheduled( 'wppa_cron_event', array( $slug ) ) ) {
102
+
103
+ // It is crashed
104
+ $result = true;
105
+ }
106
+ }
107
+ }
108
+ }
109
+ }
110
+
111
  return $result;
112
  }
113
 
130
  // The actual cleaner
131
  function wppa_do_cleanup() {
132
  global $wpdb;
 
133
 
134
+ wppa_log( 'Cron', '{b}wppa_cleanup{/b} started.' );
135
 
136
  // Cleanup session db table
137
  $lifetime = 3600; // Sessions expire after one hour
151
  }
152
 
153
  // Re-animate crashed cronjobs
154
+ wppa_re_animate_cron();
 
 
 
 
 
 
 
155
 
156
  // Find lost photos, update their album to -9, meaning trashed
157
  $album_ids = $wpdb->get_col( "SELECT `id` FROM `" . WPPA_ALBUMS . "`" );
170
  wppa_create_pl_htaccess();
171
 
172
  // Cleanup index
173
+ // wppa_index_compute_skips();
174
+ // wppa_schedule_maintenance_proc( 'wppa_cleanup_index' );
175
 
176
  // Retry failed mails
177
  if ( wppa_opt( 'retry_mails' ) ) {
210
  update_option( 'wppa_failed_mails', $failed_mails );
211
  }
212
 
213
+ wppa_log( 'Cron', '{b}wppa_cleanup{/b} completed.' );
214
+
215
+ // Redo after 5 minutes
216
+ // wp_schedule_single_event( time() + 300, 'wppa_cleanup' );
217
+ // wppa_log( 'Cron', '{b}wppa_cleanup{/b} re-scheduled' );
218
  }
219
 
220
  // Activate treecount update proc
246
  exit();
247
  }
248
  }
249
+ }
250
+
251
+ function wppa_re_animate_cron() {
252
+ global $wppa_cron_maintenance_slugs;
253
+
254
+ foreach ( $wppa_cron_maintenance_slugs as $slug ) {
255
+ if ( wppa_is_maintenance_cron_job_crashed( $slug ) ) {
256
+ $last = get_option( $slug . '_last' );
257
+ update_option( $slug . '_last', $last + 1 );
258
+ wppa_schedule_maintenance_proc( $slug );
259
+ wppa_log( 'Cron', '{b}' . $slug . '{/b} re-animated at item {b}#' . $last . '{/b}' );
260
+ }
261
+ }
262
+
263
  }
wppa-index.php CHANGED
@@ -3,7 +3,7 @@
3
  * Package: wp-photo-album-plus
4
  *
5
  * Contains all indexing functions
6
- * Version 6.6.22
7
  *
8
  *
9
  */
@@ -15,20 +15,25 @@
15
  //
16
  // The actual addition of searchable words and ids into the index db table is handled in a cron job.
17
  // If this function is called real-time, it simply notifys cron to scan all albums or photos on missing items.
18
- function wppa_index_add( $type, $id ) {
19
  global $wpdb;
20
  global $acount;
21
  global $pcount;
22
 
23
  if ( $type == 'album' ) {
24
 
25
- // If there is a cron job running adding to the index and this is not that cron job, do nothing
26
- if ( get_option( 'wppa_remake_index_albums_user' ) == 'cron-job' && ! wppa_is_cron() ) {
 
 
 
 
 
27
  return;
28
  }
29
 
30
  // If no user runs the remake proc, start it as cron job
31
- if ( ! get_option( 'wppa_remake_index_albums_user' ) ) {
32
  wppa_schedule_maintenance_proc( 'wppa_remake_index_albums' );
33
  return;
34
  }
@@ -54,7 +59,9 @@ global $pcount;
54
  // If this line does not exist yet, create it with only one album number as data
55
  if ( ! $indexline ) {
56
  wppa_create_index_entry( array( 'slug' => $word, 'albums' => $id ) );
57
- wppa_log( 'Cron', 'Adding index slug {b}' . $word . '{/b} for album # {b}' . $id . '{/b}' );
 
 
58
  }
59
 
60
  // Index line already exitst, process this album id for this word
@@ -69,9 +76,6 @@ global $pcount;
69
  // Add it
70
  $oldalbums[] = $id;
71
 
72
- // Report addition
73
- // wppa_log( 'Cron', 'Adding album # {b}'.$id.'{/b} to index slug {b}'.$word.'{/b}');
74
-
75
  // Covert to string again
76
  $newalbums = wppa_index_array_to_string( $oldalbums );
77
 
@@ -86,13 +90,18 @@ global $pcount;
86
 
87
  elseif ( $type == 'photo' ) {
88
 
 
 
 
 
 
89
  // If there is a cron job running adding to the index and this is not that cron job, do nothing
90
- if ( get_option( 'wppa_remake_index_photos_user' ) == 'cron-job' && ! wppa_is_cron() ) {
91
  return;
92
  }
93
 
94
  // If no user runs the remake proc, start it as cron job
95
- if ( ! get_option( 'wppa_remake_index_photos_user' ) ) {
96
  wppa_schedule_maintenance_proc( 'wppa_remake_index_photos' );
97
  return;
98
  }
@@ -112,7 +121,7 @@ global $pcount;
112
  // If this line does not exist yet, create it with only one album number as data
113
  if ( ! $indexline ) {
114
  wppa_create_index_entry( array( 'slug' => $word, 'photos' => $id ) );
115
- wppa_log( 'Cron', 'Adding index slug {b}' . $word . '{/b} for photo # {b}' . $id . '{/b}' );
116
  }
117
 
118
  // Index line already exitst, process this photo id for this word
3
  * Package: wp-photo-album-plus
4
  *
5
  * Contains all indexing functions
6
+ * Version 6.6.24
7
  *
8
  *
9
  */
15
  //
16
  // The actual addition of searchable words and ids into the index db table is handled in a cron job.
17
  // If this function is called real-time, it simply notifys cron to scan all albums or photos on missing items.
18
+ function wppa_index_add( $type, $id, $force = false ) {
19
  global $wpdb;
20
  global $acount;
21
  global $pcount;
22
 
23
  if ( $type == 'album' ) {
24
 
25
+ // Make sure this album will be re-indexed some time if we are not a cron job
26
+ if ( ! wppa_is_cron() && ! $force ) {
27
+ $wpdb->query( "UPDATE `" . WPPA_ALBUMS . "` SET `indexdtm` = '' WHERE `id` = " . strval( intval( $id ) ) );
28
+ }
29
+
30
+ // If there is a cron job running adding to the index and this is not that cron job, do nothing, unless force
31
+ if ( get_option( 'wppa_remake_index_albums_user' ) == 'cron-job' && ! wppa_is_cron() && ! $force ) {
32
  return;
33
  }
34
 
35
  // If no user runs the remake proc, start it as cron job
36
+ if ( ! get_option( 'wppa_remake_index_albums_user' ) && ! $force ) {
37
  wppa_schedule_maintenance_proc( 'wppa_remake_index_albums' );
38
  return;
39
  }
59
  // If this line does not exist yet, create it with only one album number as data
60
  if ( ! $indexline ) {
61
  wppa_create_index_entry( array( 'slug' => $word, 'albums' => $id ) );
62
+ if ( ! $force ) {
63
+ wppa_log( 'Cron', 'Adding index slug {b}' . $word . '{/b} for album {b}' . $id . '{/b}' );
64
+ }
65
  }
66
 
67
  // Index line already exitst, process this album id for this word
76
  // Add it
77
  $oldalbums[] = $id;
78
 
 
 
 
79
  // Covert to string again
80
  $newalbums = wppa_index_array_to_string( $oldalbums );
81
 
90
 
91
  elseif ( $type == 'photo' ) {
92
 
93
+ // Make sure this photo will be re-indexed some time if we are not a cron job
94
+ if ( ! wppa_is_cron() && ! $force ) {
95
+ $wpdb->query( "UPDATE `" . WPPA_PHOTOS . "` SET `indexdtm` = '' WHERE `id` = " . strval( intval( $id ) ) );
96
+ }
97
+
98
  // If there is a cron job running adding to the index and this is not that cron job, do nothing
99
+ if ( get_option( 'wppa_remake_index_photos_user' ) == 'cron-job' && ! wppa_is_cron() && ! $force ) {
100
  return;
101
  }
102
 
103
  // If no user runs the remake proc, start it as cron job
104
+ if ( ! get_option( 'wppa_remake_index_photos_user' ) && ! $force ) {
105
  wppa_schedule_maintenance_proc( 'wppa_remake_index_photos' );
106
  return;
107
  }
121
  // If this line does not exist yet, create it with only one album number as data
122
  if ( ! $indexline ) {
123
  wppa_create_index_entry( array( 'slug' => $word, 'photos' => $id ) );
124
+ wppa_log( 'Cron', 'Adding index slug {b}' . $word . '{/b} for photo {b}' . $id . '{/b}' );
125
  }
126
 
127
  // Index line already exitst, process this photo id for this word
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 6.6.22
7
  *
8
  */
9
 
@@ -57,6 +57,21 @@ $wppa_all_maintenance_slugs = array( 'wppa_remake_index_albums',
57
  'wppa_cleanup_index',
58
  );
59
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
60
  // Main maintenace module
61
  // Must return a string like: errormesssage||$slug||status||togo
62
  function wppa_do_maintenance_proc( $slug ) {
@@ -133,7 +148,7 @@ global $wppa_timestamp_start;
133
  // Pre-processing needed?
134
  if ( $lastid == '0' ) {
135
  if ( wppa_is_cron() ) {
136
- wppa_log( 'Cron', 'Cron job {b}' . $slug . '{/b} started. Allowed runtime: ' . ( $endtime - time() ) . 's. Cron id = ' . wppa_is_cron() );
137
  }
138
  else {
139
  wppa_log( 'Obs', 'Maintenance proc {b}' . $slug . '{/b} started. Allowed runtime: ' . ( $endtime - time() ) . 's.' );
@@ -145,6 +160,7 @@ global $wppa_timestamp_start;
145
  // Pre-Clear album index only if not cron
146
  if ( ! wppa_is_cron() ) {
147
  $wpdb->query( "UPDATE `" . WPPA_INDEX . "` SET `albums` = ''" );
 
148
  }
149
  wppa_index_compute_skips();
150
  break;
@@ -154,6 +170,7 @@ global $wppa_timestamp_start;
154
  // Pre-Clear photo index only if not cron
155
  if ( ! wppa_is_cron() ) {
156
  $wpdb->query( "UPDATE `" . WPPA_INDEX . "` SET `photos` = ''" );
 
157
  }
158
  wppa_index_compute_skips();
159
  break;
@@ -234,7 +251,7 @@ global $wppa_timestamp_start;
234
 
235
  if ( $lastid != '0' ) {
236
  if ( wppa_is_cron() ) {
237
- wppa_log( 'Cron', 'Cron job {b}' . $slug . '{/b} continued. Allowed runtime: ' . ( $endtime - time() ) . 's. Cron id = ' . wppa_is_cron() );
238
  }
239
  }
240
 
@@ -249,8 +266,20 @@ global $wppa_timestamp_start;
249
 
250
  // Process albums
251
  $table = WPPA_ALBUMS;
252
- $topid = $wpdb->get_var( "SELECT `id` FROM `".WPPA_ALBUMS."` ORDER BY `id` DESC LIMIT 1" );
253
- $albums = $wpdb->get_results( "SELECT * FROM `".WPPA_ALBUMS."` WHERE `id` > ".$lastid." ORDER BY `id` LIMIT 100", ARRAY_A );
 
 
 
 
 
 
 
 
 
 
 
 
254
  wppa_cache_album( 'add', $albums );
255
 
256
  if ( $albums ) foreach ( $albums as $album ) {
@@ -261,7 +290,14 @@ global $wppa_timestamp_start;
261
 
262
  case 'wppa_remake_index_albums':
263
 
264
- wppa_index_add( 'album', $id );
 
 
 
 
 
 
 
265
  break;
266
 
267
  case 'wppa_remove_empty_albums':
@@ -339,6 +375,14 @@ global $wppa_timestamp_start;
339
  $photos[]['id'] = $i;
340
  }
341
  }
 
 
 
 
 
 
 
 
342
  else {
343
  $topid = $wpdb->get_var( "SELECT `id` FROM `".WPPA_PHOTOS."` ORDER BY `id` DESC LIMIT 1" );
344
  $photos = $wpdb->get_results( "SELECT * FROM `".WPPA_PHOTOS."` WHERE `id` > ".$lastid." ORDER BY `id` LIMIT ".$chunksize, ARRAY_A );
@@ -371,7 +415,14 @@ global $wppa_timestamp_start;
371
 
372
  case 'wppa_remake_index_photos':
373
 
374
- wppa_index_add( 'photo', $id );
 
 
 
 
 
 
 
375
  break;
376
 
377
  case 'wppa_apply_default_photoname_all':
@@ -794,6 +845,7 @@ global $wppa_timestamp_start;
794
  break;
795
 
796
  }
 
797
  // Test for timeout / ready
798
  $lastid = $id;
799
  update_option( $slug.'_last', $lastid );
@@ -801,12 +853,7 @@ global $wppa_timestamp_start;
801
  $togo = $wpdb->get_var( $wpdb->prepare( "SELECT COUNT(*) FROM `" . WPPA_PHOTOS . "` WHERE `id` > %s ", $lastid ) );
802
  if ( $togo ) {
803
  update_option( $slug.'_togo', $togo );
804
- }
805
- if ( time() > $endtime ) {
806
- update_option( $slug.'_status', __('Scheduled cron job', 'wp-photo-album-plus'));
807
- }
808
- else {
809
- update_option( $slug.'_status', __('Running cron job', 'wp-photo-album-plus'));
810
  }
811
  }
812
  if ( time() > $endtime ) break; // Time out
@@ -930,11 +977,10 @@ global $wppa_timestamp_start;
930
 
931
  // Update status
932
  if ( wppa_is_cron() ) {
933
- if ( ( time() > $endtime ) || ( memory_get_usage() >= ( 0.9 * wppa_memry_limit() ) ) ) {
934
- update_option( $slug.'_status', __('Scheduled cron job', 'wp-photo-album-plus'));
935
- }
936
- else {
937
- update_option( $slug.'_status', __('Running cron job', 'wp-photo-album-plus'));
938
  }
939
  }
940
 
@@ -985,7 +1031,10 @@ global $wppa_timestamp_start;
985
  if ( wppa_is_cron() ) {
986
 
987
  update_option( $slug.'_togo', $togo );
988
- update_option( $slug.'_status', 'Running cron' );
 
 
 
989
  wppa_schedule_maintenance_proc( $slug );
990
  }
991
  else {
@@ -1073,7 +1122,7 @@ global $wppa_timestamp_start;
1073
  }
1074
 
1075
  if ( wppa_is_cron() ) {
1076
- wppa_log( 'Cron', 'Cron job {b}' . $slug . '{/b} completed' );
1077
  }
1078
  else {
1079
  wppa_log( 'Obs', 'Maintenance proc {b}' . $slug . '{/b} completed' );
3
  * Package: wp-photo-album-plus
4
  *
5
  * Contains (not yet, but in the future maybe) all the maintenance routines
6
+ * Version 6.6.24
7
  *
8
  */
9
 
57
  'wppa_cleanup_index',
58
  );
59
 
60
+ global $wppa_cron_maintenance_slugs;
61
+ $wppa_cron_maintenance_slugs = array( 'wppa_remake_index_albums',
62
+ 'wppa_remake_index_photos',
63
+ 'wppa_regen_thumbs',
64
+ 'wppa_rerate',
65
+ 'wppa_recup',
66
+ 'wppa_cleanup_index',
67
+ 'wppa_remake',
68
+ 'wppa_rerate',
69
+ 'wppa_comp_sizes',
70
+ 'wppa_add_gpx_tag',
71
+ 'wppa_add_hd_tag',
72
+ 'wppa_test_proc',
73
+ );
74
+
75
  // Main maintenace module
76
  // Must return a string like: errormesssage||$slug||status||togo
77
  function wppa_do_maintenance_proc( $slug ) {
148
  // Pre-processing needed?
149
  if ( $lastid == '0' ) {
150
  if ( wppa_is_cron() ) {
151
+ wppa_log( 'Cron', '{b}' . $slug . '{/b} started. Allowed runtime: ' . ( $endtime - time() ) . 's. Cron id = ' . wppa_is_cron() );
152
  }
153
  else {
154
  wppa_log( 'Obs', 'Maintenance proc {b}' . $slug . '{/b} started. Allowed runtime: ' . ( $endtime - time() ) . 's.' );
160
  // Pre-Clear album index only if not cron
161
  if ( ! wppa_is_cron() ) {
162
  $wpdb->query( "UPDATE `" . WPPA_INDEX . "` SET `albums` = ''" );
163
+ $wpdb->query( "UPDATE `" . WPPA_ALBUMS . "` SET `indexdtm` = ''" );
164
  }
165
  wppa_index_compute_skips();
166
  break;
170
  // Pre-Clear photo index only if not cron
171
  if ( ! wppa_is_cron() ) {
172
  $wpdb->query( "UPDATE `" . WPPA_INDEX . "` SET `photos` = ''" );
173
+ $wpdb->query( "UPDATE `" . WPPA_PHOTOS . "` SET `indexdtm` = ''" );
174
  }
175
  wppa_index_compute_skips();
176
  break;
251
 
252
  if ( $lastid != '0' ) {
253
  if ( wppa_is_cron() ) {
254
+ wppa_log( 'Cron', '{b}' . $slug . '{/b} continued. Allowed runtime: ' . ( $endtime - time() ) . 's. Cron id = ' . wppa_is_cron() );
255
  }
256
  }
257
 
266
 
267
  // Process albums
268
  $table = WPPA_ALBUMS;
269
+
270
+ if ( $slug == 'wppa_remake_index_albums' ) {
271
+ $topid = $wpdb->get_var( "SELECT `id` FROM `".WPPA_ALBUMS."` ORDER BY `id` DESC LIMIT 1" );
272
+ $albums = $wpdb->get_results( "SELECT * FROM `" . WPPA_ALBUMS . "` " .
273
+ "WHERE `id` > " . $lastid . " " .
274
+ "AND `indexdtm` < `modified` " .
275
+ "ORDER BY `id` " .
276
+ "LIMIT 100", ARRAY_A );
277
+ }
278
+ else {
279
+ $topid = $wpdb->get_var( "SELECT `id` FROM `".WPPA_ALBUMS."` ORDER BY `id` DESC LIMIT 1" );
280
+ $albums = $wpdb->get_results( "SELECT * FROM `".WPPA_ALBUMS."` WHERE `id` > ".$lastid." ORDER BY `id` LIMIT 100", ARRAY_A );
281
+ }
282
+
283
  wppa_cache_album( 'add', $albums );
284
 
285
  if ( $albums ) foreach ( $albums as $album ) {
290
 
291
  case 'wppa_remake_index_albums':
292
 
293
+ if ( wppa_is_cron() ) {
294
+ wppa_index_add( 'album', $id );
295
+ wppa_log( 'Cron', 'Indexed album {b}' . $id . '{/b}' );
296
+ }
297
+ else {
298
+ wppa_index_add( 'album', $id, 'force' );
299
+ }
300
+ $wpdb->query( "UPDATE `" . WPPA_ALBUMS . "` SET `indexdtm` = '" . time() . "' WHERE `id` = $id" );
301
  break;
302
 
303
  case 'wppa_remove_empty_albums':
375
  $photos[]['id'] = $i;
376
  }
377
  }
378
+ elseif ( $slug == 'wppa_remake_index_photos' ) {
379
+ $topid = $wpdb->get_var( "SELECT `id` FROM `".WPPA_PHOTOS."` ORDER BY `id` DESC LIMIT 1" );
380
+ $photos = $wpdb->get_results( "SELECT * FROM `" . WPPA_PHOTOS . "` " .
381
+ "WHERE `id` > " . $lastid . " " .
382
+ "AND `indexdtm` < `modified` " .
383
+ "ORDER BY `id` " .
384
+ "LIMIT " . $chunksize, ARRAY_A );
385
+ }
386
  else {
387
  $topid = $wpdb->get_var( "SELECT `id` FROM `".WPPA_PHOTOS."` ORDER BY `id` DESC LIMIT 1" );
388
  $photos = $wpdb->get_results( "SELECT * FROM `".WPPA_PHOTOS."` WHERE `id` > ".$lastid." ORDER BY `id` LIMIT ".$chunksize, ARRAY_A );
415
 
416
  case 'wppa_remake_index_photos':
417
 
418
+ if ( wppa_is_cron() ) {
419
+ wppa_index_add( 'photo', $id );
420
+ wppa_log( 'Cron', 'Indexed photo {b}' . $id . '{/b}' );
421
+ }
422
+ else {
423
+ wppa_index_add( 'photo', $id, 'force' );
424
+ }
425
+ $wpdb->query( "UPDATE `" . WPPA_PHOTOS . "` SET `indexdtm` = '" . time() . "' WHERE `id` = $id" );
426
  break;
427
 
428
  case 'wppa_apply_default_photoname_all':
845
  break;
846
 
847
  }
848
+
849
  // Test for timeout / ready
850
  $lastid = $id;
851
  update_option( $slug.'_last', $lastid );
853
  $togo = $wpdb->get_var( $wpdb->prepare( "SELECT COUNT(*) FROM `" . WPPA_PHOTOS . "` WHERE `id` > %s ", $lastid ) );
854
  if ( $togo ) {
855
  update_option( $slug.'_togo', $togo );
856
+ update_option( $slug.'_status', 'Cron job' );
 
 
 
 
 
857
  }
858
  }
859
  if ( time() > $endtime ) break; // Time out
977
 
978
  // Update status
979
  if ( wppa_is_cron() ) {
980
+ $togo = $wpdb->get_var( $wpdb->prepare( "SELECT COUNT(*) FROM `" . WPPA_INDEX . "` WHERE `id` > %s ", $lastid ) );
981
+ if ( $togo ) {
982
+ update_option( $slug.'_togo', $togo );
983
+ update_option( $slug.'_status', 'Cron job' );
 
984
  }
985
  }
986
 
1031
  if ( wppa_is_cron() ) {
1032
 
1033
  update_option( $slug.'_togo', $togo );
1034
+ update_option( $slug.'_status', 'Cron job' );
1035
+
1036
+ global $is_reschedule;
1037
+ $is_reschedule = true;
1038
  wppa_schedule_maintenance_proc( $slug );
1039
  }
1040
  else {
1122
  }
1123
 
1124
  if ( wppa_is_cron() ) {
1125
+ wppa_log( 'Cron', '{b}' . $slug . '{/b} completed' );
1126
  }
1127
  else {
1128
  wppa_log( 'Obs', 'Maintenance proc {b}' . $slug . '{/b} completed' );
wppa-non-admin.php CHANGED
@@ -97,7 +97,7 @@ global $wpdb;
97
 
98
  if ( $id ) {
99
 
100
- if ( wppa_switch( 'share_twitter' ) && wppa_opt( 'twitter_account' ) ) {
101
  $thumb = wppa_cache_thumb( $id );
102
 
103
  // Twitter wants at least 280px in width, and at least 150px in height
@@ -106,39 +106,31 @@ global $wpdb;
106
  $y = wppa_get_photo_item( $id, 'photoy' );
107
  }
108
  if ( $thumb && $x >= 280 && $y >= 150 ) {
109
- $title = wppa_get_photo_name( $id );
110
- $desc = wppa_get_og_desc( $id, 'short' );
111
- $url = ( is_ssl() ? 'https://' : 'http://' ) . $_SERVER['HTTP_HOST'] . $_SERVER['REQUEST_URI'];
112
- $site = get_bloginfo('name');
113
-
114
- echo '
115
- <!-- WPPA+ Twitter Share data -->
116
- <meta name="twitter:card" content="summary_large_image">
117
- <meta name="twitter:site" content="' . wppa_opt( 'twitter_account' ) . '">
118
- <meta name="twitter:creator" content="' . wppa_opt( 'twitter_account' ) . '">
119
- <meta name="twitter:title" content="' . esc_attr( sanitize_text_field( $title ) ) . '">
120
- <meta name="twitter:text:description" content="' . esc_attr( sanitize_text_field( $desc ) ) . '">
121
- <meta name="twitter:image" content="' . esc_url( sanitize_text_field( $imgurl ) ) . '">
122
- <!-- WPPA+ End Twitter Share data -->
123
- ';
124
  }
125
- elseif ( $thumb && $x >= 120 && $y >= 120 ) {
126
- $title = wppa_get_photo_name( $id );
127
- $desc = wppa_get_og_desc( $id, 'short' );
128
- $url = ( is_ssl() ? 'https://' : 'http://' ) . $_SERVER['HTTP_HOST'] . $_SERVER['REQUEST_URI'];
129
- $site = get_bloginfo('name');
 
 
 
130
 
131
  echo '
132
  <!-- WPPA+ Twitter Share data -->
133
- <meta name="twitter:card" content="summary">
134
- <meta name="twitter:site" content="' . wppa_opt( 'twitter_account' ) . '">
135
  <meta name="twitter:title" content="' . esc_attr( sanitize_text_field( $title ) ) . '">
136
  <meta name="twitter:text:description" content="' . esc_attr( sanitize_text_field( $desc ) ) . '">
137
- <meta name="twitter:image" content="' . esc_url( sanitize_text_field( $imgurl ) ) . '">
 
 
 
 
 
138
  <!-- WPPA+ End Twitter Share data -->
139
  ';
140
-
141
- }
142
  }
143
 
144
  if ( wppa_switch( 'og_tags_on' ) ) {
97
 
98
  if ( $id ) {
99
 
100
+ if ( wppa_switch( 'share_twitter' ) ) {
101
  $thumb = wppa_cache_thumb( $id );
102
 
103
  // Twitter wants at least 280px in width, and at least 150px in height
106
  $y = wppa_get_photo_item( $id, 'photoy' );
107
  }
108
  if ( $thumb && $x >= 280 && $y >= 150 ) {
109
+ $card = 'summary_large_image';
 
 
 
 
 
 
 
 
 
 
 
 
 
 
110
  }
111
+ else {
112
+ $card = 'summary';
113
+ }
114
+ $title = wppa_get_photo_name( $id );
115
+ $desc = wppa_get_og_desc( $id, 'short' );
116
+ $url = ( is_ssl() ? 'https://' : 'http://' ) . $_SERVER['HTTP_HOST'] . $_SERVER['REQUEST_URI'];
117
+ $site = get_bloginfo( 'name' );
118
+ $creat = wppa_opt( 'twitter_account' );
119
 
120
  echo '
121
  <!-- WPPA+ Twitter Share data -->
122
+ <meta name="twitter:card" content="' . $card . '">
123
+ <meta name="twitter:site" content="' . esc_attr( $site ) . '">
124
  <meta name="twitter:title" content="' . esc_attr( sanitize_text_field( $title ) ) . '">
125
  <meta name="twitter:text:description" content="' . esc_attr( sanitize_text_field( $desc ) ) . '">
126
+ <meta name="twitter:image" content="' . esc_url( $imgurl ) . '">';
127
+ if ( $creat ) {
128
+ echo '
129
+ <meta name="twitter:creator" content="' . $creat . '">';
130
+ }
131
+ echo '
132
  <!-- WPPA+ End Twitter Share data -->
133
  ';
 
 
134
  }
135
 
136
  if ( wppa_switch( 'og_tags_on' ) ) {
wppa-photo-files.php CHANGED
@@ -2,7 +2,7 @@
2
  /* wppa-photo-files.php
3
  *
4
  * Functions used to create/manipulate photofiles
5
- * Version 6.6.20
6
  *
7
  */
8
 
@@ -196,7 +196,7 @@ global $wpdb;
196
  }
197
 
198
  // Classic GD
199
- else {
200
 
201
  // Picture sizes
202
  $src_width = $src_size[0];
2
  /* wppa-photo-files.php
3
  *
4
  * Functions used to create/manipulate photofiles
5
+ * Version 6.6.24
6
  *
7
  */
8
 
196
  }
197
 
198
  // Classic GD
199
+ if ( ! wppa_opt( 'image_magick' ) || ! is_file( $newimage ) ) {
200
 
201
  // Picture sizes
202
  $src_width = $src_size[0];
wppa-settings-autosave.php CHANGED
@@ -3,7 +3,7 @@
3
  * Package: wp-photo-album-plus
4
  *
5
  * manage all options
6
- * Version 6.6.19
7
  *
8
  */
9
 
@@ -33,6 +33,9 @@ global $wp_version;
33
  wppa_initialize_runtime( true );
34
  $options_error = false;
35
 
 
 
 
36
  // If watermark all is going to be run, make sure the current user has no private overrule settings
37
  delete_option( 'wppa_watermark_file_'.wppa_get_user() );
38
  delete_option( 'wppa_watermark_pos_'.wppa_get_user() );
@@ -311,8 +314,8 @@ global $wp_version;
311
 
312
  // Check for pending actions
313
  // if ( wppa_switch( 'indexed_search' ) ) {
314
- if ( get_option( 'wppa_remake_index_albums_status' ) && get_option( 'wppa_remake_index_albums_user', wppa_get_user() ) == wppa_get_user() ) wppa_warning_message( __( 'Rebuilding the Album index needs completion. See Table VIII' , 'wp-photo-album-plus') );
315
- if ( get_option( 'wppa_remake_index_photos_status' ) && get_option( 'wppa_remake_index_photos_user', wppa_get_user() ) == wppa_get_user() ) wppa_warning_message( __( 'Rebuilding the Photo index needs completion. See Table VIII' , 'wp-photo-album-plus') );
316
  // }
317
  if ( get_option( 'wppa_remove_empty_albums_status' ) && get_option( 'wppa_remove_empty_albums_user', wppa_get_user() ) == wppa_get_user() ) wppa_warning_message( __( 'Remove empty albums needs completion. See Table VIII', 'wp-photo-album-plus') );
318
  if ( get_option( 'wppa_apply_new_photodesc_all_status' ) && get_option( 'wppa_apply_new_photodesc_all_user', wppa_get_user() ) == wppa_get_user() ) wppa_warning_message( __( 'Applying new photo description needs completion. See Table VIII', 'wp-photo-album-plus') );
@@ -8444,6 +8447,24 @@ if ( strpos( $_SERVER['SERVER_NAME'], 'opajaap' ) !== false ) {
8444
  break;
8445
  }
8446
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
8447
  $name = __('Max user albums', 'wp-photo-album-plus');
8448
  $desc = __('The max number of albums a user can create.', 'wp-photo-album-plus');
8449
  $help = esc_js(__('The maximum number of albums a user can create when he is not admin and owner only is active', 'wp-photo-album-plus'));
@@ -10029,6 +10050,17 @@ if ( strpos( $_SERVER['SERVER_NAME'], 'opajaap' ) !== false ) {
10029
  <script type="text/javascript">wppaInitSettings();wppaCheckInconsistencies();</script>
10030
  <?php echo sprintf(__('<br />Memory used on this page: %6.2f Mb.', 'wp-photo-album-plus'), memory_get_peak_usage(true)/(1024*1024)); ?>
10031
  <?php echo sprintf(__('<br />There are %d settings and %d runtime parameters.', 'wp-photo-album-plus'), count($wppa_opt), count($wppa)); ?>
 
 
 
 
 
 
 
 
 
 
 
10032
  </div>
10033
 
10034
  <?php
3
  * Package: wp-photo-album-plus
4
  *
5
  * manage all options
6
+ * Version 6.6.24
7
  *
8
  */
9
 
33
  wppa_initialize_runtime( true );
34
  $options_error = false;
35
 
36
+ // Re-animate crashec cron jobs
37
+ wppa_re_animate_cron();
38
+
39
  // If watermark all is going to be run, make sure the current user has no private overrule settings
40
  delete_option( 'wppa_watermark_file_'.wppa_get_user() );
41
  delete_option( 'wppa_watermark_pos_'.wppa_get_user() );
314
 
315
  // Check for pending actions
316
  // if ( wppa_switch( 'indexed_search' ) ) {
317
+ // if ( get_option( 'wppa_remake_index_albums_status' ) && get_option( 'wppa_remake_index_albums_user', wppa_get_user() ) == wppa_get_user() ) wppa_warning_message( __( 'Rebuilding the Album index needs completion. See Table VIII' , 'wp-photo-album-plus') );
318
+ // if ( get_option( 'wppa_remake_index_photos_status' ) && get_option( 'wppa_remake_index_photos_user', wppa_get_user() ) == wppa_get_user() ) wppa_warning_message( __( 'Rebuilding the Photo index needs completion. See Table VIII' , 'wp-photo-album-plus') );
319
  // }
320
  if ( get_option( 'wppa_remove_empty_albums_status' ) && get_option( 'wppa_remove_empty_albums_user', wppa_get_user() ) == wppa_get_user() ) wppa_warning_message( __( 'Remove empty albums needs completion. See Table VIII', 'wp-photo-album-plus') );
321
  if ( get_option( 'wppa_apply_new_photodesc_all_status' ) && get_option( 'wppa_apply_new_photodesc_all_user', wppa_get_user() ) == wppa_get_user() ) wppa_warning_message( __( 'Applying new photo description needs completion. See Table VIII', 'wp-photo-album-plus') );
8447
  break;
8448
  }
8449
 
8450
+ $name = __('Grant categoriess', 'wp-photo-album-plus');
8451
+ $desc = __('The categories a new granted album will get.', 'wppa');
8452
+ $help = '';
8453
+ $slug = 'wppa_grant_cats';
8454
+ $html = wppa_input($slug, '150px');
8455
+ $clas = '';
8456
+ $tags = 'system,album';
8457
+ wppa_setting($slug, '11.2', $name, $desc, $html, $help, $clas, $tags);
8458
+
8459
+ $name = __('Grant tags', 'wp-photo-album-plus');
8460
+ $desc = __('The default tags the photos in a new granted album will get.', 'wppa');
8461
+ $help = '';
8462
+ $slug = 'wppa_grant_tags';
8463
+ $html = wppa_input($slug, '150px');
8464
+ $clas = '';
8465
+ $tags = 'system,album';
8466
+ wppa_setting($slug, '11.3', $name, $desc, $html, $help, $clas, $tags);
8467
+
8468
  $name = __('Max user albums', 'wp-photo-album-plus');
8469
  $desc = __('The max number of albums a user can create.', 'wp-photo-album-plus');
8470
  $help = esc_js(__('The maximum number of albums a user can create when he is not admin and owner only is active', 'wp-photo-album-plus'));
10050
  <script type="text/javascript">wppaInitSettings();wppaCheckInconsistencies();</script>
10051
  <?php echo sprintf(__('<br />Memory used on this page: %6.2f Mb.', 'wp-photo-album-plus'), memory_get_peak_usage(true)/(1024*1024)); ?>
10052
  <?php echo sprintf(__('<br />There are %d settings and %d runtime parameters.', 'wp-photo-album-plus'), count($wppa_opt), count($wppa)); ?>
10053
+ <input type="hidden" id="wppa-heartbeat" value="0" />
10054
+ <script>
10055
+ function wppaHeartbeat() {
10056
+ var val = jQuery( '#wppa-heartbeat' ).val();
10057
+ val++;
10058
+ jQuery( '#wppa-heartbeat' ).val( val );
10059
+ wppaAjaxUpdateOptionValue( 'heartbeat', document.getElementById( 'wppa-heartbeat' ) );
10060
+ setTimeout( function() { wppaHeartbeat(); }, 15000 );
10061
+ }
10062
+ wppaHeartbeat();
10063
+ </script>
10064
  </div>
10065
 
10066
  <?php
wppa-setup.php CHANGED
@@ -3,7 +3,7 @@
3
  * Package: wp-photo-album-plus
4
  *
5
  * Contains all the setup stuff
6
- * Version 6.6.22
7
  *
8
  */
9
 
@@ -74,6 +74,7 @@ global $silent;
74
  treecounts text NOT NULL,
75
  wmfile tinytext NOT NULL,
76
  wmpos tinytext NOT NULL,
 
77
  PRIMARY KEY (id)
78
  ) DEFAULT CHARACTER SET utf8;";
79
 
@@ -113,6 +114,7 @@ global $silent;
113
  stereo smallint NOT NULL default '0',
114
  crypt tinytext NOT NULL,
115
  magickstack text NOT NULL,
 
116
  PRIMARY KEY (id),
117
  KEY albumkey (album),
118
  KEY statuskey (status(6))
@@ -1578,6 +1580,8 @@ Hide Camera info
1578
  'wppa_grant_name' => 'display',
1579
  'wppa_grant_parent_sel_method' => 'selectionbox',
1580
  'wppa_grant_parent' => '-1',
 
 
1581
  'wppa_default_parent' => '0',
1582
  'wppa_default_parent_always' => 'no',
1583
 
@@ -1605,7 +1609,6 @@ Hide Camera info
1605
  'wppa_search_cats' => 'no',
1606
  'wppa_search_comments' => 'no',
1607
  'wppa_photos_only' => 'no', // 3
1608
- // 'wppa_indexed_search' => 'no',
1609
  'wppa_max_search_photos' => '250',
1610
  'wppa_max_search_albums' => '25',
1611
  'wppa_tags_or_only' => 'no',
@@ -1742,6 +1745,8 @@ Hide Camera info
1742
 
1743
  'wppa_dismiss_admin_notice_scripts_are_obsolete' => 'no',
1744
 
 
 
1745
  );
1746
 
1747
  if ( $force ) {
@@ -1996,7 +2001,9 @@ static $user;
1996
  if ( ! in_array( $parent, $my_albs_parents, true ) ) {
1997
 
1998
  // make an album for this user
1999
- $id = wppa_create_album_entry( array ( 'name' => $name, 'description' => $desc, 'a_parent' => $parent ) );
 
 
2000
  if ( $id ) {
2001
  wppa_log( 'Obs', 'Album ' . wppa_get_album_name( $parent ) . '(' . $parent . ')' .' -> ' . $id . ' for ' . $user . ' created.' );
2002
  $albums_created[] = $id;
3
  * Package: wp-photo-album-plus
4
  *
5
  * Contains all the setup stuff
6
+ * Version 6.6.24
7
  *
8
  */
9
 
74
  treecounts text NOT NULL,
75
  wmfile tinytext NOT NULL,
76
  wmpos tinytext NOT NULL,
77
+ indexdtm tinytext NOT NULL,
78
  PRIMARY KEY (id)
79
  ) DEFAULT CHARACTER SET utf8;";
80
 
114
  stereo smallint NOT NULL default '0',
115
  crypt tinytext NOT NULL,
116
  magickstack text NOT NULL,
117
+ indexdtm tinytext NOT NULL,
118
  PRIMARY KEY (id),
119
  KEY albumkey (album),
120
  KEY statuskey (status(6))
1580
  'wppa_grant_name' => 'display',
1581
  'wppa_grant_parent_sel_method' => 'selectionbox',
1582
  'wppa_grant_parent' => '-1',
1583
+ 'wppa_grant_cats' => '',
1584
+ 'wppa_grant_tags' => '',
1585
  'wppa_default_parent' => '0',
1586
  'wppa_default_parent_always' => 'no',
1587
 
1609
  'wppa_search_cats' => 'no',
1610
  'wppa_search_comments' => 'no',
1611
  'wppa_photos_only' => 'no', // 3
 
1612
  'wppa_max_search_photos' => '250',
1613
  'wppa_max_search_albums' => '25',
1614
  'wppa_tags_or_only' => 'no',
1745
 
1746
  'wppa_dismiss_admin_notice_scripts_are_obsolete' => 'no',
1747
 
1748
+ 'wppa_heartbeat' => '0',
1749
+
1750
  );
1751
 
1752
  if ( $force ) {
2001
  if ( ! in_array( $parent, $my_albs_parents, true ) ) {
2002
 
2003
  // make an album for this user
2004
+ $cats = wppa_opt( 'grant_cats' );
2005
+ $deftags = wppa_opt( 'grant_tags' );
2006
+ $id = wppa_create_album_entry( array ( 'name' => $name, 'description' => $desc, 'a_parent' => $parent, 'cats' => $cats, 'default_tags' => $deftags ) );
2007
  if ( $id ) {
2008
  wppa_log( 'Obs', 'Album ' . wppa_get_album_name( $parent ) . '(' . $parent . ')' .' -> ' . $id . ' for ' . $user . ' created.' );
2009
  $albums_created[] = $id;
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 6.6.22
7
  *
8
  */
9
 
@@ -196,7 +196,12 @@ global $wpdb;
196
  );
197
  $iret = $wpdb->query($query);
198
 
199
- if ( $iret ) return $args['id'];
 
 
 
 
 
200
  else return false;
201
  }
202
 
@@ -270,13 +275,14 @@ global $wpdb;
270
  'custom' => '',
271
  'crypt' => wppa_get_unique_photo_crypt(),
272
  'magickstack' => '',
 
273
  ) );
274
 
275
  if ( $args['scheduledtm'] ) $args['status'] = 'scheduled';
276
 
277
  if ( ! wppa_is_id_free( WPPA_PHOTOS, $args['id'] ) ) $args['id'] = wppa_nextkey( WPPA_PHOTOS );
278
 
279
- $query = $wpdb->prepare("INSERT INTO `" . WPPA_PHOTOS . "` ( `id`,
280
  `album`,
281
  `ext`,
282
  `name`,
@@ -304,9 +310,10 @@ global $wpdb;
304
  `scheduledel`,
305
  `custom`,
306
  `crypt`,
307
- `magickstack`
 
308
  )
309
- 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 )",
310
  $args['id'],
311
  $args['album'],
312
  $args['ext'],
@@ -335,9 +342,10 @@ global $wpdb;
335
  $args['scheduledel'],
336
  $args['custom'],
337
  $args['crypt'],
338
- $args['magickstack']
 
339
  );
340
- $iret = $wpdb->query($query);
341
 
342
  if ( $iret ) {
343
 
@@ -376,7 +384,8 @@ global $wpdb;
376
  'cats' => '',
377
  'scheduledtm' => '',
378
  'crypt' => wppa_get_unique_album_crypt(),
379
- 'treecounts' => serialize( array( 1,0,0,0,0,0,0,0,0,0,0 ) )
 
380
  ) );
381
 
382
  if ( ! wppa_is_id_free( WPPA_ALBUMS, $args['id'] ) ) $args['id'] = wppa_nextkey( WPPA_ALBUMS );
@@ -402,9 +411,10 @@ global $wpdb;
402
  `cats`,
403
  `scheduledtm`,
404
  `crypt`,
405
- `treecounts`
 
406
  )
407
- VALUES ( %s, %s, %s, %s, %s, %s, %s, %s, %s, %s ,%s, %s, %s, %s, %s, %s, %s, %s, %s, %s, %s, %s )",
408
  $args['id'],
409
  trim( $args['name'] ),
410
  trim( $args['description'] ),
@@ -426,7 +436,8 @@ global $wpdb;
426
  $args['cats'],
427
  $args['scheduledtm'],
428
  $args['crypt'],
429
- $args['treecounts']
 
430
  );
431
  $iret = $wpdb->query( $query );
432
 
3
  * Package: wp-photo-album-plus
4
  *
5
  * Contains low-level wpdb routines that add new records
6
+ * Version 6.6.24
7
  *
8
  */
9
 
196
  );
197
  $iret = $wpdb->query($query);
198
 
199
+ if ( $iret ) {
200
+ if ( wppa_opt( 'search_comments' ) ) {
201
+ wppa_update_photo( $args['photo'] );
202
+ }
203
+ return $args['id'];
204
+ }
205
  else return false;
206
  }
207
 
275
  'custom' => '',
276
  'crypt' => wppa_get_unique_photo_crypt(),
277
  'magickstack' => '',
278
+ 'indexdtm' => '',
279
  ) );
280
 
281
  if ( $args['scheduledtm'] ) $args['status'] = 'scheduled';
282
 
283
  if ( ! wppa_is_id_free( WPPA_PHOTOS, $args['id'] ) ) $args['id'] = wppa_nextkey( WPPA_PHOTOS );
284
 
285
+ $query = $wpdb->prepare( "INSERT INTO `" . WPPA_PHOTOS . "` ( `id`,
286
  `album`,
287
  `ext`,
288
  `name`,
310
  `scheduledel`,
311
  `custom`,
312
  `crypt`,
313
+ `magickstack`,
314
+ `indexdtm`
315
  )
316
+ 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 )",
317
  $args['id'],
318
  $args['album'],
319
  $args['ext'],
342
  $args['scheduledel'],
343
  $args['custom'],
344
  $args['crypt'],
345
+ $args['magickstack'],
346
+ $args['indexdtm']
347
  );
348
+ $iret = $wpdb->query( $query );
349
 
350
  if ( $iret ) {
351
 
384
  'cats' => '',
385
  'scheduledtm' => '',
386
  'crypt' => wppa_get_unique_album_crypt(),
387
+ 'treecounts' => serialize( array( 1,0,0,0,0,0,0,0,0,0,0 ) ),
388
+ 'indexdtm' => '',
389
  ) );
390
 
391
  if ( ! wppa_is_id_free( WPPA_ALBUMS, $args['id'] ) ) $args['id'] = wppa_nextkey( WPPA_ALBUMS );
411
  `cats`,
412
  `scheduledtm`,
413
  `crypt`,
414
+ `treecounts`,
415
+ `indexdtm`
416
  )
417
+ VALUES ( %s, %s, %s, %s, %s, %s, %s, %s, %s, %s ,%s, %s, %s, %s, %s, %s, %s, %s, %s, %s, %s, %s, %s )",
418
  $args['id'],
419
  trim( $args['name'] ),
420
  trim( $args['description'] ),
436
  $args['cats'],
437
  $args['scheduledtm'],
438
  $args['crypt'],
439
+ $args['treecounts'],
440
+ $args['indexdtm']
441
  );
442
  $iret = $wpdb->query( $query );
443
 
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 6.6.22
7
  *
8
  */
9
 
@@ -13,7 +13,14 @@ if ( ! defined( 'ABSPATH' ) ) die( "Can't load this file directly" );
13
  function wppa_update_album( $args ) {
14
  global $wpdb;
15
 
16
- if ( ! is_array( $args ) ) return false;
 
 
 
 
 
 
 
17
  if ( ! $args['id'] ) return false;
18
  if ( ! wppa_cache_album( $args['id'] ) ) return false;
19
  $id = $args['id'];
@@ -99,7 +106,14 @@ global $wpdb;
99
  function wppa_update_photo( $args ) {
100
  global $wpdb;
101
 
102
- if ( ! is_array( $args ) ) return false;
 
 
 
 
 
 
 
103
  if ( ! $args['id'] ) return false;
104
  $thumb = wppa_cache_thumb( $args['id'] );
105
  if ( ! $thumb ) return false;
3
  * Package: wp-photo-album-plus
4
  *
5
  * Contains low-level wpdb routines that update records
6
+ * Version 6.6.24
7
  *
8
  */
9
 
13
  function wppa_update_album( $args ) {
14
  global $wpdb;
15
 
16
+ if ( ! is_array( $args ) ) {
17
+ if ( wppa_is_int( $args ) ) {
18
+ $args = array( 'id' => $args, 'modified' => time() );
19
+ }
20
+ else {
21
+ return false;
22
+ }
23
+ }
24
  if ( ! $args['id'] ) return false;
25
  if ( ! wppa_cache_album( $args['id'] ) ) return false;
26
  $id = $args['id'];
106
  function wppa_update_photo( $args ) {
107
  global $wpdb;
108
 
109
+ if ( ! is_array( $args ) ) {
110
+ if ( wppa_is_int( $args ) ) {
111
+ $args = array( 'id' => $args, 'modified' => time() );
112
+ }
113
+ else {
114
+ return false;
115
+ }
116
+ }
117
  if ( ! $args['id'] ) return false;
118
  $thumb = wppa_cache_thumb( $args['id'] );
119
  if ( ! $thumb ) 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: 6.6.23
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,12 +22,12 @@ global $wpdb;
22
  global $wp_version;
23
 
24
  /* WPPA GLOBALS */
25
- global $wppa_revno; $wppa_revno = '6623'; // WPPA db version
26
- global $wppa_api_version; $wppa_api_version = '6-6-23-001'; // WPPA software version
27
 
28
  /* start timers */
29
- global $wppa_starttime; $wppa_starttime = microtime(true);
30
- global $wppa_loadtime; $wppa_loadtime = - microtime(true);
31
  global $wppa_timestamp_start; $wppa_timestamp_start = time();
32
 
33
  /* CONSTANTS
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: 6.6.24
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 = '6624'; // WPPA db version
26
+ global $wppa_api_version; $wppa_api_version = '6-6-24-010'; // WPPA software version
27
 
28
  /* start timers */
29
+ global $wppa_starttime; $wppa_starttime = microtime( true );
30
+ global $wppa_loadtime; $wppa_loadtime = - microtime( true );
31
  global $wppa_timestamp_start; $wppa_timestamp_start = time();
32
 
33
  /* CONSTANTS