WP Photo Album Plus - Version 8.1.00.001

Version Description

= 8.0.10 =

  • 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.1.00.001
Comparing to
See all releases

Code changes from version 8.0.10.005 to 8.1.00.001

changelog.txt CHANGED
@@ -1,5 +1,9 @@
1
  WP Photo Album Plus Changelog
2
 
 
 
 
 
3
  = 8.0.10 =
4
 
5
  * Security fix: The logfile was prone to XSS attacks. Fixed.
1
  WP Photo Album Plus Changelog
2
 
3
+ = 8.1.00 =
4
+
5
+ * Removed ajax method 'extern' for security reasons.
6
+
7
  = 8.0.10 =
8
 
9
  * Security fix: The logfile was prone to XSS attacks. Fixed.
js/wppa-admin-scripts.js CHANGED
@@ -1,7 +1,7 @@
1
  /* admin-scripts.js */
2
  /* Package: wp-photo-album-plus
3
  /*
4
- /* Version 8.0.05.004
5
  /* Various js routines used in admin pages
6
  */
7
 
@@ -1098,7 +1098,7 @@ function wppaMaintenanceProc(slug, intern, asCronJob ) {
1098
  '&wppa-action=maintenance'+
1099
  '&slug='+slug+
1100
  '&wppa-nonce='+jQuery('#wppa-nonce').val()+
1101
- ( asCronJob ? '&wppa-cron' : '' ),
1102
  async: true,
1103
  type: 'POST',
1104
  timeout: 300000,
@@ -1153,6 +1153,9 @@ function wppaMaintenanceProc(slug, intern, asCronJob ) {
1153
  if ( ! asCronJob ) {
1154
  jQuery("#"+slug+"_status").html('Pending');
1155
  }
 
 
 
1156
  },
1157
 
1158
  error: function( xhr, status, error ) {
@@ -1705,6 +1708,7 @@ function wppaAjaxUpdateTogo(slug) {
1705
  type: 'GET',
1706
  timeout: 100000,
1707
  beforeSend: function( xhr ) {
 
1708
  },
1709
  success: function( result, status, xhr ) {
1710
 
@@ -1723,7 +1727,7 @@ function wppaAjaxUpdateTogo(slug) {
1723
  }
1724
  jQuery( '#' + slug + '_status' ).html( New );
1725
 
1726
- setTimeout( function() {wppaAjaxUpdateTogo(slug);}, 5000 );
1727
  },
1728
  error: function( xhr ) {
1729
  },
1
  /* admin-scripts.js */
2
  /* Package: wp-photo-album-plus
3
  /*
4
+ /* Version 8.1.00.001
5
  /* Various js routines used in admin pages
6
  */
7
 
1098
  '&wppa-action=maintenance'+
1099
  '&slug='+slug+
1100
  '&wppa-nonce='+jQuery('#wppa-nonce').val()+
1101
+ ( asCronJob ? '&wppa-cron=1' : '' ),
1102
  async: true,
1103
  type: 'POST',
1104
  timeout: 300000,
1153
  if ( ! asCronJob ) {
1154
  jQuery("#"+slug+"_status").html('Pending');
1155
  }
1156
+
1157
+ // Start update togo
1158
+ setTimeout( function() {wppaAjaxUpdateTogo(slug);}, 1000 );
1159
  },
1160
 
1161
  error: function( xhr, status, error ) {
1708
  type: 'GET',
1709
  timeout: 100000,
1710
  beforeSend: function( xhr ) {
1711
+ // wppaConsoleLog('Requesting togo for slug '+slug, 'force');
1712
  },
1713
  success: function( result, status, xhr ) {
1714
 
1727
  }
1728
  jQuery( '#' + slug + '_status' ).html( New );
1729
 
1730
+ setTimeout( function() {wppaAjaxUpdateTogo(slug);}, 1000 );
1731
  },
1732
  error: function( xhr ) {
1733
  },
js/wppa-admin-scripts.min.js CHANGED
@@ -1 +1 @@
1
- function checkjQueryRev(e,t,a){var p=parseFloat(jQuery.fn.jquery);t.checked&&p<a&&(alert(e+"\nThe version of your jQuery library: "+p+" is too low for this feature. It requires version "+a),t.checked="")}function wppaReUpload(e,o,t,r){document.getElementById("wppa-re-up-form-"+o);var a=document.getElementById("wppa-re-up-file-"+o),u=document.getElementById("wppa-re-up-butn-"+o);e.preventDefault();a=a.files[0];if(a.type.match("image.*")){if(0==t.length)alert("Filename will be set to "+a.name);else if(a.name!=t&&!confirm("Filename is different.\nIf you continue, the filename will not be updated!.\n\nContinue?"))return void jQuery("#re-up-"+o).css("display","none");u.value="Uploading...",u.style.color="black";t=new FormData;t.append("photo",a,a.name);var i=new XMLHttpRequest,a="?action=wppa&wppa-action=update-photo&photo-id="+o+"&item=file&wppa-nonce="+document.getElementById("photo-nonce-"+o).value;i.open("POST",wppaAjaxUrl+a,!0),i.onload=function(){if(200===i.status){var e=wppaTrim(i.responseText).split("||");switch(""!=e[0]&&alert("The server returned unexpected output:\n"+e[0]),e[1]){case"0":var t,a,p,n=JSON.parse(e[2]);for(t in n)switch(p=n[t],t){case"remark":p=(p=(p=p.replace(/&lt;/g,"<")).replace(/&gt;/g,">")).replace(/\\/g,""),a="0"!=e[1]?'<span style="color:red;" >'+p+"</span>":'<span style="color:green;" >'+p+"</span>",r&&(a+=' <span style="color:blue;" >Reloading...</span>'),jQuery("#remark-"+o).html(a);break;case"photourl":wppaCropper[o]?wppaCropper[o].replace(p):jQuery("#photourl-"+o).attr("src",p),jQuery("#thumba-"+o).attr("href",p);break;case"thumburl":jQuery("#thumburl-"+o).attr("src",p);break;case"magickstack":jQuery("#magickstack-"+o).html(p),0<p.length?jQuery("#imstackbutton-"+o).css("display","inline"):jQuery("#imstackbutton-"+o).css("display","none");break;default:jQuery("#"+t+"-"+o).html(p)}u.value="Upload",jQuery("#re-up-"+o).css("display","none");break;case"99":document.getElementById("photoitem-"+o).innerHTML='<span style="color:red">'+e[2]+"</span>";break;default:document.getElementById("remark-"+o).innerHTML='<span style="color:red">'+e[2]+" ("+e[1]+")</span>",u.value="Error occured",u.style.color="red"}}else alert("An error occurred!")},i.send(t)}else alert("File is not an image file!")}jQuery(document).ready(function(){jQuery(window).on("DOMContentLoaded load resize scroll",function(){wppaMakeLazyVisible("windowon")}),wppaMakeLazyVisible("docready")});var _wppaRefreshAfter=!1;function wppaRefreshAfter(){_wppaRefreshAfter=!0}function wppaCheckWidgetMethod(){var e,t,a;if("4"==document.getElementById("wppa-wm").value?(document.getElementById("wppa-wp").style.visibility="visible","day-of-week"==(a=jQuery("#wppa-wp").val())||"day-of-month"==a||"day-of-year"==a?jQuery(".wppa-order").css("visibility",""):jQuery(".wppa-order").css("visibility","hidden")):(document.getElementById("wppa-wp").style.visibility="hidden",jQuery(".wppa-order").css("visibility","hidden")),"1"==document.getElementById("wppa-wm").value)for(e=document.getElementsByName("wppa-widget-photo"),t=0;t<e.length;)e[t].style.visibility="visible",t++;else for(e=document.getElementsByName("wppa-widget-photo"),t=0;t<e.length;)e[t].style.visibility="hidden",t++}function wppa_tablecookieon(e){wppa_setCookie("table_"+e,"on","365")}function wppa_tablecookieoff(e){wppa_setCookie("table_"+e,"off","365")}function wppaCookieCheckbox(e,t){e.checked?wppa_setCookie(t,"on","365"):wppa_setCookie(t,"off","365")}function wppa_move_up(e){document.location=wppa_moveup_url+e+"&wppa-nonce="+document.getElementById("wppa-nonce").value}function checkColor(e){var t=e.substr(5),e=jQuery("#"+t).val();jQuery("#colorbox-"+t).css("background-color",e)}function checkAll(e,t){e=document.getElementById(e);e&&(e.checked?jQuery(t).prop("checked",!0):jQuery(t).prop("checked",!1))}function impUpd(e,t){e.checked?(jQuery(t).val(wppa_update),jQuery(".hideifupdate").css("display","none")):(jQuery(t).val(wppa_import),jQuery(".hideifupdate").css("display",""))}function wppaAjaxDeletePhoto(t,e,a){var p="",n="",p=e||'<div style="padding-left:5px;" >';a?n=a:aftrer="</div>",wppaFeAjaxLog("in");var o=wppaGetXmlHttp(),a=wppaAjaxUrl+"?action=wppa&wppa-action=delete-photo&photo-id="+t;a+="&wppa-nonce="+document.getElementById("photo-nonce-"+t).value,o.open("GET",a,!0),o.send(),o.onreadystatechange=function(){switch(o.readyState){case 1:document.getElementById("remark-"+t).innerHTML="server connection established";break;case 2:document.getElementById("remark-"+t).innerHTML="request received";break;case 3:document.getElementById("remark-"+t).innerHTML="processing request";break;case 4:var e;200==o.status?("ER"==(e=wppaTrim(o.responseText).split("||"))[0]?(e[3]&&alert(e[3]),jQuery("#wppa-delete-"+t).css("text-decoration","line-through")):""!=e[0]&&alert("The server returned unexpected output:\n"+e[0]),0==e[1]?document.getElementById("remark-"+t).innerHTML=e[2]:(document.getElementById("photoitem-"+t).innerHTML=p+e[2]+n,wppaProcessFull(e[3],e[4])),jQuery(window).trigger("scroll"),wppaFeAjaxLog("out")):document.getElementById("photoitem-"+t).innerHTML=p+'<span style="color:red;" >Comm error '+o.status+": "+o.statusText+"</span>"+n}}}function wppaAjaxUndeletePhoto(t){wppaFeAjaxLog("in");var a=wppaGetXmlHttp(),e=wppaAjaxUrl+"?action=wppa&wppa-action=undelete-photo&photo-id="+t;e+="&wppa-nonce="+document.getElementById("photo-nonce-"+t).value,a.open("GET",e,!0),a.send(),a.onreadystatechange=function(){switch(a.readyState){case 1:document.getElementById("remark-"+t).innerHTML="server connection established";break;case 2:document.getElementById("remark-"+t).innerHTML="request received";break;case 3:document.getElementById("remark-"+t).innerHTML="processing request";break;case 4:var e;200==a.status?("ER"==(e=wppaTrim(a.responseText).split("||"))[0]?(e[3]&&alert(e[3]),jQuery("#wppa-delete-"+t).css("text-decoration","line-through")):""!=e[0]&&alert("The server returned unexpected output:\n"+e[0]),0==e[1]?document.getElementById("remark-"+t).innerHTML=e[2]:document.getElementById("photoitem-"+t).innerHTML='<div style="padding-left:5px;" >'+e[2]+"</div>",wppaFeAjaxLog("out")):document.getElementById("photoitem-"+t).innerHTML=before+'<span style="color:red;" >Comm error '+a.status+": "+a.statusText+"</span>"+after}}}function wppaAjaxApplyWatermark(t,e,a){wppaFeAjaxLog("in");var p=wppaGetXmlHttp();jQuery("#wppa-water-spin-"+t).css({visibility:"visible"});var n="action=wppa&wppa-action=watermark-photo&photo-id="+t;n+="&wppa-nonce="+document.getElementById("photo-nonce-"+t).value,e&&(n+="&wppa-watermark-file="+e),a&&(n+="&wppa-watermark-pos="+a),p.open("POST",wppaAjaxUrl,!0),p.setRequestHeader("Content-type","application/x-www-form-urlencoded"),p.send(n),p.onreadystatechange=function(){var e;4==p.readyState&&(200==p.status?(""!=(e=wppaTrim(p.responseText).split("||"))[0]&&alert("The server returned unexpected output:\n"+e[0]),"0"===e[1]?(document.getElementById("remark-"+t).innerHTML=e[2],setTimeout(function(){document.location.reload(!0)},500)):document.getElementById("remark-"+t).innerHTML='<span style="color:red">'+e[2]+"</span>",jQuery("#wppa-water-spin-"+t).css({visibility:"hidden"}),wppaFeAjaxLog("out")):document.getElementById("remark-"+t).innerHTML='<span style="color:red;" >Comm error '+p.status+": "+p.statusText+"</span>")}}function wppaAjaxUpdateIptc(i,e,t,a){jQuery.ajax({url:wppaAjaxUrl,data:"action=wppa&wppa-action=update-iptc&photo-id="+i+"&item="+e+"&wppa-nonce="+document.getElementById("photo-nonce-"+i).value+"&value="+wppaEncode(t)+"&tagname="+a,async:!0,type:"POST",timeout:6e4,beforeSend:function(e){jQuery("#remark-"+i).html("Working, please wait...")},success:function(e,t,a){var p=wppaTrim(e).split("||");if(""!=p[0]&&alert("The server returned unexpected output:\n"+p[0]),"99"===p[1])jQuery("#photoitem-"+i).html(bef+'<span style="color:red">'+p[2]+"</span>"+aft);else{var n,o,r,u=JSON.parse(p[2]);for(n in u)switch(r=u[n],n){case"remark":r=(r=(r=r.replace(/&lt;/g,"<")).replace(/&gt;/g,">")).replace(/\\/g,""),o="0"!=p[1]?'<span style="color:red;" >'+r+"</span>":'<span style="color:green;" >'+r+"</span>",jQuery("#remark-"+i).html(o);break;case"photourl":wppaCropper[i]?wppaCropper[i].replace(r):jQuery("#photourl-"+i).attr("src",r),jQuery("#thumba-"+i).attr("href",r);break;case"thumburl":jQuery("#thumburl-"+i).attr("src",r);break;case"magickstack":jQuery("#magickstack-"+i).html(r),0<r.length?jQuery("#imstackbutton-"+i).css("display","inline"):jQuery("#imstackbutton-"+i).css("display","none")}}wppaFeAjaxLog("out")},error:function(e,t,a){jQuery("#remark-"+i).html('<span style="color:red;" >Comm error '+t+"</span>"),wppaConsoleLog("wppaAjaxUpdatePhoto failed. Error = "+a+", status = "+t,"force")},complete:function(e,t,a){jQuery("#wppa-admin-spinner").css("display","none"),jQuery(window).trigger("scroll")}})}function wppaAjaxUpdatePhoto(i,l,e,s,c,d){c=c||"",d=d||"",wppaFeAjaxLog("in"),jQuery.ajax({url:wppaAjaxUrl,data:"action=wppa&wppa-action=update-photo&photo-id="+i+"&item="+l+"&wppa-nonce="+document.getElementById("photo-nonce-"+i).value+"&value="+wppaEncode(e),async:!0,type:"POST",timeout:6e4,beforeSend:function(e){"description"==l&&jQuery("#wppa-photo-spin-"+i).css({visibility:"visible"}),jQuery("#remark-"+i).html("Working, please wait...")},success:function(e,t,a){var p=wppaTrim(e).split("||");if(""!=p[0]&&alert("The server returned unexpected output:\n"+p[0]),"99"===p[1])jQuery("#photoitem-"+i).html(c+'<span style="color:red">'+p[2]+"</span>"+d);else{var n,o,r,u=JSON.parse(p[2]);for(n in u)switch(r=u[n],n){case"remark":r=(r=(r=r.replace(/&lt;/g,"<")).replace(/&gt;/g,">")).replace(/\\/g,""),o="0"!=p[1]?'<span style="color:red;" >'+r+"</span>":'<span style="color:green;" >'+r+"</span>",s&&(o+=' <span style="color:blue;" >Reloading...</span>'),jQuery("#remark-"+i).html(o);break;case"photourl":wppaCropper[i]?wppaCropper[i].replace(r):jQuery("#photourl-"+i).attr("src",r),jQuery("#thumba-"+i).attr("href",r);break;case"thumburl":jQuery("#thumburl-"+i).attr("src",r);break;case"magickstack":jQuery("#magickstack-"+i).html(r),0<r.length?jQuery("#imstackbutton-"+i).css("display","inline"):jQuery("#imstackbutton-"+i).css("display","none");break;default:jQuery("#"+n+"-"+i).html(r)}}"description"==l&&jQuery("#wppa-photo-spin-"+i).css({visibility:"hidden"}),wppaFeAjaxLog("out")},error:function(e,t,a){jQuery("#remark-"+i).html('<span style="color:red;" >Comm error '+t+"</span>"),wppaConsoleLog("wppaAjaxUpdatePhoto failed. Error = "+a+", status = "+t,"force")},complete:function(e,t,a){var p=(p=document.location.href).replace(/&pano-val=./,"");s?setTimeout(function(){document.location.href=p},300):(jQuery("#wppa-admin-spinner").css("display","none"),jQuery(window).trigger("scroll"))}})}function wppaChangeScheduleAlbum(e,t){jQuery(t).prop("checked")?jQuery(".wppa-datetime-"+e).css("display","inline"):(jQuery(".wppa-datetime-"+e).css("display","none"),wppaAjaxUpdateAlbum(e,"scheduledtm",Math.rand()))}function wppaChangeScheduleDelAlbum(e,t){jQuery(t).prop("checked")?jQuery(".wppa-datetimedel-"+e).css("display","inline"):(jQuery(".wppa-datetimedel-"+e).css("display","none"),wppaAjaxUpdateAlbum(e,"scheduledel",Math.rand()))}var _wppaRefreshAfter=!1,wppaAjaxAlbumCount=0,wppaAlbumUpdateMatrix=new Array;function wppaAjaxUpdateAlbum(e,t,a,p){var n=0==jQuery("#wppaalbumdesc:visible").length;jQuery("#wppaalbumdesc-html").click();for(var o=wppaAlbumUpdateMatrix.length,r=0,u=!1,i=-1;r<o;)wppaAlbumUpdateMatrix[r][0]==e&&wppaAlbumUpdateMatrix[r][1]==t&&(u=!0,i=r),r++;u||(wppaAlbumUpdateMatrix[o]=[e,t,"undefined",!1,!1,p],i=o),wppaAlbumUpdateMatrix[i][3]="number"==typeof a?a:a.value,wppaAlbumUpdateMatrix[i][5]=p,wppaAjaxUpdateAlbumMonitor(n)}function wppaAjaxUpdateAlbumMonitor(e){for(var t=wppaAlbumUpdateMatrix.length,a=0;a<t;)wppaAlbumUpdateMatrix[a][2]==wppaAlbumUpdateMatrix[a][3]||wppaAlbumUpdateMatrix[a][4]||(wppaAlbumUpdateMatrix[a][4]=!0,_wppaAjaxUpdateAlbum(wppaAlbumUpdateMatrix[a][0],wppaAlbumUpdateMatrix[a][1],wppaAlbumUpdateMatrix[a][3],e,wppaAlbumUpdateMatrix[a][5])),a++;e&&jQuery("#wppaalbumdesc-tmce").click()}function _wppaAjaxUpdateAlbum(r,u,i,l,s){wppaAjaxAlbumCount++;jQuery.ajax({url:wppaAjaxUrl,data:"action=wppa&wppa-action=update-album&album-id="+r+"&item="+u+"&wppa-nonce="+document.getElementById("album-nonce-"+r).value+"&value="+wppaEncode(i),async:!0,type:"POST",timeout:6e4,beforeSend:function(e){"description"==u&&jQuery("#wppa-album-spin").css({visibility:"visible"}),jQuery("#albumstatus-"+r).html("Working, please wait... ("+wppaAjaxAlbumCount+")")},success:function(e,t,a){e=wppaTrim(e).split("||");if(wppaAjaxAlbumCount--,""!=e[0]&&alert("The server returned unexpected output:\n"+e[0]),"0"===e[1]?0==wppaAjaxAlbumCount?jQuery("#albumstatus-"+r).html(e[2]):jQuery("#albumstatus-"+r).html("Working, please wait... ("+wppaAjaxAlbumCount+")"):jQuery("#albumstatus-"+r).html='<span style="color:red">'+e[2]+" ("+e[1]+")</span>",void 0!==e[3]&&wppaProcessFull(e[3],e[4]),s&&"0"==e[1])return jQuery("#albumstatus-"+r).after('<span style="color:blue;font-weight:bold;"> Reloading...</span>'),jQuery("#wppa-admin-spinner").fadeIn(),void setTimeout(function(){wppaReload()},100);"description"==u&&jQuery("#wppa-album-spin").css({visibility:"hidden"});for(var p=0,n=-1,o=wppaAlbumUpdateMatrix.length;p<o;)wppaAlbumUpdateMatrix[p][0]==r&&wppaAlbumUpdateMatrix[p][1]==u&&(n=p),p++;wppaAlbumUpdateMatrix[n][2]=i||0,wppaAlbumUpdateMatrix[n][4]=!1,wppaAlbumUpdateMatrix[n][5]=!1,wppaAjaxUpdateAlbumMonitor(l)},error:function(e,t,a){wppaAjaxAlbumCount--,jQuery("#albumstatus-"+r).html('<span style="color:red;" >Comm error '+t+"</span>"),wppaConsoleLog("_wppaAjaxUpdateAlbum failed. Error = "+a+", status = "+t,"force")},complete:function(e,t,a){}})}function wppaProcessFull(e,t){"full"==e&&(jQuery("#full").css("display",""),jQuery("#notfull").css("display","none")),"notfull"==e&&(jQuery("#full").css("display","none"),0<t?jQuery("#notfull").attr("value",wppaUploadToThisAlbum+" (max "+t+")"):jQuery("#notfull").attr("value",wppaUploadToThisAlbum),jQuery("#notfull").css("display",""))}function wppaAjaxUpdateCommentStatus(t,a,e){var p=wppaGetXmlHttp(),e=wppaAjaxUrl+"?action=wppa&wppa-action=update-comment-status&wppa-photo-id="+t+"&wppa-comment-id="+a+"&wppa-comment-status="+e+"&wppa-nonce="+document.getElementById("photo-nonce-"+t).value;p.onreadystatechange=function(){var e;4==p.readyState&&(200==p.status?(""!=(e=wppaTrim(p.responseText).split("||"))[0]&&alert("The server returned unexpected output:\n"+e[0]),"0"===e[1]?jQuery("#remark-"+t).html(e[2]):jQuery("#remark-"+t).html('<span style="color:red">'+e[2]+"</span>"),jQuery("#wppa-comment-spin-"+a).css("visibility","hidden")):jQuery("#remark-"+t).html('<span style="color:red;" >Comm error '+p.status+": "+p.statusText+"</span>"))},p.open("GET",e,!0),p.send()}function wppaAjaxUpdateOptionCheckBox(t,e){var a=wppaGetXmlHttp(),p=wppaAjaxUrl+"?action=wppa&wppa-action=update-option&wppa-option="+t;p+="&wppa-nonce="+document.getElementById("wppa-nonce").value,e.checked?p+="&value=yes":p+="&value=no",a.onreadystatechange=function(){switch(a.readyState){case 1:case 2:case 3:jQuery("#img_"+t).attr("src",wppaImageDirectory+"spinner.gif");break;case 4:var e=wppaTrim(a.responseText).split("||");""!=e[0]&&alert("The server returned unexpected output:\n"+e[0]),404!=a.status?("0"===e[1]?(jQuery("#img_"+t).attr("src",wppaImageDirectory+"tick.png"),jQuery("#img_"+t).attr("title",e[2])):(jQuery("#img_"+t).attr("src",wppaImageDirectory+"cross.png"),jQuery("#img_"+t).attr("title","Error #"+e[1]+", message: "+e[2]+", status: "+a.status)),e[3]&&alert(e[3]),_wppaRefreshAfter&&(_wppaRefreshAfter=!1,document.location.reload(!0))):(jQuery("#img_"+t).attr("src",wppaImageDirectory+"cross.png"),jQuery("#img_"+t).attr("title","Communication error, status = "+a.status)),wppaCheckInconsistencies()}},a.open("GET",p,!0),a.send()}var wppaAlwaysContinue=100;function wppaMaintenanceProc(p,e,r){if(!r&&!e&&"yes"==document.getElementById(p+"_continue").value)return document.getElementById(p+"_continue").value="no",document.getElementById(p+"_button").value="Start!",void(0<jQuery("#"+p+"_togo").html()&&(jQuery("#"+p+"_status").html("Pausing..."),jQuery("#"+p+"_button").css("display","none")));r||(document.getElementById(p+"_continue").value="yes",document.getElementById(p+"_button").value="Stop!",""==jQuery("#"+p+"_status").html()&&jQuery("#"+p+"_status").html("Wait...")),jQuery.ajax({url:wppaAjaxUrl,data:"action=wppa&wppa-action=maintenance&slug="+p+"&wppa-nonce="+jQuery("#wppa-nonce").val()+(r?"&wppa-cron":""),async:!0,type:"POST",timeout:3e5,beforeSend:function(e){},success:function(e,t,a){var p=e.split("||"),n=p[1],o=!1;return n?(10<p[0].length&&(alert("An error occurred:\n"+p[0]),o=!0),jQuery("#"+n+"_status").html(p[2]),jQuery("#"+n+"_togo").html(p[3]),jQuery("#"+n+"_button").css("display",""),o||"0"==p[3]?"reload"==p[4]?(alert("This page will now be reloaded to finish the operation. Please stay tuned..."),void wppaReload()):void setTimeout("wppaMaintenanceProc('"+n+"', false)",20):void("yes"!=document.getElementById(n+"_continue").value?r||jQuery("#"+n+"_status").html("Pending"):setTimeout("wppaMaintenanceProc('"+n+"', true)",20))):(alert("The server returned unexpected output:\n"+e+"\nIf the current procedure has a Skip One button, press it before retrying. Reloading page..."),void wppaReload())},error:function(e,t,a){wppaConsoleLog("wppaMaintenanceProc failed. Slug = "+p+", Error = "+a+", status = "+t,"force"),jQuery("#"+p+"_status").html("Server error #"+(11-wppaAlwaysContinue));t=!1;--wppaAlwaysContinue<1&&(t=confirm("10 Server errors happened.\nDo you want to continue?"))&&(wppaAlwaysContinue=100),(t||0<wppaAlwaysContinue)&&("wppa_remake"==p&&wppaAjaxUpdateOptionValue("wppa_remake_skip_one",0),"wppa_regen_thumbs"==p&&wppaAjaxUpdateOptionValue("wppa_regen_thumbs_skip_one",0),"wppa_create_o1_files"==p&&wppaAjaxUpdateOptionValue("wppa_create_o1_files_skip_one",0),setTimeout("wppaMaintenanceProc('"+p+"', true)",2e3))},complete:function(e,t,a){}})}function wppaAjaxPopupWindow(e){switch(e){case"wppa_list_index":0;break;case"wppa_list_errorlog":0;break;case"wppa_list_rating":0;break;case"wppa_list_session":0;break;case"wppa_list_comments":0}var t=.9*wppaWindowWidth(),a=wppaGetXmlHttp(),p=wppaAjaxUrl,e="action=wppa&wppa-action=maintenancepopup&slug="+e;e+="&wppa-nonce="+document.getElementById("wppa-nonce").value,a.open("POST",p,!1),a.setRequestHeader("Content-type","application/x-www-form-urlencoded"),a.send(e),4==a.readyState&&200==a.status&&(a=(e=wppaEntityDecode(a.responseText).split("|"))[0],e[0]="",e=e.join("|").substring(1),t={modal:!0,resizable:!0,width:t,show:{effect:"fadeIn",duration:800},closeText:wppaCloseText},jQuery("#wppa-modal-container").html(e).dialog(t).dialog("open"),jQuery("#wppa-modal-container").css({width:"100%"}),jQuery(".ui-dialog").css({boxShadow:"0px 0px 5px 5px #aaaaaa",padding:"8px",backgroundColor:"#cccccc",boxSizing:"content-box",zIndex:"200200"}),jQuery(".ui-dialog-titlebar").css({lineHeight:"0px",height:"50px"}),jQuery(".ui-dialog-title").html("<h2>"+a+"</h2>"),jQuery(".ui-button").css({position:"absolute",top:"12px",right:"12px"}),jQuery(".ui-button").attr("title",wppaCloseText),jQuery(".ui-widget-overlay").css({backgroundColor:"transparent"}))}function wppaAjaxUpdateOptionValue(i,e,t){var a="action=wppa&wppa-action=update-option&wppa-option="+wppaEncode(i)+"&wppa-nonce="+document.getElementById("wppa-nonce").value;0!=e&&(a+="number"==typeof e?"&value="+e:t?"&value="+wppaGetSelectionEnumByClass("."+i,","):"&value="+wppaEncode(e.value)),jQuery.ajax({url:wppaAjaxUrl,data:a,async:!0,type:"POST",timeout:1e5,beforeSend:function(e){jQuery("#img_"+i.replace("#","H")).attr("src",wppaImageDirectory+"spinner.gif")},success:function(e,t,a){e=wppaTrim(e).split("||");if(""!=e[0])alert("The server returned unexpected output:\n"+e[0]);else if("0"===e[1]?(jQuery("#img_"+i.replace("#","H")).attr("src",wppaImageDirectory+"tick.png"),e[3]&&alert(e[3]),_wppaRefreshAfter&&(_wppaRefreshAfter=!1,document.location.reload(!0))):(jQuery("#img_"+i.replace("#","H")).attr("src",wppaImageDirectory+"cross.png"),e[3]&&alert(e[3])),jQuery("#img_"+i.replace("#","H")).attr("title",e[2]),e[4])for(var p,n,o,r=e[4].split(";"),u=0;u<r.length;)p=r[u].split(":"),n=jQuery("#"+p[0]).html(),o=p[1],""!=n&&""==o&&(o='<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" />'),jQuery("#"+p[0]).html(o),u++},error:function(e){jQuery("#img_"+i.replace("#","H")).attr("src",wppaImageDirectory+"cross.png"),document.getElementById("img_"+i).title="Communication error"},complete:function(e){wppaCheckInconsistencies(),"spinner_shape"!=i&&"icon_corner_style"!=i||(wppaAjaxGetSpinnerHtml("normal","wppa-spin-pre-1"),wppaAjaxGetSpinnerHtml("lightbox","wppa-spin-pre-2")),"svg_color"!=i&&"svg_bg_color"!=i||wppaAjaxGetSpinnerHtml("normal","wppa-spin-pre-1"),"ovl_svg_color"!=i&&"ovl_svg_bg_color"!=i||wppaAjaxGetSpinnerHtml("lightbox","wppa-spin-pre-2")}})}function wppaEncode(e){if(void 0!==e){if("number"==typeof e)return e;for(var t=(p=(p=e.replace(/#/g,"||HASH||")).replace(/&/g,"||AMP||")).split("+"),a=0,p="";a<t.length;)p+=t[a],++a<t.length&&(p+="||PLUS||");return p}}function wppaCheckInconsistencies(){jQuery("#use_thumb_popup").prop("checked")&&"lightbox"==jQuery("#thumb_linktype").val()?jQuery(".popup-lightbox-err").css("display",""):jQuery(".popup-lightbox-err").css("display","none")}function wppaGetXmlHttp(){return xmlhttp=window.XMLHttpRequest?new XMLHttpRequest:new ActiveXObject("Microsoft.XMLHTTP"),xmlhttp}function wppaPhotoStatusChange(e){if(jQuery("#psdesc-"+e).css({display:"none"}),jQuery("#status-"+e)){if(elm=document.getElementById("status-"+e),"pending"!=elm.value&&"scheduled"!=elm.value||jQuery("#photoitem-"+e).css({backgroundColor:"#ffebe8",borderColor:"#cc0000"}),"publish"==elm.value&&jQuery("#photoitem-"+e).css({backgroundColor:"#ffffe0",borderColor:"#e6db55"}),"featured"==elm.value){jQuery("#photoitem-"+e).css({backgroundColor:"#e0ffe0",borderColor:"#55ee55"});var t=document.getElementById("pname-"+e).value.split(".");if(1<t.length)for(var a=0;a<t.length;)"jpg"!=t[a]&&"JPG"!=t[a]||jQuery("#psdesc-"+e).css({display:""}),a++}"gold"==elm.value&&jQuery("#photoitem-"+e).css({backgroundColor:"#eeeecc",borderColor:"#ddddbb"}),"silver"==elm.value&&jQuery("#photoitem-"+e).css({backgroundColor:"#ffffff",borderColor:"#eeeeee"}),"bronze"==elm.value&&jQuery("#photoitem-"+e).css({backgroundColor:"#ddddbb",borderColor:"#ccccaa"}),"scheduled"==elm.value?jQuery(".wppa-datetime-"+e).css("display",""):jQuery(".wppa-datetime-"+e).css("display","none"),jQuery("#scheduledel-"+e).prop("checked")?jQuery(".wppa-del-datetime-"+e).css("display",""):jQuery(".wppa-del-datetime-"+e).css("display","none")}}function wppaSetComBgCol(e){"approved"==jQuery("#com-stat-"+e).val()?jQuery("#com-tr-"+e).css({backgroundColor:"#ffffe0"}):jQuery("#com-tr-"+e).css({backgroundColor:"#ffebe8"})}function wppaAddCat(e,t){wppaAddTag(e,t)}function wppaAddTag(e,t){t=document.getElementById(t);e&&(t.value?t.value+=","+e:t.value=e,"-clear-"==e&&(t.value=""))}function wppaRefresh(e){e=new String(document.location).split("#")[0]+"#"+e;document.location=e}function wppaReload(e){e?(url=document.location.href.split("#"),document.location.href=url[0]+e,setTimeout(function(){document.location.reload(!0)},10)):document.location.reload(!0)}var wppaFeCount=0;function wppaFeAjaxLog(e){"in"==e&&(0==wppaFeCount&&jQuery("#wppa-fe-exit").css("display","none"),wppaFeCount++,jQuery("#wppa-fe-count").html(wppaFeCount)),"out"==e&&(1==wppaFeCount&&(jQuery("#wppa-fe-count").html(""),jQuery("#wppa-fe-exit").css("display","inline"),wppaFeCount--),1<wppaFeCount&&(wppaFeCount--,jQuery("#wppa-fe-count").html(wppaFeCount)))}function wppaArrayToEnum(e,t){temp=e.sort(function(e,t){return e-t});for(var a,p="",n=-1,o=-2,r=0,u=!1,i=0;i<e.length;)0!=(a=e[i].valueOf())&&(r=n,a==++r?u=!0:u?(p+=n==o?t+n+t+a:t+t+n+t+a,u=!1):p+=t+a,u||(o=a,o++),n=a),i++;for(u&&(p+=".."+n);"."==p.substr(0,1);)p=p.substr(1);for(;p.substr(0,1)==t;)p=p.substr(1);return p}function wppaGetSelEnumToId(e,t){p=jQuery("."+e);var a=[];for(i=0,j=0;i<p.length;)p[i].selected&&(a[j]=p[i].value,j++),i++;jQuery("#"+t).val(wppaArrayToEnum(a,"."))}function wppaGetSelectionEnumByClass(e,t){var a,p=[],n=0,o=0;for(t=t||".",a=jQuery(e),o=n=0;n<a.length;)a[n].selected&&(p[o]=a[n].value,o++),n++;return wppaArrayToEnum(p,t)}function wppaEditSearch(e,t){t=jQuery("#"+t).val();0==t.length?alert("Please enter searchstring"):document.location.href=e+"&wppa-searchstring="+t}function wppaEditTrash(e){document.location.href=e}function wppaExportDbTable(p){jQuery.ajax({url:wppaAjaxUrl,data:"action=wppa&wppa-action=export-table&table="+p,async:!0,type:"GET",timeout:1e5,beforeSend:function(e){jQuery("#"+p+"-spin").css("display","inline")},success:function(e,t,a){e=e.split("||");"0"==e[1]?document.location=e[2]:alert("Error: "+e[1]+"\n\n"+e[2])},error:function(e,t,a){alert("Export Db Table "+p+" failed. Error = "+a+", status = "+t)},complete:function(e,t,a){jQuery("#"+p+"-spin").css("display","none")}})}function wppaDismissAdminNotice(e,t){wppaAjaxUpdateOptionCheckBox(e,t),jQuery("#wppa-wr-").css("display","none")}function wppaAjaxUpdateTogo(n){jQuery.ajax({url:wppaAjaxUrl,data:"action=wppa&wppa-action=gettogo&slug="+n,async:!0,type:"GET",timeout:1e5,beforeSend:function(e){},success:function(e,t,a){var p=e.split("|");jQuery("#"+n+"_togo").html(p[0]);e=jQuery("#"+n+"_status").html(),p=p[1];""!=e&&""==p&&(p='<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" />'),jQuery("#"+n+"_status").html(p),setTimeout(function(){wppaAjaxUpdateTogo(n)},5e3)},error:function(e){},complete:function(e){}})}function wppaIsEmpty(e){return(null==e||void 0===e||""==e||0==e)&&!0}function wppaTimedConfirm(e){var t={modal:!0,resizable:!1,width:400,show:{effect:"fadeIn",duration:800},closeText:"X",buttons:[{text:"NO",click:function(){jQuery(this).dialog("close")}},{text:"YES",click:function(){jQuery(this).dialog("close")}}]};jQuery("#wppa-modal-container").html(e).dialog(t).dialog("open"),jQuery(".ui-dialog").css({boxShadow:"0px 0px 5px 5px #aaaaaa",padding:"8px",backgroundColor:"#cccccc",boxSizing:"content-box",zIndex:"200200"}),jQuery(".ui-dialog-titlebar").css({lineHeight:"0px",height:"32px"}),jQuery(".ui-button").css({float:"right",position:"relative",bottom:"40px"}),jQuery(".ui-dialog-titlebar-close").css({display:"none"}),jQuery(".ui-widget-overlay").css({backgroundColor:"transparent"}),jQuery(".ui-button").attr("title",wppaCloseText),setTimeout(function(){jQuery(".ui-button").trigger("click")},6e4)}function wppaAjaxGetSpinnerHtml(e,p){jQuery.ajax({url:wppaAjaxUrl,data:"action=wppa&wppa-action=update-option&wppa-option=getspinnerpreview&type="+e+"&wppa-nonce="+document.getElementById("wppa-nonce").value,async:!0,type:"GET",timeout:1e5,beforeSend:function(e){},success:function(e,t,a){e=e.split("|");jQuery("#"+p).html(e[0])},error:function(e){},complete:function(e){}})}function wppaDragHorizon(t){var a=0,p=0;function n(e){(e=e||window.event).preventDefault(),a=p-e.clientY,p=e.clientY,t.style.top=t.offsetTop-a+"px"}function o(){document.onmouseup=null,document.onmousemove=null}t.onmousedown=function(e){(e=e||window.event).preventDefault(),pos3=e.clientX,p=e.clientY,document.onmouseup=o,document.onmousemove=n}}function wppaAjaxReplaceLog(){jQuery.ajax({url:wppaAjaxUrl,data:"action=wppa&wppa-action=maintenancepopup&slug=wppa_list_errorlog&raw=1&wppa-nonce="+jQuery("#wppa-nonce").val(),async:!0,type:"GET",timeout:1e5,beforeSend:function(e){jQuery("#wppa-spinner").show()},success:function(e,t,a){e=wppaEntityDecode(e),jQuery("#wppa-logbody").html(e),jQuery("#wppa-spinner").hide()}})}
1
+ function checkjQueryRev(e,t,a){var p=parseFloat(jQuery.fn.jquery);t.checked&&p<a&&(alert(e+"\nThe version of your jQuery library: "+p+" is too low for this feature. It requires version "+a),t.checked="")}function wppaReUpload(e,o,t,r){document.getElementById("wppa-re-up-form-"+o);var a=document.getElementById("wppa-re-up-file-"+o),u=document.getElementById("wppa-re-up-butn-"+o);e.preventDefault();a=a.files[0];if(a.type.match("image.*")){if(0==t.length)alert("Filename will be set to "+a.name);else if(a.name!=t&&!confirm("Filename is different.\nIf you continue, the filename will not be updated!.\n\nContinue?"))return void jQuery("#re-up-"+o).css("display","none");u.value="Uploading...",u.style.color="black";t=new FormData;t.append("photo",a,a.name);var i=new XMLHttpRequest,a="?action=wppa&wppa-action=update-photo&photo-id="+o+"&item=file&wppa-nonce="+document.getElementById("photo-nonce-"+o).value;i.open("POST",wppaAjaxUrl+a,!0),i.onload=function(){if(200===i.status){var e=wppaTrim(i.responseText).split("||");switch(""!=e[0]&&alert("The server returned unexpected output:\n"+e[0]),e[1]){case"0":var t,a,p,n=JSON.parse(e[2]);for(t in n)switch(p=n[t],t){case"remark":p=(p=(p=p.replace(/&lt;/g,"<")).replace(/&gt;/g,">")).replace(/\\/g,""),a="0"!=e[1]?'<span style="color:red;" >'+p+"</span>":'<span style="color:green;" >'+p+"</span>",r&&(a+=' <span style="color:blue;" >Reloading...</span>'),jQuery("#remark-"+o).html(a);break;case"photourl":wppaCropper[o]?wppaCropper[o].replace(p):jQuery("#photourl-"+o).attr("src",p),jQuery("#thumba-"+o).attr("href",p);break;case"thumburl":jQuery("#thumburl-"+o).attr("src",p);break;case"magickstack":jQuery("#magickstack-"+o).html(p),0<p.length?jQuery("#imstackbutton-"+o).css("display","inline"):jQuery("#imstackbutton-"+o).css("display","none");break;default:jQuery("#"+t+"-"+o).html(p)}u.value="Upload",jQuery("#re-up-"+o).css("display","none");break;case"99":document.getElementById("photoitem-"+o).innerHTML='<span style="color:red">'+e[2]+"</span>";break;default:document.getElementById("remark-"+o).innerHTML='<span style="color:red">'+e[2]+" ("+e[1]+")</span>",u.value="Error occured",u.style.color="red"}}else alert("An error occurred!")},i.send(t)}else alert("File is not an image file!")}jQuery(document).ready(function(){jQuery(window).on("DOMContentLoaded load resize scroll",function(){wppaMakeLazyVisible("windowon")}),wppaMakeLazyVisible("docready")});var _wppaRefreshAfter=!1;function wppaRefreshAfter(){_wppaRefreshAfter=!0}function wppaCheckWidgetMethod(){var e,t,a;if("4"==document.getElementById("wppa-wm").value?(document.getElementById("wppa-wp").style.visibility="visible","day-of-week"==(a=jQuery("#wppa-wp").val())||"day-of-month"==a||"day-of-year"==a?jQuery(".wppa-order").css("visibility",""):jQuery(".wppa-order").css("visibility","hidden")):(document.getElementById("wppa-wp").style.visibility="hidden",jQuery(".wppa-order").css("visibility","hidden")),"1"==document.getElementById("wppa-wm").value)for(e=document.getElementsByName("wppa-widget-photo"),t=0;t<e.length;)e[t].style.visibility="visible",t++;else for(e=document.getElementsByName("wppa-widget-photo"),t=0;t<e.length;)e[t].style.visibility="hidden",t++}function wppa_tablecookieon(e){wppa_setCookie("table_"+e,"on","365")}function wppa_tablecookieoff(e){wppa_setCookie("table_"+e,"off","365")}function wppaCookieCheckbox(e,t){e.checked?wppa_setCookie(t,"on","365"):wppa_setCookie(t,"off","365")}function wppa_move_up(e){document.location=wppa_moveup_url+e+"&wppa-nonce="+document.getElementById("wppa-nonce").value}function checkColor(e){var t=e.substr(5),e=jQuery("#"+t).val();jQuery("#colorbox-"+t).css("background-color",e)}function checkAll(e,t){e=document.getElementById(e);e&&(e.checked?jQuery(t).prop("checked",!0):jQuery(t).prop("checked",!1))}function impUpd(e,t){e.checked?(jQuery(t).val(wppa_update),jQuery(".hideifupdate").css("display","none")):(jQuery(t).val(wppa_import),jQuery(".hideifupdate").css("display",""))}function wppaAjaxDeletePhoto(t,e,a){var p="",n="",p=e||'<div style="padding-left:5px;" >';a?n=a:aftrer="</div>",wppaFeAjaxLog("in");var o=wppaGetXmlHttp(),a=wppaAjaxUrl+"?action=wppa&wppa-action=delete-photo&photo-id="+t;a+="&wppa-nonce="+document.getElementById("photo-nonce-"+t).value,o.open("GET",a,!0),o.send(),o.onreadystatechange=function(){switch(o.readyState){case 1:document.getElementById("remark-"+t).innerHTML="server connection established";break;case 2:document.getElementById("remark-"+t).innerHTML="request received";break;case 3:document.getElementById("remark-"+t).innerHTML="processing request";break;case 4:var e;200==o.status?("ER"==(e=wppaTrim(o.responseText).split("||"))[0]?(e[3]&&alert(e[3]),jQuery("#wppa-delete-"+t).css("text-decoration","line-through")):""!=e[0]&&alert("The server returned unexpected output:\n"+e[0]),0==e[1]?document.getElementById("remark-"+t).innerHTML=e[2]:(document.getElementById("photoitem-"+t).innerHTML=p+e[2]+n,wppaProcessFull(e[3],e[4])),jQuery(window).trigger("scroll"),wppaFeAjaxLog("out")):document.getElementById("photoitem-"+t).innerHTML=p+'<span style="color:red;" >Comm error '+o.status+": "+o.statusText+"</span>"+n}}}function wppaAjaxUndeletePhoto(t){wppaFeAjaxLog("in");var a=wppaGetXmlHttp(),e=wppaAjaxUrl+"?action=wppa&wppa-action=undelete-photo&photo-id="+t;e+="&wppa-nonce="+document.getElementById("photo-nonce-"+t).value,a.open("GET",e,!0),a.send(),a.onreadystatechange=function(){switch(a.readyState){case 1:document.getElementById("remark-"+t).innerHTML="server connection established";break;case 2:document.getElementById("remark-"+t).innerHTML="request received";break;case 3:document.getElementById("remark-"+t).innerHTML="processing request";break;case 4:var e;200==a.status?("ER"==(e=wppaTrim(a.responseText).split("||"))[0]?(e[3]&&alert(e[3]),jQuery("#wppa-delete-"+t).css("text-decoration","line-through")):""!=e[0]&&alert("The server returned unexpected output:\n"+e[0]),0==e[1]?document.getElementById("remark-"+t).innerHTML=e[2]:document.getElementById("photoitem-"+t).innerHTML='<div style="padding-left:5px;" >'+e[2]+"</div>",wppaFeAjaxLog("out")):document.getElementById("photoitem-"+t).innerHTML=before+'<span style="color:red;" >Comm error '+a.status+": "+a.statusText+"</span>"+after}}}function wppaAjaxApplyWatermark(t,e,a){wppaFeAjaxLog("in");var p=wppaGetXmlHttp();jQuery("#wppa-water-spin-"+t).css({visibility:"visible"});var n="action=wppa&wppa-action=watermark-photo&photo-id="+t;n+="&wppa-nonce="+document.getElementById("photo-nonce-"+t).value,e&&(n+="&wppa-watermark-file="+e),a&&(n+="&wppa-watermark-pos="+a),p.open("POST",wppaAjaxUrl,!0),p.setRequestHeader("Content-type","application/x-www-form-urlencoded"),p.send(n),p.onreadystatechange=function(){var e;4==p.readyState&&(200==p.status?(""!=(e=wppaTrim(p.responseText).split("||"))[0]&&alert("The server returned unexpected output:\n"+e[0]),"0"===e[1]?(document.getElementById("remark-"+t).innerHTML=e[2],setTimeout(function(){document.location.reload(!0)},500)):document.getElementById("remark-"+t).innerHTML='<span style="color:red">'+e[2]+"</span>",jQuery("#wppa-water-spin-"+t).css({visibility:"hidden"}),wppaFeAjaxLog("out")):document.getElementById("remark-"+t).innerHTML='<span style="color:red;" >Comm error '+p.status+": "+p.statusText+"</span>")}}function wppaAjaxUpdateIptc(i,e,t,a){jQuery.ajax({url:wppaAjaxUrl,data:"action=wppa&wppa-action=update-iptc&photo-id="+i+"&item="+e+"&wppa-nonce="+document.getElementById("photo-nonce-"+i).value+"&value="+wppaEncode(t)+"&tagname="+a,async:!0,type:"POST",timeout:6e4,beforeSend:function(e){jQuery("#remark-"+i).html("Working, please wait...")},success:function(e,t,a){var p=wppaTrim(e).split("||");if(""!=p[0]&&alert("The server returned unexpected output:\n"+p[0]),"99"===p[1])jQuery("#photoitem-"+i).html(bef+'<span style="color:red">'+p[2]+"</span>"+aft);else{var n,o,r,u=JSON.parse(p[2]);for(n in u)switch(r=u[n],n){case"remark":r=(r=(r=r.replace(/&lt;/g,"<")).replace(/&gt;/g,">")).replace(/\\/g,""),o="0"!=p[1]?'<span style="color:red;" >'+r+"</span>":'<span style="color:green;" >'+r+"</span>",jQuery("#remark-"+i).html(o);break;case"photourl":wppaCropper[i]?wppaCropper[i].replace(r):jQuery("#photourl-"+i).attr("src",r),jQuery("#thumba-"+i).attr("href",r);break;case"thumburl":jQuery("#thumburl-"+i).attr("src",r);break;case"magickstack":jQuery("#magickstack-"+i).html(r),0<r.length?jQuery("#imstackbutton-"+i).css("display","inline"):jQuery("#imstackbutton-"+i).css("display","none")}}wppaFeAjaxLog("out")},error:function(e,t,a){jQuery("#remark-"+i).html('<span style="color:red;" >Comm error '+t+"</span>"),wppaConsoleLog("wppaAjaxUpdatePhoto failed. Error = "+a+", status = "+t,"force")},complete:function(e,t,a){jQuery("#wppa-admin-spinner").css("display","none"),jQuery(window).trigger("scroll")}})}function wppaAjaxUpdatePhoto(i,l,e,s,c,d){c=c||"",d=d||"",wppaFeAjaxLog("in"),jQuery.ajax({url:wppaAjaxUrl,data:"action=wppa&wppa-action=update-photo&photo-id="+i+"&item="+l+"&wppa-nonce="+document.getElementById("photo-nonce-"+i).value+"&value="+wppaEncode(e),async:!0,type:"POST",timeout:6e4,beforeSend:function(e){"description"==l&&jQuery("#wppa-photo-spin-"+i).css({visibility:"visible"}),jQuery("#remark-"+i).html("Working, please wait...")},success:function(e,t,a){var p=wppaTrim(e).split("||");if(""!=p[0]&&alert("The server returned unexpected output:\n"+p[0]),"99"===p[1])jQuery("#photoitem-"+i).html(c+'<span style="color:red">'+p[2]+"</span>"+d);else{var n,o,r,u=JSON.parse(p[2]);for(n in u)switch(r=u[n],n){case"remark":r=(r=(r=r.replace(/&lt;/g,"<")).replace(/&gt;/g,">")).replace(/\\/g,""),o="0"!=p[1]?'<span style="color:red;" >'+r+"</span>":'<span style="color:green;" >'+r+"</span>",s&&(o+=' <span style="color:blue;" >Reloading...</span>'),jQuery("#remark-"+i).html(o);break;case"photourl":wppaCropper[i]?wppaCropper[i].replace(r):jQuery("#photourl-"+i).attr("src",r),jQuery("#thumba-"+i).attr("href",r);break;case"thumburl":jQuery("#thumburl-"+i).attr("src",r);break;case"magickstack":jQuery("#magickstack-"+i).html(r),0<r.length?jQuery("#imstackbutton-"+i).css("display","inline"):jQuery("#imstackbutton-"+i).css("display","none");break;default:jQuery("#"+n+"-"+i).html(r)}}"description"==l&&jQuery("#wppa-photo-spin-"+i).css({visibility:"hidden"}),wppaFeAjaxLog("out")},error:function(e,t,a){jQuery("#remark-"+i).html('<span style="color:red;" >Comm error '+t+"</span>"),wppaConsoleLog("wppaAjaxUpdatePhoto failed. Error = "+a+", status = "+t,"force")},complete:function(e,t,a){var p=(p=document.location.href).replace(/&pano-val=./,"");s?setTimeout(function(){document.location.href=p},300):(jQuery("#wppa-admin-spinner").css("display","none"),jQuery(window).trigger("scroll"))}})}function wppaChangeScheduleAlbum(e,t){jQuery(t).prop("checked")?jQuery(".wppa-datetime-"+e).css("display","inline"):(jQuery(".wppa-datetime-"+e).css("display","none"),wppaAjaxUpdateAlbum(e,"scheduledtm",Math.rand()))}function wppaChangeScheduleDelAlbum(e,t){jQuery(t).prop("checked")?jQuery(".wppa-datetimedel-"+e).css("display","inline"):(jQuery(".wppa-datetimedel-"+e).css("display","none"),wppaAjaxUpdateAlbum(e,"scheduledel",Math.rand()))}var _wppaRefreshAfter=!1,wppaAjaxAlbumCount=0,wppaAlbumUpdateMatrix=new Array;function wppaAjaxUpdateAlbum(e,t,a,p){var n=0==jQuery("#wppaalbumdesc:visible").length;jQuery("#wppaalbumdesc-html").click();for(var o=wppaAlbumUpdateMatrix.length,r=0,u=!1,i=-1;r<o;)wppaAlbumUpdateMatrix[r][0]==e&&wppaAlbumUpdateMatrix[r][1]==t&&(u=!0,i=r),r++;u||(wppaAlbumUpdateMatrix[o]=[e,t,"undefined",!1,!1,p],i=o),wppaAlbumUpdateMatrix[i][3]="number"==typeof a?a:a.value,wppaAlbumUpdateMatrix[i][5]=p,wppaAjaxUpdateAlbumMonitor(n)}function wppaAjaxUpdateAlbumMonitor(e){for(var t=wppaAlbumUpdateMatrix.length,a=0;a<t;)wppaAlbumUpdateMatrix[a][2]==wppaAlbumUpdateMatrix[a][3]||wppaAlbumUpdateMatrix[a][4]||(wppaAlbumUpdateMatrix[a][4]=!0,_wppaAjaxUpdateAlbum(wppaAlbumUpdateMatrix[a][0],wppaAlbumUpdateMatrix[a][1],wppaAlbumUpdateMatrix[a][3],e,wppaAlbumUpdateMatrix[a][5])),a++;e&&jQuery("#wppaalbumdesc-tmce").click()}function _wppaAjaxUpdateAlbum(r,u,i,l,s){wppaAjaxAlbumCount++;jQuery.ajax({url:wppaAjaxUrl,data:"action=wppa&wppa-action=update-album&album-id="+r+"&item="+u+"&wppa-nonce="+document.getElementById("album-nonce-"+r).value+"&value="+wppaEncode(i),async:!0,type:"POST",timeout:6e4,beforeSend:function(e){"description"==u&&jQuery("#wppa-album-spin").css({visibility:"visible"}),jQuery("#albumstatus-"+r).html("Working, please wait... ("+wppaAjaxAlbumCount+")")},success:function(e,t,a){e=wppaTrim(e).split("||");if(wppaAjaxAlbumCount--,""!=e[0]&&alert("The server returned unexpected output:\n"+e[0]),"0"===e[1]?0==wppaAjaxAlbumCount?jQuery("#albumstatus-"+r).html(e[2]):jQuery("#albumstatus-"+r).html("Working, please wait... ("+wppaAjaxAlbumCount+")"):jQuery("#albumstatus-"+r).html='<span style="color:red">'+e[2]+" ("+e[1]+")</span>",void 0!==e[3]&&wppaProcessFull(e[3],e[4]),s&&"0"==e[1])return jQuery("#albumstatus-"+r).after('<span style="color:blue;font-weight:bold;"> Reloading...</span>'),jQuery("#wppa-admin-spinner").fadeIn(),void setTimeout(function(){wppaReload()},100);"description"==u&&jQuery("#wppa-album-spin").css({visibility:"hidden"});for(var p=0,n=-1,o=wppaAlbumUpdateMatrix.length;p<o;)wppaAlbumUpdateMatrix[p][0]==r&&wppaAlbumUpdateMatrix[p][1]==u&&(n=p),p++;wppaAlbumUpdateMatrix[n][2]=i||0,wppaAlbumUpdateMatrix[n][4]=!1,wppaAlbumUpdateMatrix[n][5]=!1,wppaAjaxUpdateAlbumMonitor(l)},error:function(e,t,a){wppaAjaxAlbumCount--,jQuery("#albumstatus-"+r).html('<span style="color:red;" >Comm error '+t+"</span>"),wppaConsoleLog("_wppaAjaxUpdateAlbum failed. Error = "+a+", status = "+t,"force")},complete:function(e,t,a){}})}function wppaProcessFull(e,t){"full"==e&&(jQuery("#full").css("display",""),jQuery("#notfull").css("display","none")),"notfull"==e&&(jQuery("#full").css("display","none"),0<t?jQuery("#notfull").attr("value",wppaUploadToThisAlbum+" (max "+t+")"):jQuery("#notfull").attr("value",wppaUploadToThisAlbum),jQuery("#notfull").css("display",""))}function wppaAjaxUpdateCommentStatus(t,a,e){var p=wppaGetXmlHttp(),e=wppaAjaxUrl+"?action=wppa&wppa-action=update-comment-status&wppa-photo-id="+t+"&wppa-comment-id="+a+"&wppa-comment-status="+e+"&wppa-nonce="+document.getElementById("photo-nonce-"+t).value;p.onreadystatechange=function(){var e;4==p.readyState&&(200==p.status?(""!=(e=wppaTrim(p.responseText).split("||"))[0]&&alert("The server returned unexpected output:\n"+e[0]),"0"===e[1]?jQuery("#remark-"+t).html(e[2]):jQuery("#remark-"+t).html('<span style="color:red">'+e[2]+"</span>"),jQuery("#wppa-comment-spin-"+a).css("visibility","hidden")):jQuery("#remark-"+t).html('<span style="color:red;" >Comm error '+p.status+": "+p.statusText+"</span>"))},p.open("GET",e,!0),p.send()}function wppaAjaxUpdateOptionCheckBox(t,e){var a=wppaGetXmlHttp(),p=wppaAjaxUrl+"?action=wppa&wppa-action=update-option&wppa-option="+t;p+="&wppa-nonce="+document.getElementById("wppa-nonce").value,e.checked?p+="&value=yes":p+="&value=no",a.onreadystatechange=function(){switch(a.readyState){case 1:case 2:case 3:jQuery("#img_"+t).attr("src",wppaImageDirectory+"spinner.gif");break;case 4:var e=wppaTrim(a.responseText).split("||");""!=e[0]&&alert("The server returned unexpected output:\n"+e[0]),404!=a.status?("0"===e[1]?(jQuery("#img_"+t).attr("src",wppaImageDirectory+"tick.png"),jQuery("#img_"+t).attr("title",e[2])):(jQuery("#img_"+t).attr("src",wppaImageDirectory+"cross.png"),jQuery("#img_"+t).attr("title","Error #"+e[1]+", message: "+e[2]+", status: "+a.status)),e[3]&&alert(e[3]),_wppaRefreshAfter&&(_wppaRefreshAfter=!1,document.location.reload(!0))):(jQuery("#img_"+t).attr("src",wppaImageDirectory+"cross.png"),jQuery("#img_"+t).attr("title","Communication error, status = "+a.status)),wppaCheckInconsistencies()}},a.open("GET",p,!0),a.send()}var wppaAlwaysContinue=100;function wppaMaintenanceProc(p,e,r){if(!r&&!e&&"yes"==document.getElementById(p+"_continue").value)return document.getElementById(p+"_continue").value="no",document.getElementById(p+"_button").value="Start!",void(0<jQuery("#"+p+"_togo").html()&&(jQuery("#"+p+"_status").html("Pausing..."),jQuery("#"+p+"_button").css("display","none")));r||(document.getElementById(p+"_continue").value="yes",document.getElementById(p+"_button").value="Stop!",""==jQuery("#"+p+"_status").html()&&jQuery("#"+p+"_status").html("Wait...")),jQuery.ajax({url:wppaAjaxUrl,data:"action=wppa&wppa-action=maintenance&slug="+p+"&wppa-nonce="+jQuery("#wppa-nonce").val()+(r?"&wppa-cron=1":""),async:!0,type:"POST",timeout:3e5,beforeSend:function(e){},success:function(e,t,a){var p=e.split("||"),n=p[1],o=!1;return n?(10<p[0].length&&(alert("An error occurred:\n"+p[0]),o=!0),jQuery("#"+n+"_status").html(p[2]),jQuery("#"+n+"_togo").html(p[3]),jQuery("#"+n+"_button").css("display",""),o||"0"==p[3]?"reload"==p[4]?(alert("This page will now be reloaded to finish the operation. Please stay tuned..."),void wppaReload()):void setTimeout("wppaMaintenanceProc('"+n+"', false)",20):void("yes"!=document.getElementById(n+"_continue").value?(r||jQuery("#"+n+"_status").html("Pending"),setTimeout(function(){wppaAjaxUpdateTogo(n)},1e3)):setTimeout("wppaMaintenanceProc('"+n+"', true)",20))):(alert("The server returned unexpected output:\n"+e+"\nIf the current procedure has a Skip One button, press it before retrying. Reloading page..."),void wppaReload())},error:function(e,t,a){wppaConsoleLog("wppaMaintenanceProc failed. Slug = "+p+", Error = "+a+", status = "+t,"force"),jQuery("#"+p+"_status").html("Server error #"+(11-wppaAlwaysContinue));t=!1;--wppaAlwaysContinue<1&&(t=confirm("10 Server errors happened.\nDo you want to continue?"))&&(wppaAlwaysContinue=100),(t||0<wppaAlwaysContinue)&&("wppa_remake"==p&&wppaAjaxUpdateOptionValue("wppa_remake_skip_one",0),"wppa_regen_thumbs"==p&&wppaAjaxUpdateOptionValue("wppa_regen_thumbs_skip_one",0),"wppa_create_o1_files"==p&&wppaAjaxUpdateOptionValue("wppa_create_o1_files_skip_one",0),setTimeout("wppaMaintenanceProc('"+p+"', true)",2e3))},complete:function(e,t,a){}})}function wppaAjaxPopupWindow(e){switch(e){case"wppa_list_index":0;break;case"wppa_list_errorlog":0;break;case"wppa_list_rating":0;break;case"wppa_list_session":0;break;case"wppa_list_comments":0}var t=.9*wppaWindowWidth(),a=wppaGetXmlHttp(),p=wppaAjaxUrl,e="action=wppa&wppa-action=maintenancepopup&slug="+e;e+="&wppa-nonce="+document.getElementById("wppa-nonce").value,a.open("POST",p,!1),a.setRequestHeader("Content-type","application/x-www-form-urlencoded"),a.send(e),4==a.readyState&&200==a.status&&(a=(e=wppaEntityDecode(a.responseText).split("|"))[0],e[0]="",e=e.join("|").substring(1),t={modal:!0,resizable:!0,width:t,show:{effect:"fadeIn",duration:800},closeText:wppaCloseText},jQuery("#wppa-modal-container").html(e).dialog(t).dialog("open"),jQuery("#wppa-modal-container").css({width:"100%"}),jQuery(".ui-dialog").css({boxShadow:"0px 0px 5px 5px #aaaaaa",padding:"8px",backgroundColor:"#cccccc",boxSizing:"content-box",zIndex:"200200"}),jQuery(".ui-dialog-titlebar").css({lineHeight:"0px",height:"50px"}),jQuery(".ui-dialog-title").html("<h2>"+a+"</h2>"),jQuery(".ui-button").css({position:"absolute",top:"12px",right:"12px"}),jQuery(".ui-button").attr("title",wppaCloseText),jQuery(".ui-widget-overlay").css({backgroundColor:"transparent"}))}function wppaAjaxUpdateOptionValue(i,e,t){var a="action=wppa&wppa-action=update-option&wppa-option="+wppaEncode(i)+"&wppa-nonce="+document.getElementById("wppa-nonce").value;0!=e&&(a+="number"==typeof e?"&value="+e:t?"&value="+wppaGetSelectionEnumByClass("."+i,","):"&value="+wppaEncode(e.value)),jQuery.ajax({url:wppaAjaxUrl,data:a,async:!0,type:"POST",timeout:1e5,beforeSend:function(e){jQuery("#img_"+i.replace("#","H")).attr("src",wppaImageDirectory+"spinner.gif")},success:function(e,t,a){e=wppaTrim(e).split("||");if(""!=e[0])alert("The server returned unexpected output:\n"+e[0]);else if("0"===e[1]?(jQuery("#img_"+i.replace("#","H")).attr("src",wppaImageDirectory+"tick.png"),e[3]&&alert(e[3]),_wppaRefreshAfter&&(_wppaRefreshAfter=!1,document.location.reload(!0))):(jQuery("#img_"+i.replace("#","H")).attr("src",wppaImageDirectory+"cross.png"),e[3]&&alert(e[3])),jQuery("#img_"+i.replace("#","H")).attr("title",e[2]),e[4])for(var p,n,o,r=e[4].split(";"),u=0;u<r.length;)p=r[u].split(":"),n=jQuery("#"+p[0]).html(),o=p[1],""!=n&&""==o&&(o='<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" />'),jQuery("#"+p[0]).html(o),u++},error:function(e){jQuery("#img_"+i.replace("#","H")).attr("src",wppaImageDirectory+"cross.png"),document.getElementById("img_"+i).title="Communication error"},complete:function(e){wppaCheckInconsistencies(),"spinner_shape"!=i&&"icon_corner_style"!=i||(wppaAjaxGetSpinnerHtml("normal","wppa-spin-pre-1"),wppaAjaxGetSpinnerHtml("lightbox","wppa-spin-pre-2")),"svg_color"!=i&&"svg_bg_color"!=i||wppaAjaxGetSpinnerHtml("normal","wppa-spin-pre-1"),"ovl_svg_color"!=i&&"ovl_svg_bg_color"!=i||wppaAjaxGetSpinnerHtml("lightbox","wppa-spin-pre-2")}})}function wppaEncode(e){if(void 0!==e){if("number"==typeof e)return e;for(var t=(p=(p=e.replace(/#/g,"||HASH||")).replace(/&/g,"||AMP||")).split("+"),a=0,p="";a<t.length;)p+=t[a],++a<t.length&&(p+="||PLUS||");return p}}function wppaCheckInconsistencies(){jQuery("#use_thumb_popup").prop("checked")&&"lightbox"==jQuery("#thumb_linktype").val()?jQuery(".popup-lightbox-err").css("display",""):jQuery(".popup-lightbox-err").css("display","none")}function wppaGetXmlHttp(){return xmlhttp=window.XMLHttpRequest?new XMLHttpRequest:new ActiveXObject("Microsoft.XMLHTTP"),xmlhttp}function wppaPhotoStatusChange(e){if(jQuery("#psdesc-"+e).css({display:"none"}),jQuery("#status-"+e)){if(elm=document.getElementById("status-"+e),"pending"!=elm.value&&"scheduled"!=elm.value||jQuery("#photoitem-"+e).css({backgroundColor:"#ffebe8",borderColor:"#cc0000"}),"publish"==elm.value&&jQuery("#photoitem-"+e).css({backgroundColor:"#ffffe0",borderColor:"#e6db55"}),"featured"==elm.value){jQuery("#photoitem-"+e).css({backgroundColor:"#e0ffe0",borderColor:"#55ee55"});var t=document.getElementById("pname-"+e).value.split(".");if(1<t.length)for(var a=0;a<t.length;)"jpg"!=t[a]&&"JPG"!=t[a]||jQuery("#psdesc-"+e).css({display:""}),a++}"gold"==elm.value&&jQuery("#photoitem-"+e).css({backgroundColor:"#eeeecc",borderColor:"#ddddbb"}),"silver"==elm.value&&jQuery("#photoitem-"+e).css({backgroundColor:"#ffffff",borderColor:"#eeeeee"}),"bronze"==elm.value&&jQuery("#photoitem-"+e).css({backgroundColor:"#ddddbb",borderColor:"#ccccaa"}),"scheduled"==elm.value?jQuery(".wppa-datetime-"+e).css("display",""):jQuery(".wppa-datetime-"+e).css("display","none"),jQuery("#scheduledel-"+e).prop("checked")?jQuery(".wppa-del-datetime-"+e).css("display",""):jQuery(".wppa-del-datetime-"+e).css("display","none")}}function wppaSetComBgCol(e){"approved"==jQuery("#com-stat-"+e).val()?jQuery("#com-tr-"+e).css({backgroundColor:"#ffffe0"}):jQuery("#com-tr-"+e).css({backgroundColor:"#ffebe8"})}function wppaAddCat(e,t){wppaAddTag(e,t)}function wppaAddTag(e,t){t=document.getElementById(t);e&&(t.value?t.value+=","+e:t.value=e,"-clear-"==e&&(t.value=""))}function wppaRefresh(e){e=new String(document.location).split("#")[0]+"#"+e;document.location=e}function wppaReload(e){e?(url=document.location.href.split("#"),document.location.href=url[0]+e,setTimeout(function(){document.location.reload(!0)},10)):document.location.reload(!0)}var wppaFeCount=0;function wppaFeAjaxLog(e){"in"==e&&(0==wppaFeCount&&jQuery("#wppa-fe-exit").css("display","none"),wppaFeCount++,jQuery("#wppa-fe-count").html(wppaFeCount)),"out"==e&&(1==wppaFeCount&&(jQuery("#wppa-fe-count").html(""),jQuery("#wppa-fe-exit").css("display","inline"),wppaFeCount--),1<wppaFeCount&&(wppaFeCount--,jQuery("#wppa-fe-count").html(wppaFeCount)))}function wppaArrayToEnum(e,t){temp=e.sort(function(e,t){return e-t});for(var a,p="",n=-1,o=-2,r=0,u=!1,i=0;i<e.length;)0!=(a=e[i].valueOf())&&(r=n,a==++r?u=!0:u?(p+=n==o?t+n+t+a:t+t+n+t+a,u=!1):p+=t+a,u||(o=a,o++),n=a),i++;for(u&&(p+=".."+n);"."==p.substr(0,1);)p=p.substr(1);for(;p.substr(0,1)==t;)p=p.substr(1);return p}function wppaGetSelEnumToId(e,t){p=jQuery("."+e);var a=[];for(i=0,j=0;i<p.length;)p[i].selected&&(a[j]=p[i].value,j++),i++;jQuery("#"+t).val(wppaArrayToEnum(a,"."))}function wppaGetSelectionEnumByClass(e,t){var a,p=[],n=0,o=0;for(t=t||".",a=jQuery(e),o=n=0;n<a.length;)a[n].selected&&(p[o]=a[n].value,o++),n++;return wppaArrayToEnum(p,t)}function wppaEditSearch(e,t){t=jQuery("#"+t).val();0==t.length?alert("Please enter searchstring"):document.location.href=e+"&wppa-searchstring="+t}function wppaEditTrash(e){document.location.href=e}function wppaExportDbTable(p){jQuery.ajax({url:wppaAjaxUrl,data:"action=wppa&wppa-action=export-table&table="+p,async:!0,type:"GET",timeout:1e5,beforeSend:function(e){jQuery("#"+p+"-spin").css("display","inline")},success:function(e,t,a){e=e.split("||");"0"==e[1]?document.location=e[2]:alert("Error: "+e[1]+"\n\n"+e[2])},error:function(e,t,a){alert("Export Db Table "+p+" failed. Error = "+a+", status = "+t)},complete:function(e,t,a){jQuery("#"+p+"-spin").css("display","none")}})}function wppaDismissAdminNotice(e,t){wppaAjaxUpdateOptionCheckBox(e,t),jQuery("#wppa-wr-").css("display","none")}function wppaAjaxUpdateTogo(n){jQuery.ajax({url:wppaAjaxUrl,data:"action=wppa&wppa-action=gettogo&slug="+n,async:!0,type:"GET",timeout:1e5,beforeSend:function(e){},success:function(e,t,a){var p=e.split("|");jQuery("#"+n+"_togo").html(p[0]);e=jQuery("#"+n+"_status").html(),p=p[1];""!=e&&""==p&&(p='<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" />'),jQuery("#"+n+"_status").html(p),setTimeout(function(){wppaAjaxUpdateTogo(n)},1e3)},error:function(e){},complete:function(e){}})}function wppaIsEmpty(e){return(null==e||void 0===e||""==e||0==e)&&!0}function wppaTimedConfirm(e){var t={modal:!0,resizable:!1,width:400,show:{effect:"fadeIn",duration:800},closeText:"X",buttons:[{text:"NO",click:function(){jQuery(this).dialog("close")}},{text:"YES",click:function(){jQuery(this).dialog("close")}}]};jQuery("#wppa-modal-container").html(e).dialog(t).dialog("open"),jQuery(".ui-dialog").css({boxShadow:"0px 0px 5px 5px #aaaaaa",padding:"8px",backgroundColor:"#cccccc",boxSizing:"content-box",zIndex:"200200"}),jQuery(".ui-dialog-titlebar").css({lineHeight:"0px",height:"32px"}),jQuery(".ui-button").css({float:"right",position:"relative",bottom:"40px"}),jQuery(".ui-dialog-titlebar-close").css({display:"none"}),jQuery(".ui-widget-overlay").css({backgroundColor:"transparent"}),jQuery(".ui-button").attr("title",wppaCloseText),setTimeout(function(){jQuery(".ui-button").trigger("click")},6e4)}function wppaAjaxGetSpinnerHtml(e,p){jQuery.ajax({url:wppaAjaxUrl,data:"action=wppa&wppa-action=update-option&wppa-option=getspinnerpreview&type="+e+"&wppa-nonce="+document.getElementById("wppa-nonce").value,async:!0,type:"GET",timeout:1e5,beforeSend:function(e){},success:function(e,t,a){e=e.split("|");jQuery("#"+p).html(e[0])},error:function(e){},complete:function(e){}})}function wppaDragHorizon(t){var a=0,p=0;function n(e){(e=e||window.event).preventDefault(),a=p-e.clientY,p=e.clientY,t.style.top=t.offsetTop-a+"px"}function o(){document.onmouseup=null,document.onmousemove=null}t.onmousedown=function(e){(e=e||window.event).preventDefault(),pos3=e.clientX,p=e.clientY,document.onmouseup=o,document.onmousemove=n}}function wppaAjaxReplaceLog(){jQuery.ajax({url:wppaAjaxUrl,data:"action=wppa&wppa-action=maintenancepopup&slug=wppa_list_errorlog&raw=1&wppa-nonce="+jQuery("#wppa-nonce").val(),async:!0,type:"GET",timeout:1e5,beforeSend:function(e){jQuery("#wppa-spinner").show()},success:function(e,t,a){e=wppaEntityDecode(e),jQuery("#wppa-logbody").html(e),jQuery("#wppa-spinner").hide()}})}
readme.txt CHANGED
@@ -5,7 +5,7 @@ Tags: photo, album, slideshow, video, audio, lightbox, iptc, exif, cloudinary, f
5
  Requires at least: 3.9
6
  Tested up to: 5.8
7
  Requires PHP: 5.5
8
- Stable tag: 8.0.10.005
9
  License: GPLv2 or later
10
  License URI: http://www.gnu.org/licenses/gpl-2.0.html
11
 
5
  Requires at least: 3.9
6
  Tested up to: 5.8
7
  Requires PHP: 5.5
8
+ Stable tag: 8.0.10.006
9
  License: GPLv2 or later
10
  License URI: http://www.gnu.org/licenses/gpl-2.0.html
11
 
{cloudinary → vendor/cloudinary}/README.md RENAMED
File without changes
{cloudinary → vendor/cloudinary}/index.php RENAMED
File without changes
{cloudinary → vendor/cloudinary}/src/Api.php RENAMED
File without changes
{cloudinary → vendor/cloudinary}/src/Cloudinary.php RENAMED
File without changes
{cloudinary → vendor/cloudinary}/src/Uploader.php RENAMED
File without changes
{cloudinary → vendor/cloudinary}/src/cacert.pem RENAMED
File without changes
wppa-ajax-front.php DELETED
@@ -1,30 +0,0 @@
1
- <?php
2
- /* wppa-ajax-front.php
3
- *
4
- * Supplies the functionality like wp-admin/admin-ajax.php for wppa frontend ajax requests without using wp-admin files
5
- * version 7.3.00
6
- *
7
- */
8
- define( 'DOING_AJAX', true );
9
-
10
- /** Load WordPress Bootstrap */
11
- require_once ( dirname( dirname( dirname( dirname( __FILE__ ) ) ) ) . '/wp-load.php' );
12
-
13
- /** Allow for cross-domain requests (from the frontend). */
14
- send_origin_headers();
15
-
16
- // Require an action parameter
17
- if ( empty( $_REQUEST['action'] ) )
18
- die( '0' );
19
-
20
- // Load the wppa admin functions
21
- require_once 'wppa-admin.php';
22
-
23
- @header( 'Content-Type: text/html; charset=' . wppa_get_option( 'blog_charset' ) );
24
- @header( 'X-Robots-Tag: noindex' );
25
-
26
- send_nosniff_header();
27
- nocache_headers();
28
-
29
- wppa_ajax_callback();
30
-
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
wppa-ajax.php CHANGED
@@ -2,7 +2,7 @@
2
  /* wppa-ajax.php
3
  *
4
  * Functions used in ajax requests
5
- * Version 8.0.10.005
6
  *
7
  */
8
 
@@ -71,7 +71,7 @@ global $wppa;
71
  $args = '';
72
  $t = array_merge( $_GET, $_POST );
73
  foreach( array_keys( $t ) as $key ) {
74
- $args .= $key . '=' . $t[$key] . ', ';
75
  }
76
  wppa_log( 'Ajx', 'Script = ' . basename( $_SERVER['SCRIPT_FILENAME'] ) . ', Args = ' . $args );
77
  }
2
  /* wppa-ajax.php
3
  *
4
  * Functions used in ajax requests
5
+ * Version 8.1.00.001
6
  *
7
  */
8
 
71
  $args = '';
72
  $t = array_merge( $_GET, $_POST );
73
  foreach( array_keys( $t ) as $key ) {
74
+ $args .= $key . '=' . wppa_get( $key ) . ', ';
75
  }
76
  wppa_log( 'Ajx', 'Script = ' . basename( $_SERVER['SCRIPT_FILENAME'] ) . ', Args = ' . $args );
77
  }
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.0.09.003
7
  *
8
  */
9
 
@@ -2941,7 +2941,7 @@ global $wpdb;
2941
  />';
2942
 
2943
  // Open subalbums by clicking the open button if it was before (cookie), and if it is visible (!)
2944
- if ( isset( $_COOKIE['alb-arrow-' . $id] ) && $_COOKIE['alb-arrow-' . $id] == 'on' ) {
2945
  echo '
2946
  <script>
2947
  jQuery(document).ready(function(){
3
  * Package: wp-photo-album-plus
4
  *
5
  * create, edit and delete albums
6
+ * Version 8.1.00.001
7
  *
8
  */
9
 
2941
  />';
2942
 
2943
  // Open subalbums by clicking the open button if it was before (cookie), and if it is visible (!)
2944
+ if ( wppa_get_cookie( 'alb-arrow-' . $id ) == 'on' ) {
2945
  echo '
2946
  <script>
2947
  jQuery(document).ready(function(){
wppa-boxes-html.php CHANGED
@@ -3,7 +3,7 @@
3
  * Package: wp-photo-album-plus
4
  *
5
  * Various wppa boxes
6
- * Version 8.0.10.002
7
  *
8
  */
9
 
@@ -6390,7 +6390,7 @@ global $wppa_supported_stereo_glass_names;
6390
  $result .=
6391
  '<option' .
6392
  ' value="' . $wppa_supported_stereo_types[$key] . '"' .
6393
- ( isset( $_COOKIE["stereotype"] ) && $_COOKIE["stereotype"] == $wppa_supported_stereo_types[$key] ? ' selected' : '' ) .
6394
  ' >' .
6395
  $wppa_supported_stereo_type_names[$key] .
6396
  '</option>';
@@ -6406,7 +6406,7 @@ global $wppa_supported_stereo_glass_names;
6406
  $result .=
6407
  '<option' .
6408
  ' value="' . $wppa_supported_stereo_glasses[$key] . '"' .
6409
- ( isset( $_COOKIE["stereoglass"] ) && $_COOKIE["stereoglass"] == $wppa_supported_stereo_glasses[$key] ? ' selected' : '' ) .
6410
  ' >' .
6411
  $wppa_supported_stereo_glass_names[$key] .
6412
  '</option>';
3
  * Package: wp-photo-album-plus
4
  *
5
  * Various wppa boxes
6
+ * Version 8.1.00.001
7
  *
8
  */
9
 
6390
  $result .=
6391
  '<option' .
6392
  ' value="' . $wppa_supported_stereo_types[$key] . '"' .
6393
+ ( wppa_get_cookie( "stereotype" ) == $wppa_supported_stereo_types[$key] ? ' selected' : '' ) .
6394
  ' >' .
6395
  $wppa_supported_stereo_type_names[$key] .
6396
  '</option>';
6406
  $result .=
6407
  '<option' .
6408
  ' value="' . $wppa_supported_stereo_glasses[$key] . '"' .
6409
+ ( wppa_get_cookie( "stereoglass" ) == $wppa_supported_stereo_glasses[$key] ? ' selected' : '' ) .
6410
  ' >' .
6411
  $wppa_supported_stereo_glass_names[$key] .
6412
  '</option>';
wppa-cache.php CHANGED
@@ -3,7 +3,7 @@
3
  /*
4
  /* Contains all wppa smart cache functions
5
  /*
6
- /* Version 8.0.10.003
7
  */
8
 
9
  // Test for caching
@@ -215,7 +215,7 @@ function wppa_clear_cache( $args = array() ) {
215
  global $cache_path;
216
  global $wpdb;
217
 
218
- wppa_log( 'obs', 'Clear cache called with args ' . var_export( $args, true ) );
219
 
220
  // Fill in default args
221
  $defaults = array( 'album' => '',
3
  /*
4
  /* Contains all wppa smart cache functions
5
  /*
6
+ /* Version 8.1.00.001
7
  */
8
 
9
  // Test for caching
215
  global $cache_path;
216
  global $wpdb;
217
 
218
+ // wppa_log( 'obs', 'Clear cache called with args ' . var_export( $args, true ) );
219
 
220
  // Fill in default args
221
  $defaults = array( 'album' => '',
wppa-cloudinary.php CHANGED
@@ -1,7 +1,7 @@
1
  <?php
2
  /* Only loads when php version >= 5.3
3
  *
4
- * Version 7.5.03
5
  *
6
  */
7
 
@@ -14,9 +14,9 @@ function wppa_load_cloudinary() {
14
 
15
  if ( $cdn != 'cloudinary' && $cdn != 'cloudinarymaintenance' ) return;
16
 
17
- require_once 'cloudinary/src/Cloudinary.php';
18
- require_once 'cloudinary/src/Uploader.php';
19
- require_once 'cloudinary/src/Api.php';
20
 
21
  \Cloudinary::config(array(
22
  "cloud_name" => wppa_get_option('wppa_cdn_cloud_name'),
1
  <?php
2
  /* Only loads when php version >= 5.3
3
  *
4
+ * Version 8.1.00.001
5
  *
6
  */
7
 
14
 
15
  if ( $cdn != 'cloudinary' && $cdn != 'cloudinarymaintenance' ) return;
16
 
17
+ require_once 'vendor/cloudinary/src/Cloudinary.php';
18
+ require_once 'vendor/cloudinary/src/Uploader.php';
19
+ require_once 'vendor/cloudinary/src/Api.php';
20
 
21
  \Cloudinary::config(array(
22
  "cloud_name" => wppa_get_option('wppa_cdn_cloud_name'),
wppa-comment-admin.php CHANGED
@@ -3,7 +3,7 @@
3
  * Package: wp-photo-album-plus
4
  *
5
  * manage all comments
6
- * Version 8.0.08.005
7
  *
8
  */
9
 
@@ -34,7 +34,7 @@ class WPPA_Comment_table extends WP_List_Table {
34
  function extra_tablenav( $which ) {
35
 
36
  if ( 'top' === $which ) {
37
- $comment_show = isset( $_COOKIE['comadmin-show'] ) ? $_COOKIE['comadmin-show'] : 'all';
38
  echo
39
  '<div class="alignleft actions">' .
40
  '<select id="wppa_comadmin_show" name="wppa_comadmin_show" onchange="" >
@@ -294,22 +294,20 @@ class WPPA_Comment_table extends WP_List_Table {
294
 
295
  // Normal use
296
  else {
297
- if ( isset( $_COOKIE['comadmin-show'] ) ) {
298
- switch( $_COOKIE['comadmin-show'] ) {
299
- case 'all':
300
- break;
301
- case 'spam':
302
- $filter = "WHERE status = 'spam'";
303
- break;
304
- case 'pending':
305
- $filter = "WHERE status = 'pending' OR status = ''";
306
- break;
307
- case 'approved':
308
- $filter = "WHERE status = 'approved'";
309
- break;
310
- default:
311
- break;
312
- }
313
  }
314
  }
315
 
@@ -430,21 +428,6 @@ function _wppa_comment_admin() {
430
  echo
431
  '</tbody>
432
  </table>';
433
-
434
- /*
435
- // Filter
436
- $comment_show = isset( $_COOKIE['comadmin-show'] ) ? $_COOKIE['comadmin-show'] : 'all';
437
- echo
438
- '<p>' .
439
- '<b>' . __( 'Filter', 'wp-photo-album-plus' ) . ': </b>' .
440
- '<select name="wppa_comadmin_show" onchange="wppa_setCookie(\'comadmin-show\', this.value, \'365\'); document.location.reload(true);" >
441
- <option value="all" ' . ( $comment_show == 'all' ? 'selected="selected"' : '' ) . ' >' . __( 'all', 'wp-photo-album-plus' ) . '</option>
442
- <option value="pending" ' . ( $comment_show == 'pending' ? 'selected="selected"' : '' ) . '>' . __( 'pending', 'wp-photo-album-plus' ) . '</option>
443
- <option value="approved" ' . ( $comment_show == 'approved' ? 'selected="selected"' : '' ) . '>' . __( 'approved', 'wp-photo-album-plus' ) . '</option>
444
- <option value="spam" ' . ( $comment_show == 'spam' ? 'selected="selected"' : '' ) . '>' . __( 'spam', 'wp-photo-album-plus' ) . '</option>
445
- </select>
446
- </p>';
447
- */
448
  }
449
 
450
  echo
3
  * Package: wp-photo-album-plus
4
  *
5
  * manage all comments
6
+ * Version 8.1.00.001
7
  *
8
  */
9
 
34
  function extra_tablenav( $which ) {
35
 
36
  if ( 'top' === $which ) {
37
+ $comment_show = wppa_get_cookie( 'comadmin-show', 'all' );
38
  echo
39
  '<div class="alignleft actions">' .
40
  '<select id="wppa_comadmin_show" name="wppa_comadmin_show" onchange="" >
294
 
295
  // Normal use
296
  else {
297
+ switch( wppa_get_cookie( 'comadmin-show' ) ) {
298
+ case 'all':
299
+ break;
300
+ case 'spam':
301
+ $filter = "WHERE status = 'spam'";
302
+ break;
303
+ case 'pending':
304
+ $filter = "WHERE status = 'pending' OR status = ''";
305
+ break;
306
+ case 'approved':
307
+ $filter = "WHERE status = 'approved'";
308
+ break;
309
+ default:
310
+ break;
 
 
311
  }
312
  }
313
 
428
  echo
429
  '</tbody>
430
  </table>';
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
431
  }
432
 
433
  echo
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.0.09.001
6
  *
7
  */
8
 
@@ -113,7 +113,7 @@ global $wppa_current_shortcode_atts;
113
  $ajax = false;
114
  if ( $first_pla ) {
115
  $first_pla = false;
116
- $mocc = isset( $_REQUEST['page'] ) ? $_REQUEST['page'] : '4711'; // ; wppa_get( 'page', '4711', 'int' ); // Kind of random
117
  }
118
  }
119
 
2
  /* wppa-common-functions.php
3
  *
4
  * Functions used in admin and in themes
5
+ * Version 8.1.00.001
6
  *
7
  */
8
 
113
  $ajax = false;
114
  if ( $first_pla ) {
115
  $first_pla = false;
116
+ $mocc = wppa_get( 'page', '4711', 'int' ); // Kind of random
117
  }
118
  }
119
 
wppa-date-time.php CHANGED
@@ -3,7 +3,7 @@
3
  * Package: wp-photo-album-plus
4
  *
5
  * date and time related functions
6
- * Version 7.7.05.002
7
  *
8
  */
9
 
@@ -261,32 +261,7 @@ function wppa_local_date( $format, $timestamp = false ) {
261
  $time = time();
262
  }
263
 
264
- // wp >= 5.3 ?
265
- if ( function_exists( 'wp_date' ) ) {
266
- return wp_date( $format, $time );
267
- }
268
-
269
- // Find timezonestring
270
- $tzstring = wppa_get_option( 'timezone_string' );
271
- if ( empty( $tzstring ) ) {
272
-
273
- // Correct $time according to gmt_offset
274
- $current_offset = wppa_get_option( 'gmt_offset', 0 );
275
-
276
- $tzstring = 'UTC';
277
-
278
- if ( is_numeric( $current_offset ) ) {
279
- $time += $current_offset * 3600;
280
- }
281
- }
282
-
283
- // Get the right output
284
- date_default_timezone_set( $tzstring );
285
- $result = date_i18n( $format, $time );
286
-
287
- // Reset default timezone to wp standard
288
- date_default_timezone_set( 'GMT' );
289
- return $result;
290
  }
291
 
292
  // Return unix timestamp computed from readable date/time, corrected for timezone.
@@ -298,18 +273,10 @@ function wppa_local_strtotime( $str ) {
298
  // Find timezonestring
299
  $tzstring = wppa_get_option( 'timezone_string' );
300
 
301
- if ( $tzstring ) {
302
- date_default_timezone_set( "UTC" );
303
- $current_offset = timezone_offset_get( timezone_open( $tzstring ), new DateTime() );
304
- }
305
- else {
306
-
307
- // Correct $time according to gmt_offset
308
- $current_offset = wppa_get_option( 'gmt_offset', 0 ) * 3600;
309
- }
310
-
311
  $result -= $current_offset;
312
- date_default_timezone_set( 'GMT' );
313
  return $result;
314
  }
315
 
3
  * Package: wp-photo-album-plus
4
  *
5
  * date and time related functions
6
+ * Version 8.1.00.001
7
  *
8
  */
9
 
261
  $time = time();
262
  }
263
 
264
+ return wp_date( $format, $time );
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
265
  }
266
 
267
  // Return unix timestamp computed from readable date/time, corrected for timezone.
273
  // Find timezonestring
274
  $tzstring = wppa_get_option( 'timezone_string' );
275
 
276
+ // Correct $time according to gmt_offset
277
+ $current_offset = wppa_get_option( 'gmt_offset', 0 ) * 3600;
 
 
 
 
 
 
 
 
278
  $result -= $current_offset;
279
+
280
  return $result;
281
  }
282
 
wppa-encrypt.php CHANGED
@@ -3,7 +3,7 @@
3
  * Package: wp-photo-album-plus
4
  *
5
  * Contains all ecryption/decryption logic
6
- * Version 8.0.07.009
7
  *
8
  */
9
 
@@ -170,7 +170,7 @@ global $wpdb;
170
  $result = false;
171
 
172
  // If not mandatoty cryptic, try anything else first
173
- if ( ! wppa_switch( 'refuse_unencrypted' ) ) {
174
 
175
  // Leave '', '0' and false untouched
176
  if ( ! $photo ) return $photo;
@@ -261,7 +261,7 @@ global $wpdb;
261
  $result = false;
262
 
263
  // If not mandatoty cryptic, try anything else first
264
- if ( ! wppa_switch( 'refuse_unencrypted' ) || ! $strict ) {
265
 
266
  // Leave '', '0' and false untouched
267
  if ( ! $album ) return $album;
3
  * Package: wp-photo-album-plus
4
  *
5
  * Contains all ecryption/decryption logic
6
+ * Version 8.1.00.001
7
  *
8
  */
9
 
170
  $result = false;
171
 
172
  // If not mandatoty cryptic, try anything else first
173
+ if ( ! wppa_switch( 'refuse_unencrypted' ) || is_admin() ) {
174
 
175
  // Leave '', '0' and false untouched
176
  if ( ! $photo ) return $photo;
261
  $result = false;
262
 
263
  // If not mandatoty cryptic, try anything else first
264
+ if ( ! wppa_switch( 'refuse_unencrypted' ) || ! $strict || is_admin() ) {
265
 
266
  // Leave '', '0' and false untouched
267
  if ( ! $album ) return $album;
wppa-export.php CHANGED
@@ -3,7 +3,7 @@
3
  * Package: wp-photo-album-plus
4
  *
5
  * Contains all the export functions
6
- * Version 7.3.00
7
  *
8
  */
9
 
@@ -13,7 +13,7 @@ global $wpdb;
13
  // Export Photos admin page
14
 
15
  // Do the export if requested
16
- if (isset($_POST['wppa-export-submit'])) {
17
  check_admin_referer( '$wppa_nonce', WPPA_NONCE );
18
  wppa_export_photos();
19
  } ?>
@@ -99,13 +99,13 @@ global $wppa_temp_idx;
99
  if ( ! class_exists('ZipArchive') ) wppa_warning_message(__('Can export albums and photos, but cannot make a zipfile. Your php version does not support ZipArchive.', 'wp-photo-album-plus'));
100
  }
101
 
102
- if (isset($_POST['high'])) $high = $_POST['high']; else $high = 0;
103
 
104
  if ( $high ) {
105
  $id = 0;
106
  $cnt = 0;
107
  while ( $id <= $high ) {
108
- if (isset($_POST['album-'.$id])) {
109
  _e('<br/>Processing album', 'wp-photo-album-plus'); echo(' '.$id.'....');
110
  wppa_write_album_file_by_id($id);
111
  $photos = $wpdb->get_results($wpdb->prepare( "SELECT * FROM $wpdb->wppa_photos
3
  * Package: wp-photo-album-plus
4
  *
5
  * Contains all the export functions
6
+ * Version 8.1.00.001
7
  *
8
  */
9
 
13
  // Export Photos admin page
14
 
15
  // Do the export if requested
16
+ if ( wppa_get( 'export-submit' ) ) {
17
  check_admin_referer( '$wppa_nonce', WPPA_NONCE );
18
  wppa_export_photos();
19
  } ?>
99
  if ( ! class_exists('ZipArchive') ) wppa_warning_message(__('Can export albums and photos, but cannot make a zipfile. Your php version does not support ZipArchive.', 'wp-photo-album-plus'));
100
  }
101
 
102
+ $high = wppa_get( 'high', '0' );
103
 
104
  if ( $high ) {
105
  $id = 0;
106
  $cnt = 0;
107
  while ( $id <= $high ) {
108
+ if ( wppa_get( 'album-' . $id, '0', 'text' ) ) {
109
  _e('<br/>Processing album', 'wp-photo-album-plus'); echo(' '.$id.'....');
110
  wppa_write_album_file_by_id($id);
111
  $photos = $wpdb->get_results($wpdb->prepare( "SELECT * FROM $wpdb->wppa_photos
wppa-functions.php CHANGED
@@ -3,7 +3,7 @@
3
  * Package: wp-photo-album-plus
4
  *
5
  * Various functions
6
- * Version 8.0.10.002
7
  *
8
  */
9
 
@@ -5113,7 +5113,7 @@ global $wppa_upload_succes_id;
5113
  if ( $done ) {
5114
 
5115
  // SUCCESSFUL UPLOAD, Blog It?
5116
- if ( current_user_can( 'edit_posts' ) && isset( $_POST['wppa-blogit'] ) ) {
5117
 
5118
  $title = wppa_get( 'post-title' );
5119
  if ( ! $title ) {
@@ -5253,8 +5253,9 @@ global $wppa_upload_succes_id;
5253
 
5254
  $idx = '0';
5255
  while ( $idx < '10' ) {
5256
- if ( isset( $_POST['custom_' . $idx] ) ) {
5257
- $value = wppa_get( 'custom_' . $idx );
 
5258
  $custom_data[$idx] = wppa_sanitize_custom_field( $value );
5259
  }
5260
  $idx++;
@@ -5350,7 +5351,7 @@ global $wppa_alert;
5350
  // Add new entry
5351
  if ( ! $id ) {
5352
 
5353
- $desc = isset( $_POST['user-desc'] ) ? balanceTags( wppa_get( 'user-desc' ), true ) : '';
5354
  if ( ! $desc && wppa_switch( 'apply_newphoto_desc_user' ) ) {
5355
  $desc = wppa_opt( 'newphoto_description' );
5356
  }
@@ -5476,7 +5477,7 @@ global $wppa_alert;
5476
  $desc = balanceTags( wppa_get( 'user-desc' ), true );
5477
 
5478
  // If BlogIt! and no descrption given, use name field - this is for the shortcode used: typ"mphoto"
5479
- if ( ! $desc && isset( $_POST['wppa-blogit'] ) ) {
5480
  $desc = 'w#name';
5481
  }
5482
 
@@ -5567,8 +5568,9 @@ function wppa_fe_add_tags( $id ) {
5567
  $tags = wppa_get_photo_item( $id, 'tags' );
5568
  $oldt = $tags;
5569
  for ( $i = '1'; $i < '4'; $i++ ) {
5570
- if ( isset( $_POST['wppa-user-tags-'.$i] ) ) { // Existing tags
5571
- $tags .= ','.implode( ',', $_POST['wppa-user-tags-'.$i] );
 
5572
  }
5573
  }
5574
  if ( wppa_get( 'new-tags' ) ) { // New tags
@@ -5594,8 +5596,9 @@ function wppa_fe_add_custom( $id ) {
5594
  if ( wppa_switch( 'fe_custom_fields' ) ) {
5595
  $custom_data = array( '', '', '', '', '', '', '', '', '', '' );
5596
  for ( $i = '0'; $i < '10' ; $i++ ) {
5597
- if ( isset( $_POST['wppa-user-custom-'.$i] ) ) {
5598
- $custom_data[$i] = strip_tags( $_POST['wppa-user-custom-'.$i] );
 
5599
  }
5600
  }
5601
  wppa_update_photo( array( 'id' => $id, 'custom' => serialize( $custom_data ) ) );
3
  * Package: wp-photo-album-plus
4
  *
5
  * Various functions
6
+ * Version 8.1.00.001
7
  *
8
  */
9
 
5113
  if ( $done ) {
5114
 
5115
  // SUCCESSFUL UPLOAD, Blog It?
5116
+ if ( current_user_can( 'edit_posts' ) && wppa_get( 'blogit' ) ) {
5117
 
5118
  $title = wppa_get( 'post-title' );
5119
  if ( ! $title ) {
5253
 
5254
  $idx = '0';
5255
  while ( $idx < '10' ) {
5256
+ $value = wppa_get( 'custom_' . $idx, '', 'html' );
5257
+ if ( $value ) {
5258
+
5259
  $custom_data[$idx] = wppa_sanitize_custom_field( $value );
5260
  }
5261
  $idx++;
5351
  // Add new entry
5352
  if ( ! $id ) {
5353
 
5354
+ $desc = wppa_get( 'user-desc', '', 'html' );
5355
  if ( ! $desc && wppa_switch( 'apply_newphoto_desc_user' ) ) {
5356
  $desc = wppa_opt( 'newphoto_description' );
5357
  }
5477
  $desc = balanceTags( wppa_get( 'user-desc' ), true );
5478
 
5479
  // If BlogIt! and no descrption given, use name field - this is for the shortcode used: typ"mphoto"
5480
+ if ( ! $desc && wppa_get( 'blogit' ) ) {
5481
  $desc = 'w#name';
5482
  }
5483
 
5568
  $tags = wppa_get_photo_item( $id, 'tags' );
5569
  $oldt = $tags;
5570
  for ( $i = '1'; $i < '4'; $i++ ) {
5571
+ $dt = wppa_get( 'user-tags-' . $i, null, 'arraytxt' );
5572
+ if ( $dt ) { // A (multi) selection out of 4 selectionboxes of existing tags
5573
+ $tags .= ',' . implode( ',', $dt );
5574
  }
5575
  }
5576
  if ( wppa_get( 'new-tags' ) ) { // New tags
5596
  if ( wppa_switch( 'fe_custom_fields' ) ) {
5597
  $custom_data = array( '', '', '', '', '', '', '', '', '', '' );
5598
  for ( $i = '0'; $i < '10' ; $i++ ) {
5599
+ $cd = wppa_get( 'wppa-user-custom-' . $i, '', 'html' );
5600
+ if ( $cd ) {
5601
+ $custom_data[$i] = strip_tags( $cd );
5602
  }
5603
  }
5604
  wppa_update_photo( array( 'id' => $id, 'custom' => serialize( $custom_data ) ) );
wppa-import.php CHANGED
@@ -191,12 +191,7 @@ global $wppa_session;
191
  'wp-photo-album-plus' ), WPPA_DEPOT_PATH ) );
192
  }
193
 
194
- // See if remote is possible
195
- $can_remote = ini_get( 'allow_url_fopen' ) && function_exists( 'curl_init' );
196
- if ( ! $can_remote ) {
197
- update_option( 'wppa_import_source_type_'.$user, 'local' );
198
- }
199
-
200
  // Get this users current source type setting ( local/remote )
201
  $source_type = wppa_get_option( 'wppa_import_source_type_'.$user, 'local' );
202
 
@@ -1727,14 +1722,12 @@ global $wppa_session;
1727
  $files = array();
1728
 
1729
  // Get page content
1730
- $curl = curl_init();
1731
- curl_setopt( $curl, CURLOPT_RETURNTRANSFER, 1 );
1732
- curl_setopt( $curl, CURLOPT_URL, $setting );
1733
- $contents = curl_exec( $curl );
1734
- curl_close( $curl );
1735
 
1736
  // Process result
1737
- if ( $contents ) {
1738
 
1739
  // Preprocess
1740
  $contents = str_replace( '\'', '"', $contents );
191
  'wp-photo-album-plus' ), WPPA_DEPOT_PATH ) );
192
  }
193
 
194
+ $can_remote = true;
 
 
 
 
 
195
  // Get this users current source type setting ( local/remote )
196
  $source_type = wppa_get_option( 'wppa_import_source_type_'.$user, 'local' );
197
 
1722
  $files = array();
1723
 
1724
  // Get page content
1725
+ $response = wp_remote_get( $setting );
1726
+ $contents = wp_remote_retrieve_body( $response );
1727
+ $httpcode = wp_remote_retrieve_response_code( $response );
 
 
1728
 
1729
  // Process result
1730
+ if ( $httpcode == 200 ) {
1731
 
1732
  // Preprocess
1733
  $contents = str_replace( '\'', '"', $contents );
wppa-init.php CHANGED
@@ -4,7 +4,7 @@
4
  *
5
  * This file loads required php files and contains all functions used in init actions.
6
  *
7
- * Version 8.0.08.005
8
  */
9
 
10
  /* LOAD SIDEBAR WIDGETS */
@@ -266,19 +266,19 @@ function wppa_maintenance_messages() {
266
 
267
  // Check for pending actions
268
  if ( wppa_get_option( 'wppa_remove_empty_albums_status' ) && wppa_get_option( 'wppa_remove_empty_albums_user', wppa_get_user() ) == wppa_get_user() ) {
269
- wppa_warning_message( __( 'Remove empty albums needs completion.', 'wp-photo-album-plus') . wppa_see_also( 'maintenance', '1', '31', '', '', true ) );
270
  }
271
  if ( wppa_get_option( 'wppa_apply_new_photodesc_all_status' ) && wppa_get_option( 'wppa_apply_new_photodesc_all_user', wppa_get_user() ) == wppa_get_user() ) {
272
- wppa_warning_message( __( 'Applying new photo description needs completion.', 'wp-photo-album-plus') . wppa_see_also( 'maintenance', '1', '28', '', '', true ) );
273
  }
274
  if ( wppa_get_option( 'wppa_append_to_photodesc_status' ) && wppa_get_option( 'wppa_append_to_photodesc_user', wppa_get_user() ) == wppa_get_user() ) {
275
- wppa_warning_message( __( 'Appending to photo description needs completion.' , 'wp-photo-album-plus') . wppa_see_also( 'maintenance', '1', '29', '', '', true ) );
276
  }
277
  if ( wppa_get_option( 'wppa_remove_from_photodesc_status' ) && wppa_get_option( 'wppa_remove_from_photodesc_user', wppa_get_user() ) == wppa_get_user() ) {
278
- wppa_warning_message( __( 'Removing from photo description needs completion.' , 'wp-photo-album-plus') . wppa_see_also( 'maintenance', '1', '30', '', '', true ) );
279
  }
280
  if ( wppa_get_option( 'wppa_remove_file_extensions_status' ) && wppa_get_option( 'wppa_remove_file_extensions_user', wppa_get_user() ) == wppa_get_user() ) {
281
- wppa_warning_message( __( 'Removing file extensions needs completion.' , 'wp-photo-album-plus') . wppa_see_also( 'maintenance', '1', '32', '', '', true ) );
282
  }
283
  if ( wppa_get_option( 'wppa_regen_thumbs_status' ) && wppa_get_option( 'wppa_regen_thumbs_user', wppa_get_user() ) == wppa_get_user() ) {
284
  wppa_warning_message( __( 'Regenerating the Thumbnails needs completion.' , 'wp-photo-album-plus') . wppa_see_also( 'maintenance', '1', '4', '', '', true ) );
4
  *
5
  * This file loads required php files and contains all functions used in init actions.
6
  *
7
+ * Version 8.1.00.001
8
  */
9
 
10
  /* LOAD SIDEBAR WIDGETS */
266
 
267
  // Check for pending actions
268
  if ( wppa_get_option( 'wppa_remove_empty_albums_status' ) && wppa_get_option( 'wppa_remove_empty_albums_user', wppa_get_user() ) == wppa_get_user() ) {
269
+ wppa_warning_message( __( 'Remove empty albums needs completion.', 'wp-photo-album-plus') . wppa_see_also( 'maintenance', '2', '9', '', '', true ) );
270
  }
271
  if ( wppa_get_option( 'wppa_apply_new_photodesc_all_status' ) && wppa_get_option( 'wppa_apply_new_photodesc_all_user', wppa_get_user() ) == wppa_get_user() ) {
272
+ wppa_warning_message( __( 'Applying new photo description needs completion.', 'wp-photo-album-plus') . wppa_see_also( 'maintenance', '2', '6', '', '', true ) );
273
  }
274
  if ( wppa_get_option( 'wppa_append_to_photodesc_status' ) && wppa_get_option( 'wppa_append_to_photodesc_user', wppa_get_user() ) == wppa_get_user() ) {
275
+ wppa_warning_message( __( 'Appending to photo description needs completion.' , 'wp-photo-album-plus') . wppa_see_also( 'maintenance', '2', '7', '', '', true ) );
276
  }
277
  if ( wppa_get_option( 'wppa_remove_from_photodesc_status' ) && wppa_get_option( 'wppa_remove_from_photodesc_user', wppa_get_user() ) == wppa_get_user() ) {
278
+ wppa_warning_message( __( 'Removing from photo description needs completion.' , 'wp-photo-album-plus') . wppa_see_also( 'maintenance', '2', '8', '', '', true ) );
279
  }
280
  if ( wppa_get_option( 'wppa_remove_file_extensions_status' ) && wppa_get_option( 'wppa_remove_file_extensions_user', wppa_get_user() ) == wppa_get_user() ) {
281
+ wppa_warning_message( __( 'Removing file extensions needs completion.' , 'wp-photo-album-plus') . wppa_see_also( 'maintenance', '2', '10', '', '', true ) );
282
  }
283
  if ( wppa_get_option( 'wppa_regen_thumbs_status' ) && wppa_get_option( 'wppa_regen_thumbs_user', wppa_get_user() ) == wppa_get_user() ) {
284
  wppa_warning_message( __( 'Regenerating the Thumbnails needs completion.' , 'wp-photo-album-plus') . wppa_see_also( 'maintenance', '1', '4', '', '', true ) );
wppa-input.php CHANGED
@@ -3,7 +3,7 @@
3
  * Package: wp-photo-album-plus
4
  *
5
  * Contains functions for sanitizing and formatting user input
6
- * Version 8.0.10.005
7
  *
8
  */
9
 
@@ -85,6 +85,7 @@ function wppa_get_get_filter( $name ) {
85
  case 'subtab':
86
  case 'pano-val':
87
  case 'album-page-no':
 
88
  $result = 'int';
89
  break;
90
 
@@ -130,6 +131,9 @@ function wppa_get_get_filter( $name ) {
130
  case 'applynewdesc':
131
  case 'remakealbum':
132
  case 'search-submit':
 
 
 
133
  $result = 'bool';
134
  break;
135
 
@@ -213,6 +217,8 @@ function wppa_get_get_filter( $name ) {
213
  case 'import-submit':
214
  case 'delete':
215
  case 'cache':
 
 
216
  $result = 'text';
217
  break;
218
 
@@ -242,6 +248,11 @@ function wppa_get_get_filter( $name ) {
242
  $result = 'url';
243
  break;
244
 
 
 
 
 
 
245
  default:
246
  $result = 'raw';
247
  break;
@@ -257,6 +268,11 @@ global $wpdb;
257
  // Save orig xname for debug
258
  $oxname = $xname;
259
 
 
 
 
 
 
260
  // Ajax call?
261
  if ( $xname == 'action' ) {
262
  if ( isset( $_REQUEST['wppa-action'] ) ) {
@@ -283,7 +299,9 @@ global $wpdb;
283
  $value = isset( $_REQUEST[$name] ) ? $_REQUEST[$name] : null;
284
  }
285
  if ( ! isset( $value ) ) $value = isset( $_REQUEST[$xname] ) ? $_REQUEST[$xname] : null;
286
- if ( ! isset( $value ) ) return $default;
 
 
287
 
288
  // Get the right filter
289
  if ( ! $filter ) {
@@ -360,14 +378,21 @@ global $wpdb;
360
  $result = esc_url_raw( $value );
361
  break;
362
 
 
 
 
 
 
 
 
363
  case 'raw':
364
- wppa_log( 'obs', 'Unfiltered (raw) querystring arg = ' . $name . ', value = ' . var_export( $value, true ) );
365
- $result = $value ? '1' : '0';
366
  break;
367
 
368
  default:
369
- wppa_log( 'obs', 'Unknown filter for querystring arg = ' . $name . ', value = ' . var_export( $value, true ) );
370
- $result = $value ? '1' : '0';
371
  break;
372
  }
373
 
@@ -387,5 +412,24 @@ function wppa_sanitize_searchstring( $str ) {
387
  }
388
  $result = implode( ',', $temp );
389
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
390
  return $result;
391
  }
3
  * Package: wp-photo-album-plus
4
  *
5
  * Contains functions for sanitizing and formatting user input
6
+ * Version 8.1.00.001
7
  *
8
  */
9
 
85
  case 'subtab':
86
  case 'pano-val':
87
  case 'album-page-no':
88
+ case 'high':
89
  $result = 'int';
90
  break;
91
 
131
  case 'applynewdesc':
132
  case 'remakealbum':
133
  case 'search-submit':
134
+ case 'export-submit':
135
+ case 'blogit':
136
+ case 'cron':
137
  $result = 'bool';
138
  break;
139
 
217
  case 'import-submit':
218
  case 'delete':
219
  case 'cache':
220
+ case 'item':
221
+ case 'error':
222
  $result = 'text';
223
  break;
224
 
248
  $result = 'url';
249
  break;
250
 
251
+ // Array text
252
+ case 'bulk-photo':
253
+ $result = 'arraytxt';
254
+ break;
255
+
256
  default:
257
  $result = 'raw';
258
  break;
268
  // Save orig xname for debug
269
  $oxname = $xname;
270
 
271
+ // Sanitize
272
+ $xname = sanitize_text_field( $xname );
273
+ $default = $default ? sanitize_text_field( $default ) : false;
274
+ $filter = sanitize_text_field( $filter );
275
+
276
  // Ajax call?
277
  if ( $xname == 'action' ) {
278
  if ( isset( $_REQUEST['wppa-action'] ) ) {
299
  $value = isset( $_REQUEST[$name] ) ? $_REQUEST[$name] : null;
300
  }
301
  if ( ! isset( $value ) ) $value = isset( $_REQUEST[$xname] ) ? $_REQUEST[$xname] : null;
302
+ if ( ! isset( $value ) ) {
303
+ return $default;
304
+ }
305
 
306
  // Get the right filter
307
  if ( ! $filter ) {
378
  $result = esc_url_raw( $value );
379
  break;
380
 
381
+ case 'arraytxt':
382
+ $result = array();
383
+ foreach ( array_keys( $value ) as $key ) {
384
+ $result[$key] = sanitize_text_field( $value[$key] );
385
+ }
386
+ break;
387
+
388
  case 'raw':
389
+ wppa_log( 'err', 'Unfiltered (raw) querystring arg = ' . $name . ', value = ' . var_export( $value, true ) );
390
+ $result = sanitize_text_field( $value );
391
  break;
392
 
393
  default:
394
+ wppa_log( 'err', 'Unknown filter for querystring arg = ' . $name . ', value = ' . var_export( $value, true ) );
395
+ $result = sanitize_text_field( $value );
396
  break;
397
  }
398
 
412
  }
413
  $result = implode( ',', $temp );
414
 
415
+ return $result;
416
+ }
417
+
418
+ // Retrieve a cookie, sanitized and verified
419
+ function wppa_get_cookie( $name, $default = '' ) {
420
+
421
+ // Sanitize
422
+ $name = sanitize_text_field( $name );
423
+ $default = sanitize_text_field( $default );
424
+
425
+ // Validate
426
+ if ( isset( $_COOKIE[$name] ) ) {
427
+
428
+ $result = sanitize_text_field( $_COOKIE[$name] );
429
+ }
430
+ else {
431
+ $result = $default;
432
+ }
433
+
434
  return $result;
435
  }
wppa-links.php CHANGED
@@ -118,32 +118,16 @@ global $wppa_runtime_settings;
118
  if ( ! $key && is_search() ) $key = wppa_opt( 'search_linkpage' );
119
 
120
  switch ( wppa_opt( 'ajax_method' ) ) {
121
- case 'normal':
122
- if ( is_admin() ) $al = site_url() . '/wp-admin/admin-ajax.php?action=wppa&amp;wppa-action=render';
123
- else $al = site_url() . '/wppaajax?action=wppa&amp;wppa-action=render';
124
- break;
125
- case 'wppaajax':
126
- $al = site_url() . '/wppaajax?action=wppa&amp;wppa-action=render';
127
- break;
128
  case 'admin':
 
129
  $al = site_url() . '/wp-admin/admin-ajax.php?action=wppa&amp;wppa-action=render';
130
  break;
131
- case 'extern':
132
  if ( is_admin() ) $al = site_url() . '/wp-admin/admin-ajax.php?action=wppa&amp;wppa-action=render';
133
- else $al = WPPA_URL . '/wppa-ajax-front.php?action=wppa&amp;wppa-action=render';
134
- break;
135
- case 'none':
136
- $al = site_url() . '/wp-admin/admin-ajax.php?action=wppa&amp;wppa-action=render';
137
  break;
138
  }
139
- /*
140
- if ( ! is_admin() ) {
141
- $al = site_url() . '/wppaajax/?action=wppa&amp;wppa-action=render';
142
- }
143
- else {
144
- $al = admin_url( 'admin-ajax.php' ).'?action=wppa&amp;wppa-action=render';
145
- }
146
- */
147
  // See if this call is from an ajax operation or...
148
  if ( wppa( 'ajax' ) ) {
149
  if ( wppa_get( 'size' ) ) $al .= '&amp;wppa-size=' . wppa_get( 'size' );
118
  if ( ! $key && is_search() ) $key = wppa_opt( 'search_linkpage' );
119
 
120
  switch ( wppa_opt( 'ajax_method' ) ) {
 
 
 
 
 
 
 
121
  case 'admin':
122
+ case 'none':
123
  $al = site_url() . '/wp-admin/admin-ajax.php?action=wppa&amp;wppa-action=render';
124
  break;
125
+ default: // 'normal'
126
  if ( is_admin() ) $al = site_url() . '/wp-admin/admin-ajax.php?action=wppa&amp;wppa-action=render';
127
+ else $al = site_url() . '/wppaajax?action=wppa&amp;wppa-action=render';
 
 
 
128
  break;
129
  }
130
+
 
 
 
 
 
 
 
131
  // See if this call is from an ajax operation or...
132
  if ( wppa( 'ajax' ) ) {
133
  if ( wppa_get( 'size' ) ) $al .= '&amp;wppa-size=' . wppa_get( 'size' );
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 8.0.10.004
7
  *
8
  */
9
 
@@ -946,13 +946,9 @@ global $wppa_endtime;
946
  // Test for timeout / ready
947
  $lastid = $id;
948
  update_option( $slug.'_last', $lastid );
949
- if ( wppa_is_cron() ) {
950
- $togo = $wpdb->get_var( $wpdb->prepare( "SELECT COUNT(*) FROM $wpdb->wppa_photos WHERE id > %s ", $lastid ) );
951
- if ( $togo ) {
952
- update_option( $slug.'_togo', $togo );
953
- update_option( $slug.'_status', 'Cron job' );
954
- }
955
- }
956
  if ( wppa_is_time_up() ) break; // Time out
957
  }
958
  else { // Nothing to do, Done anyway
@@ -1078,13 +1074,7 @@ global $wppa_endtime;
1078
  }
1079
 
1080
  // Update status
1081
- if ( wppa_is_cron() ) {
1082
- $togo = $wpdb->get_var( $wpdb->prepare( "SELECT COUNT(*) FROM $wpdb->wppa_index WHERE id > %s ", $lastid ) );
1083
- if ( $togo ) {
1084
- update_option( $slug.'_togo', $togo );
1085
- update_option( $slug.'_status', 'Cron job' );
1086
- }
1087
- }
1088
 
1089
  if ( wppa_is_time_up() ) break;
1090
  if ( memory_get_usage() >= ( 0.9 * wppa_memry_limit() ) ) break;
@@ -1267,6 +1257,25 @@ global $wppa_endtime;
1267
  wppa_exit();
1268
  }
1269
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1270
  function wppa_do_maintenance_popup( $slug ) {
1271
  global $wpdb;
1272
  global $wppa_log_file;
3
  * Package: wp-photo-album-plus
4
  *
5
  * Contains (not yet, but in the future maybe) all the maintenance routines
6
+ * Version 8.1.00.001
7
  *
8
  */
9
 
946
  // Test for timeout / ready
947
  $lastid = $id;
948
  update_option( $slug.'_last', $lastid );
949
+
950
+ wppa_maintenance_update_status( $slug, $lastid, $wpdb->wppa_photos );
951
+
 
 
 
 
952
  if ( wppa_is_time_up() ) break; // Time out
953
  }
954
  else { // Nothing to do, Done anyway
1074
  }
1075
 
1076
  // Update status
1077
+ wppa_maintenance_update_status( $slug, $lastid, $wpdb->wppa_index );
 
 
 
 
 
 
1078
 
1079
  if ( wppa_is_time_up() ) break;
1080
  if ( memory_get_usage() >= ( 0.9 * wppa_memry_limit() ) ) break;
1257
  wppa_exit();
1258
  }
1259
 
1260
+ // Stutus update
1261
+ function wppa_maintenance_update_status( $slug, $lastid, $table ) {
1262
+ global $wpdb;
1263
+
1264
+ if ( $slug == 'wppa_cleanup' ) return;
1265
+
1266
+ $togo = $wpdb->get_var( $wpdb->prepare( "SELECT COUNT(*) FROM $table WHERE id > %s ", $lastid ) );
1267
+ if ( $togo ) {
1268
+ update_option( $slug.'_togo', $togo );
1269
+ if ( wppa_is_cron() ) {
1270
+ update_option( $slug.'_status', 'Cron job' );
1271
+ }
1272
+ else {
1273
+ update_option( $slug.'_status', 'Working' );
1274
+ }
1275
+ }
1276
+ // wppa_log( 'obs', "Maint did $lastid for $slug" );
1277
+ }
1278
+
1279
  function wppa_do_maintenance_popup( $slug ) {
1280
  global $wpdb;
1281
  global $wppa_log_file;
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.0.07.018
7
  *
8
  */
9
 
@@ -2522,12 +2522,12 @@ function wppa_album_photos_bulk( $album ) {
2522
  if ( wppa_get( 'bulk-action' ) ) {
2523
  check_admin_referer( 'wppa-bulk', 'wppa-bulk' );
2524
  if ( wppa_get( 'bulk-photo' ) ) {
2525
- $ids = wppa_get( 'bulk-photo' );
2526
  $newalb = wppa_get( 'bulk-album' );
2527
  $status = wppa_get( 'bulk-status' );
2528
  $owner = wppa_get( 'bulk-owner' );
2529
  $totcount = count( $ids );
2530
- if ( ! is_numeric( $newalb ) ) wp_die( 'Security check failure 1' );
2531
  if ( is_array( $ids ) ) {
2532
  foreach ( array_keys( $ids ) as $id ) {
2533
  $skip = false;
@@ -2651,10 +2651,10 @@ function wppa_album_photos_bulk( $album ) {
2651
  }
2652
 
2653
  $pagesize = wppa_opt( 'photo_admin_pagesize' ) ? wppa_opt( 'photo_admin_pagesize' ) : '20';
2654
- $next_after = wppa_get( 'next-after', '0' );
2655
  $p = wppa_get( 'page' );
2656
  if ( ! is_numeric( $p ) ) $p = 0;
2657
- $page = ( $p ? max( wppa_get( 'page' ), '1' ) : '1' ) + wppa_get( 'next-after' );
2658
  $skip = ( $page > '0' ? ( $page - '1' ) * $pagesize : '0' );
2659
 
2660
  if ( $album ) {
3
  * Package: wp-photo-album-plus
4
  *
5
  * edit and delete photos
6
+ * Version 8.1.00.001
7
  *
8
  */
9
 
2522
  if ( wppa_get( 'bulk-action' ) ) {
2523
  check_admin_referer( 'wppa-bulk', 'wppa-bulk' );
2524
  if ( wppa_get( 'bulk-photo' ) ) {
2525
+ $ids = (array) wppa_get( 'bulk-photo' );
2526
  $newalb = wppa_get( 'bulk-album' );
2527
  $status = wppa_get( 'bulk-status' );
2528
  $owner = wppa_get( 'bulk-owner' );
2529
  $totcount = count( $ids );
2530
+
2531
  if ( is_array( $ids ) ) {
2532
  foreach ( array_keys( $ids ) as $id ) {
2533
  $skip = false;
2651
  }
2652
 
2653
  $pagesize = wppa_opt( 'photo_admin_pagesize' ) ? wppa_opt( 'photo_admin_pagesize' ) : '20';
2654
+ $next_after = wppa_get( 'next-after', '0' ) ? 1 : 0;
2655
  $p = wppa_get( 'page' );
2656
  if ( ! is_numeric( $p ) ) $p = 0;
2657
+ $page = ( $p ? max( wppa_get( 'page' ), '1' ) : '1' ) + $next_after;
2658
  $skip = ( $page > '0' ? ( $page - '1' ) * $pagesize : '0' );
2659
 
2660
  if ( $album ) {
wppa-settings-autosave.php CHANGED
@@ -3,7 +3,7 @@
3
  * Package: wp-photo-album-plus
4
  *
5
  * manage all options
6
- * Version 8.0.10.004
7
  *
8
  */
9
 
@@ -5893,9 +5893,8 @@ global $wppa_subtab_names;
5893
  $slug = 'wppa_ajax_upload_method';
5894
  $opts = array( __('normal', 'wp-photo-album-plus'),
5895
  __('backend', 'wp-photo-album-plus'),
5896
- __('extern', 'wp-photo-album-plus'),
5897
  );
5898
- $vals = array( 'normal', 'backend', 'extern' );
5899
  $html = wppa_select($slug, $opts, $vals);
5900
  wppa_setting_new($slug, '5.1', $name, $desc, $html, $help, wppa_switch( 'ajax_upload' ));
5901
 
@@ -6532,13 +6531,13 @@ global $wppa_subtab_names;
6532
  $help = __('Only change this setting when there are links that do not work', 'wp-photo-album-plus');
6533
  $slug = 'wppa_ajax_method';
6534
  $opts = array( __('Normal', 'wp-photo-album-plus'),
6535
- __('Classic', 'wp-photo-album-plus'),
6536
  // __('Frontend and Backend: Frontend method', 'wp-photo-album-plus'),
6537
  __('Frontend and Backend: Backend method', 'wp-photo-album-plus'),
6538
  __('Frontend: none, Backend: Backend method', 'wp-photo-album-plus'),
6539
  );
6540
  $vals = array( 'normal',
6541
- 'extern',
6542
  // 'wppaajax',
6543
  'admin',
6544
  'none',
3
  * Package: wp-photo-album-plus
4
  *
5
  * manage all options
6
+ * Version 8.1.00.001
7
  *
8
  */
9
 
5893
  $slug = 'wppa_ajax_upload_method';
5894
  $opts = array( __('normal', 'wp-photo-album-plus'),
5895
  __('backend', 'wp-photo-album-plus'),
 
5896
  );
5897
+ $vals = array( 'normal', 'backend' );
5898
  $html = wppa_select($slug, $opts, $vals);
5899
  wppa_setting_new($slug, '5.1', $name, $desc, $html, $help, wppa_switch( 'ajax_upload' ));
5900
 
6531
  $help = __('Only change this setting when there are links that do not work', 'wp-photo-album-plus');
6532
  $slug = 'wppa_ajax_method';
6533
  $opts = array( __('Normal', 'wp-photo-album-plus'),
6534
+ // __('Classic', 'wp-photo-album-plus'),
6535
  // __('Frontend and Backend: Frontend method', 'wp-photo-album-plus'),
6536
  __('Frontend and Backend: Backend method', 'wp-photo-album-plus'),
6537
  __('Frontend: none, Backend: Backend method', 'wp-photo-album-plus'),
6538
  );
6539
  $vals = array( 'normal',
6540
+ // 'extern',
6541
  // 'wppaajax',
6542
  'admin',
6543
  'none',
wppa-setup.php CHANGED
@@ -3,7 +3,7 @@
3
  * Package: wp-photo-album-plus
4
  *
5
  * Contains all the setup stuff
6
- * Version 8.0.08.007
7
  *
8
  */
9
 
@@ -296,6 +296,7 @@ global $wppa_error;
296
  if ( $old_rev <= '8004004' ) {
297
  $wpdb->query( "UPDATE $wpdb->wppa_albums SET status = 'publish' WHERE status = ''" );
298
  }
 
299
  }
300
 
301
  // Check required directories
3
  * Package: wp-photo-album-plus
4
  *
5
  * Contains all the setup stuff
6
+ * Version 8.1.00.001
7
  *
8
  */
9
 
296
  if ( $old_rev <= '8004004' ) {
297
  $wpdb->query( "UPDATE $wpdb->wppa_albums SET status = 'publish' WHERE status = ''" );
298
  }
299
+
300
  }
301
 
302
  // Check required directories
wppa-upload.php CHANGED
@@ -3,7 +3,7 @@
3
  * Package: wp-photo-album-plus
4
  *
5
  * Contains all the upload pages and functions
6
- * Version 8.0.09.001
7
  *
8
  */
9
 
@@ -22,25 +22,18 @@ global $upload_album;
22
  $user = wppa_get_user();
23
 
24
  // Sanitize album input
25
- if ( isset( $_POST['wppa-album'] ) ) {
26
- $upload_album = strval( intval( $_POST['wppa-album'] ) );
27
- }
28
- else {
29
- $upload_album = null;
30
- }
31
 
32
  // Update watermark settings for the user if new values supplied
33
  if ( wppa_switch( 'watermark_on' ) && ( wppa_switch( 'watermark_user' ) || current_user_can( 'wppa_settings' ) ) ) {
34
 
35
  // File
36
- if ( isset( $_POST['wppa-watermark-file'] ) ) {
37
 
38
  // Sanitize input
39
- $watermark_file = $_POST['wppa-watermark-file'];
40
- if ( stripos( $watermark_file, '.png' ) !== false ) {
41
- $watermark_file = sanitize_file_name( $watermark_file );
42
- }
43
- else {
44
  if ( ! in_array( $watermark_file, array( '--- none ---', '---name---', '---filename---', '---description---', '---predef---' ) ) ) {
45
  $watermark_file = 'nil';
46
  }
@@ -51,10 +44,11 @@ global $upload_album;
51
  }
52
 
53
  // Position
54
- if ( isset( $_POST['wppa-watermark-pos'] ) ) {
55
 
56
  // Sanitize input
57
- $watermark_pos = $_POST['wppa-watermark-pos'];
 
58
  if ( ! in_array( $watermark_pos, array( 'toplft', 'topcen', 'toprht', 'cenlft', 'cencen', 'cenrht', 'botlft', 'botcen', 'botrht' ) ) ) {
59
  $watermark_pos = 'nil';
60
  }
@@ -73,11 +67,10 @@ global $upload_album;
73
  }
74
 
75
  // Do the upload if requested
76
- // From BOX A
77
- if ( isset( $_POST['wppa-upload-multiple'] ) ) {
78
  check_admin_referer( '$wppa_nonce', WPPA_NONCE );
79
  wppa_upload_multiple();
80
- if ( isset( $_POST['wppa-go-edit-multiple'] ) ) {
81
  if ( current_user_can( 'wppa_admin' ) ) {
82
  wppa_ok_message( __( 'Connecting to edit album...' , 'wp-photo-album-plus' ) ); ?>
83
  <script type="text/javascript" >
3
  * Package: wp-photo-album-plus
4
  *
5
  * Contains all the upload pages and functions
6
+ * Version 8.1.00.001
7
  *
8
  */
9
 
22
  $user = wppa_get_user();
23
 
24
  // Sanitize album input
25
+ $upload_album = wppa_get( 'album', '0', 'int' );
 
 
 
 
 
26
 
27
  // Update watermark settings for the user if new values supplied
28
  if ( wppa_switch( 'watermark_on' ) && ( wppa_switch( 'watermark_user' ) || current_user_can( 'wppa_settings' ) ) ) {
29
 
30
  // File
31
+ if ( wppa_get( 'watermark-file' ) ) {
32
 
33
  // Sanitize input
34
+ $watermark_file = sanitize_file_name( wppa_get( 'watermark-file' ), 'nil' );
35
+ if ( stripos( $watermark_file, '.png' ) === false ) {
36
+
 
 
37
  if ( ! in_array( $watermark_file, array( '--- none ---', '---name---', '---filename---', '---description---', '---predef---' ) ) ) {
38
  $watermark_file = 'nil';
39
  }
44
  }
45
 
46
  // Position
47
+ if ( wppa_get( 'watermark-pos' ) ) {
48
 
49
  // Sanitize input
50
+ $watermark_pos = wppa_get( 'watermark-pos', 'nil' );
51
+
52
  if ( ! in_array( $watermark_pos, array( 'toplft', 'topcen', 'toprht', 'cenlft', 'cencen', 'cenrht', 'botlft', 'botcen', 'botrht' ) ) ) {
53
  $watermark_pos = 'nil';
54
  }
67
  }
68
 
69
  // Do the upload if requested
70
+ if ( wppa_get( 'upload-multiple', false, 'bool' ) ) {
 
71
  check_admin_referer( '$wppa_nonce', WPPA_NONCE );
72
  wppa_upload_multiple();
73
+ if ( wppa_get( 'go-edit-multiple', false, 'bool' ) ) {
74
  if ( current_user_can( 'wppa_admin' ) ) {
75
  wppa_ok_message( __( 'Connecting to edit album...' , 'wp-photo-album-plus' ) ); ?>
76
  <script type="text/javascript" >
wppa-utils.php CHANGED
@@ -3,7 +3,7 @@
3
  * Package: wp-photo-album-plus
4
  *
5
  * Contains low-level utility routines
6
- * Version 8.0.10.005
7
  *
8
  */
9
 
@@ -191,16 +191,10 @@ global $wppa_supported_stereo_types;
191
  if ( wppa_is_stereo( $id ) ) {
192
 
193
  // Get type from cookie
194
- $st = isset( $_COOKIE["stereotype"] ) ? $_COOKIE["stereotype"] : 'color';
195
- if ( ! in_array( $st, $wppa_supported_stereo_types ) ) {
196
- $st = '_flat';
197
- }
198
 
199
  // Get glass from cookie
200
- $sg = 'rc';
201
- if ( isset( $_COOKIE["stereoglass"] ) && $_COOKIE["stereoglass"] == 'greenmagenta' ) {
202
- $sg = 'gm';
203
- }
204
 
205
  // Create the file if not present
206
  if ( ! is_file( wppa_get_stereo_path( $id, $st, $sg ) ) ) {
@@ -3814,68 +3808,40 @@ function wppa_get_mime_type( $id ) {
3814
  return $result;
3815
  }
3816
 
3817
- // Test if a given url is to a photo file
3818
  function wppa_is_url_a_photo( &$url, $save = true ) {
3819
  global $wppa_supported_photo_extensions;
3820
  global $wppa_session;
3821
 
3822
- // Been here before?
3823
- if ( isset( $wppa_session['rem_url'][$url] ) ) {
3824
- return $wppa_session['rem_url'][$url];
3825
- }
3826
-
3827
- // Check existence
3828
- if ( ! wppa_remote_file_exists( $url, $save ) ) {
3829
- $wppa_session['rem_url'][$url] = false;
3830
- if ( count( $wppa_session['rem_url'] ) > 100 ) array_shift( $wppa_session['rem_url'] );
3831
- return false;
3832
- }
3833
-
3834
  // Init
3835
- $result = true;
3836
- $ext = wppa_get_ext( $url );
3837
-
3838
- // If the url does not have a valid photo extension, its not a photo file
3839
- if ( ! in_array( $ext, $wppa_supported_photo_extensions ) ) {
3840
- $wppa_session['rem_url'][$url] = false;
3841
- if ( count( $wppa_session['rem_url'] ) > 100 ) array_shift( $wppa_session['rem_url'] );
3842
- return false;
3843
- }
3844
-
3845
- // Using curl may be protected/limited
3846
- // Use curl to see if the url is found to prevent a php warning
3847
- /* experimental */
3848
- if ( function_exists( 'curl_init' ) && false ) {
3849
-
3850
- // Create a curl handle to the expected photofile
3851
- $ch = curl_init( $url );
3852
 
3853
- // Execute
3854
- curl_setopt( $ch, CURLOPT_RETURNTRANSFER, true );
3855
- curl_setopt( $ch, CURLOPT_FAILONERROR, true );
3856
- curl_exec( $ch );
3857
 
3858
- // Check if HTTP code > 400 i.e. error 22 occurred
3859
- if( curl_errno( $ch ) == 22 ) {
3860
- $result = false;
3861
- }
3862
 
3863
- // Close handle
3864
- curl_close($ch);
 
 
3865
 
3866
- }
 
3867
 
3868
- // No curl on system, or do not use curl
3869
- else {
3870
 
3871
- // getimagesize on a non imagefile produces a php warning
3872
- $result = is_array( @ getimagesize( $url ) );
 
 
 
3873
  }
3874
 
3875
- // Done
3876
- $wppa_session['rem_url'][$url] = $result;
3877
- if ( count( $wppa_session['rem_url'] ) > 100 ) array_shift( $wppa_session['rem_url'] );
3878
- return $result;
3879
  }
3880
 
3881
  function wppa_get_like_title_a( $id ) {
@@ -3966,43 +3932,33 @@ function wppa_create_qrcode_cache( $url, $size = '80' ) {
3966
 
3967
  // In cache already?
3968
  $key = md5( $qrsrc );
3969
- if ( is_file( WPPA_UPLOAD_PATH . '/qr/' . $key . '.svg' ) ) {
 
 
 
3970
 
3971
  // Bump cache found counter
3972
  update_option( 'wppa_qr_cache_hits', wppa_get_option( 'wppa_qr_cache_hits', 0 ) + 1 );
3973
- return WPPA_UPLOAD_URL . '/qr/' . $key . '.svg';
3974
  }
3975
 
3976
  // Bump cache miss counter
3977
  update_option( 'wppa_qr_cache_miss', wppa_get_option( 'wppa_qr_cache_miss', 0 ) + 1 );
3978
 
3979
  // Catch the qr image
3980
- $curl = curl_init();
3981
- curl_setopt( $curl, CURLOPT_RETURNTRANSFER, 1 );
3982
- curl_setopt( $curl, CURLOPT_URL, $qrsrc );
3983
- $contents = curl_exec( $curl );
3984
- curl_close( $curl );
3985
-
3986
- // Save the image
3987
- if ( strlen( $contents ) > 1000 ) {
3988
-
3989
- wppa_put_contents( WPPA_UPLOAD_PATH . '/qr/' . $key . '.svg', $contents );
3990
-
3991
- /*
3992
- $file = wppa _fopen( WPPA_UPLOAD_PATH . '/qr/' . $key . '.svg', 'w' );
3993
- if ( $file ) {
3994
- fwrite( $file, $contents, strlen( $contents ) );
3995
- fclose( $file );
3996
- }
3997
- */
3998
- }
3999
 
4000
- if ( wppa_is_file( WPPA_UPLOAD_PATH . '/qr/' . $key . '.svg' ) ) {
4001
- return WPPA_UPLOAD_URL . '/qr/' . $key . '.svg';
4002
- }
4003
- else {
4004
- return $qrsrc;
4005
  }
 
 
 
4006
  }
4007
 
4008
 
@@ -4873,46 +4829,6 @@ function wppa_is_panorama( $id ) {
4873
  return $result;
4874
  }
4875
 
4876
- // See if a remote file exists
4877
- function wppa_remote_file_exists( &$url, $save = true ) {
4878
-
4879
- $orig_url = $url;
4880
- $ext = wppa_get_ext( $url );
4881
- $url_1 = wppa_strip_ext( $url );
4882
- $exts = array( 'jpg', 'png', 'jpeg' );
4883
-
4884
- for ( $i=1; $i<4; $i++ ) { // Give it four tries
4885
- foreach( $exts as $ext ) { // Try all possible extensions
4886
-
4887
- $url = $url_1 . '.' . $ext;
4888
- $ch = curl_init( $url );
4889
- $options = array(
4890
- CURLOPT_NOBODY => true,
4891
- CURLOPT_SSL_VERIFYPEER => true,
4892
- );
4893
- curl_setopt_array( $ch, $options );
4894
- curl_exec( $ch );
4895
- $httpCode = curl_getinfo( $ch, CURLINFO_HTTP_CODE );
4896
- curl_close( $ch );
4897
- wppa_log( 'dbg', 'curl_exec() returned {b}' . $httpCode . '{/b} for ' . $url );
4898
- if ( $httpCode == 200 ) {
4899
- $path = WPPA_DEPOT_PATH . '/' . basename( wppa_compress_tree_path( $url ) );
4900
- if ( ! wppa_is_file( $path ) || ! wppa_filesize( $path ) ) {
4901
- $data = file_get_contents( $url );
4902
- if ( $save ) {
4903
- file_put_contents( $path, $data );
4904
- wppa_log( 'dbg', basename( $path ) . ' saved by wppa_remote_file_exists()' );
4905
- }
4906
- }
4907
- return true;
4908
- }
4909
- }
4910
- sleep( 1 ); // Wait a second, may help sometimes
4911
- }
4912
- $url = $orig_url;
4913
- return false;
4914
- }
4915
-
4916
  // Rename all files inside a tree to their sanitized name (recursive)
4917
  function wppa_rename_files_sanitized( $root ) {
4918
 
3
  * Package: wp-photo-album-plus
4
  *
5
  * Contains low-level utility routines
6
+ * Version 8.1.00.001
7
  *
8
  */
9
 
191
  if ( wppa_is_stereo( $id ) ) {
192
 
193
  // Get type from cookie
194
+ $st = wppa_get_cookie( 'stereotype', '_flat' );
 
 
 
195
 
196
  // Get glass from cookie
197
+ $sg = ( wppa_get( 'stereoglass' ) == 'greenmagenta' ? 'gm' : 'rc' );
 
 
 
198
 
199
  // Create the file if not present
200
  if ( ! is_file( wppa_get_stereo_path( $id, $st, $sg ) ) ) {
3808
  return $result;
3809
  }
3810
 
3811
+ // Test if a given url is to a photo file, possibly adjust url extension
3812
  function wppa_is_url_a_photo( &$url, $save = true ) {
3813
  global $wppa_supported_photo_extensions;
3814
  global $wppa_session;
3815
 
 
 
 
 
 
 
 
 
 
 
 
 
3816
  // Init
3817
+ $result = true;
3818
+ $ext = wppa_get_ext( $url );
3819
+ $urlnoext = wppa_strip_ext( $url );
 
 
 
 
 
 
 
 
 
 
 
 
 
 
3820
 
3821
+ // Try all supported extensions
3822
+ foreach( $wppa_supported_photo_extensions as $ext ) {
 
 
3823
 
3824
+ $url = $urlnoext . '.' . $ext;
 
 
 
3825
 
3826
+ // Use wp HTTP API to retrieve the photo
3827
+ $response = wp_remote_get( $url );
3828
+ $result = wp_remote_retrieve_body( $response );
3829
+ $httpcode = wp_remote_retrieve_response_code( $response );
3830
 
3831
+ // Done, save image optionally
3832
+ if ( $httpcode == 200 ) {
3833
 
3834
+ if ( $save ) {
 
3835
 
3836
+ $path = WPPA_DEPOT_PATH . '/' . basename( wppa_compress_tree_path( $url ) );
3837
+ wppa_put_contents( $path, $result );
3838
+ }
3839
+ return true;
3840
+ }
3841
  }
3842
 
3843
+ // No
3844
+ return false;
 
 
3845
  }
3846
 
3847
  function wppa_get_like_title_a( $id ) {
3932
 
3933
  // In cache already?
3934
  $key = md5( $qrsrc );
3935
+ $qr_image_path = WPPA_UPLOAD_PATH . '/qr/' . $key . '.svg';
3936
+ $qr_image_url = WPPA_UPLOAD_URL . '/qr/' . $key . '.svg';
3937
+
3938
+ if ( is_file( $qr_image_path ) ) {
3939
 
3940
  // Bump cache found counter
3941
  update_option( 'wppa_qr_cache_hits', wppa_get_option( 'wppa_qr_cache_hits', 0 ) + 1 );
3942
+ return $qr_image_url;
3943
  }
3944
 
3945
  // Bump cache miss counter
3946
  update_option( 'wppa_qr_cache_miss', wppa_get_option( 'wppa_qr_cache_miss', 0 ) + 1 );
3947
 
3948
  // Catch the qr image
3949
+ $response = wp_remote_get( $qrsrc );
3950
+ $contents = wp_remote_retrieve_body( $response );
3951
+ $httpcode = wp_remote_retrieve_response_code( $response );
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
3952
 
3953
+ // On success, save the image and return the url to the image
3954
+ if ( $httpcode == 200 ) {
3955
+
3956
+ wppa_put_contents( $qr_image_path, $contents );
3957
+ return $qr_image_url;
3958
  }
3959
+
3960
+ // Failed, return qr source url
3961
+ return $qrsrc;
3962
  }
3963
 
3964
 
4829
  return $result;
4830
  }
4831
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
4832
  // Rename all files inside a tree to their sanitized name (recursive)
4833
  function wppa_rename_files_sanitized( $root ) {
4834
 
wppa-wrappers.php CHANGED
@@ -466,7 +466,8 @@ function wppa_put_contents( $path, $contents, $log = true ) {
466
  // Read an entire file
467
  function wppa_get_contents( $file ) {
468
 
469
- if ( ! wppa_is_path_safe( $file ) ) {
 
470
  wppa_log( 'Err', 'Unsafe path detected in wppa_get_contents(): ' . wppa_shortpath( $path ), true );
471
  return false;
472
  }
@@ -497,7 +498,7 @@ function wppa_get_contents_array( $path, $log = true ) {
497
  }
498
 
499
  // Utility to check if a given full filepath is safe to manipulate upon
500
- function wppa_is_path_safe( $path, $wp_content = false ) {
501
  global $wppa_lang;
502
  global $wppa_log_file;
503
 
@@ -508,10 +509,10 @@ global $wppa_log_file;
508
 
509
  // Safe protocols
510
  if ( strpos( strtolower( $path ), 'http://' ) === 0 ) {
511
- return true;
512
  }
513
  if ( strpos( strtolower( $path ), 'https://' ) === 0 ) {
514
- return true;
515
  }
516
 
517
  // During activation/setup
466
  // Read an entire file
467
  function wppa_get_contents( $file ) {
468
 
469
+ // May be inside wp-content, may not be remote
470
+ if ( ! wppa_is_path_safe( $file, true, false ) ) {
471
  wppa_log( 'Err', 'Unsafe path detected in wppa_get_contents(): ' . wppa_shortpath( $path ), true );
472
  return false;
473
  }
498
  }
499
 
500
  // Utility to check if a given full filepath is safe to manipulate upon
501
+ function wppa_is_path_safe( $path, $wp_content = false, $may_remote = true ) {
502
  global $wppa_lang;
503
  global $wppa_log_file;
504
 
509
 
510
  // Safe protocols
511
  if ( strpos( strtolower( $path ), 'http://' ) === 0 ) {
512
+ return $may_remote;
513
  }
514
  if ( strpos( strtolower( $path ), 'https://' ) === 0 ) {
515
+ return $may_remote;
516
  }
517
 
518
  // During activation/setup
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.0.10.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,7 +24,7 @@ global $wp_version;
24
 
25
  /* WPPA GLOBALS */
26
  global $wppa_api_version;
27
- $wppa_api_version = '8.0.10.005'; // 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.1.00.001
6
  * Author: J.N. Breetvelt a.k.a. OpaJaap
7
  * Author URI: http://wppa.opajaap.nl/
8
  * Plugin URI: http://wordpress.org/extend/plugins/wp-photo-album-plus/
24
 
25
  /* WPPA GLOBALS */
26
  global $wppa_api_version;
27
+ $wppa_api_version = '8.1.00.001'; // WPPA software version
28
  global $wppa_revno;
29
  $wppa_revno = str_replace( '.', '', $wppa_api_version ); // WPPA db version
30