diff --git a/include/Contact.php b/include/Contact.php index c83177dda..04d3fa9e5 100644 --- a/include/Contact.php +++ b/include/Contact.php @@ -219,7 +219,7 @@ function contact_photo_menu($contact) { $poke_link = $a->get_baseurl() . '/poke/?f=&c=' . $contact['id']; $contact_url = $a->get_baseurl() . '/contacts/' . $contact['id']; - $posts_link = $a->get_baseurl() . '/network/?cid=' . $contact['id']; + $posts_link = $a->get_baseurl() . '/network/0?nets=all&cid=' . $contact['id']; $menu = Array( 'poke' => array(t("Poke"), $poke_link), diff --git a/include/acl_selectors.php b/include/acl_selectors.php index 1b9843fd1..d2042b1a8 100644 --- a/include/acl_selectors.php +++ b/include/acl_selectors.php @@ -339,7 +339,7 @@ function populate_acl($user = null,$celeb = false) { function construct_acl_data(&$a, $user) { // Get group and contact information for html ACL selector - $acl_data = acl_lookup(&$a, 'html'); + $acl_data = acl_lookup($a, 'html'); $user_defaults = get_acl_permissions($user); diff --git a/include/conversation.php b/include/conversation.php index d5f87567b..5296011bb 100644 --- a/include/conversation.php +++ b/include/conversation.php @@ -795,7 +795,7 @@ function item_photo_menu($item){ if(($cid) && (! $item['self'])) { $poke_link = $a->get_baseurl($ssl_state) . '/poke/?f=&c=' . $cid; $contact_url = $a->get_baseurl($ssl_state) . '/contacts/' . $cid; - $posts_link = $a->get_baseurl($ssl_state) . '/network/?cid=' . $cid; + $posts_link = $a->get_baseurl($ssl_state) . '/network/0?nets=all&cid=' . $cid; $clean_url = normalise_link($item['author-link']); diff --git a/include/security.php b/include/security.php index d92f48a08..126f16237 100644 --- a/include/security.php +++ b/include/security.php @@ -266,14 +266,8 @@ function item_permissions_sql($owner_id,$remote_verified = false,$groups = null) * Profile owner - everything is visible */ - if($local_user) { - if($local_user == $owner_id) { - $sql = ''; - } - else { - /* logged in user can see hidden walls and feeds that are blocked to unknown users (private == 2) */ - $sql = " AND private != 1 "; - } + if($local_user && ($local_user == $owner_id)) { + $sql = ''; } /** diff --git a/js/ajaxupload.min.js b/js/ajaxupload.min.js index 246f2bdb2..0f3956b2d 100644 --- a/js/ajaxupload.min.js +++ b/js/ajaxupload.min.js @@ -1,6 +1 @@ -/** - * AJAX Upload ( http://valums.com/ajax-upload/ ) - * Copyright (c) Andris Valums - * Licensed under the MIT license ( http://valums.com/mit-license/ ) - * Thanks to Gary Haran, David Mark, Corey Burns and others for contributions. - */(function(){function log(){typeof console!="undefined"&&typeof console.log=="function"&&(Array.prototype.unshift.call(arguments,"[Ajax Upload]"),console.log(Array.prototype.join.call(arguments," ")))}function addEvent(e,t,n){if(e.addEventListener)e.addEventListener(t,n,!1);else{if(!e.attachEvent)throw new Error("not supported or DOM not loaded");e.attachEvent("on"+t,function(){n.call(e)})}}function addResizeEvent(e){var t;addEvent(window,"resize",function(){t&&clearTimeout(t),t=setTimeout(e,100)})}function getBox(e){var t,n,r,i,s=getOffset(e);return t=s.left,r=s.top,n=t+e.offsetWidth,i=r+e.offsetHeight,{left:t,right:n,top:r,bottom:i}}function addStyles(e,t){for(var n in t)t.hasOwnProperty(n)&&(e.style[n]=t[n])}function copyLayout(e,t){var n=getBox(e);addStyles(t,{position:"absolute",left:n.left+"px",top:n.top+"px",width:e.offsetWidth+"px",height:e.offsetHeight+"px"}),t.title=e.title}function fileFromPath(e){return e.replace(/.*(\/|\\)/,"")}function getExt(e){return-1!==e.indexOf(".")?e.replace(/.*[.]/,""):""}function hasClass(e,t){var n=new RegExp("\\b"+t+"\\b");return n.test(e.className)}function addClass(e,t){hasClass(e,t)||(e.className+=" "+t)}function removeClass(e,t){var n=new RegExp("\\b"+t+"\\b");e.className=e.className.replace(n,"")}function removeNode(e){e.parentNode.removeChild(e)}if(document.documentElement.getBoundingClientRect)var getOffset=function(e){var t=e.getBoundingClientRect(),n=e.ownerDocument,r=n.body,i=n.documentElement,s=i.clientTop||r.clientTop||0,o=i.clientLeft||r.clientLeft||0,u=1;if(r.getBoundingClientRect){var a=r.getBoundingClientRect();u=(a.right-a.left)/r.clientWidth}u>1&&(s=0,o=0);var f=t.top/u+(window.pageYOffset||i&&i.scrollTop/u||r.scrollTop/u)-s,l=t.left/u+(window.pageXOffset||i&&i.scrollLeft/u||r.scrollLeft/u)-o;return{top:f,left:l}};else var getOffset=function(e){var t=0,n=0;do t+=e.offsetTop||0,n+=e.offsetLeft||0,e=e.offsetParent;while(e);return{left:n,top:t}};var toElement=function(){var e=document.createElement("div");return function(t){e.innerHTML=t;var n=e.firstChild;return e.removeChild(n)}}(),getUID=function(){var e=0;return function(){return"ValumsAjaxUpload"+e++}}();window.AjaxUpload=function(e,t){this._settings={action:"upload.php",name:"userfile",data:{},autoSubmit:!0,responseType:!1,hoverClass:"hover",focusClass:"focus",disabledClass:"disabled",onChange:function(e,t){},onSubmit:function(e,t){},onComplete:function(e,t){}};for(var n in t)t.hasOwnProperty(n)&&(this._settings[n]=t[n]);e.jquery?e=e[0]:typeof e=="string"&&(/^#.*/.test(e)&&(e=e.slice(1)),e=document.getElementById(e));if(!e||e.nodeType!==1)throw new Error("Please make sure that you're passing a valid element");e.nodeName.toUpperCase()=="A"&&addEvent(e,"click",function(e){e&&e.preventDefault?e.preventDefault():window.event&&(window.event.returnValue=!1)}),this._button=e,this._input=null,this._disabled=!1,this.enable(),this._rerouteClicks()},AjaxUpload.prototype={setData:function(e){this._settings.data=e},disable:function(){addClass(this._button,this._settings.disabledClass),this._disabled=!0;var e=this._button.nodeName.toUpperCase();(e=="INPUT"||e=="BUTTON")&&this._button.setAttribute("disabled","disabled"),this._input&&(this._input.parentNode.style.visibility="hidden")},enable:function(){removeClass(this._button,this._settings.disabledClass),this._button.removeAttribute("disabled"),this._disabled=!1},_createInput:function(){var e=this,t=document.createElement("input");t.setAttribute("type","file"),t.setAttribute("name",this._settings.name),addStyles(t,{position:"absolute",right:0,margin:0,padding:0,fontSize:"480px",fontFamily:"sans-serif",cursor:"pointer"});var n=document.createElement("div");addStyles(n,{display:"block",position:"absolute",overflow:"hidden",margin:0,padding:0,opacity:0,direction:"ltr",zIndex:2147483583,cursor:"pointer"});if(n.style.opacity!=="0"){if(typeof n.filters=="undefined")throw new Error("Opacity not supported by the browser");n.style.filter="alpha(opacity=0)"}addEvent(t,"change",function(){if(!t||t.value==="")return;var n=fileFromPath(t.value);if(!1===e._settings.onChange.call(e,n,getExt(n))){e._clearInput();return}e._settings.autoSubmit&&e.submit()}),addEvent(t,"mouseover",function(){addClass(e._button,e._settings.hoverClass)}),addEvent(t,"mouseout",function(){removeClass(e._button,e._settings.hoverClass),removeClass(e._button,e._settings.focusClass),t.parentNode.style.visibility="hidden"}),addEvent(t,"focus",function(){addClass(e._button,e._settings.focusClass)}),addEvent(t,"blur",function(){removeClass(e._button,e._settings.focusClass)}),n.appendChild(t),document.body.appendChild(n),this._input=t},_clearInput:function(){if(!this._input)return;removeNode(this._input.parentNode),this._input=null,this._createInput(),removeClass(this._button,this._settings.hoverClass),removeClass(this._button,this._settings.focusClass)},_rerouteClicks:function(){var e=this;addEvent(e._button,"mouseover",function(){if(e._disabled)return;e._input||e._createInput();var t=e._input.parentNode;copyLayout(e._button,t),t.style.visibility="visible"})},_createIframe:function(){var e=getUID(),t=toElement('');return t.setAttribute("id",e),t.style.display="none",document.body.appendChild(t),t},_createForm:function(e){var t=this._settings,n=toElement('
');n.setAttribute("action",t.action),n.setAttribute("target",e.name),n.style.display="none",document.body.appendChild(n);for(var r in t.data)if(t.data.hasOwnProperty(r)){var i=document.createElement("input");i.setAttribute("type","hidden"),i.setAttribute("name",r),i.setAttribute("value",t.data[r]),n.appendChild(i)}return n},_getResponse:function(iframe,file){var toDeleteFlag=!1,self=this,settings=this._settings;addEvent(iframe,"load",function(){if(iframe.src=="javascript:'%3Chtml%3E%3C/html%3E';"||iframe.src=="javascript:'';"){toDeleteFlag&&setTimeout(function(){removeNode(iframe)},0);return}var doc=iframe.contentDocument?iframe.contentDocument:window.frames[iframe.id].document;if(doc.readyState&&doc.readyState!="complete")return;if(doc.body&&doc.body.innerHTML=="false")return;var response;doc.XMLDocument?response=doc.XMLDocument:doc.body?(response=doc.body.innerHTML,settings.responseType&&settings.responseType.toLowerCase()=="json"&&(doc.body.firstChild&&doc.body.firstChild.nodeName.toUpperCase()=="PRE"&&(doc.normalize(),response=doc.body.firstChild.firstChild.nodeValue),response?response=eval("("+response+")"):response={})):response=doc,settings.onComplete.call(self,file,response),toDeleteFlag=!0,iframe.src="javascript:'';"})},submit:function(){var e=this,t=this._settings;if(!this._input||this._input.value==="")return;var n=fileFromPath(this._input.value);if(!1===t.onSubmit.call(this,n,getExt(n))){this._clearInput();return}var r=this._createIframe(),i=this._createForm(r);removeNode(this._input.parentNode),removeClass(e._button,e._settings.hoverClass),removeClass(e._button,e._settings.focusClass),i.appendChild(this._input),i.submit(),removeNode(i),i=null,removeNode(this._input),this._input=null,this._getResponse(r,n),this._createInput()}}})(); \ No newline at end of file +(function(){function log(){if(typeof console!="undefined"&&typeof console.log=="function"){Array.prototype.unshift.call(arguments,"[Ajax Upload]");console.log(Array.prototype.join.call(arguments," "))}}function addEvent(el,type,fn){if(el.addEventListener){el.addEventListener(type,fn,false)}else if(el.attachEvent){el.attachEvent("on"+type,function(){fn.call(el)})}else{throw new Error("not supported or DOM not loaded")}}function addResizeEvent(fn){var timeout;addEvent(window,"resize",function(){if(timeout){clearTimeout(timeout)}timeout=setTimeout(fn,100)})}if(document.documentElement.getBoundingClientRect){var getOffset=function(el){var box=el.getBoundingClientRect();var doc=el.ownerDocument;var body=doc.body;var docElem=doc.documentElement;var clientTop=docElem.clientTop||body.clientTop||0;var clientLeft=docElem.clientLeft||body.clientLeft||0;var zoom=1;if(body.getBoundingClientRect){var bound=body.getBoundingClientRect();zoom=(bound.right-bound.left)/body.clientWidth}if(zoom>1){clientTop=0;clientLeft=0}var top=box.top/zoom+(window.pageYOffset||docElem&&docElem.scrollTop/zoom||body.scrollTop/zoom)-clientTop,left=box.left/zoom+(window.pageXOffset||docElem&&docElem.scrollLeft/zoom||body.scrollLeft/zoom)-clientLeft;return{top:top,left:left}}}else{var getOffset=function(el){var top=0,left=0;do{top+=el.offsetTop||0;left+=el.offsetLeft||0;el=el.offsetParent}while(el);return{left:left,top:top}}}function getBox(el){var left,right,top,bottom;var offset=getOffset(el);left=offset.left;top=offset.top;right=left+el.offsetWidth;bottom=top+el.offsetHeight;return{left:left,right:right,top:top,bottom:bottom}}function addStyles(el,styles){for(var name in styles){if(styles.hasOwnProperty(name)){el.style[name]=styles[name]}}}function copyLayout(from,to){var box=getBox(from);addStyles(to,{position:"absolute",left:box.left+"px",top:box.top+"px",width:from.offsetWidth+"px",height:from.offsetHeight+"px"});to.title=from.title}var toElement=function(){var div=document.createElement("div");return function(html){div.innerHTML=html;var el=div.firstChild;return div.removeChild(el)}}();var getUID=function(){var id=0;return function(){return"ValumsAjaxUpload"+id++}}();function fileFromPath(file){return file.replace(/.*(\/|\\)/,"")}function getExt(file){return-1!==file.indexOf(".")?file.replace(/.*[.]/,""):""}function hasClass(el,name){var re=new RegExp("\\b"+name+"\\b");return re.test(el.className)}function addClass(el,name){if(!hasClass(el,name)){el.className+=" "+name}}function removeClass(el,name){var re=new RegExp("\\b"+name+"\\b");el.className=el.className.replace(re,"")}function removeNode(el){el.parentNode.removeChild(el)}window.AjaxUpload=function(button,options){this._settings={action:"upload.php",name:"userfile",data:{},autoSubmit:true,responseType:false,hoverClass:"hover",focusClass:"focus",disabledClass:"disabled",onChange:function(file,extension){},onSubmit:function(file,extension){},onComplete:function(file,response){}};for(var i in options){if(options.hasOwnProperty(i)){this._settings[i]=options[i]}}if(button.jquery){button=button[0]}else if(typeof button=="string"){if(/^#.*/.test(button)){button=button.slice(1)}button=document.getElementById(button)}if(!button||button.nodeType!==1){throw new Error("Please make sure that you're passing a valid element")}if(button.nodeName.toUpperCase()=="A"){addEvent(button,"click",function(e){if(e&&e.preventDefault){e.preventDefault()}else if(window.event){window.event.returnValue=false}})}this._button=button;this._input=null;this._disabled=false;this.enable();this._rerouteClicks()};AjaxUpload.prototype={setData:function(data){this._settings.data=data},disable:function(){addClass(this._button,this._settings.disabledClass);this._disabled=true;var nodeName=this._button.nodeName.toUpperCase();if(nodeName=="INPUT"||nodeName=="BUTTON"){this._button.setAttribute("disabled","disabled")}if(this._input){this._input.parentNode.style.visibility="hidden"}},enable:function(){removeClass(this._button,this._settings.disabledClass);this._button.removeAttribute("disabled");this._disabled=false},_createInput:function(){var self=this;var input=document.createElement("input");input.setAttribute("type","file");input.setAttribute("name",this._settings.name);addStyles(input,{position:"absolute",right:0,margin:0,padding:0,fontSize:"480px",fontFamily:"sans-serif",cursor:"pointer"});var div=document.createElement("div");addStyles(div,{display:"block",position:"absolute",overflow:"hidden",margin:0,padding:0,opacity:0,direction:"ltr",zIndex:2147483583,cursor:"pointer"});if(div.style.opacity!=="0"){if(typeof div.filters=="undefined"){throw new Error("Opacity not supported by the browser")}div.style.filter="alpha(opacity=0)"}addEvent(input,"change",function(){if(!input||input.value===""){return}var file=fileFromPath(input.value);if(false===self._settings.onChange.call(self,file,getExt(file))){self._clearInput();return}if(self._settings.autoSubmit){self.submit()}});addEvent(input,"mouseover",function(){addClass(self._button,self._settings.hoverClass)});addEvent(input,"mouseout",function(){removeClass(self._button,self._settings.hoverClass);removeClass(self._button,self._settings.focusClass);input.parentNode.style.visibility="hidden"});addEvent(input,"focus",function(){addClass(self._button,self._settings.focusClass)});addEvent(input,"blur",function(){removeClass(self._button,self._settings.focusClass)});div.appendChild(input);document.body.appendChild(div);this._input=input},_clearInput:function(){if(!this._input){return}removeNode(this._input.parentNode);this._input=null;this._createInput();removeClass(this._button,this._settings.hoverClass);removeClass(this._button,this._settings.focusClass)},_rerouteClicks:function(){var self=this;addEvent(self._button,"mouseover",function(){if(self._disabled){return}if(!self._input){self._createInput()}var div=self._input.parentNode;copyLayout(self._button,div);div.style.visibility="visible"})},_createIframe:function(){var id=getUID();var iframe=toElement('');iframe.setAttribute("id",id);iframe.style.display="none";document.body.appendChild(iframe);return iframe},_createForm:function(iframe){var settings=this._settings;var form=toElement('');form.setAttribute("action",settings.action);form.setAttribute("target",iframe.name);form.style.display="none";document.body.appendChild(form);for(var prop in settings.data){if(settings.data.hasOwnProperty(prop)){var el=document.createElement("input");el.setAttribute("type","hidden");el.setAttribute("name",prop);el.setAttribute("value",settings.data[prop]);form.appendChild(el)}}return form},_getResponse:function(iframe,file){var toDeleteFlag=false,self=this,settings=this._settings;addEvent(iframe,"load",function(){if(iframe.src=="javascript:'%3Chtml%3E%3C/html%3E';"||iframe.src=="javascript:'';"){if(toDeleteFlag){setTimeout(function(){removeNode(iframe)},0)}return}var doc=iframe.contentDocument?iframe.contentDocument:window.frames[iframe.id].document;if(doc.readyState&&doc.readyState!="complete"){return}if(doc.body&&doc.body.innerHTML=="false"){return}var response;if(doc.XMLDocument){response=doc.XMLDocument}else if(doc.body){response=doc.body.innerHTML;if(settings.responseType&&settings.responseType.toLowerCase()=="json"){if(doc.body.firstChild&&doc.body.firstChild.nodeName.toUpperCase()=="PRE"){doc.normalize();response=doc.body.firstChild.firstChild.nodeValue}if(response){response=eval("("+response+")")}else{response={}}}}else{response=doc}settings.onComplete.call(self,file,response);toDeleteFlag=true;iframe.src="javascript:'';"})},submit:function(){var self=this,settings=this._settings;if(!this._input||this._input.value===""){return}var file=fileFromPath(this._input.value);if(false===settings.onSubmit.call(this,file,getExt(file))){this._clearInput();return}var iframe=this._createIframe();var form=this._createForm(iframe);removeNode(this._input.parentNode);removeClass(self._button,self._settings.hoverClass);removeClass(self._button,self._settings.focusClass);form.appendChild(this._input);form.submit();removeNode(form);form=null;removeNode(this._input);this._input=null;this._getResponse(iframe,file);this._createInput()}}})(); \ No newline at end of file diff --git a/js/country.min.js b/js/country.min.js index df293530e..90b335d66 100644 --- a/js/country.min.js +++ b/js/country.min.js @@ -1,11 +1,2 @@ -// + +