From e93156427ea71162943691ea6b384109e1fe8369 Mon Sep 17 00:00:00 2001 From: rabuzarus <> Date: Mon, 28 Dec 2015 23:16:34 +0100 Subject: [PATCH 001/242] use perfect-scrollbars for nav-notifications-menu (and in vier aside) --- js/main.js | 7 + .../perfect-scrollbar/perfect-scrollbar.css | 106 ++ .../perfect-scrollbar.jquery.js | 1617 +++++++++++++++++ .../perfect-scrollbar.min.css | 2 + view/templates/head.tpl | 2 + 5 files changed, 1734 insertions(+) create mode 100644 library/perfect-scrollbar/perfect-scrollbar.css create mode 100644 library/perfect-scrollbar/perfect-scrollbar.jquery.js create mode 100644 library/perfect-scrollbar/perfect-scrollbar.min.css diff --git a/js/main.js b/js/main.js index b28b1079b7..c27d743bc4 100644 --- a/js/main.js +++ b/js/main.js @@ -167,6 +167,10 @@ var notifications_mark = unescape($('
').append( $("#nav-notifications-mark-all").clone() ).html()); //outerHtml hack var notifications_empty = unescape($("#nav-notifications-menu").html()); + /* enable perfect-scrollbars for nav-notivications-menu */ + $('#nav-notifications-menu').perfectScrollbar(); + $('aside').perfectScrollbar(); + /* nav update event */ $('nav').bind('nav-update', function(e,data){ var invalid = $(data).find('invalid').text(); @@ -311,6 +315,9 @@ $.jGrowl(text, { sticky: false, theme: 'info', life: 5000 }); }); + /* update the js scrollbars */ + $('#nav-notifications-menu').perfectScrollbar('update'); + }); NavUpdate(); diff --git a/library/perfect-scrollbar/perfect-scrollbar.css b/library/perfect-scrollbar/perfect-scrollbar.css new file mode 100644 index 0000000000..32cf99b0a3 --- /dev/null +++ b/library/perfect-scrollbar/perfect-scrollbar.css @@ -0,0 +1,106 @@ +/* perfect-scrollbar v0.6.8 */ +.ps-container { + -ms-touch-action: none; + overflow: hidden !important; } + .ps-container.ps-active-x > .ps-scrollbar-x-rail, + .ps-container.ps-active-y > .ps-scrollbar-y-rail { + display: block; } + .ps-container.ps-in-scrolling { + pointer-events: none; } + .ps-container.ps-in-scrolling.ps-x > .ps-scrollbar-x-rail { + background-color: #eee; + opacity: 0.9; } + .ps-container.ps-in-scrolling.ps-x > .ps-scrollbar-x-rail > .ps-scrollbar-x { + background-color: #999; } + .ps-container.ps-in-scrolling.ps-y > .ps-scrollbar-y-rail { + background-color: #eee; + opacity: 0.9; } + .ps-container.ps-in-scrolling.ps-y > .ps-scrollbar-y-rail > .ps-scrollbar-y { + background-color: #999; } + .ps-container > .ps-scrollbar-x-rail { + display: none; + position: absolute; + /* please don't change 'position' */ + -webkit-border-radius: 4px; + -moz-border-radius: 4px; + -ms-border-radius: 4px; + border-radius: 4px; + opacity: 0; + -webkit-transition: background-color 0.2s linear, opacity 0.2s linear; + -moz-transition: background-color 0.2s linear, opacity 0.2s linear; + -o-transition: background-color 0.2s linear, opacity 0.2s linear; + transition: background-color 0.2s linear, opacity 0.2s linear; + bottom: 3px; + /* there must be 'bottom' for ps-scrollbar-x-rail */ + height: 8px; } + .ps-container > .ps-scrollbar-x-rail > .ps-scrollbar-x { + position: absolute; + /* please don't change 'position' */ + background-color: #aaa; + -webkit-border-radius: 4px; + -moz-border-radius: 4px; + -ms-border-radius: 4px; + border-radius: 4px; + -webkit-transition: background-color 0.2s linear; + -moz-transition: background-color 0.2s linear; + -o-transition: background-color 0.2s linear; + transition: background-color 0.2s linear; + bottom: 0; + /* there must be 'bottom' for ps-scrollbar-x */ + height: 8px; } + .ps-container > .ps-scrollbar-y-rail { + display: none; + position: absolute; + /* please don't change 'position' */ + -webkit-border-radius: 4px; + -moz-border-radius: 4px; + -ms-border-radius: 4px; + border-radius: 4px; + opacity: 0; + -webkit-transition: background-color 0.2s linear, opacity 0.2s linear; + -moz-transition: background-color 0.2s linear, opacity 0.2s linear; + -o-transition: background-color 0.2s linear, opacity 0.2s linear; + transition: background-color 0.2s linear, opacity 0.2s linear; + right: 3px; + /* there must be 'right' for ps-scrollbar-y-rail */ + width: 8px; } + .ps-container > .ps-scrollbar-y-rail > .ps-scrollbar-y { + position: absolute; + /* please don't change 'position' */ + background-color: #aaa; + -webkit-border-radius: 4px; + -moz-border-radius: 4px; + -ms-border-radius: 4px; + border-radius: 4px; + -webkit-transition: background-color 0.2s linear; + -moz-transition: background-color 0.2s linear; + -o-transition: background-color 0.2s linear; + transition: background-color 0.2s linear; + right: 0; + /* there must be 'right' for ps-scrollbar-y */ + width: 8px; } + .ps-container:hover.ps-in-scrolling { + pointer-events: none; } + .ps-container:hover.ps-in-scrolling.ps-x > .ps-scrollbar-x-rail { + background-color: #eee; + opacity: 0.9; } + .ps-container:hover.ps-in-scrolling.ps-x > .ps-scrollbar-x-rail > .ps-scrollbar-x { + background-color: #999; } + .ps-container:hover.ps-in-scrolling.ps-y > .ps-scrollbar-y-rail { + background-color: #eee; + opacity: 0.9; } + .ps-container:hover.ps-in-scrolling.ps-y > .ps-scrollbar-y-rail > .ps-scrollbar-y { + background-color: #999; } + .ps-container:hover > .ps-scrollbar-x-rail, + .ps-container:hover > .ps-scrollbar-y-rail { + opacity: 0.6; } + .ps-container:hover > .ps-scrollbar-x-rail:hover { + background-color: #eee; + opacity: 0.9; } + .ps-container:hover > .ps-scrollbar-x-rail:hover > .ps-scrollbar-x { + background-color: #999; } + .ps-container:hover > .ps-scrollbar-y-rail:hover { + background-color: #eee; + opacity: 0.9; } + .ps-container:hover > .ps-scrollbar-y-rail:hover > .ps-scrollbar-y { + background-color: #999; } diff --git a/library/perfect-scrollbar/perfect-scrollbar.jquery.js b/library/perfect-scrollbar/perfect-scrollbar.jquery.js new file mode 100644 index 0000000000..e872d8f30b --- /dev/null +++ b/library/perfect-scrollbar/perfect-scrollbar.jquery.js @@ -0,0 +1,1617 @@ +/* perfect-scrollbar v0.6.8 */ +(function e(t,n,r){function s(o,u){if(!n[o]){if(!t[o]){var a=typeof require=="function"&&require;if(!u&&a)return a(o,!0);if(i)return i(o,!0);var f=new Error("Cannot find module '"+o+"'");throw f.code="MODULE_NOT_FOUND",f}var l=n[o]={exports:{}};t[o][0].call(l.exports,function(e){var n=t[o][1][e];return s(n?n:e)},l,l.exports,e,t,n,r)}return n[o].exports}var i=typeof require=="function"&&require;for(var o=0;o= 0) { + classes.splice(idx, 1); + } + element.className = classes.join(' '); +} + +exports.add = function (element, className) { + if (element.classList) { + element.classList.add(className); + } else { + oldAdd(element, className); + } +}; + +exports.remove = function (element, className) { + if (element.classList) { + element.classList.remove(className); + } else { + oldRemove(element, className); + } +}; + +exports.list = function (element) { + if (element.classList) { + return Array.prototype.slice.apply(element.classList); + } else { + return element.className.split(' '); + } +}; + +},{}],3:[function(require,module,exports){ +/* Copyright (c) 2015 Hyunje Alex Jun and other contributors + * Licensed under the MIT License + */ +'use strict'; + +var DOM = {}; + +DOM.e = function (tagName, className) { + var element = document.createElement(tagName); + element.className = className; + return element; +}; + +DOM.appendTo = function (child, parent) { + parent.appendChild(child); + return child; +}; + +function cssGet(element, styleName) { + return window.getComputedStyle(element)[styleName]; +} + +function cssSet(element, styleName, styleValue) { + if (typeof styleValue === 'number') { + styleValue = styleValue.toString() + 'px'; + } + element.style[styleName] = styleValue; + return element; +} + +function cssMultiSet(element, obj) { + for (var key in obj) { + var val = obj[key]; + if (typeof val === 'number') { + val = val.toString() + 'px'; + } + element.style[key] = val; + } + return element; +} + +DOM.css = function (element, styleNameOrObject, styleValue) { + if (typeof styleNameOrObject === 'object') { + // multiple set with object + return cssMultiSet(element, styleNameOrObject); + } else { + if (typeof styleValue === 'undefined') { + return cssGet(element, styleNameOrObject); + } else { + return cssSet(element, styleNameOrObject, styleValue); + } + } +}; + +DOM.matches = function (element, query) { + if (typeof element.matches !== 'undefined') { + return element.matches(query); + } else { + if (typeof element.matchesSelector !== 'undefined') { + return element.matchesSelector(query); + } else if (typeof element.webkitMatchesSelector !== 'undefined') { + return element.webkitMatchesSelector(query); + } else if (typeof element.mozMatchesSelector !== 'undefined') { + return element.mozMatchesSelector(query); + } else if (typeof element.msMatchesSelector !== 'undefined') { + return element.msMatchesSelector(query); + } + } +}; + +DOM.remove = function (element) { + if (typeof element.remove !== 'undefined') { + element.remove(); + } else { + if (element.parentNode) { + element.parentNode.removeChild(element); + } + } +}; + +DOM.queryChildren = function (element, selector) { + return Array.prototype.filter.call(element.childNodes, function (child) { + return DOM.matches(child, selector); + }); +}; + +module.exports = DOM; + +},{}],4:[function(require,module,exports){ +/* Copyright (c) 2015 Hyunje Alex Jun and other contributors + * Licensed under the MIT License + */ +'use strict'; + +var EventElement = function (element) { + this.element = element; + this.events = {}; +}; + +EventElement.prototype.bind = function (eventName, handler) { + if (typeof this.events[eventName] === 'undefined') { + this.events[eventName] = []; + } + this.events[eventName].push(handler); + this.element.addEventListener(eventName, handler, false); +}; + +EventElement.prototype.unbind = function (eventName, handler) { + var isHandlerProvided = (typeof handler !== 'undefined'); + this.events[eventName] = this.events[eventName].filter(function (hdlr) { + if (isHandlerProvided && hdlr !== handler) { + return true; + } + this.element.removeEventListener(eventName, hdlr, false); + return false; + }, this); +}; + +EventElement.prototype.unbindAll = function () { + for (var name in this.events) { + this.unbind(name); + } +}; + +var EventManager = function () { + this.eventElements = []; +}; + +EventManager.prototype.eventElement = function (element) { + var ee = this.eventElements.filter(function (eventElement) { + return eventElement.element === element; + })[0]; + if (typeof ee === 'undefined') { + ee = new EventElement(element); + this.eventElements.push(ee); + } + return ee; +}; + +EventManager.prototype.bind = function (element, eventName, handler) { + this.eventElement(element).bind(eventName, handler); +}; + +EventManager.prototype.unbind = function (element, eventName, handler) { + this.eventElement(element).unbind(eventName, handler); +}; + +EventManager.prototype.unbindAll = function () { + for (var i = 0; i < this.eventElements.length; i++) { + this.eventElements[i].unbindAll(); + } +}; + +EventManager.prototype.once = function (element, eventName, handler) { + var ee = this.eventElement(element); + var onceHandler = function (e) { + ee.unbind(eventName, onceHandler); + handler(e); + }; + ee.bind(eventName, onceHandler); +}; + +module.exports = EventManager; + +},{}],5:[function(require,module,exports){ +/* Copyright (c) 2015 Hyunje Alex Jun and other contributors + * Licensed under the MIT License + */ +'use strict'; + +module.exports = (function () { + function s4() { + return Math.floor((1 + Math.random()) * 0x10000) + .toString(16) + .substring(1); + } + return function () { + return s4() + s4() + '-' + s4() + '-' + s4() + '-' + + s4() + '-' + s4() + s4() + s4(); + }; +})(); + +},{}],6:[function(require,module,exports){ +/* Copyright (c) 2015 Hyunje Alex Jun and other contributors + * Licensed under the MIT License + */ +'use strict'; + +var cls = require('./class') + , d = require('./dom'); + +exports.toInt = function (x) { + return parseInt(x, 10) || 0; +}; + +exports.clone = function (obj) { + if (obj === null) { + return null; + } else if (typeof obj === 'object') { + var result = {}; + for (var key in obj) { + result[key] = this.clone(obj[key]); + } + return result; + } else { + return obj; + } +}; + +exports.extend = function (original, source) { + var result = this.clone(original); + for (var key in source) { + result[key] = this.clone(source[key]); + } + return result; +}; + +exports.isEditable = function (el) { + return d.matches(el, "input,[contenteditable]") || + d.matches(el, "select,[contenteditable]") || + d.matches(el, "textarea,[contenteditable]") || + d.matches(el, "button,[contenteditable]"); +}; + +exports.removePsClasses = function (element) { + var clsList = cls.list(element); + for (var i = 0; i < clsList.length; i++) { + var className = clsList[i]; + if (className.indexOf('ps-') === 0) { + cls.remove(element, className); + } + } +}; + +exports.outerWidth = function (element) { + return this.toInt(d.css(element, 'width')) + + this.toInt(d.css(element, 'paddingLeft')) + + this.toInt(d.css(element, 'paddingRight')) + + this.toInt(d.css(element, 'borderLeftWidth')) + + this.toInt(d.css(element, 'borderRightWidth')); +}; + +exports.startScrolling = function (element, axis) { + cls.add(element, 'ps-in-scrolling'); + if (typeof axis !== 'undefined') { + cls.add(element, 'ps-' + axis); + } else { + cls.add(element, 'ps-x'); + cls.add(element, 'ps-y'); + } +}; + +exports.stopScrolling = function (element, axis) { + cls.remove(element, 'ps-in-scrolling'); + if (typeof axis !== 'undefined') { + cls.remove(element, 'ps-' + axis); + } else { + cls.remove(element, 'ps-x'); + cls.remove(element, 'ps-y'); + } +}; + +exports.env = { + isWebKit: 'WebkitAppearance' in document.documentElement.style, + supportsTouch: (('ontouchstart' in window) || window.DocumentTouch && document instanceof window.DocumentTouch), + supportsIePointer: window.navigator.msMaxTouchPoints !== null +}; + +},{"./class":2,"./dom":3}],7:[function(require,module,exports){ +/* Copyright (c) 2015 Hyunje Alex Jun and other contributors + * Licensed under the MIT License + */ +'use strict'; + +var destroy = require('./plugin/destroy') + , initialize = require('./plugin/initialize') + , update = require('./plugin/update'); + +module.exports = { + initialize: initialize, + update: update, + destroy: destroy +}; + +},{"./plugin/destroy":9,"./plugin/initialize":17,"./plugin/update":21}],8:[function(require,module,exports){ +/* Copyright (c) 2015 Hyunje Alex Jun and other contributors + * Licensed under the MIT License + */ +'use strict'; + +module.exports = { + maxScrollbarLength: null, + minScrollbarLength: null, + scrollXMarginOffset: 0, + scrollYMarginOffset: 0, + stopPropagationOnClick: true, + suppressScrollX: false, + suppressScrollY: false, + swipePropagation: true, + useBothWheelAxes: false, + useKeyboard: true, + useSelectionScroll: false, + wheelPropagation: false, + wheelSpeed: 1 +}; + +},{}],9:[function(require,module,exports){ +/* Copyright (c) 2015 Hyunje Alex Jun and other contributors + * Licensed under the MIT License + */ +'use strict'; + +var d = require('../lib/dom') + , h = require('../lib/helper') + , instances = require('./instances'); + +module.exports = function (element) { + var i = instances.get(element); + + if (!i) { + return; + } + + i.event.unbindAll(); + d.remove(i.scrollbarX); + d.remove(i.scrollbarY); + d.remove(i.scrollbarXRail); + d.remove(i.scrollbarYRail); + h.removePsClasses(element); + + instances.remove(element); +}; + +},{"../lib/dom":3,"../lib/helper":6,"./instances":18}],10:[function(require,module,exports){ +/* Copyright (c) 2015 Hyunje Alex Jun and other contributors + * Licensed under the MIT License + */ +'use strict'; + +var h = require('../../lib/helper') + , instances = require('../instances') + , updateGeometry = require('../update-geometry') + , updateScroll = require('../update-scroll'); + +function bindClickRailHandler(element, i) { + function pageOffset(el) { + return el.getBoundingClientRect(); + } + var stopPropagation = window.Event.prototype.stopPropagation.bind; + + if (i.settings.stopPropagationOnClick) { + i.event.bind(i.scrollbarY, 'click', stopPropagation); + } + i.event.bind(i.scrollbarYRail, 'click', function (e) { + var halfOfScrollbarLength = h.toInt(i.scrollbarYHeight / 2); + var positionTop = i.railYRatio * (e.pageY - window.pageYOffset - pageOffset(i.scrollbarYRail).top - halfOfScrollbarLength); + var maxPositionTop = i.railYRatio * (i.railYHeight - i.scrollbarYHeight); + var positionRatio = positionTop / maxPositionTop; + + if (positionRatio < 0) { + positionRatio = 0; + } else if (positionRatio > 1) { + positionRatio = 1; + } + + updateScroll(element, 'top', (i.contentHeight - i.containerHeight) * positionRatio); + updateGeometry(element); + + e.stopPropagation(); + }); + + if (i.settings.stopPropagationOnClick) { + i.event.bind(i.scrollbarX, 'click', stopPropagation); + } + i.event.bind(i.scrollbarXRail, 'click', function (e) { + var halfOfScrollbarLength = h.toInt(i.scrollbarXWidth / 2); + var positionLeft = i.railXRatio * (e.pageX - window.pageXOffset - pageOffset(i.scrollbarXRail).left - halfOfScrollbarLength); + var maxPositionLeft = i.railXRatio * (i.railXWidth - i.scrollbarXWidth); + var positionRatio = positionLeft / maxPositionLeft; + + if (positionRatio < 0) { + positionRatio = 0; + } else if (positionRatio > 1) { + positionRatio = 1; + } + + updateScroll(element, 'left', ((i.contentWidth - i.containerWidth) * positionRatio) - i.negativeScrollAdjustment); + updateGeometry(element); + + e.stopPropagation(); + }); +} + +module.exports = function (element) { + var i = instances.get(element); + bindClickRailHandler(element, i); +}; + +},{"../../lib/helper":6,"../instances":18,"../update-geometry":19,"../update-scroll":20}],11:[function(require,module,exports){ +/* Copyright (c) 2015 Hyunje Alex Jun and other contributors + * Licensed under the MIT License + */ +'use strict'; + +var d = require('../../lib/dom') + , h = require('../../lib/helper') + , instances = require('../instances') + , updateGeometry = require('../update-geometry') + , updateScroll = require('../update-scroll'); + +function bindMouseScrollXHandler(element, i) { + var currentLeft = null; + var currentPageX = null; + + function updateScrollLeft(deltaX) { + var newLeft = currentLeft + (deltaX * i.railXRatio); + var maxLeft = Math.max(0, i.scrollbarXRail.getBoundingClientRect().left) + (i.railXRatio * (i.railXWidth - i.scrollbarXWidth)); + + if (newLeft < 0) { + i.scrollbarXLeft = 0; + } else if (newLeft > maxLeft) { + i.scrollbarXLeft = maxLeft; + } else { + i.scrollbarXLeft = newLeft; + } + + var scrollLeft = h.toInt(i.scrollbarXLeft * (i.contentWidth - i.containerWidth) / (i.containerWidth - (i.railXRatio * i.scrollbarXWidth))) - i.negativeScrollAdjustment; + updateScroll(element, 'left', scrollLeft); + } + + var mouseMoveHandler = function (e) { + updateScrollLeft(e.pageX - currentPageX); + updateGeometry(element); + e.stopPropagation(); + e.preventDefault(); + }; + + var mouseUpHandler = function () { + h.stopScrolling(element, 'x'); + i.event.unbind(i.ownerDocument, 'mousemove', mouseMoveHandler); + }; + + i.event.bind(i.scrollbarX, 'mousedown', function (e) { + currentPageX = e.pageX; + currentLeft = h.toInt(d.css(i.scrollbarX, 'left')) * i.railXRatio; + h.startScrolling(element, 'x'); + + i.event.bind(i.ownerDocument, 'mousemove', mouseMoveHandler); + i.event.once(i.ownerDocument, 'mouseup', mouseUpHandler); + + e.stopPropagation(); + e.preventDefault(); + }); +} + +function bindMouseScrollYHandler(element, i) { + var currentTop = null; + var currentPageY = null; + + function updateScrollTop(deltaY) { + var newTop = currentTop + (deltaY * i.railYRatio); + var maxTop = Math.max(0, i.scrollbarYRail.getBoundingClientRect().top) + (i.railYRatio * (i.railYHeight - i.scrollbarYHeight)); + + if (newTop < 0) { + i.scrollbarYTop = 0; + } else if (newTop > maxTop) { + i.scrollbarYTop = maxTop; + } else { + i.scrollbarYTop = newTop; + } + + var scrollTop = h.toInt(i.scrollbarYTop * (i.contentHeight - i.containerHeight) / (i.containerHeight - (i.railYRatio * i.scrollbarYHeight))); + updateScroll(element, 'top', scrollTop); + } + + var mouseMoveHandler = function (e) { + updateScrollTop(e.pageY - currentPageY); + updateGeometry(element); + e.stopPropagation(); + e.preventDefault(); + }; + + var mouseUpHandler = function () { + h.stopScrolling(element, 'y'); + i.event.unbind(i.ownerDocument, 'mousemove', mouseMoveHandler); + }; + + i.event.bind(i.scrollbarY, 'mousedown', function (e) { + currentPageY = e.pageY; + currentTop = h.toInt(d.css(i.scrollbarY, 'top')) * i.railYRatio; + h.startScrolling(element, 'y'); + + i.event.bind(i.ownerDocument, 'mousemove', mouseMoveHandler); + i.event.once(i.ownerDocument, 'mouseup', mouseUpHandler); + + e.stopPropagation(); + e.preventDefault(); + }); +} + +module.exports = function (element) { + var i = instances.get(element); + bindMouseScrollXHandler(element, i); + bindMouseScrollYHandler(element, i); +}; + +},{"../../lib/dom":3,"../../lib/helper":6,"../instances":18,"../update-geometry":19,"../update-scroll":20}],12:[function(require,module,exports){ +/* Copyright (c) 2015 Hyunje Alex Jun and other contributors + * Licensed under the MIT License + */ +'use strict'; + +var h = require('../../lib/helper') + , instances = require('../instances') + , updateGeometry = require('../update-geometry') + , updateScroll = require('../update-scroll'); + +function bindKeyboardHandler(element, i) { + var hovered = false; + i.event.bind(element, 'mouseenter', function () { + hovered = true; + }); + i.event.bind(element, 'mouseleave', function () { + hovered = false; + }); + + var shouldPrevent = false; + function shouldPreventDefault(deltaX, deltaY) { + var scrollTop = element.scrollTop; + if (deltaX === 0) { + if (!i.scrollbarYActive) { + return false; + } + if ((scrollTop === 0 && deltaY > 0) || (scrollTop >= i.contentHeight - i.containerHeight && deltaY < 0)) { + return !i.settings.wheelPropagation; + } + } + + var scrollLeft = element.scrollLeft; + if (deltaY === 0) { + if (!i.scrollbarXActive) { + return false; + } + if ((scrollLeft === 0 && deltaX < 0) || (scrollLeft >= i.contentWidth - i.containerWidth && deltaX > 0)) { + return !i.settings.wheelPropagation; + } + } + return true; + } + + i.event.bind(i.ownerDocument, 'keydown', function (e) { + if (e.isDefaultPrevented && e.isDefaultPrevented()) { + return; + } + + if (!hovered) { + return; + } + + var activeElement = document.activeElement ? document.activeElement : i.ownerDocument.activeElement; + if (activeElement) { + // go deeper if element is a webcomponent + while (activeElement.shadowRoot) { + activeElement = activeElement.shadowRoot.activeElement; + } + if (h.isEditable(activeElement)) { + return; + } + } + + var deltaX = 0; + var deltaY = 0; + + switch (e.which) { + case 37: // left + deltaX = -30; + break; + case 38: // up + deltaY = 30; + break; + case 39: // right + deltaX = 30; + break; + case 40: // down + deltaY = -30; + break; + case 33: // page up + deltaY = 90; + break; + case 32: // space bar + if (e.shiftKey) { + deltaY = 90; + } else { + deltaY = -90; + } + break; + case 34: // page down + deltaY = -90; + break; + case 35: // end + if (e.ctrlKey) { + deltaY = -i.contentHeight; + } else { + deltaY = -i.containerHeight; + } + break; + case 36: // home + if (e.ctrlKey) { + deltaY = element.scrollTop; + } else { + deltaY = i.containerHeight; + } + break; + default: + return; + } + + updateScroll(element, 'top', element.scrollTop - deltaY); + updateScroll(element, 'left', element.scrollLeft + deltaX); + updateGeometry(element); + + shouldPrevent = shouldPreventDefault(deltaX, deltaY); + if (shouldPrevent) { + e.preventDefault(); + } + }); +} + +module.exports = function (element) { + var i = instances.get(element); + bindKeyboardHandler(element, i); +}; + +},{"../../lib/helper":6,"../instances":18,"../update-geometry":19,"../update-scroll":20}],13:[function(require,module,exports){ +/* Copyright (c) 2015 Hyunje Alex Jun and other contributors + * Licensed under the MIT License + */ +'use strict'; + +var instances = require('../instances') + , updateGeometry = require('../update-geometry') + , updateScroll = require('../update-scroll'); + +function bindMouseWheelHandler(element, i) { + var shouldPrevent = false; + + function shouldPreventDefault(deltaX, deltaY) { + var scrollTop = element.scrollTop; + if (deltaX === 0) { + if (!i.scrollbarYActive) { + return false; + } + if ((scrollTop === 0 && deltaY > 0) || (scrollTop >= i.contentHeight - i.containerHeight && deltaY < 0)) { + return !i.settings.wheelPropagation; + } + } + + var scrollLeft = element.scrollLeft; + if (deltaY === 0) { + if (!i.scrollbarXActive) { + return false; + } + if ((scrollLeft === 0 && deltaX < 0) || (scrollLeft >= i.contentWidth - i.containerWidth && deltaX > 0)) { + return !i.settings.wheelPropagation; + } + } + return true; + } + + function getDeltaFromEvent(e) { + var deltaX = e.deltaX; + var deltaY = -1 * e.deltaY; + + if (typeof deltaX === "undefined" || typeof deltaY === "undefined") { + // OS X Safari + deltaX = -1 * e.wheelDeltaX / 6; + deltaY = e.wheelDeltaY / 6; + } + + if (e.deltaMode && e.deltaMode === 1) { + // Firefox in deltaMode 1: Line scrolling + deltaX *= 10; + deltaY *= 10; + } + + if (deltaX !== deltaX && deltaY !== deltaY/* NaN checks */) { + // IE in some mouse drivers + deltaX = 0; + deltaY = e.wheelDelta; + } + + return [deltaX, deltaY]; + } + + function shouldBeConsumedByTextarea(deltaX, deltaY) { + var hoveredTextarea = element.querySelector('textarea:hover'); + if (hoveredTextarea) { + var maxScrollTop = hoveredTextarea.scrollHeight - hoveredTextarea.clientHeight; + if (maxScrollTop > 0) { + if (!(hoveredTextarea.scrollTop === 0 && deltaY > 0) && + !(hoveredTextarea.scrollTop === maxScrollTop && deltaY < 0)) { + return true; + } + } + var maxScrollLeft = hoveredTextarea.scrollLeft - hoveredTextarea.clientWidth; + if (maxScrollLeft > 0) { + if (!(hoveredTextarea.scrollLeft === 0 && deltaX < 0) && + !(hoveredTextarea.scrollLeft === maxScrollLeft && deltaX > 0)) { + return true; + } + } + } + return false; + } + + function mousewheelHandler(e) { + var delta = getDeltaFromEvent(e); + + var deltaX = delta[0]; + var deltaY = delta[1]; + + if (shouldBeConsumedByTextarea(deltaX, deltaY)) { + return; + } + + shouldPrevent = false; + if (!i.settings.useBothWheelAxes) { + // deltaX will only be used for horizontal scrolling and deltaY will + // only be used for vertical scrolling - this is the default + updateScroll(element, 'top', element.scrollTop - (deltaY * i.settings.wheelSpeed)); + updateScroll(element, 'left', element.scrollLeft + (deltaX * i.settings.wheelSpeed)); + } else if (i.scrollbarYActive && !i.scrollbarXActive) { + // only vertical scrollbar is active and useBothWheelAxes option is + // active, so let's scroll vertical bar using both mouse wheel axes + if (deltaY) { + updateScroll(element, 'top', element.scrollTop - (deltaY * i.settings.wheelSpeed)); + } else { + updateScroll(element, 'top', element.scrollTop + (deltaX * i.settings.wheelSpeed)); + } + shouldPrevent = true; + } else if (i.scrollbarXActive && !i.scrollbarYActive) { + // useBothWheelAxes and only horizontal bar is active, so use both + // wheel axes for horizontal bar + if (deltaX) { + updateScroll(element, 'left', element.scrollLeft + (deltaX * i.settings.wheelSpeed)); + } else { + updateScroll(element, 'left', element.scrollLeft - (deltaY * i.settings.wheelSpeed)); + } + shouldPrevent = true; + } + + updateGeometry(element); + + shouldPrevent = (shouldPrevent || shouldPreventDefault(deltaX, deltaY)); + if (shouldPrevent) { + e.stopPropagation(); + e.preventDefault(); + } + } + + if (typeof window.onwheel !== "undefined") { + i.event.bind(element, 'wheel', mousewheelHandler); + } else if (typeof window.onmousewheel !== "undefined") { + i.event.bind(element, 'mousewheel', mousewheelHandler); + } +} + +module.exports = function (element) { + var i = instances.get(element); + bindMouseWheelHandler(element, i); +}; + +},{"../instances":18,"../update-geometry":19,"../update-scroll":20}],14:[function(require,module,exports){ +/* Copyright (c) 2015 Hyunje Alex Jun and other contributors + * Licensed under the MIT License + */ +'use strict'; + +var instances = require('../instances') + , updateGeometry = require('../update-geometry'); + +function bindNativeScrollHandler(element, i) { + i.event.bind(element, 'scroll', function () { + updateGeometry(element); + }); +} + +module.exports = function (element) { + var i = instances.get(element); + bindNativeScrollHandler(element, i); +}; + +},{"../instances":18,"../update-geometry":19}],15:[function(require,module,exports){ +/* Copyright (c) 2015 Hyunje Alex Jun and other contributors + * Licensed under the MIT License + */ +'use strict'; + +var h = require('../../lib/helper') + , instances = require('../instances') + , updateGeometry = require('../update-geometry') + , updateScroll = require('../update-scroll'); + +function bindSelectionHandler(element, i) { + function getRangeNode() { + var selection = window.getSelection ? window.getSelection() : + document.getSelection ? document.getSelection() : ''; + if (selection.toString().length === 0) { + return null; + } else { + return selection.getRangeAt(0).commonAncestorContainer; + } + } + + var scrollingLoop = null; + var scrollDiff = {top: 0, left: 0}; + function startScrolling() { + if (!scrollingLoop) { + scrollingLoop = setInterval(function () { + if (!instances.get(element)) { + clearInterval(scrollingLoop); + return; + } + + updateScroll(element, 'top', element.scrollTop + scrollDiff.top); + updateScroll(element, 'left', element.scrollLeft + scrollDiff.left); + updateGeometry(element); + }, 50); // every .1 sec + } + } + function stopScrolling() { + if (scrollingLoop) { + clearInterval(scrollingLoop); + scrollingLoop = null; + } + h.stopScrolling(element); + } + + var isSelected = false; + i.event.bind(i.ownerDocument, 'selectionchange', function () { + if (element.contains(getRangeNode())) { + isSelected = true; + } else { + isSelected = false; + stopScrolling(); + } + }); + i.event.bind(window, 'mouseup', function () { + if (isSelected) { + isSelected = false; + stopScrolling(); + } + }); + + i.event.bind(window, 'mousemove', function (e) { + if (isSelected) { + var mousePosition = {x: e.pageX, y: e.pageY}; + var containerGeometry = { + left: element.offsetLeft, + right: element.offsetLeft + element.offsetWidth, + top: element.offsetTop, + bottom: element.offsetTop + element.offsetHeight + }; + + if (mousePosition.x < containerGeometry.left + 3) { + scrollDiff.left = -5; + h.startScrolling(element, 'x'); + } else if (mousePosition.x > containerGeometry.right - 3) { + scrollDiff.left = 5; + h.startScrolling(element, 'x'); + } else { + scrollDiff.left = 0; + } + + if (mousePosition.y < containerGeometry.top + 3) { + if (containerGeometry.top + 3 - mousePosition.y < 5) { + scrollDiff.top = -5; + } else { + scrollDiff.top = -20; + } + h.startScrolling(element, 'y'); + } else if (mousePosition.y > containerGeometry.bottom - 3) { + if (mousePosition.y - containerGeometry.bottom + 3 < 5) { + scrollDiff.top = 5; + } else { + scrollDiff.top = 20; + } + h.startScrolling(element, 'y'); + } else { + scrollDiff.top = 0; + } + + if (scrollDiff.top === 0 && scrollDiff.left === 0) { + stopScrolling(); + } else { + startScrolling(); + } + } + }); +} + +module.exports = function (element) { + var i = instances.get(element); + bindSelectionHandler(element, i); +}; + +},{"../../lib/helper":6,"../instances":18,"../update-geometry":19,"../update-scroll":20}],16:[function(require,module,exports){ +/* Copyright (c) 2015 Hyunje Alex Jun and other contributors + * Licensed under the MIT License + */ +'use strict'; + +var instances = require('../instances') + , updateGeometry = require('../update-geometry') + , updateScroll = require('../update-scroll'); + +function bindTouchHandler(element, i, supportsTouch, supportsIePointer) { + function shouldPreventDefault(deltaX, deltaY) { + var scrollTop = element.scrollTop; + var scrollLeft = element.scrollLeft; + var magnitudeX = Math.abs(deltaX); + var magnitudeY = Math.abs(deltaY); + + if (magnitudeY > magnitudeX) { + // user is perhaps trying to swipe up/down the page + + if (((deltaY < 0) && (scrollTop === i.contentHeight - i.containerHeight)) || + ((deltaY > 0) && (scrollTop === 0))) { + return !i.settings.swipePropagation; + } + } else if (magnitudeX > magnitudeY) { + // user is perhaps trying to swipe left/right across the page + + if (((deltaX < 0) && (scrollLeft === i.contentWidth - i.containerWidth)) || + ((deltaX > 0) && (scrollLeft === 0))) { + return !i.settings.swipePropagation; + } + } + + return true; + } + + function applyTouchMove(differenceX, differenceY) { + updateScroll(element, 'top', element.scrollTop - differenceY); + updateScroll(element, 'left', element.scrollLeft - differenceX); + + updateGeometry(element); + } + + var startOffset = {}; + var startTime = 0; + var speed = {}; + var easingLoop = null; + var inGlobalTouch = false; + var inLocalTouch = false; + + function globalTouchStart() { + inGlobalTouch = true; + } + function globalTouchEnd() { + inGlobalTouch = false; + } + + function getTouch(e) { + if (e.targetTouches) { + return e.targetTouches[0]; + } else { + // Maybe IE pointer + return e; + } + } + function shouldHandle(e) { + if (e.targetTouches && e.targetTouches.length === 1) { + return true; + } + if (e.pointerType && e.pointerType !== 'mouse' && e.pointerType !== e.MSPOINTER_TYPE_MOUSE) { + return true; + } + return false; + } + function touchStart(e) { + if (shouldHandle(e)) { + inLocalTouch = true; + + var touch = getTouch(e); + + startOffset.pageX = touch.pageX; + startOffset.pageY = touch.pageY; + + startTime = (new Date()).getTime(); + + if (easingLoop !== null) { + clearInterval(easingLoop); + } + + e.stopPropagation(); + } + } + function touchMove(e) { + if (!inGlobalTouch && inLocalTouch && shouldHandle(e)) { + var touch = getTouch(e); + + var currentOffset = {pageX: touch.pageX, pageY: touch.pageY}; + + var differenceX = currentOffset.pageX - startOffset.pageX; + var differenceY = currentOffset.pageY - startOffset.pageY; + + applyTouchMove(differenceX, differenceY); + startOffset = currentOffset; + + var currentTime = (new Date()).getTime(); + + var timeGap = currentTime - startTime; + if (timeGap > 0) { + speed.x = differenceX / timeGap; + speed.y = differenceY / timeGap; + startTime = currentTime; + } + + if (shouldPreventDefault(differenceX, differenceY)) { + e.stopPropagation(); + e.preventDefault(); + } + } + } + function touchEnd() { + if (!inGlobalTouch && inLocalTouch) { + inLocalTouch = false; + + clearInterval(easingLoop); + easingLoop = setInterval(function () { + if (!instances.get(element)) { + clearInterval(easingLoop); + return; + } + + if (Math.abs(speed.x) < 0.01 && Math.abs(speed.y) < 0.01) { + clearInterval(easingLoop); + return; + } + + applyTouchMove(speed.x * 30, speed.y * 30); + + speed.x *= 0.8; + speed.y *= 0.8; + }, 10); + } + } + + if (supportsTouch) { + i.event.bind(window, 'touchstart', globalTouchStart); + i.event.bind(window, 'touchend', globalTouchEnd); + i.event.bind(element, 'touchstart', touchStart); + i.event.bind(element, 'touchmove', touchMove); + i.event.bind(element, 'touchend', touchEnd); + } + + if (supportsIePointer) { + if (window.PointerEvent) { + i.event.bind(window, 'pointerdown', globalTouchStart); + i.event.bind(window, 'pointerup', globalTouchEnd); + i.event.bind(element, 'pointerdown', touchStart); + i.event.bind(element, 'pointermove', touchMove); + i.event.bind(element, 'pointerup', touchEnd); + } else if (window.MSPointerEvent) { + i.event.bind(window, 'MSPointerDown', globalTouchStart); + i.event.bind(window, 'MSPointerUp', globalTouchEnd); + i.event.bind(element, 'MSPointerDown', touchStart); + i.event.bind(element, 'MSPointerMove', touchMove); + i.event.bind(element, 'MSPointerUp', touchEnd); + } + } +} + +module.exports = function (element, supportsTouch, supportsIePointer) { + var i = instances.get(element); + bindTouchHandler(element, i, supportsTouch, supportsIePointer); +}; + +},{"../instances":18,"../update-geometry":19,"../update-scroll":20}],17:[function(require,module,exports){ +/* Copyright (c) 2015 Hyunje Alex Jun and other contributors + * Licensed under the MIT License + */ +'use strict'; + +var cls = require('../lib/class') + , h = require('../lib/helper') + , instances = require('./instances') + , updateGeometry = require('./update-geometry'); + +// Handlers +var clickRailHandler = require('./handler/click-rail') + , dragScrollbarHandler = require('./handler/drag-scrollbar') + , keyboardHandler = require('./handler/keyboard') + , mouseWheelHandler = require('./handler/mouse-wheel') + , nativeScrollHandler = require('./handler/native-scroll') + , selectionHandler = require('./handler/selection') + , touchHandler = require('./handler/touch'); + +module.exports = function (element, userSettings) { + userSettings = typeof userSettings === 'object' ? userSettings : {}; + + cls.add(element, 'ps-container'); + + // Create a plugin instance. + var i = instances.add(element); + + i.settings = h.extend(i.settings, userSettings); + + clickRailHandler(element); + dragScrollbarHandler(element); + mouseWheelHandler(element); + nativeScrollHandler(element); + + if (i.settings.useSelectionScroll) { + selectionHandler(element); + } + + if (h.env.supportsTouch || h.env.supportsIePointer) { + touchHandler(element, h.env.supportsTouch, h.env.supportsIePointer); + } + if (i.settings.useKeyboard) { + keyboardHandler(element); + } + + updateGeometry(element); +}; + +},{"../lib/class":2,"../lib/helper":6,"./handler/click-rail":10,"./handler/drag-scrollbar":11,"./handler/keyboard":12,"./handler/mouse-wheel":13,"./handler/native-scroll":14,"./handler/selection":15,"./handler/touch":16,"./instances":18,"./update-geometry":19}],18:[function(require,module,exports){ +/* Copyright (c) 2015 Hyunje Alex Jun and other contributors + * Licensed under the MIT License + */ +'use strict'; + +var d = require('../lib/dom') + , defaultSettings = require('./default-setting') + , EventManager = require('../lib/event-manager') + , guid = require('../lib/guid') + , h = require('../lib/helper'); + +var instances = {}; + +function Instance(element) { + var i = this; + + i.settings = h.clone(defaultSettings); + i.containerWidth = null; + i.containerHeight = null; + i.contentWidth = null; + i.contentHeight = null; + + i.isRtl = d.css(element, 'direction') === "rtl"; + i.isNegativeScroll = (function () { + var originalScrollLeft = element.scrollLeft; + var result = null; + element.scrollLeft = -1; + result = element.scrollLeft < 0; + element.scrollLeft = originalScrollLeft; + return result; + })(); + i.negativeScrollAdjustment = i.isNegativeScroll ? element.scrollWidth - element.clientWidth : 0; + i.event = new EventManager(); + i.ownerDocument = element.ownerDocument || document; + + i.scrollbarXRail = d.appendTo(d.e('div', 'ps-scrollbar-x-rail'), element); + i.scrollbarX = d.appendTo(d.e('div', 'ps-scrollbar-x'), i.scrollbarXRail); + i.scrollbarX.setAttribute('tabindex', 0); + i.scrollbarXActive = null; + i.scrollbarXWidth = null; + i.scrollbarXLeft = null; + i.scrollbarXBottom = h.toInt(d.css(i.scrollbarXRail, 'bottom')); + i.isScrollbarXUsingBottom = i.scrollbarXBottom === i.scrollbarXBottom; // !isNaN + i.scrollbarXTop = i.isScrollbarXUsingBottom ? null : h.toInt(d.css(i.scrollbarXRail, 'top')); + i.railBorderXWidth = h.toInt(d.css(i.scrollbarXRail, 'borderLeftWidth')) + h.toInt(d.css(i.scrollbarXRail, 'borderRightWidth')); + // Set rail to display:block to calculate margins + d.css(i.scrollbarXRail, 'display', 'block'); + i.railXMarginWidth = h.toInt(d.css(i.scrollbarXRail, 'marginLeft')) + h.toInt(d.css(i.scrollbarXRail, 'marginRight')); + d.css(i.scrollbarXRail, 'display', ''); + i.railXWidth = null; + i.railXRatio = null; + + i.scrollbarYRail = d.appendTo(d.e('div', 'ps-scrollbar-y-rail'), element); + i.scrollbarY = d.appendTo(d.e('div', 'ps-scrollbar-y'), i.scrollbarYRail); + i.scrollbarY.setAttribute('tabindex', 0); + i.scrollbarYActive = null; + i.scrollbarYHeight = null; + i.scrollbarYTop = null; + i.scrollbarYRight = h.toInt(d.css(i.scrollbarYRail, 'right')); + i.isScrollbarYUsingRight = i.scrollbarYRight === i.scrollbarYRight; // !isNaN + i.scrollbarYLeft = i.isScrollbarYUsingRight ? null : h.toInt(d.css(i.scrollbarYRail, 'left')); + i.scrollbarYOuterWidth = i.isRtl ? h.outerWidth(i.scrollbarY) : null; + i.railBorderYWidth = h.toInt(d.css(i.scrollbarYRail, 'borderTopWidth')) + h.toInt(d.css(i.scrollbarYRail, 'borderBottomWidth')); + d.css(i.scrollbarYRail, 'display', 'block'); + i.railYMarginHeight = h.toInt(d.css(i.scrollbarYRail, 'marginTop')) + h.toInt(d.css(i.scrollbarYRail, 'marginBottom')); + d.css(i.scrollbarYRail, 'display', ''); + i.railYHeight = null; + i.railYRatio = null; +} + +function getId(element) { + if (typeof element.dataset === 'undefined') { + return element.getAttribute('data-ps-id'); + } else { + return element.dataset.psId; + } +} + +function setId(element, id) { + if (typeof element.dataset === 'undefined') { + element.setAttribute('data-ps-id', id); + } else { + element.dataset.psId = id; + } +} + +function removeId(element) { + if (typeof element.dataset === 'undefined') { + element.removeAttribute('data-ps-id'); + } else { + delete element.dataset.psId; + } +} + +exports.add = function (element) { + var newId = guid(); + setId(element, newId); + instances[newId] = new Instance(element); + return instances[newId]; +}; + +exports.remove = function (element) { + delete instances[getId(element)]; + removeId(element); +}; + +exports.get = function (element) { + return instances[getId(element)]; +}; + +},{"../lib/dom":3,"../lib/event-manager":4,"../lib/guid":5,"../lib/helper":6,"./default-setting":8}],19:[function(require,module,exports){ +/* Copyright (c) 2015 Hyunje Alex Jun and other contributors + * Licensed under the MIT License + */ +'use strict'; + +var cls = require('../lib/class') + , d = require('../lib/dom') + , h = require('../lib/helper') + , instances = require('./instances') + , updateScroll = require('./update-scroll'); + +function getThumbSize(i, thumbSize) { + if (i.settings.minScrollbarLength) { + thumbSize = Math.max(thumbSize, i.settings.minScrollbarLength); + } + if (i.settings.maxScrollbarLength) { + thumbSize = Math.min(thumbSize, i.settings.maxScrollbarLength); + } + return thumbSize; +} + +function updateCss(element, i) { + var xRailOffset = {width: i.railXWidth}; + if (i.isRtl) { + xRailOffset.left = i.negativeScrollAdjustment + element.scrollLeft + i.containerWidth - i.contentWidth; + } else { + xRailOffset.left = element.scrollLeft; + } + if (i.isScrollbarXUsingBottom) { + xRailOffset.bottom = i.scrollbarXBottom - element.scrollTop; + } else { + xRailOffset.top = i.scrollbarXTop + element.scrollTop; + } + d.css(i.scrollbarXRail, xRailOffset); + + var yRailOffset = {top: element.scrollTop, height: i.railYHeight}; + if (i.isScrollbarYUsingRight) { + if (i.isRtl) { + yRailOffset.right = i.contentWidth - (i.negativeScrollAdjustment + element.scrollLeft) - i.scrollbarYRight - i.scrollbarYOuterWidth; + } else { + yRailOffset.right = i.scrollbarYRight - element.scrollLeft; + } + } else { + if (i.isRtl) { + yRailOffset.left = i.negativeScrollAdjustment + element.scrollLeft + i.containerWidth * 2 - i.contentWidth - i.scrollbarYLeft - i.scrollbarYOuterWidth; + } else { + yRailOffset.left = i.scrollbarYLeft + element.scrollLeft; + } + } + d.css(i.scrollbarYRail, yRailOffset); + + d.css(i.scrollbarX, {left: i.scrollbarXLeft, width: i.scrollbarXWidth - i.railBorderXWidth}); + d.css(i.scrollbarY, {top: i.scrollbarYTop, height: i.scrollbarYHeight - i.railBorderYWidth}); +} + +module.exports = function (element) { + var i = instances.get(element); + + i.containerWidth = element.clientWidth; + i.containerHeight = element.clientHeight; + i.contentWidth = element.scrollWidth; + i.contentHeight = element.scrollHeight; + + var existingRails; + if (!element.contains(i.scrollbarXRail)) { + existingRails = d.queryChildren(element, '.ps-scrollbar-x-rail'); + if (existingRails.length > 0) { + existingRails.forEach(function (rail) { + d.remove(rail); + }); + } + d.appendTo(i.scrollbarXRail, element); + } + if (!element.contains(i.scrollbarYRail)) { + existingRails = d.queryChildren(element, '.ps-scrollbar-y-rail'); + if (existingRails.length > 0) { + existingRails.forEach(function (rail) { + d.remove(rail); + }); + } + d.appendTo(i.scrollbarYRail, element); + } + + if (!i.settings.suppressScrollX && i.containerWidth + i.settings.scrollXMarginOffset < i.contentWidth) { + i.scrollbarXActive = true; + i.railXWidth = i.containerWidth - i.railXMarginWidth; + i.railXRatio = i.containerWidth / i.railXWidth; + i.scrollbarXWidth = getThumbSize(i, h.toInt(i.railXWidth * i.containerWidth / i.contentWidth)); + i.scrollbarXLeft = h.toInt((i.negativeScrollAdjustment + element.scrollLeft) * (i.railXWidth - i.scrollbarXWidth) / (i.contentWidth - i.containerWidth)); + } else { + i.scrollbarXActive = false; + } + + if (!i.settings.suppressScrollY && i.containerHeight + i.settings.scrollYMarginOffset < i.contentHeight) { + i.scrollbarYActive = true; + i.railYHeight = i.containerHeight - i.railYMarginHeight; + i.railYRatio = i.containerHeight / i.railYHeight; + i.scrollbarYHeight = getThumbSize(i, h.toInt(i.railYHeight * i.containerHeight / i.contentHeight)); + i.scrollbarYTop = h.toInt(element.scrollTop * (i.railYHeight - i.scrollbarYHeight) / (i.contentHeight - i.containerHeight)); + } else { + i.scrollbarYActive = false; + } + + if (i.scrollbarXLeft >= i.railXWidth - i.scrollbarXWidth) { + i.scrollbarXLeft = i.railXWidth - i.scrollbarXWidth; + } + if (i.scrollbarYTop >= i.railYHeight - i.scrollbarYHeight) { + i.scrollbarYTop = i.railYHeight - i.scrollbarYHeight; + } + + updateCss(element, i); + + if (i.scrollbarXActive) { + cls.add(element, 'ps-active-x'); + } else { + cls.remove(element, 'ps-active-x'); + i.scrollbarXWidth = 0; + i.scrollbarXLeft = 0; + updateScroll(element, 'left', 0); + } + if (i.scrollbarYActive) { + cls.add(element, 'ps-active-y'); + } else { + cls.remove(element, 'ps-active-y'); + i.scrollbarYHeight = 0; + i.scrollbarYTop = 0; + updateScroll(element, 'top', 0); + } +}; + +},{"../lib/class":2,"../lib/dom":3,"../lib/helper":6,"./instances":18,"./update-scroll":20}],20:[function(require,module,exports){ +/* Copyright (c) 2015 Hyunje Alex Jun and other contributors + * Licensed under the MIT License + */ +'use strict'; + +var instances = require('./instances'); + +var upEvent = document.createEvent('Event') + , downEvent = document.createEvent('Event') + , leftEvent = document.createEvent('Event') + , rightEvent = document.createEvent('Event') + , yEvent = document.createEvent('Event') + , xEvent = document.createEvent('Event') + , xStartEvent = document.createEvent('Event') + , xEndEvent = document.createEvent('Event') + , yStartEvent = document.createEvent('Event') + , yEndEvent = document.createEvent('Event') + , lastTop + , lastLeft; + +upEvent.initEvent('ps-scroll-up', true, true); +downEvent.initEvent('ps-scroll-down', true, true); +leftEvent.initEvent('ps-scroll-left', true, true); +rightEvent.initEvent('ps-scroll-right', true, true); +yEvent.initEvent('ps-scroll-y', true, true); +xEvent.initEvent('ps-scroll-x', true, true); +xStartEvent.initEvent('ps-x-reach-start', true, true); +xEndEvent.initEvent('ps-x-reach-end', true, true); +yStartEvent.initEvent('ps-y-reach-start', true, true); +yEndEvent.initEvent('ps-y-reach-end', true, true); + +module.exports = function (element, axis, value) { + if (typeof element === 'undefined') { + throw 'You must provide an element to the update-scroll function'; + } + + if (typeof axis === 'undefined') { + throw 'You must provide an axis to the update-scroll function'; + } + + if (typeof value === 'undefined') { + throw 'You must provide a value to the update-scroll function'; + } + + if (axis === 'top' && value <= 0) { + element.scrollTop = 0; + element.dispatchEvent(yStartEvent); + return; // don't allow negative scroll + } + + if (axis === 'left' && value <= 0) { + element.scrollLeft = 0; + element.dispatchEvent(xStartEvent); + return; // don't allow negative scroll + } + + var i = instances.get(element); + + if (axis === 'top' && value >= i.contentHeight - i.containerHeight) { + element.scrollTop = i.contentHeight - i.containerHeight; + element.dispatchEvent(yEndEvent); + return; // don't allow scroll past container + } + + if (axis === 'left' && value >= i.contentWidth - i.containerWidth) { + element.scrollLeft = i.contentWidth - i.containerWidth; + element.dispatchEvent(xEndEvent); + return; // don't allow scroll past container + } + + if (!lastTop) { + lastTop = element.scrollTop; + } + + if (!lastLeft) { + lastLeft = element.scrollLeft; + } + + if (axis === 'top' && value < lastTop) { + element.dispatchEvent(upEvent); + } + + if (axis === 'top' && value > lastTop) { + element.dispatchEvent(downEvent); + } + + if (axis === 'left' && value < lastLeft) { + element.dispatchEvent(leftEvent); + } + + if (axis === 'left' && value > lastLeft) { + element.dispatchEvent(rightEvent); + } + + if (axis === 'top') { + element.scrollTop = lastTop = value; + element.dispatchEvent(yEvent); + } + + if (axis === 'left') { + element.scrollLeft = lastLeft = value; + element.dispatchEvent(xEvent); + } + +}; + +},{"./instances":18}],21:[function(require,module,exports){ +/* Copyright (c) 2015 Hyunje Alex Jun and other contributors + * Licensed under the MIT License + */ +'use strict'; + +var d = require('../lib/dom') + , h = require('../lib/helper') + , instances = require('./instances') + , updateGeometry = require('./update-geometry') + , updateScroll = require('./update-scroll'); + +module.exports = function (element) { + var i = instances.get(element); + + if (!i) { + return; + } + + // Recalcuate negative scrollLeft adjustment + i.negativeScrollAdjustment = i.isNegativeScroll ? element.scrollWidth - element.clientWidth : 0; + + // Recalculate rail margins + d.css(i.scrollbarXRail, 'display', 'block'); + d.css(i.scrollbarYRail, 'display', 'block'); + i.railXMarginWidth = h.toInt(d.css(i.scrollbarXRail, 'marginLeft')) + h.toInt(d.css(i.scrollbarXRail, 'marginRight')); + i.railYMarginHeight = h.toInt(d.css(i.scrollbarYRail, 'marginTop')) + h.toInt(d.css(i.scrollbarYRail, 'marginBottom')); + + // Hide scrollbars not to affect scrollWidth and scrollHeight + d.css(i.scrollbarXRail, 'display', 'none'); + d.css(i.scrollbarYRail, 'display', 'none'); + + updateGeometry(element); + + // Update top/left scroll to trigger events + updateScroll(element, 'top', element.scrollTop); + updateScroll(element, 'left', element.scrollLeft); + + d.css(i.scrollbarXRail, 'display', ''); + d.css(i.scrollbarYRail, 'display', ''); +}; + +},{"../lib/dom":3,"../lib/helper":6,"./instances":18,"./update-geometry":19,"./update-scroll":20}]},{},[1]); diff --git a/library/perfect-scrollbar/perfect-scrollbar.min.css b/library/perfect-scrollbar/perfect-scrollbar.min.css new file mode 100644 index 0000000000..288671cfcc --- /dev/null +++ b/library/perfect-scrollbar/perfect-scrollbar.min.css @@ -0,0 +1,2 @@ +/* perfect-scrollbar v0.6.8 */ +.ps-container{-ms-touch-action:none;overflow:hidden !important}.ps-container.ps-active-x>.ps-scrollbar-x-rail,.ps-container.ps-active-y>.ps-scrollbar-y-rail{display:block}.ps-container.ps-in-scrolling{pointer-events:none}.ps-container.ps-in-scrolling.ps-x>.ps-scrollbar-x-rail{background-color:#eee;opacity:0.9}.ps-container.ps-in-scrolling.ps-x>.ps-scrollbar-x-rail>.ps-scrollbar-x{background-color:#999}.ps-container.ps-in-scrolling.ps-y>.ps-scrollbar-y-rail{background-color:#eee;opacity:0.9}.ps-container.ps-in-scrolling.ps-y>.ps-scrollbar-y-rail>.ps-scrollbar-y{background-color:#999}.ps-container>.ps-scrollbar-x-rail{display:none;position:absolute;-webkit-border-radius:4px;-moz-border-radius:4px;-ms-border-radius:4px;border-radius:4px;opacity:0;-webkit-transition:background-color 0.2s linear,opacity 0.2s linear;-moz-transition:background-color 0.2s linear,opacity 0.2s linear;-o-transition:background-color 0.2s linear,opacity 0.2s linear;transition:background-color 0.2s linear,opacity 0.2s linear;bottom:3px;height:8px}.ps-container>.ps-scrollbar-x-rail>.ps-scrollbar-x{position:absolute;background-color:#aaa;-webkit-border-radius:4px;-moz-border-radius:4px;-ms-border-radius:4px;border-radius:4px;-webkit-transition:background-color 0.2s linear;-moz-transition:background-color 0.2s linear;-o-transition:background-color 0.2s linear;transition:background-color 0.2s linear;bottom:0;height:8px}.ps-container>.ps-scrollbar-y-rail{display:none;position:absolute;-webkit-border-radius:4px;-moz-border-radius:4px;-ms-border-radius:4px;border-radius:4px;opacity:0;-webkit-transition:background-color 0.2s linear,opacity 0.2s linear;-moz-transition:background-color 0.2s linear,opacity 0.2s linear;-o-transition:background-color 0.2s linear,opacity 0.2s linear;transition:background-color 0.2s linear,opacity 0.2s linear;right:3px;width:8px}.ps-container>.ps-scrollbar-y-rail>.ps-scrollbar-y{position:absolute;background-color:#aaa;-webkit-border-radius:4px;-moz-border-radius:4px;-ms-border-radius:4px;border-radius:4px;-webkit-transition:background-color 0.2s linear;-moz-transition:background-color 0.2s linear;-o-transition:background-color 0.2s linear;transition:background-color 0.2s linear;right:0;width:8px}.ps-container:hover.ps-in-scrolling{pointer-events:none}.ps-container:hover.ps-in-scrolling.ps-x>.ps-scrollbar-x-rail{background-color:#eee;opacity:0.9}.ps-container:hover.ps-in-scrolling.ps-x>.ps-scrollbar-x-rail>.ps-scrollbar-x{background-color:#999}.ps-container:hover.ps-in-scrolling.ps-y>.ps-scrollbar-y-rail{background-color:#eee;opacity:0.9}.ps-container:hover.ps-in-scrolling.ps-y>.ps-scrollbar-y-rail>.ps-scrollbar-y{background-color:#999}.ps-container:hover>.ps-scrollbar-x-rail,.ps-container:hover>.ps-scrollbar-y-rail{opacity:0.6}.ps-container:hover>.ps-scrollbar-x-rail:hover{background-color:#eee;opacity:0.9}.ps-container:hover>.ps-scrollbar-x-rail:hover>.ps-scrollbar-x{background-color:#999}.ps-container:hover>.ps-scrollbar-y-rail:hover{background-color:#eee;opacity:0.9}.ps-container:hover>.ps-scrollbar-y-rail:hover>.ps-scrollbar-y{background-color:#999} diff --git a/view/templates/head.tpl b/view/templates/head.tpl index f2f2d3487a..17c459c4d8 100644 --- a/view/templates/head.tpl +++ b/view/templates/head.tpl @@ -6,6 +6,7 @@ + @@ -37,6 +38,7 @@ + From 20fbf670db15809fd01b155773aab38e6298f670 Mon Sep 17 00:00:00 2001 From: rabuzarus <> Date: Wed, 30 Dec 2015 00:26:50 +0100 Subject: [PATCH 002/242] photo aside widget for profile page --- include/features.php | 6 ++ include/photos.php | 142 +++++++++++++++++++++++++++++ mod/photos.php | 66 ++------------ mod/profile.php | 4 + view/global.css | 15 +++ view/templates/widget_photos.tpl | 18 ++++ view/theme/duepuntozero/style.css | 13 ++- view/theme/frost-mobile/style.css | 15 ++- view/theme/frost/style.css | 19 +++- view/theme/quattro/dark/style.css | 5 +- view/theme/quattro/green/style.css | 5 +- view/theme/quattro/lilac/style.css | 11 ++- view/theme/quattro/quattro.less | 1 + view/theme/smoothly/style.css | 9 ++ view/theme/vier/style.css | 6 ++ 15 files changed, 263 insertions(+), 72 deletions(-) create mode 100644 view/templates/widget_photos.tpl diff --git a/include/features.php b/include/features.php index 2639604576..8b3ad5d3f6 100644 --- a/include/features.php +++ b/include/features.php @@ -79,6 +79,12 @@ function get_features() { array('savedsearch', t('Saved Searches'), t('Save search terms for re-use'),false), ), + // Profile sidebar widgets + 'profile-widgets' => array( + t('Profile Sidebar Widgets'), + array('photos_widget', t('Show last Photos'), t('Show your last Photos on the Profile Page Sidebar'),false), + ), + // Network tabs 'net_tabs' => array( t('Network Tabs'), diff --git a/include/photos.php b/include/photos.php index 93a565b511..fed4ab10c1 100644 --- a/include/photos.php +++ b/include/photos.php @@ -4,6 +4,148 @@ * @brief Functions related to photo handling. */ + +/** + * @brief Get the permissions for the photos page + * + * @param int $owner_uid Owner of the photos page + * @param bool $community_page If it's an forum account + * + * @return array + *......'can_post' + *......'visitor' + *......'contact' + * 'remote_contact' + * .....'contact_id' + * 'groups' + */ +function photos_permissions($owner_uid, $community_page = 0) { + + $arr = array(); + + if((local_user()) && (local_user() == $owner_uid)) + $arr['can_post'] = true; + else { + if($community_page && remote_user()) { + if(is_array($_SESSION['remote'])) { + foreach($_SESSION['remote'] as $v) { + if($v['uid'] == $owner_uid) { + $arr['contact_id'] = $v['cid']; + break; + } + } + } + if($arr['contact_id']) { + + $r = q("SELECT `uid` FROM `contact` WHERE `blocked` = 0 AND `pending` = 0 AND `id` = %d AND `uid` = %d LIMIT 1", + intval($arr['contact_id']), + intval($owner_uid) + ); + if(count($r)) { + $arr['can_post'] = true; + $arr['contact'] = $r[0]; + $arr['remote_contact'] = true; + $arr['visitor'] = $cid; + } + } + } + } + + // perhaps they're visiting - but not a community page, so they wouldn't have write access + + if(remote_user() && (! $arr['visitor'])) { + $arr['contact_id'] = 0; + if(is_array($_SESSION['remote'])) { + foreach($_SESSION['remote'] as $v) { + if($v['uid'] == $owner_uid) { + $arr['contact_id'] = $v['cid']; + break; + } + } + } + if($arr['contact_id']) { + $arr['groups'] = init_groups_visitor($arr['contact_id']); + $r = q("SELECT * FROM `contact` WHERE `blocked` = 0 AND `pending` = 0 AND `id` = %d AND `uid` = %d LIMIT 1", + intval($arr['contact_id']), + intval($owner_uid) + ); + if(count($r)) { + $arr['contact'] = $r[0]; + $arr['remote_contact'] = true; + } + } + } + + if(! $arr['remote_contact']) { + if(local_user()) { + $arr['contact_id'] = $_SESSION['cid']; + $arr['contact'] = $a->contact; + } + } + + return $arr; +} + +/** + * @brief Construnct a widget with last uploaded photos + * + * It displays the last 9 photos + * + * @param array $profile_data + *......'profile_uid'...=> The user.id of the profile (owner of the hotos) + *......'nickname'......=> Nick of the owner of the profile + *......'page-flags'....=> Account type of the profile + * + * @return string + *......formatted html + * + * @template widget_photos.tpl + */ +function widget_photos($profile_data) { + + $community_page = (($profile_data['page-flags'] == PAGE_COMMUNITY) ? true : false); + $nickname = $profile_data['nickname']; + $owner_id = $profile_data['profile_uid']; + + $phototypes = Photo::supportedTypes(); + $photos_perms = photos_permissions($owner_id, $community_page); + + $sql_extra = permissions_sql($owner_id, $photos_perms['remote_contact'], $photos_perms['groups']); + + $r = q("SELECT `resource-id`, `id`, `filename`, `type`, max(`scale`) AS `scale` FROM `photo` + WHERE `uid` = %d AND `album` != '%s' AND `album` != '%s' AND `album` != '%s' + $sql_extra GROUP BY `resource-id` ORDER BY `created` DESC LIMIT 9", + intval($owner_id), + dbesc('Contact Photos'), + dbesc( t('Contact Photos')), + dbesc( t('Profile Photos')) + ); + + $photos = array(); + if(count($r)) { + foreach($r as $rr) { + $ext = $phototypes[$rr['type']]; + + $photos[] = array( + 'id' => $rr['id'], + 'src' => z_root() . '/photos/' . $nickname . '/image/' . $rr['resource-id'], + 'photo' => z_root() . '/photo/' . $rr['resource-id'] . '-' . ((($rr['scale']) == 6) ? 4 : $rr['scale']) . '.' . $ext, + 'alt_text' => $rr['filename'], + ); + } + + $tpl = get_markup_template('widget_photos.tpl'); + $o .= replace_macros($tpl, array( + '$title' => t('Photos'), + '$photos' => $photos, + '$photo_albums_page' => z_root() . '/photos/' . $nickname, + '$photo_albums_page_title' => t('Vist the Photo Albums'), + )); + + return $o; + } +} + function getGps($exifCoord, $hemi) { $degrees = count($exifCoord) > 0 ? gps2Num($exifCoord[0]) : 0; $minutes = count($exifCoord) > 1 ? gps2Num($exifCoord[1]) : 0; diff --git a/mod/photos.php b/mod/photos.php index a9dade6a81..cd2026c252 100644 --- a/mod/photos.php +++ b/mod/photos.php @@ -1023,63 +1023,13 @@ function photos_content(&$a) { $community_page = (($a->data['user']['page-flags'] == PAGE_COMMUNITY) ? true : false); - if((local_user()) && (local_user() == $owner_uid)) - $can_post = true; - else { - if($community_page && remote_user()) { - if(is_array($_SESSION['remote'])) { - foreach($_SESSION['remote'] as $v) { - if($v['uid'] == $owner_uid) { - $contact_id = $v['cid']; - break; - } - } - } - if($contact_id) { + // get the access rights for photos + $photos_perms = photos_permissions($owner_uid, $community_page); - $r = q("SELECT `uid` FROM `contact` WHERE `blocked` = 0 AND `pending` = 0 AND `id` = %d AND `uid` = %d LIMIT 1", - intval($contact_id), - intval($owner_uid) - ); - if(count($r)) { - $can_post = true; - $contact = $r[0]; - $remote_contact = true; - $visitor = $cid; - } - } - } - } - - // perhaps they're visiting - but not a community page, so they wouldn't have write access - - if(remote_user() && (! $visitor)) { - $contact_id = 0; - if(is_array($_SESSION['remote'])) { - foreach($_SESSION['remote'] as $v) { - if($v['uid'] == $owner_uid) { - $contact_id = $v['cid']; - break; - } - } - } - if($contact_id) { - $groups = init_groups_visitor($contact_id); - $r = q("SELECT * FROM `contact` WHERE `blocked` = 0 AND `pending` = 0 AND `id` = %d AND `uid` = %d LIMIT 1", - intval($contact_id), - intval($owner_uid) - ); - if(count($r)) { - $contact = $r[0]; - $remote_contact = true; - } - } - } - - if(! $remote_contact) { - if(local_user()) { - $contact_id = $_SESSION['cid']; - $contact = $a->contact; + // convert keys of the $photo_persms array into variables + if(count($photos_perms)) { + foreach ($photos_perms as $key => $value) { + ${$key} = $value; } } @@ -1088,7 +1038,7 @@ function photos_content(&$a) { return; } - $sql_extra = permissions_sql($owner_uid,$remote_contact,$groups); + $sql_extra = permissions_sql($owner_uid, $remote_contact, $groups); $o = ""; @@ -1842,7 +1792,7 @@ function photos_content(&$a) { $a->set_pager_itemspage(20); } - $r = q("SELECT `resource-id`, `id`, `filename`, type, `album`, max(`scale`) AS `scale` FROM `photo` + $r = q("SELECT `resource-id`, `id`, `filename`, `type`, `album`, max(`scale`) AS `scale` FROM `photo` WHERE `uid` = %d AND `album` != '%s' AND `album` != '%s' $sql_extra GROUP BY `resource-id` ORDER BY `created` DESC LIMIT %d , %d", intval($a->data['user']['uid']), diff --git a/mod/profile.php b/mod/profile.php index 26bd395230..0913573a83 100644 --- a/mod/profile.php +++ b/mod/profile.php @@ -181,6 +181,10 @@ function profile_content(&$a, $update = 0) { $commpage = (($a->profile['page-flags'] == PAGE_COMMUNITY) ? true : false); $commvisitor = (($commpage && $remote_contact == true) ? true : false); + if(feature_enabled($a->profile['profile_uid'],'photos_widget')) { + require_once('include/photos.php'); + $a->page['aside'] .= widget_photos($a->profile); + } $a->page['aside'] .= posted_date_widget($a->get_baseurl(true) . '/profile/' . $a->profile['nickname'],$a->profile['profile_uid'],true); $a->page['aside'] .= categories_widget($a->get_baseurl(true) . '/profile/' . $a->profile['nickname'],(x($category) ? xmlify($category) : '')); diff --git a/view/global.css b/view/global.css index 05940508ca..09168a52bd 100644 --- a/view/global.css +++ b/view/global.css @@ -321,3 +321,18 @@ ul.credits li { .p-addr { clear: both; } + +.widget-photo { + float: left; +} + +.widget-photo-link { + margin: 0 2px 2px 0; +} + +img.widget-photo-img { + width: 48px; + height: 48px; + object-fit: cover; + padding-right: 2px; +} diff --git a/view/templates/widget_photos.tpl b/view/templates/widget_photos.tpl new file mode 100644 index 0000000000..1e56c8df16 --- /dev/null +++ b/view/templates/widget_photos.tpl @@ -0,0 +1,18 @@ + + \ No newline at end of file diff --git a/view/theme/duepuntozero/style.css b/view/theme/duepuntozero/style.css index c004eb53d0..bfffeb2503 100644 --- a/view/theme/duepuntozero/style.css +++ b/view/theme/duepuntozero/style.css @@ -140,12 +140,12 @@ nav #banner #logo-text a:hover { text-decoration: none; } .nav-commlink, .nav-login-link { - display: block; - height: 15px; + display: block; + height: 15px; margin-top: 67px; margin-right: 2px; - //padding: 6px 10px; - padding: 6px 3px; + /* padding: 6px 10px; */ + padding: 6px 3px; float: left; bottom: 140px; border: 1px solid #babdb6; @@ -244,7 +244,7 @@ section { display:block; float:left; padding: 0.4em; - //margin-right: 1em; + /*margin-right: 1em; */ margin-right: 3px ; } .tab.active { @@ -2164,6 +2164,9 @@ aside input[type='text'] { } +.widget h3 a { + color: #000000; +} /*.photos { height: auto; diff --git a/view/theme/frost-mobile/style.css b/view/theme/frost-mobile/style.css index 400b23c10b..94e5120c01 100644 --- a/view/theme/frost-mobile/style.css +++ b/view/theme/frost-mobile/style.css @@ -2541,6 +2541,14 @@ a.mail-list-link { margin: 10px 0 10px; } +.widget-photo { + float: left; +} + +.widget-photo-link { + margin: 0 2px 2px 0; +} + #sidebar-group-list ul { list-style-type: none; } @@ -2626,12 +2634,15 @@ aside input[type='text'] { -webkit-border-radius:5px; border-radius:5px; } + +.widget h3 a { + color: #505050; +} + .widget.settings-widget { padding: 0; } - - /*.photos { height: auto; overflow: auto; diff --git a/view/theme/frost/style.css b/view/theme/frost/style.css index 3dd400c76b..3adf91ad67 100644 --- a/view/theme/frost/style.css +++ b/view/theme/frost/style.css @@ -2356,6 +2356,21 @@ a.mail-list-link { margin: 10px 0 10px; } +.widget-photo { + float: left; +} + +.widget-photo-link { + margin: 0 2px 2px 0; +} + +img.widget-photo-img { + width: 48px; + height: 48px; + object-fit: cover; + padding-right: 2px; +} + #sidebar-group-list ul { list-style-type: none; } @@ -2446,9 +2461,11 @@ aside input[type='text'] { -moz-border-radius:5px; -webkit-border-radius:5px; border-radius:5px; - } +.widget h3 a { + color: #505050; +} /*.photos { height: auto; diff --git a/view/theme/quattro/dark/style.css b/view/theme/quattro/dark/style.css index 847017ee5b..ebb9977416 100644 --- a/view/theme/quattro/dark/style.css +++ b/view/theme/quattro/dark/style.css @@ -463,7 +463,7 @@ a:hover { text-decoration: underline; } blockquote { - background: #FFFFFF; + background: #ffffff; padding: 1em; margin-left: 1em; border-left: 1em solid #e6e6e6; @@ -1007,6 +1007,9 @@ aside .posted-date-selector-months { padding: 0; margin: 2px; } +.widget h3 a { + color: #2d2d2d; +} .widget .action { opacity: 0.1; -webkit-transition: all 0.2s ease-in-out; diff --git a/view/theme/quattro/green/style.css b/view/theme/quattro/green/style.css index 4cfcb59273..5c2661e919 100644 --- a/view/theme/quattro/green/style.css +++ b/view/theme/quattro/green/style.css @@ -463,7 +463,7 @@ a:hover { text-decoration: underline; } blockquote { - background: #FFFFFF; + background: #ffffff; padding: 1em; margin-left: 1em; border-left: 1em solid #e6e6e6; @@ -1007,6 +1007,9 @@ aside .posted-date-selector-months { padding: 0; margin: 2px; } +.widget h3 a { + color: #2d2d2d; +} .widget .action { opacity: 0.1; -webkit-transition: all 0.2s ease-in-out; diff --git a/view/theme/quattro/lilac/style.css b/view/theme/quattro/lilac/style.css index 2ff7cfcb0c..32f1ccaf6a 100644 --- a/view/theme/quattro/lilac/style.css +++ b/view/theme/quattro/lilac/style.css @@ -420,7 +420,7 @@ body { font-family: Liberation Sans, helvetica, arial, clean, sans-serif; font-size: 11px; - background-color: #F6ECF9; + background-color: #f6ecf9; color: #2d2d2d; margin: 50px 0 0 0; display: table; @@ -463,7 +463,7 @@ a:hover { text-decoration: underline; } blockquote { - background: #FFFFFF; + background: #ffffff; padding: 1em; margin-left: 1em; border-left: 1em solid #e6e6e6; @@ -1007,6 +1007,9 @@ aside .posted-date-selector-months { padding: 0; margin: 2px; } +.widget h3 a { + color: #2d2d2d; +} .widget .action { opacity: 0.1; -webkit-transition: all 0.2s ease-in-out; @@ -1753,7 +1756,7 @@ span[id^="showmore-wrap"] { height: 20px; width: 500px; font-weight: bold; - border: 1px solid #F6ECF9; + border: 1px solid #f6ecf9; } #jot #jot-title:-webkit-input-placeholder { font-weight: normal; @@ -1780,7 +1783,7 @@ span[id^="showmore-wrap"] { margin: 0; height: 20px; width: 200px; - border: 1px solid #F6ECF9; + border: 1px solid #f6ecf9; } #jot #jot-category:hover { border: 1px solid #999999; diff --git a/view/theme/quattro/quattro.less b/view/theme/quattro/quattro.less index 681cfcc374..8822fc3ded 100644 --- a/view/theme/quattro/quattro.less +++ b/view/theme/quattro/quattro.less @@ -454,6 +454,7 @@ aside { margin-bottom: 2em; h3 { padding: 0; margin: 2px;} + h3 a { color: @BodyColor; } .action { .opaque(0.1); } input.action { .opaque(0.5); } &:hover .title .action { .opaque(1); } diff --git a/view/theme/smoothly/style.css b/view/theme/smoothly/style.css index b9f094932d..5123307493 100644 --- a/view/theme/smoothly/style.css +++ b/view/theme/smoothly/style.css @@ -1019,6 +1019,15 @@ ul .sidebar-group-li .icon { text-shadow: -1px 0px 0px #bdbdbd; } +.widget h3 a { + color: #626262; +} + +.widget h3 a:hover, .widget h3 a:focus { + color: #6da6c4; + text-decoration: none; +} + #connect-desc { margin-left: 10px; } diff --git a/view/theme/vier/style.css b/view/theme/vier/style.css index e53ac45f74..df503e273a 100644 --- a/view/theme/vier/style.css +++ b/view/theme/vier/style.css @@ -1141,6 +1141,12 @@ aside h4, right_aside h4 { padding: 0px; margin: 2px; } +.widget h3 a { + color: #737373; +} +.widget h3 a:hover { + color: black; +} .widget .action { opacity: 0.1; -webkit-transition: all 0.2s ease-in-out; From 3366e530cdd6ae2a7433a19a27dbe85bedabaea9 Mon Sep 17 00:00:00 2001 From: rabuzarus <> Date: Wed, 30 Dec 2015 00:37:24 +0100 Subject: [PATCH 003/242] photo aside widget: little polish --- include/features.php | 2 +- include/photos.php | 2 +- view/templates/widget_photos.tpl | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/include/features.php b/include/features.php index 8b3ad5d3f6..7dceaa4bc0 100644 --- a/include/features.php +++ b/include/features.php @@ -82,7 +82,7 @@ function get_features() { // Profile sidebar widgets 'profile-widgets' => array( t('Profile Sidebar Widgets'), - array('photos_widget', t('Show last Photos'), t('Show your last Photos on the Profile Page Sidebar'),false), + array('photos_widget', t('Show last Photos'), t('Show your last Photos in the Profile Page Sidebar'),false), ), // Network tabs diff --git a/include/photos.php b/include/photos.php index fed4ab10c1..3c40f11f8a 100644 --- a/include/photos.php +++ b/include/photos.php @@ -92,7 +92,7 @@ function photos_permissions($owner_uid, $community_page = 0) { * It displays the last 9 photos * * @param array $profile_data - *......'profile_uid'...=> The user.id of the profile (owner of the hotos) + *......'profile_uid'...=> The user.id of the profile (owner of the photos) *......'nickname'......=> Nick of the owner of the profile *......'page-flags'....=> Account type of the profile * diff --git a/view/templates/widget_photos.tpl b/view/templates/widget_photos.tpl index 1e56c8df16..abd403a172 100644 --- a/view/templates/widget_photos.tpl +++ b/view/templates/widget_photos.tpl @@ -15,4 +15,4 @@
- \ No newline at end of file + From f8256fc53b9188aa6da51fcb9800a85e39ac3409 Mon Sep 17 00:00:00 2001 From: rabuzarus <> Date: Wed, 30 Dec 2015 03:12:52 +0100 Subject: [PATCH 004/242] make perfect scrollbars work with quattro --- js/main.js | 1 + view/theme/quattro/dark/style.css | 5 ----- view/theme/quattro/green/style.css | 5 ----- view/theme/quattro/lilac/style.css | 5 ----- 4 files changed, 1 insertion(+), 15 deletions(-) diff --git a/js/main.js b/js/main.js index c27d743bc4..3a77fdd802 100644 --- a/js/main.js +++ b/js/main.js @@ -147,6 +147,7 @@ } else { last_popup_menu = menu; last_popup_button = parent; + $('#nav-notifications-menu').perfectScrollbar('update'); } return false; }); diff --git a/view/theme/quattro/dark/style.css b/view/theme/quattro/dark/style.css index 1b021687cd..a45584a700 100644 --- a/view/theme/quattro/dark/style.css +++ b/view/theme/quattro/dark/style.css @@ -544,7 +544,6 @@ header { margin: 0; padding: 0; /*width: 100%; height: 12px; */ - z-index: 110; color: #ffffff; } @@ -922,7 +921,6 @@ aside .posted-date-selector-months { overflow: auto; height: auto; /*.contact-block-div { width:60px; height: 60px; }*/ - } #contact-block .contact-block-h4 { float: left; @@ -1004,7 +1002,6 @@ aside .posted-date-selector-months { margin-bottom: 2em; /*.action .s10 { width: 10px; overflow: hidden; padding: 0;} .action .s16 { width: 16px; overflow: hidden; padding: 0;}*/ - } .widget h3 { padding: 0; @@ -1308,7 +1305,6 @@ section { height: 32px; margin-left: 16px; /*background: url(../../../images/icons/22/user.png) no-repeat center center;*/ - } .comment-edit-preview .contact-photo-menu-button { top: 15px !important; @@ -2241,7 +2237,6 @@ ul.tabs li .active { min-height: 22px; padding-top: 6px; /* a { display: block;}*/ - } #photo-caption { display: block; diff --git a/view/theme/quattro/green/style.css b/view/theme/quattro/green/style.css index 4c50fb35fa..e3463e289d 100644 --- a/view/theme/quattro/green/style.css +++ b/view/theme/quattro/green/style.css @@ -544,7 +544,6 @@ header { margin: 0; padding: 0; /*width: 100%; height: 12px; */ - z-index: 110; color: #ffffff; } @@ -922,7 +921,6 @@ aside .posted-date-selector-months { overflow: auto; height: auto; /*.contact-block-div { width:60px; height: 60px; }*/ - } #contact-block .contact-block-h4 { float: left; @@ -1004,7 +1002,6 @@ aside .posted-date-selector-months { margin-bottom: 2em; /*.action .s10 { width: 10px; overflow: hidden; padding: 0;} .action .s16 { width: 16px; overflow: hidden; padding: 0;}*/ - } .widget h3 { padding: 0; @@ -1308,7 +1305,6 @@ section { height: 32px; margin-left: 16px; /*background: url(../../../images/icons/22/user.png) no-repeat center center;*/ - } .comment-edit-preview .contact-photo-menu-button { top: 15px !important; @@ -2241,7 +2237,6 @@ ul.tabs li .active { min-height: 22px; padding-top: 6px; /* a { display: block;}*/ - } #photo-caption { display: block; diff --git a/view/theme/quattro/lilac/style.css b/view/theme/quattro/lilac/style.css index 7fb505dec5..750b3b995c 100644 --- a/view/theme/quattro/lilac/style.css +++ b/view/theme/quattro/lilac/style.css @@ -544,7 +544,6 @@ header { margin: 0; padding: 0; /*width: 100%; height: 12px; */ - z-index: 110; color: #ffffff; } @@ -922,7 +921,6 @@ aside .posted-date-selector-months { overflow: auto; height: auto; /*.contact-block-div { width:60px; height: 60px; }*/ - } #contact-block .contact-block-h4 { float: left; @@ -1004,7 +1002,6 @@ aside .posted-date-selector-months { margin-bottom: 2em; /*.action .s10 { width: 10px; overflow: hidden; padding: 0;} .action .s16 { width: 16px; overflow: hidden; padding: 0;}*/ - } .widget h3 { padding: 0; @@ -1308,7 +1305,6 @@ section { height: 32px; margin-left: 16px; /*background: url(../../../images/icons/22/user.png) no-repeat center center;*/ - } .comment-edit-preview .contact-photo-menu-button { top: 15px !important; @@ -2241,7 +2237,6 @@ ul.tabs li .active { min-height: 22px; padding-top: 6px; /* a { display: block;}*/ - } #photo-caption { display: block; From 8a51e470e73c8159a56cf9c2785346a552e887e1 Mon Sep 17 00:00:00 2001 From: rabuzarus <> Date: Wed, 30 Dec 2015 14:22:13 +0100 Subject: [PATCH 005/242] perfect scrollbars: added README --- library/perfect-scrollbar/README.md | 405 ++++++++++++++++++++++++++++ 1 file changed, 405 insertions(+) create mode 100644 library/perfect-scrollbar/README.md diff --git a/library/perfect-scrollbar/README.md b/library/perfect-scrollbar/README.md new file mode 100644 index 0000000000..b0e732827d --- /dev/null +++ b/library/perfect-scrollbar/README.md @@ -0,0 +1,405 @@ +# `perfect-scrollbar` + +Minimalistic but perfect custom scrollbar plugin + +[![Travis CI](https://travis-ci.org/noraesae/perfect-scrollbar.svg?branch=master)](https://travis-ci.org/noraesae/perfect-scrollbar) + +If you want information of old versions<0.6.0, please refer to +[an old documentation](https://github.com/noraesae/perfect-scrollbar/tree/0.5.9). + +## Why perfect-scrollbar? + +I was once working on a personal project, and trying to find the jQuery +scrollbar plugin that's *perfect*. But there was no *perfect* one. +That's why I decided to make one. + +perfect-scrollbar is minimalistic but *perfect* (for me, and maybe for most developers) +scrollbar plugin working with jQuery or vanilla JavaScript as well. + +I hope you love it! + +## [Demo](http://noraesae.github.com/perfect-scrollbar/) + +[It's on the GitHub Pages](http://noraesae.github.com/perfect-scrollbar/). + +## What does *perfect* mean? + +*perfect* means... + +* There should be no css change on any original element. +* The scrollbar should not affect the original design layout. +* The design of the scrollbar should be (nearly) fully customizable. +* If the size of the container or the content changes, the scrollbar + size and position should be able to change. +* *New!* It should work with vanilla JavaScript and major tools like + NPM or Browserify. + +## Then perfect-scrollbar is really *perfect*? + +* perfect-scrollbar has some requirements, but doesn't change or add + any style on original elements. +* perfect-scrollbar is designed not to have width or height. It's fixed + on the right and bottom side of the container. +* You can change nearly all css styles of the scrollbar. The scrollbar + design has no dependency on scripts. +* perfect-scrollbar supports an 'update' function. Whenever you need + to update the size or position of the scrollbar, just update. +* Additionally, perfect-scrollbar uses 'scrollTop' and 'scrollLeft', + not absolute positioning or something messy. +* perfect-scrollbar supports RTL perfectly on both WebKit and Gecko based browsers. + +It's cool, isn't it? + +## Install + +The best way to install and use perfect-scrollbar is with NPM. +It's registered on [npm](https://www.npmjs.org/package/perfect-scrollbar) as `perfect-scrollbar`. + +``` +$ npm install perfect-scrollbar +``` + +You can download the latest stable version with download links [here](http://noraesae.github.io/perfect-scrollbar/). +You also can find all releases on [Releases](https://github.com/noraesae/perfect-scrollbar/releases). + +If you want to use the development version of the plugin, use the +source files which are not minified. They're in the `src` directory. +The development version may be unstable, but some known bugs may +have been fixed. + +``` +$ git clone https://github.com/noraesae/perfect-scrollbar.git +$ cd perfect-scrollbar/src +$ npm install +$ gulp # will lint and build the source code. +``` + + +There is a Bower package for perfect-scrollbar as well. It is managed +under the [perfect-scrollbar-bower](https://github.com/noraesae/perfect-scrollbar-bower) +repository. The plugin is registered as `perfect-scrollbar`. + +``` +$ bower install perfect-scrollbar +``` + + +You can also load it from [cdnjs](http://cdnjs.com/). +It is registered as [`jquery.perfect-scrollbar`](http://www.cdnjs.com/libraries/jquery.perfect-scrollbar). + +## Requirements + +To make this plugin *perfect*, some requirements were unavoidable. +But, they're all very trivial and there is nothing to worry about. + +The following requirements should meet. + +* the container must have a 'position' css style. + +The following requirements are included in the basic CSS, but please +keep in mind when you'd like to change the CSS files. + +* the container must have an 'overflow:hidden' css style. +* the scrollbar's position must be 'absolute'. +* the scrollbar-x must have a 'bottom' css style, and the scrollbar-y + must have a 'right' css style. + +## How to use + +First of all, please check if the container element meets the +requirements. + +```html + + +``` + +I would recommend using the plugin with NPM and CommonJS module system +like Browserify. + +```javascript +var Ps = require('perfect-scrollbar'); +``` + +Or you can just load the script file as usual. + +```html + +``` + +To initialise the plugin, `Ps.initialize` is used. + +```javascript +var container = document.getElementById('container'); +Ps.initialize(container); +``` + +It can be initialised with optional parameters. + +```javascript +Ps.initialize(container, { + wheelSpeed: 2, + wheelPropagation: true, + minScrollbarLength: 20 +}); +``` + +If the size of your container or content changes, call `update`. + +```javascript +Ps.update(container); +``` + +If you want to destory the scrollbar, use `destroy`. + +```javascript +Ps.destroy(container); +``` + +If you want to scroll to somewhere, just use a `scrollTop` +property and update. + +```javascript +container.scrollTop = 0; +Ps.update(container); +``` + +You can also get information about how to use the plugin +from code in the `examples` directory of the source tree. + +## jQuery + +As you may already know, perfect-scrollbar was a jQuery plugin. +And it *is* as well. There's a jQuery adaptor and the plugin can +be used in the same way it used to be used before. + +I also recommend using NPM and CommonJS here, but it's not mandatory. + +```javascript +var $ = require('jquery'); +require('perfect-scrollbar/jquery')($); +``` + +For sure, you can just import a built script. + +```html + +``` + +After importing it, you can use the plugin in the usual way. + +```javascript +$('#container').perfectScrollbar(); // Initialize +$('#container').perfectScrollbar({ ... }); // with options +$('#container').perfectScrollbar('update'); // Update +$('#container').perfectScrollbar('destroy'); // Destroy +``` + +## RequireJS usage + +For RequireJS loader, no need to write shim, simply import two libs: + +```javascript +require.config({ + paths: { + perfectScrollbarJQuery: '.../perfect-scrollbar.jquery', + perfectScrollbar: '.../perfect-scrollbar', + } + ... +}) +``` + + +and load `perfectScrollbar` in the initialiser of your app: + +```javascript +// for vanilla JS: +window.Ps = require('perfectScrollbar'); + +// for jQuery: +require('perfectScrollbarJQuery'); +``` + + +## AngularJS + RequireJS usage + +With the require.config settings above, at the beginning of your app module +definition, you can have following code: + +```javascript +define([ + 'angular', + 'perfectScrollbar', + 'perfectScrollbarJquery' +], +function (angular) { + var myApp = angular.module('myApp', []) + .run(function() { + window.Ps = require('perfectScrollbar'); + require('perfectScrollbarJQuery'); + }) + return myApp; +}); +``` + +And initialise perfectScrollbar in a controller: + +```javascript +// by vanilla JS: +var container = document.getElementById('imgLoader'); +Ps.initialize(container); +Ps.update(container); + +// or by jQuery: +var imgLoader = $("#imgLoader") +imgLoader.perfectScrollbar(); +``` + +## Optional parameters + +perfect-scrollbar supports optional parameters. + +### wheelSpeed +The scroll speed applied to mousewheel event. +**Default: 1** + +### wheelPropagation +If this option is true, when the scroll reaches the end of the side, mousewheel event will be propagated to parent element. +**Default: false** + +### swipePropagation +If this option is true, when the scroll reaches the end of the side, touch scrolling will be propagated to parent element. +**Default: true** + +### minScrollbarLength +When set to an integer value, the thumb part of the scrollbar will not shrink below that number of pixels. +**Default: null** + +### maxScrollbarLength +When set to an integer value, the thumb part of the scrollbar will not expand over that number of pixels. +**Default: null** + +### useBothWheelAxes +When set to true, and only one (vertical or horizontal) scrollbar is visible then both vertical and horizontal scrolling will affect the scrollbar. +**Default: false** + +### useKeyboard +When set to true, the scroll works with arrow keys on the keyboard. The element is scrolled only when the mouse cursor hovers the element. +**Default: true** + +### suppressScrollX +When set to true, the scroll bar in X axis will not be available, regardless of the content width. +**Default: false** + +### suppressScrollY +When set to true, the scroll bar in Y axis will not be available, regardless of the content height. +**Default: false** + +### scrollXMarginOffset +The number of pixels the content width can surpass the container width without enabling the X axis scroll bar. Allows some "wiggle room" or "offset break", so that X axis scroll bar is not enabled just because of a few pixels. +**Default: 0** + +### scrollYMarginOffset +The number of pixels the content height can surpass the container height without enabling the Y axis scroll bar. Allows some "wiggle room" or "offset break", so that Y axis scroll bar is not enabled just because of a few pixels. +**Default: 0** + +### stopPropagationOnClick +When set to false, when clicking on a rail, the click event will be allowed to propagate. +**Default: true** + +### useSelectionScroll +When set to true, you can scroll the container by selecting text and move the cursor. +**Default: false** + +## Events + +perfect-scrollbar dispatches custom events. + +### ps-scroll-y +This event fires when the y-axis is scrolled in either direction. + +### ps-scroll-x +This event fires when the x-axis is scrolled in either direction. + +### ps-scroll-up +This event fires when scrolling upwards. + +### ps-scroll-down +This event fires when scrolling downwards. + +### ps-scroll-left +This event fires when scrolling to the left. + +### ps-scroll-right +This event fires when scrolling to the right. + +### ps-y-reach-start +This event fires when scrolling reaches the start of the y-axis. + +### ps-y-reach-end +This event fires when scrolling reaches the end of the y-axis (useful for infinite scroll). + +### ps-x-reach-start +This event fires when scrolling reaches the start of the x-axis. + +### ps-x-reach-end +This event fires when scrolling reaches the end of the x-axis. + +You can listen to these events either with vanilla JavaScript +```javascript +document.addEventListener('ps-scroll-x', function () { + // ... +}) +``` +or with jQuery +```javascript +$(document).on('ps-scroll-x', function () { + // ... +}) +``` + +## Contribution + +#### Please read [Contributing](https://github.com/noraesae/perfect-scrollbar/wiki/Contributing) in the wiki before making any contribution. + + +I *really* welcome contributions! Please feel free to fork and issue pull requests when... + +* You have a very nice idea to improve this plugin! +* You found a bug! +* You're good at English and can help my bad English! + +For IE problems, please refer to [IE Support](https://github.com/noraesae/perfect-scrollbar#ie-support). + +## IE Support + +The plugin would work in IEs >= IE9 (not well, though). + +**The patches to fix problems in IE<=8 won't be accepted.** + +When old IEs should be supported, please fork the project and +make patches personally. + +## Helpdesk + +If you have any idea to improve this project or any problem +using this, please feel free to upload an +[issue](https://github.com/noraesae/perfect-scrollbar/issues). + +For common problems there is a +[FAQ](https://github.com/noraesae/perfect-scrollbar/wiki/FAQ) wiki page. Please check the page before uploading an issue. + +## License + +The MIT License (MIT) Copyright (c) 2015 Hyunje Alex Jun and other contributors. + +Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions: + +The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. From 77a230342f3dd23be721580554979f80732f35e4 Mon Sep 17 00:00:00 2001 From: rabuzarus <> Date: Wed, 30 Dec 2015 16:26:57 +0100 Subject: [PATCH 006/242] perfect-scrollbar: added Source link to the lib --- library/perfect-scrollbar/perfect-scrollbar.jquery.js | 2 ++ 1 file changed, 2 insertions(+) diff --git a/library/perfect-scrollbar/perfect-scrollbar.jquery.js b/library/perfect-scrollbar/perfect-scrollbar.jquery.js index e872d8f30b..2bc3b2f939 100644 --- a/library/perfect-scrollbar/perfect-scrollbar.jquery.js +++ b/library/perfect-scrollbar/perfect-scrollbar.jquery.js @@ -2,6 +2,8 @@ (function e(t,n,r){function s(o,u){if(!n[o]){if(!t[o]){var a=typeof require=="function"&&require;if(!u&&a)return a(o,!0);if(i)return i(o,!0);var f=new Error("Cannot find module '"+o+"'");throw f.code="MODULE_NOT_FOUND",f}var l=n[o]={exports:{}};t[o][0].call(l.exports,function(e){var n=t[o][1][e];return s(n?n:e)},l,l.exports,e,t,n,r)}return n[o].exports}var i=typeof require=="function"&&require;for(var o=0;o Date: Sun, 3 Jan 2016 12:57:42 +0100 Subject: [PATCH 007/242] Typo in DE translations --- view/de/messages.po | 6 +++--- view/de/strings.php | 2 +- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/view/de/messages.po b/view/de/messages.po index d671c21a90..f209b453f1 100644 --- a/view/de/messages.po +++ b/view/de/messages.po @@ -24,7 +24,7 @@ # Sennewood , 2013 # Sennewood , 2012-2013 # silke m , 2015 -# bavatar , 2013-2015 +# bavatar , 2013-2016 # bavatar , 2011-2013 # zottel , 2011-2012 # tschlotfeldt , 2011 @@ -33,7 +33,7 @@ msgstr "" "Project-Id-Version: friendica\n" "Report-Msgid-Bugs-To: \n" "POT-Creation-Date: 2015-12-27 08:40+0100\n" -"PO-Revision-Date: 2015-12-31 06:29+0000\n" +"PO-Revision-Date: 2016-01-03 07:15+0000\n" "Last-Translator: bavatar \n" "Language-Team: German (http://www.transifex.com/Friendica/friendica/language/de/)\n" "MIME-Version: 1.0\n" @@ -2713,7 +2713,7 @@ msgstr "Maximale Tabellengröße (in MB) für die automatische Optimierung - Sta #: mod/admin.php:780 msgid "Minimum level of fragmentation" -msgstr "Minimales Fragmentationsgrad" +msgstr "Minimaler Fragmentationsgrad" #: mod/admin.php:780 msgid "" diff --git a/view/de/strings.php b/view/de/strings.php index 0c616cee2d..2a9a4afb8d 100644 --- a/view/de/strings.php +++ b/view/de/strings.php @@ -585,7 +585,7 @@ $a->strings["Maximum Load Average (Frontend)"] = "Maximum Load Average (Frontend $a->strings["Maximum system load before the frontend quits service - default 50."] = "Maximale Systemlast bevor Vordergrundprozesse pausiert werden - Standard 50."; $a->strings["Maximum table size for optimization"] = "Maximale Tabellengröße zur Optimierung"; $a->strings["Maximum table size (in MB) for the automatic optimization - default 100 MB. Enter -1 to disable it."] = "Maximale Tabellengröße (in MB) für die automatische Optimierung - Standard 100 MB. Gib -1 für Deaktivierung ein."; -$a->strings["Minimum level of fragmentation"] = "Minimales Fragmentationsgrad"; +$a->strings["Minimum level of fragmentation"] = "Minimaler Fragmentationsgrad"; $a->strings["Minimum fragmenation level to start the automatic optimization - default value is 30%."] = "Minimales Fragmentationsgrad von Datenbanktabellen um die automatische Optimierung einzuleiten - Standardwert ist 30%"; $a->strings["Periodical check of global contacts"] = "Regelmäßig globale Kontakte überprüfen"; $a->strings["If enabled, the global contacts are checked periodically for missing or outdated data and the vitality of the contacts and servers."] = "Wenn diese Option aktiviert ist, werden die globalen Kontakte regelmäßig auf fehlende oder veraltete Daten sowie auf Erreichbarkeit des Kontakts und des Servers überprüft."; From 1ab022f4df94f4526e88cb20703dda64bd60c889 Mon Sep 17 00:00:00 2001 From: rabuzarus <> Date: Sun, 3 Jan 2016 15:45:02 +0100 Subject: [PATCH 008/242] photos aside widget: move dependencies to the header --- mod/profile.php | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) diff --git a/mod/profile.php b/mod/profile.php index 0913573a83..83e3e37958 100644 --- a/mod/profile.php +++ b/mod/profile.php @@ -1,6 +1,7 @@ argc > 1) $which = $a->argv[1]; else { - $r = q("select nickname from user where blocked = 0 and account_expired = 0 and account_removed = 0 and verified = 1 order by rand() limit 1"); + $r = q("SELECT `nickname` FROM `user` WHERE `blocked` = 0 AND `account_expired` = 0 AND `account_removed` = 0 AND `verified` = 1 ORDER BY RAND() LIMIT 1"); if(count($r)) { goaway($a->get_baseurl() . '/profile/' . $r[0]['nickname']); } @@ -181,10 +182,9 @@ function profile_content(&$a, $update = 0) { $commpage = (($a->profile['page-flags'] == PAGE_COMMUNITY) ? true : false); $commvisitor = (($commpage && $remote_contact == true) ? true : false); - if(feature_enabled($a->profile['profile_uid'],'photos_widget')) { - require_once('include/photos.php'); + if(feature_enabled($a->profile['profile_uid'],'photos_widget')) $a->page['aside'] .= widget_photos($a->profile); - } + $a->page['aside'] .= posted_date_widget($a->get_baseurl(true) . '/profile/' . $a->profile['nickname'],$a->profile['profile_uid'],true); $a->page['aside'] .= categories_widget($a->get_baseurl(true) . '/profile/' . $a->profile['nickname'],(x($category) ? xmlify($category) : '')); @@ -225,9 +225,9 @@ function profile_content(&$a, $update = 0) { FROM `item` INNER JOIN `contact` ON `contact`.`id` = `item`.`contact-id` AND `contact`.`blocked` = 0 AND `contact`.`pending` = 0 WHERE `item`.`uid` = %d AND `item`.`visible` = 1 AND - (`item`.`deleted` = 0 OR item.verb = '" . ACTIVITY_LIKE ."' - OR item.verb = '" . ACTIVITY_DISLIKE . "' OR item.verb = '" . ACTIVITY_ATTEND . "' - OR item.verb = '" . ACTIVITY_ATTENDNO . "' OR item.verb = '" . ACTIVITY_ATTENDMAYBE . "') + (`item`.`deleted` = 0 OR `item`.`verb` = '" . ACTIVITY_LIKE ."' + OR `item`.`verb` = '" . ACTIVITY_DISLIKE . "' OR `item`.`verb` = '" . ACTIVITY_ATTEND . "' + OR `item`.`verb` = '" . ACTIVITY_ATTENDNO . "' OR `item`.`verb` = '" . ACTIVITY_ATTENDMAYBE . "') AND `item`.`moderated` = 0 and `item`.`unseen` = 1 AND `item`.`wall` = 1 $sql_extra From 29c671bb22b51f2ee703bfa3f662d4b1b6c6f4aa Mon Sep 17 00:00:00 2001 From: rabuzarus <> Date: Sun, 3 Jan 2016 16:09:05 +0100 Subject: [PATCH 009/242] photos aside widget:permissions cleanup --- mod/photos.php | 63 ++++++++++++++++++++++---------------------------- 1 file changed, 28 insertions(+), 35 deletions(-) diff --git a/mod/photos.php b/mod/photos.php index cd2026c252..1985875f18 100644 --- a/mod/photos.php +++ b/mod/photos.php @@ -1013,11 +1013,11 @@ function photos_content(&$a) { // Setup permissions structures // - $can_post = false; - $visitor = 0; - $contact = null; - $remote_contact = false; - $contact_id = 0; + $photos_perms['can_post'] = false; + $photos_perms['visitor'] = 0; + $photos_perms['contact'] = null; + $photos_perms['remote_contact'] = false; + $photos_perms['contact_id'] = 0; $owner_uid = $a->data['user']['uid']; @@ -1026,19 +1026,12 @@ function photos_content(&$a) { // get the access rights for photos $photos_perms = photos_permissions($owner_uid, $community_page); - // convert keys of the $photo_persms array into variables - if(count($photos_perms)) { - foreach ($photos_perms as $key => $value) { - ${$key} = $value; - } - } - - if($a->data['user']['hidewall'] && (local_user() != $owner_uid) && (! $remote_contact)) { + if($a->data['user']['hidewall'] && (local_user() != $owner_uid) && (! $photos_perms['remote_contact'])) { notice( t('Access to this item is restricted.') . EOL); return; } - $sql_extra = permissions_sql($owner_uid, $remote_contact, $groups); + $sql_extra = permissions_sql($owner_uid, $photos_perms['remote_contact'], $photos_perms['groups']); $o = ""; @@ -1051,7 +1044,7 @@ function photos_content(&$a) { */ if($datatype === 'upload') { - if(! ($can_post)) { + if(! ($photos_perms['can_post'])) { notice( t('Permission denied.')); return; } @@ -1121,11 +1114,11 @@ function photos_content(&$a) { if($a->theme['template_engine'] === 'internal') { $albumselect_e = template_escape($albumselect); - $aclselect_e = (($visitor) ? '' : template_escape(populate_acl($a->user))); + $aclselect_e = (($photos_perms['visitor']) ? '' : template_escape(populate_acl($a->user))); } else { $albumselect_e = $albumselect; - $aclselect_e = (($visitor) ? '' : populate_acl($a->user)); + $aclselect_e = (($photos_perms['visitor']) ? '' : populate_acl($a->user)); } $o .= replace_macros($tpl,array( @@ -1193,7 +1186,7 @@ function photos_content(&$a) { //edit album name if($cmd === 'edit') { if(($album !== t('Profile Photos')) && ($album !== 'Contact Photos') && ($album !== t('Contact Photos'))) { - if($can_post) { + if($photos_perms['can_post']) { $edit_tpl = get_markup_template('album_edit.tpl'); if($a->theme['template_engine'] === 'internal') { @@ -1216,7 +1209,7 @@ function photos_content(&$a) { } else { if(($album !== t('Profile Photos')) && ($album !== 'Contact Photos') && ($album !== t('Contact Photos'))) { - if($can_post) { + if($photos_perms['can_post']) { $edit = array(t('Edit Album'), $a->get_baseurl() . '/photos/' . $a->data['user']['nickname'] . '/album/' . bin2hex($album) . '/edit'); } } @@ -1266,7 +1259,7 @@ function photos_content(&$a) { $o .= replace_macros($tpl, array( '$photos' => $photos, '$album' => $album, - '$can_post' => $can_post, + '$can_post' => $photos_perms['can_post'], '$upload' => array(t('Upload New Photos'), $a->get_baseurl() . '/photos/' . $a->data['user']['nickname'] . '/upload/' . bin2hex($album)), '$order' => $order, '$edit' => $edit @@ -1333,7 +1326,7 @@ function photos_content(&$a) { break; } } - $edit_suffix = ((($cmd === 'edit') && ($can_post)) ? '/edit' : ''); + $edit_suffix = ((($cmd === 'edit') && ($photos_perms['can_post'])) ? '/edit' : ''); $prevlink = $a->get_baseurl() . '/photos/' . $a->data['user']['nickname'] . '/image/' . $prvnxt[$prv]['resource-id'] . $edit_suffix . (($_GET['order'] === 'posted') ? '?f=&order=posted' : ''); $nextlink = $a->get_baseurl() . '/photos/' . $a->data['user']['nickname'] . '/image/' . $prvnxt[$nxt]['resource-id'] . $edit_suffix . (($_GET['order'] === 'posted') ? '?f=&order=posted' : ''); } @@ -1356,7 +1349,7 @@ function photos_content(&$a) { $tools = Null; $lock = Null; - if($can_post && ($ph[0]['uid'] == $owner_uid)) { + if($photos_perms['can_post'] && ($ph[0]['uid'] == $owner_uid)) { $tools = array( 'edit' => array($a->get_baseurl() . '/photos/' . $a->data['user']['nickname'] . '/image/' . $datum . (($cmd === 'edit') ? '' : '/edit'), (($cmd === 'edit') ? t('View photo') : t('Edit photo'))), 'profile'=>array($a->get_baseurl() . '/profile_photo/use/'.$ph[0]['resource-id'], t('Use as profile photo')), @@ -1479,7 +1472,7 @@ function photos_content(&$a) { $edit = Null; - if(($cmd === 'edit') && ($can_post)) { + if(($cmd === 'edit') && ($photos_perms['can_post'])) { $edit_tpl = get_markup_template('photo_edit.tpl'); // Private/public post links for the non-JS ACL form @@ -1551,7 +1544,7 @@ function photos_content(&$a) { $likebuttons = ''; - if($can_post || can_write_wall($a,$owner_uid)) { + if($photos_perms['can_post'] || can_write_wall($a,$owner_uid)) { $likebuttons = replace_macros($like_tpl,array( '$id' => $link_item['id'], '$likethis' => t("I like this \x28toggle\x29"), @@ -1564,7 +1557,7 @@ function photos_content(&$a) { $comments = ''; if(! count($r)) { - if($can_post || can_write_wall($a,$owner_uid)) { + if($photos_perms['can_post'] || can_write_wall($a,$owner_uid)) { if($link_item['last-child']) { $comments .= replace_macros($cmnt_tpl,array( '$return_path' => '', @@ -1573,9 +1566,9 @@ function photos_content(&$a) { '$id' => $link_item['id'], '$parent' => $link_item['id'], '$profile_uid' => $owner_uid, - '$mylink' => $contact['url'], + '$mylink' => $photos_perms['contact']['url'], '$mytitle' => t('This is you'), - '$myphoto' => $contact['thumb'], + '$myphoto' => $photos_perms['contact']['thumb'], '$comment' => t('Comment'), '$submit' => t('Submit'), '$preview' => t('Preview'), @@ -1612,7 +1605,7 @@ function photos_content(&$a) { - if($can_post || can_write_wall($a,$owner_uid)) { + if($photos_perms['can_post'] || can_write_wall($a,$owner_uid)) { if($link_item['last-child']) { $comments .= replace_macros($cmnt_tpl,array( '$return_path' => '', @@ -1621,9 +1614,9 @@ function photos_content(&$a) { '$id' => $link_item['id'], '$parent' => $link_item['id'], '$profile_uid' => $owner_uid, - '$mylink' => $contact['url'], + '$mylink' => $photos_perms['contact']['url'], '$mytitle' => t('This is you'), - '$myphoto' => $contact['thumb'], + '$myphoto' => $photos_perms['contact']['thumb'], '$comment' => t('Comment'), '$submit' => t('Submit'), '$preview' => t('Preview'), @@ -1665,7 +1658,7 @@ function photos_content(&$a) { - $dropping = (($item['contact-id'] == $contact_id) || ($item['uid'] == local_user())); + $dropping = (($item['contact-id'] == $photos_perms['contact_id']) || ($item['uid'] == local_user())); $drop = array( 'dropping' => $dropping, 'pagedrop' => false, @@ -1699,7 +1692,7 @@ function photos_content(&$a) { '$comment' => $comment )); - if($can_post || can_write_wall($a,$owner_uid)) { + if($photos_perms['can_post'] || can_write_wall($a,$owner_uid)) { if($item['last-child']) { $comments .= replace_macros($cmnt_tpl,array( @@ -1709,9 +1702,9 @@ function photos_content(&$a) { '$id' => $item['item_id'], '$parent' => $item['parent'], '$profile_uid' => $owner_uid, - '$mylink' => $contact['url'], + '$mylink' => $photos_perms['contact']['url'], '$mytitle' => t('This is you'), - '$myphoto' => $contact['thumb'], + '$myphoto' => $photos_perms['contact']['thumb'], '$comment' => t('Comment'), '$submit' => t('Submit'), '$preview' => t('Preview'), @@ -1847,7 +1840,7 @@ function photos_content(&$a) { $tpl = get_markup_template('photos_recent.tpl'); $o .= replace_macros($tpl, array( '$title' => t('Recent Photos'), - '$can_post' => $can_post, + '$can_post' => $photos_perms['can_post'], '$upload' => array(t('Upload New Photos'), $a->get_baseurl().'/photos/'.$a->data['user']['nickname'].'/upload'), '$photos' => $photos, )); From 75ed2f830d14ca6d45d18e5d790db7bc58687ead Mon Sep 17 00:00:00 2001 From: Tobias Diekershoff Date: Sun, 3 Jan 2016 19:15:13 +0100 Subject: [PATCH 010/242] moved include Scape to top of the file --- mod/dfrn_request.php | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/mod/dfrn_request.php b/mod/dfrn_request.php index 99b933625e..2741ad59b4 100644 --- a/mod/dfrn_request.php +++ b/mod/dfrn_request.php @@ -10,6 +10,7 @@ */ require_once('include/enotify.php'); +require_once('include/Scrape.php'); if(! function_exists('dfrn_request_init')) { function dfrn_request_init(&$a) { @@ -112,8 +113,6 @@ function dfrn_request_post(&$a) { * Scrape the other site's profile page to pick up the dfrn links, key, fn, and photo */ - require_once('include/Scrape.php'); - $parms = scrape_dfrn($dfrn_url); if(! count($parms)) { From fcf7a791f1979b77a64275f63d0b0b3602fb1d36 Mon Sep 17 00:00:00 2001 From: fabrixxm Date: Mon, 4 Jan 2016 11:46:19 +0100 Subject: [PATCH 011/242] Revert "Merge pull request #2223 from rabuzarus/2912_photo_widget" This reverts commit 83e54f70d3204525ba16ea3faf5f17cd001fbc9e, reversing changes made to ecf576bdd0b801d33f3ccbc8d908729be47c3e7f. --- include/features.php | 6 -- include/photos.php | 142 ----------------------------- mod/photos.php | 119 +++++++++++++++++------- mod/profile.php | 12 +-- view/global.css | 15 --- view/templates/widget_photos.tpl | 18 ---- view/theme/duepuntozero/style.css | 13 +-- view/theme/frost-mobile/style.css | 15 +-- view/theme/frost/style.css | 19 +--- view/theme/quattro/dark/style.css | 5 +- view/theme/quattro/green/style.css | 5 +- view/theme/quattro/lilac/style.css | 11 +-- view/theme/quattro/quattro.less | 1 - view/theme/smoothly/style.css | 9 -- view/theme/vier/style.css | 6 -- 15 files changed, 106 insertions(+), 290 deletions(-) delete mode 100644 view/templates/widget_photos.tpl diff --git a/include/features.php b/include/features.php index 7dceaa4bc0..2639604576 100644 --- a/include/features.php +++ b/include/features.php @@ -79,12 +79,6 @@ function get_features() { array('savedsearch', t('Saved Searches'), t('Save search terms for re-use'),false), ), - // Profile sidebar widgets - 'profile-widgets' => array( - t('Profile Sidebar Widgets'), - array('photos_widget', t('Show last Photos'), t('Show your last Photos in the Profile Page Sidebar'),false), - ), - // Network tabs 'net_tabs' => array( t('Network Tabs'), diff --git a/include/photos.php b/include/photos.php index 3c40f11f8a..93a565b511 100644 --- a/include/photos.php +++ b/include/photos.php @@ -4,148 +4,6 @@ * @brief Functions related to photo handling. */ - -/** - * @brief Get the permissions for the photos page - * - * @param int $owner_uid Owner of the photos page - * @param bool $community_page If it's an forum account - * - * @return array - *......'can_post' - *......'visitor' - *......'contact' - * 'remote_contact' - * .....'contact_id' - * 'groups' - */ -function photos_permissions($owner_uid, $community_page = 0) { - - $arr = array(); - - if((local_user()) && (local_user() == $owner_uid)) - $arr['can_post'] = true; - else { - if($community_page && remote_user()) { - if(is_array($_SESSION['remote'])) { - foreach($_SESSION['remote'] as $v) { - if($v['uid'] == $owner_uid) { - $arr['contact_id'] = $v['cid']; - break; - } - } - } - if($arr['contact_id']) { - - $r = q("SELECT `uid` FROM `contact` WHERE `blocked` = 0 AND `pending` = 0 AND `id` = %d AND `uid` = %d LIMIT 1", - intval($arr['contact_id']), - intval($owner_uid) - ); - if(count($r)) { - $arr['can_post'] = true; - $arr['contact'] = $r[0]; - $arr['remote_contact'] = true; - $arr['visitor'] = $cid; - } - } - } - } - - // perhaps they're visiting - but not a community page, so they wouldn't have write access - - if(remote_user() && (! $arr['visitor'])) { - $arr['contact_id'] = 0; - if(is_array($_SESSION['remote'])) { - foreach($_SESSION['remote'] as $v) { - if($v['uid'] == $owner_uid) { - $arr['contact_id'] = $v['cid']; - break; - } - } - } - if($arr['contact_id']) { - $arr['groups'] = init_groups_visitor($arr['contact_id']); - $r = q("SELECT * FROM `contact` WHERE `blocked` = 0 AND `pending` = 0 AND `id` = %d AND `uid` = %d LIMIT 1", - intval($arr['contact_id']), - intval($owner_uid) - ); - if(count($r)) { - $arr['contact'] = $r[0]; - $arr['remote_contact'] = true; - } - } - } - - if(! $arr['remote_contact']) { - if(local_user()) { - $arr['contact_id'] = $_SESSION['cid']; - $arr['contact'] = $a->contact; - } - } - - return $arr; -} - -/** - * @brief Construnct a widget with last uploaded photos - * - * It displays the last 9 photos - * - * @param array $profile_data - *......'profile_uid'...=> The user.id of the profile (owner of the photos) - *......'nickname'......=> Nick of the owner of the profile - *......'page-flags'....=> Account type of the profile - * - * @return string - *......formatted html - * - * @template widget_photos.tpl - */ -function widget_photos($profile_data) { - - $community_page = (($profile_data['page-flags'] == PAGE_COMMUNITY) ? true : false); - $nickname = $profile_data['nickname']; - $owner_id = $profile_data['profile_uid']; - - $phototypes = Photo::supportedTypes(); - $photos_perms = photos_permissions($owner_id, $community_page); - - $sql_extra = permissions_sql($owner_id, $photos_perms['remote_contact'], $photos_perms['groups']); - - $r = q("SELECT `resource-id`, `id`, `filename`, `type`, max(`scale`) AS `scale` FROM `photo` - WHERE `uid` = %d AND `album` != '%s' AND `album` != '%s' AND `album` != '%s' - $sql_extra GROUP BY `resource-id` ORDER BY `created` DESC LIMIT 9", - intval($owner_id), - dbesc('Contact Photos'), - dbesc( t('Contact Photos')), - dbesc( t('Profile Photos')) - ); - - $photos = array(); - if(count($r)) { - foreach($r as $rr) { - $ext = $phototypes[$rr['type']]; - - $photos[] = array( - 'id' => $rr['id'], - 'src' => z_root() . '/photos/' . $nickname . '/image/' . $rr['resource-id'], - 'photo' => z_root() . '/photo/' . $rr['resource-id'] . '-' . ((($rr['scale']) == 6) ? 4 : $rr['scale']) . '.' . $ext, - 'alt_text' => $rr['filename'], - ); - } - - $tpl = get_markup_template('widget_photos.tpl'); - $o .= replace_macros($tpl, array( - '$title' => t('Photos'), - '$photos' => $photos, - '$photo_albums_page' => z_root() . '/photos/' . $nickname, - '$photo_albums_page_title' => t('Vist the Photo Albums'), - )); - - return $o; - } -} - function getGps($exifCoord, $hemi) { $degrees = count($exifCoord) > 0 ? gps2Num($exifCoord[0]) : 0; $minutes = count($exifCoord) > 1 ? gps2Num($exifCoord[1]) : 0; diff --git a/mod/photos.php b/mod/photos.php index 1985875f18..a9dade6a81 100644 --- a/mod/photos.php +++ b/mod/photos.php @@ -1013,25 +1013,82 @@ function photos_content(&$a) { // Setup permissions structures // - $photos_perms['can_post'] = false; - $photos_perms['visitor'] = 0; - $photos_perms['contact'] = null; - $photos_perms['remote_contact'] = false; - $photos_perms['contact_id'] = 0; + $can_post = false; + $visitor = 0; + $contact = null; + $remote_contact = false; + $contact_id = 0; $owner_uid = $a->data['user']['uid']; $community_page = (($a->data['user']['page-flags'] == PAGE_COMMUNITY) ? true : false); - // get the access rights for photos - $photos_perms = photos_permissions($owner_uid, $community_page); + if((local_user()) && (local_user() == $owner_uid)) + $can_post = true; + else { + if($community_page && remote_user()) { + if(is_array($_SESSION['remote'])) { + foreach($_SESSION['remote'] as $v) { + if($v['uid'] == $owner_uid) { + $contact_id = $v['cid']; + break; + } + } + } + if($contact_id) { - if($a->data['user']['hidewall'] && (local_user() != $owner_uid) && (! $photos_perms['remote_contact'])) { + $r = q("SELECT `uid` FROM `contact` WHERE `blocked` = 0 AND `pending` = 0 AND `id` = %d AND `uid` = %d LIMIT 1", + intval($contact_id), + intval($owner_uid) + ); + if(count($r)) { + $can_post = true; + $contact = $r[0]; + $remote_contact = true; + $visitor = $cid; + } + } + } + } + + // perhaps they're visiting - but not a community page, so they wouldn't have write access + + if(remote_user() && (! $visitor)) { + $contact_id = 0; + if(is_array($_SESSION['remote'])) { + foreach($_SESSION['remote'] as $v) { + if($v['uid'] == $owner_uid) { + $contact_id = $v['cid']; + break; + } + } + } + if($contact_id) { + $groups = init_groups_visitor($contact_id); + $r = q("SELECT * FROM `contact` WHERE `blocked` = 0 AND `pending` = 0 AND `id` = %d AND `uid` = %d LIMIT 1", + intval($contact_id), + intval($owner_uid) + ); + if(count($r)) { + $contact = $r[0]; + $remote_contact = true; + } + } + } + + if(! $remote_contact) { + if(local_user()) { + $contact_id = $_SESSION['cid']; + $contact = $a->contact; + } + } + + if($a->data['user']['hidewall'] && (local_user() != $owner_uid) && (! $remote_contact)) { notice( t('Access to this item is restricted.') . EOL); return; } - $sql_extra = permissions_sql($owner_uid, $photos_perms['remote_contact'], $photos_perms['groups']); + $sql_extra = permissions_sql($owner_uid,$remote_contact,$groups); $o = ""; @@ -1044,7 +1101,7 @@ function photos_content(&$a) { */ if($datatype === 'upload') { - if(! ($photos_perms['can_post'])) { + if(! ($can_post)) { notice( t('Permission denied.')); return; } @@ -1114,11 +1171,11 @@ function photos_content(&$a) { if($a->theme['template_engine'] === 'internal') { $albumselect_e = template_escape($albumselect); - $aclselect_e = (($photos_perms['visitor']) ? '' : template_escape(populate_acl($a->user))); + $aclselect_e = (($visitor) ? '' : template_escape(populate_acl($a->user))); } else { $albumselect_e = $albumselect; - $aclselect_e = (($photos_perms['visitor']) ? '' : populate_acl($a->user)); + $aclselect_e = (($visitor) ? '' : populate_acl($a->user)); } $o .= replace_macros($tpl,array( @@ -1186,7 +1243,7 @@ function photos_content(&$a) { //edit album name if($cmd === 'edit') { if(($album !== t('Profile Photos')) && ($album !== 'Contact Photos') && ($album !== t('Contact Photos'))) { - if($photos_perms['can_post']) { + if($can_post) { $edit_tpl = get_markup_template('album_edit.tpl'); if($a->theme['template_engine'] === 'internal') { @@ -1209,7 +1266,7 @@ function photos_content(&$a) { } else { if(($album !== t('Profile Photos')) && ($album !== 'Contact Photos') && ($album !== t('Contact Photos'))) { - if($photos_perms['can_post']) { + if($can_post) { $edit = array(t('Edit Album'), $a->get_baseurl() . '/photos/' . $a->data['user']['nickname'] . '/album/' . bin2hex($album) . '/edit'); } } @@ -1259,7 +1316,7 @@ function photos_content(&$a) { $o .= replace_macros($tpl, array( '$photos' => $photos, '$album' => $album, - '$can_post' => $photos_perms['can_post'], + '$can_post' => $can_post, '$upload' => array(t('Upload New Photos'), $a->get_baseurl() . '/photos/' . $a->data['user']['nickname'] . '/upload/' . bin2hex($album)), '$order' => $order, '$edit' => $edit @@ -1326,7 +1383,7 @@ function photos_content(&$a) { break; } } - $edit_suffix = ((($cmd === 'edit') && ($photos_perms['can_post'])) ? '/edit' : ''); + $edit_suffix = ((($cmd === 'edit') && ($can_post)) ? '/edit' : ''); $prevlink = $a->get_baseurl() . '/photos/' . $a->data['user']['nickname'] . '/image/' . $prvnxt[$prv]['resource-id'] . $edit_suffix . (($_GET['order'] === 'posted') ? '?f=&order=posted' : ''); $nextlink = $a->get_baseurl() . '/photos/' . $a->data['user']['nickname'] . '/image/' . $prvnxt[$nxt]['resource-id'] . $edit_suffix . (($_GET['order'] === 'posted') ? '?f=&order=posted' : ''); } @@ -1349,7 +1406,7 @@ function photos_content(&$a) { $tools = Null; $lock = Null; - if($photos_perms['can_post'] && ($ph[0]['uid'] == $owner_uid)) { + if($can_post && ($ph[0]['uid'] == $owner_uid)) { $tools = array( 'edit' => array($a->get_baseurl() . '/photos/' . $a->data['user']['nickname'] . '/image/' . $datum . (($cmd === 'edit') ? '' : '/edit'), (($cmd === 'edit') ? t('View photo') : t('Edit photo'))), 'profile'=>array($a->get_baseurl() . '/profile_photo/use/'.$ph[0]['resource-id'], t('Use as profile photo')), @@ -1472,7 +1529,7 @@ function photos_content(&$a) { $edit = Null; - if(($cmd === 'edit') && ($photos_perms['can_post'])) { + if(($cmd === 'edit') && ($can_post)) { $edit_tpl = get_markup_template('photo_edit.tpl'); // Private/public post links for the non-JS ACL form @@ -1544,7 +1601,7 @@ function photos_content(&$a) { $likebuttons = ''; - if($photos_perms['can_post'] || can_write_wall($a,$owner_uid)) { + if($can_post || can_write_wall($a,$owner_uid)) { $likebuttons = replace_macros($like_tpl,array( '$id' => $link_item['id'], '$likethis' => t("I like this \x28toggle\x29"), @@ -1557,7 +1614,7 @@ function photos_content(&$a) { $comments = ''; if(! count($r)) { - if($photos_perms['can_post'] || can_write_wall($a,$owner_uid)) { + if($can_post || can_write_wall($a,$owner_uid)) { if($link_item['last-child']) { $comments .= replace_macros($cmnt_tpl,array( '$return_path' => '', @@ -1566,9 +1623,9 @@ function photos_content(&$a) { '$id' => $link_item['id'], '$parent' => $link_item['id'], '$profile_uid' => $owner_uid, - '$mylink' => $photos_perms['contact']['url'], + '$mylink' => $contact['url'], '$mytitle' => t('This is you'), - '$myphoto' => $photos_perms['contact']['thumb'], + '$myphoto' => $contact['thumb'], '$comment' => t('Comment'), '$submit' => t('Submit'), '$preview' => t('Preview'), @@ -1605,7 +1662,7 @@ function photos_content(&$a) { - if($photos_perms['can_post'] || can_write_wall($a,$owner_uid)) { + if($can_post || can_write_wall($a,$owner_uid)) { if($link_item['last-child']) { $comments .= replace_macros($cmnt_tpl,array( '$return_path' => '', @@ -1614,9 +1671,9 @@ function photos_content(&$a) { '$id' => $link_item['id'], '$parent' => $link_item['id'], '$profile_uid' => $owner_uid, - '$mylink' => $photos_perms['contact']['url'], + '$mylink' => $contact['url'], '$mytitle' => t('This is you'), - '$myphoto' => $photos_perms['contact']['thumb'], + '$myphoto' => $contact['thumb'], '$comment' => t('Comment'), '$submit' => t('Submit'), '$preview' => t('Preview'), @@ -1658,7 +1715,7 @@ function photos_content(&$a) { - $dropping = (($item['contact-id'] == $photos_perms['contact_id']) || ($item['uid'] == local_user())); + $dropping = (($item['contact-id'] == $contact_id) || ($item['uid'] == local_user())); $drop = array( 'dropping' => $dropping, 'pagedrop' => false, @@ -1692,7 +1749,7 @@ function photos_content(&$a) { '$comment' => $comment )); - if($photos_perms['can_post'] || can_write_wall($a,$owner_uid)) { + if($can_post || can_write_wall($a,$owner_uid)) { if($item['last-child']) { $comments .= replace_macros($cmnt_tpl,array( @@ -1702,9 +1759,9 @@ function photos_content(&$a) { '$id' => $item['item_id'], '$parent' => $item['parent'], '$profile_uid' => $owner_uid, - '$mylink' => $photos_perms['contact']['url'], + '$mylink' => $contact['url'], '$mytitle' => t('This is you'), - '$myphoto' => $photos_perms['contact']['thumb'], + '$myphoto' => $contact['thumb'], '$comment' => t('Comment'), '$submit' => t('Submit'), '$preview' => t('Preview'), @@ -1785,7 +1842,7 @@ function photos_content(&$a) { $a->set_pager_itemspage(20); } - $r = q("SELECT `resource-id`, `id`, `filename`, `type`, `album`, max(`scale`) AS `scale` FROM `photo` + $r = q("SELECT `resource-id`, `id`, `filename`, type, `album`, max(`scale`) AS `scale` FROM `photo` WHERE `uid` = %d AND `album` != '%s' AND `album` != '%s' $sql_extra GROUP BY `resource-id` ORDER BY `created` DESC LIMIT %d , %d", intval($a->data['user']['uid']), @@ -1840,7 +1897,7 @@ function photos_content(&$a) { $tpl = get_markup_template('photos_recent.tpl'); $o .= replace_macros($tpl, array( '$title' => t('Recent Photos'), - '$can_post' => $photos_perms['can_post'], + '$can_post' => $can_post, '$upload' => array(t('Upload New Photos'), $a->get_baseurl().'/photos/'.$a->data['user']['nickname'].'/upload'), '$photos' => $photos, )); diff --git a/mod/profile.php b/mod/profile.php index 83e3e37958..26bd395230 100644 --- a/mod/profile.php +++ b/mod/profile.php @@ -1,7 +1,6 @@ argc > 1) $which = $a->argv[1]; else { - $r = q("SELECT `nickname` FROM `user` WHERE `blocked` = 0 AND `account_expired` = 0 AND `account_removed` = 0 AND `verified` = 1 ORDER BY RAND() LIMIT 1"); + $r = q("select nickname from user where blocked = 0 and account_expired = 0 and account_removed = 0 and verified = 1 order by rand() limit 1"); if(count($r)) { goaway($a->get_baseurl() . '/profile/' . $r[0]['nickname']); } @@ -182,9 +181,6 @@ function profile_content(&$a, $update = 0) { $commpage = (($a->profile['page-flags'] == PAGE_COMMUNITY) ? true : false); $commvisitor = (($commpage && $remote_contact == true) ? true : false); - if(feature_enabled($a->profile['profile_uid'],'photos_widget')) - $a->page['aside'] .= widget_photos($a->profile); - $a->page['aside'] .= posted_date_widget($a->get_baseurl(true) . '/profile/' . $a->profile['nickname'],$a->profile['profile_uid'],true); $a->page['aside'] .= categories_widget($a->get_baseurl(true) . '/profile/' . $a->profile['nickname'],(x($category) ? xmlify($category) : '')); @@ -225,9 +221,9 @@ function profile_content(&$a, $update = 0) { FROM `item` INNER JOIN `contact` ON `contact`.`id` = `item`.`contact-id` AND `contact`.`blocked` = 0 AND `contact`.`pending` = 0 WHERE `item`.`uid` = %d AND `item`.`visible` = 1 AND - (`item`.`deleted` = 0 OR `item`.`verb` = '" . ACTIVITY_LIKE ."' - OR `item`.`verb` = '" . ACTIVITY_DISLIKE . "' OR `item`.`verb` = '" . ACTIVITY_ATTEND . "' - OR `item`.`verb` = '" . ACTIVITY_ATTENDNO . "' OR `item`.`verb` = '" . ACTIVITY_ATTENDMAYBE . "') + (`item`.`deleted` = 0 OR item.verb = '" . ACTIVITY_LIKE ."' + OR item.verb = '" . ACTIVITY_DISLIKE . "' OR item.verb = '" . ACTIVITY_ATTEND . "' + OR item.verb = '" . ACTIVITY_ATTENDNO . "' OR item.verb = '" . ACTIVITY_ATTENDMAYBE . "') AND `item`.`moderated` = 0 and `item`.`unseen` = 1 AND `item`.`wall` = 1 $sql_extra diff --git a/view/global.css b/view/global.css index 09168a52bd..05940508ca 100644 --- a/view/global.css +++ b/view/global.css @@ -321,18 +321,3 @@ ul.credits li { .p-addr { clear: both; } - -.widget-photo { - float: left; -} - -.widget-photo-link { - margin: 0 2px 2px 0; -} - -img.widget-photo-img { - width: 48px; - height: 48px; - object-fit: cover; - padding-right: 2px; -} diff --git a/view/templates/widget_photos.tpl b/view/templates/widget_photos.tpl deleted file mode 100644 index abd403a172..0000000000 --- a/view/templates/widget_photos.tpl +++ /dev/null @@ -1,18 +0,0 @@ - - diff --git a/view/theme/duepuntozero/style.css b/view/theme/duepuntozero/style.css index bfffeb2503..c004eb53d0 100644 --- a/view/theme/duepuntozero/style.css +++ b/view/theme/duepuntozero/style.css @@ -140,12 +140,12 @@ nav #banner #logo-text a:hover { text-decoration: none; } .nav-commlink, .nav-login-link { - display: block; - height: 15px; + display: block; + height: 15px; margin-top: 67px; margin-right: 2px; - /* padding: 6px 10px; */ - padding: 6px 3px; + //padding: 6px 10px; + padding: 6px 3px; float: left; bottom: 140px; border: 1px solid #babdb6; @@ -244,7 +244,7 @@ section { display:block; float:left; padding: 0.4em; - /*margin-right: 1em; */ + //margin-right: 1em; margin-right: 3px ; } .tab.active { @@ -2164,9 +2164,6 @@ aside input[type='text'] { } -.widget h3 a { - color: #000000; -} /*.photos { height: auto; diff --git a/view/theme/frost-mobile/style.css b/view/theme/frost-mobile/style.css index 94e5120c01..400b23c10b 100644 --- a/view/theme/frost-mobile/style.css +++ b/view/theme/frost-mobile/style.css @@ -2541,14 +2541,6 @@ a.mail-list-link { margin: 10px 0 10px; } -.widget-photo { - float: left; -} - -.widget-photo-link { - margin: 0 2px 2px 0; -} - #sidebar-group-list ul { list-style-type: none; } @@ -2634,15 +2626,12 @@ aside input[type='text'] { -webkit-border-radius:5px; border-radius:5px; } - -.widget h3 a { - color: #505050; -} - .widget.settings-widget { padding: 0; } + + /*.photos { height: auto; overflow: auto; diff --git a/view/theme/frost/style.css b/view/theme/frost/style.css index 3adf91ad67..3dd400c76b 100644 --- a/view/theme/frost/style.css +++ b/view/theme/frost/style.css @@ -2356,21 +2356,6 @@ a.mail-list-link { margin: 10px 0 10px; } -.widget-photo { - float: left; -} - -.widget-photo-link { - margin: 0 2px 2px 0; -} - -img.widget-photo-img { - width: 48px; - height: 48px; - object-fit: cover; - padding-right: 2px; -} - #sidebar-group-list ul { list-style-type: none; } @@ -2461,11 +2446,9 @@ aside input[type='text'] { -moz-border-radius:5px; -webkit-border-radius:5px; border-radius:5px; + } -.widget h3 a { - color: #505050; -} /*.photos { height: auto; diff --git a/view/theme/quattro/dark/style.css b/view/theme/quattro/dark/style.css index ebb9977416..847017ee5b 100644 --- a/view/theme/quattro/dark/style.css +++ b/view/theme/quattro/dark/style.css @@ -463,7 +463,7 @@ a:hover { text-decoration: underline; } blockquote { - background: #ffffff; + background: #FFFFFF; padding: 1em; margin-left: 1em; border-left: 1em solid #e6e6e6; @@ -1007,9 +1007,6 @@ aside .posted-date-selector-months { padding: 0; margin: 2px; } -.widget h3 a { - color: #2d2d2d; -} .widget .action { opacity: 0.1; -webkit-transition: all 0.2s ease-in-out; diff --git a/view/theme/quattro/green/style.css b/view/theme/quattro/green/style.css index 5c2661e919..4cfcb59273 100644 --- a/view/theme/quattro/green/style.css +++ b/view/theme/quattro/green/style.css @@ -463,7 +463,7 @@ a:hover { text-decoration: underline; } blockquote { - background: #ffffff; + background: #FFFFFF; padding: 1em; margin-left: 1em; border-left: 1em solid #e6e6e6; @@ -1007,9 +1007,6 @@ aside .posted-date-selector-months { padding: 0; margin: 2px; } -.widget h3 a { - color: #2d2d2d; -} .widget .action { opacity: 0.1; -webkit-transition: all 0.2s ease-in-out; diff --git a/view/theme/quattro/lilac/style.css b/view/theme/quattro/lilac/style.css index 32f1ccaf6a..2ff7cfcb0c 100644 --- a/view/theme/quattro/lilac/style.css +++ b/view/theme/quattro/lilac/style.css @@ -420,7 +420,7 @@ body { font-family: Liberation Sans, helvetica, arial, clean, sans-serif; font-size: 11px; - background-color: #f6ecf9; + background-color: #F6ECF9; color: #2d2d2d; margin: 50px 0 0 0; display: table; @@ -463,7 +463,7 @@ a:hover { text-decoration: underline; } blockquote { - background: #ffffff; + background: #FFFFFF; padding: 1em; margin-left: 1em; border-left: 1em solid #e6e6e6; @@ -1007,9 +1007,6 @@ aside .posted-date-selector-months { padding: 0; margin: 2px; } -.widget h3 a { - color: #2d2d2d; -} .widget .action { opacity: 0.1; -webkit-transition: all 0.2s ease-in-out; @@ -1756,7 +1753,7 @@ span[id^="showmore-wrap"] { height: 20px; width: 500px; font-weight: bold; - border: 1px solid #f6ecf9; + border: 1px solid #F6ECF9; } #jot #jot-title:-webkit-input-placeholder { font-weight: normal; @@ -1783,7 +1780,7 @@ span[id^="showmore-wrap"] { margin: 0; height: 20px; width: 200px; - border: 1px solid #f6ecf9; + border: 1px solid #F6ECF9; } #jot #jot-category:hover { border: 1px solid #999999; diff --git a/view/theme/quattro/quattro.less b/view/theme/quattro/quattro.less index 8822fc3ded..681cfcc374 100644 --- a/view/theme/quattro/quattro.less +++ b/view/theme/quattro/quattro.less @@ -454,7 +454,6 @@ aside { margin-bottom: 2em; h3 { padding: 0; margin: 2px;} - h3 a { color: @BodyColor; } .action { .opaque(0.1); } input.action { .opaque(0.5); } &:hover .title .action { .opaque(1); } diff --git a/view/theme/smoothly/style.css b/view/theme/smoothly/style.css index 5123307493..b9f094932d 100644 --- a/view/theme/smoothly/style.css +++ b/view/theme/smoothly/style.css @@ -1019,15 +1019,6 @@ ul .sidebar-group-li .icon { text-shadow: -1px 0px 0px #bdbdbd; } -.widget h3 a { - color: #626262; -} - -.widget h3 a:hover, .widget h3 a:focus { - color: #6da6c4; - text-decoration: none; -} - #connect-desc { margin-left: 10px; } diff --git a/view/theme/vier/style.css b/view/theme/vier/style.css index 418ef057fc..84b3ff2361 100644 --- a/view/theme/vier/style.css +++ b/view/theme/vier/style.css @@ -1190,12 +1190,6 @@ aside h4, right_aside h4 { padding: 0px; margin: 2px; } -.widget h3 a { - color: #737373; -} -.widget h3 a:hover { - color: black; -} .widget .action { opacity: 0.1; -webkit-transition: all 0.2s ease-in-out; From c8449e6019b0ec6d77b4f652500cc18d8e73c09e Mon Sep 17 00:00:00 2001 From: Michael Vogel Date: Mon, 4 Jan 2016 20:41:24 +0100 Subject: [PATCH 012/242] Code cleanup --- include/items.php | 16 +++------------- 1 file changed, 3 insertions(+), 13 deletions(-) diff --git a/include/items.php b/include/items.php index c9e13b1a1f..02942db97d 100644 --- a/include/items.php +++ b/include/items.php @@ -19,7 +19,7 @@ require_once('mod/share.php'); require_once('library/defuse/php-encryption-1.2.1/Crypto.php'); -function get_feed_for(&$a, $dfrn_id, $owner_nick, $last_update, $direction = 0, $forpubsub = false) { +function get_feed_for(&$a, $dfrn_id, $owner_nick, $last_update, $direction = 0) { $sitefeed = ((strlen($owner_nick)) ? false : true); // not yet implemented, need to rewrite huge chunks of following logic @@ -120,18 +120,8 @@ function get_feed_for(&$a, $dfrn_id, $owner_nick, $last_update, $direction = 0, else $sort = 'ASC'; - // Include answers to status.net posts in pubsub feeds - if($forpubsub) { - $sql_post_table = "INNER JOIN `thread` ON `thread`.`iid` = `item`.`parent` - LEFT JOIN `item` AS `thritem` ON `thritem`.`uri`=`item`.`thr-parent` AND `thritem`.`uid`=`item`.`uid`"; - $visibility = sprintf("AND (`item`.`parent` = `item`.`id`) OR (`item`.`network` = '%s' AND ((`thread`.`network`='%s') OR (`thritem`.`network` = '%s')))", - dbesc(NETWORK_DFRN), dbesc(NETWORK_OSTATUS), dbesc(NETWORK_OSTATUS)); - $date_field = "`received`"; - $sql_order = "`item`.`received` DESC"; - } else { - $date_field = "`changed`"; - $sql_order = "`item`.`parent` ".$sort.", `item`.`created` ASC"; - } + $date_field = "`changed`"; + $sql_order = "`item`.`parent` ".$sort.", `item`.`created` ASC"; if(! strlen($last_update)) $last_update = 'now -30 days'; From 75e2ec01fe867f535e2beba0daa30119e1f722b1 Mon Sep 17 00:00:00 2001 From: Michael Vogel Date: Tue, 5 Jan 2016 15:34:27 +0100 Subject: [PATCH 013/242] The gcontact will now be connected to the items --- boot.php | 2 +- database.sql | 197 +++++++++++++++++++++++++--------------- include/dbstructure.php | 3 + include/diaspora.php | 8 ++ include/items.php | 3 + include/ostatus.php | 51 ++++++----- include/socgraph.php | 130 +++++++++++++++++++++----- include/threads.php | 2 +- mod/item.php | 2 + mod/network.php | 14 +-- update.php | 2 +- 11 files changed, 285 insertions(+), 129 deletions(-) diff --git a/boot.php b/boot.php index 497a97b0ec..7d8c7040de 100644 --- a/boot.php +++ b/boot.php @@ -36,7 +36,7 @@ define ( 'FRIENDICA_PLATFORM', 'Friendica'); define ( 'FRIENDICA_CODENAME', 'Asparagus'); define ( 'FRIENDICA_VERSION', '3.5-dev' ); define ( 'DFRN_PROTOCOL_VERSION', '2.23' ); -define ( 'DB_UPDATE_VERSION', 1191 ); +define ( 'DB_UPDATE_VERSION', 1192 ); /** * @brief Constant with a HTML line break. diff --git a/database.sql b/database.sql index e3768c1efb..1277585c9d 100644 --- a/database.sql +++ b/database.sql @@ -1,6 +1,6 @@ -- ------------------------------------------ --- Friendica 3.4.2 (Lily of the valley) --- DB_UPDATE_VERSION 1190 +-- Friendica 3.5-dev (Asparagus) +-- DB_UPDATE_VERSION 1192 -- ------------------------------------------ @@ -8,20 +8,21 @@ -- TABLE addon -- CREATE TABLE IF NOT EXISTS `addon` ( - `id` int(11) NOT NULL auto_increment PRIMARY KEY, + `id` int(11) NOT NULL auto_increment, `name` varchar(255) NOT NULL DEFAULT '', `version` varchar(255) NOT NULL DEFAULT '', `installed` tinyint(1) NOT NULL DEFAULT 0, `hidden` tinyint(1) NOT NULL DEFAULT 0, `timestamp` bigint(20) NOT NULL DEFAULT 0, - `plugin_admin` tinyint(1) NOT NULL DEFAULT 0 + `plugin_admin` tinyint(1) NOT NULL DEFAULT 0, + PRIMARY KEY(`id`) ) DEFAULT CHARSET=utf8; -- -- TABLE attach -- CREATE TABLE IF NOT EXISTS `attach` ( - `id` int(11) NOT NULL auto_increment PRIMARY KEY, + `id` int(11) NOT NULL auto_increment, `uid` int(11) NOT NULL DEFAULT 0, `hash` varchar(64) NOT NULL DEFAULT '', `filename` varchar(255) NOT NULL DEFAULT '', @@ -33,28 +34,31 @@ CREATE TABLE IF NOT EXISTS `attach` ( `allow_cid` mediumtext NOT NULL, `allow_gid` mediumtext NOT NULL, `deny_cid` mediumtext NOT NULL, - `deny_gid` mediumtext NOT NULL + `deny_gid` mediumtext NOT NULL, + PRIMARY KEY(`id`) ) DEFAULT CHARSET=utf8; -- -- TABLE auth_codes -- CREATE TABLE IF NOT EXISTS `auth_codes` ( - `id` varchar(40) NOT NULL PRIMARY KEY, + `id` varchar(40) NOT NULL, `client_id` varchar(20) NOT NULL DEFAULT '', `redirect_uri` varchar(200) NOT NULL DEFAULT '', `expires` int(11) NOT NULL DEFAULT 0, - `scope` varchar(250) NOT NULL DEFAULT '' + `scope` varchar(250) NOT NULL DEFAULT '', + PRIMARY KEY(`id`) ) DEFAULT CHARSET=utf8; -- -- TABLE cache -- CREATE TABLE IF NOT EXISTS `cache` ( - `k` varchar(255) NOT NULL PRIMARY KEY, + `k` varchar(255) NOT NULL, `v` text NOT NULL, `expire_mode` int(11) NOT NULL DEFAULT 0, `updated` datetime NOT NULL DEFAULT '0000-00-00 00:00:00', + PRIMARY KEY(`k`), INDEX `updated` (`updated`) ) DEFAULT CHARSET=utf8; @@ -62,34 +66,37 @@ CREATE TABLE IF NOT EXISTS `cache` ( -- TABLE challenge -- CREATE TABLE IF NOT EXISTS `challenge` ( - `id` int(10) unsigned NOT NULL auto_increment PRIMARY KEY, + `id` int(10) unsigned NOT NULL auto_increment, `challenge` varchar(255) NOT NULL DEFAULT '', `dfrn-id` varchar(255) NOT NULL DEFAULT '', `expire` int(11) NOT NULL DEFAULT 0, `type` varchar(255) NOT NULL DEFAULT '', - `last_update` varchar(255) NOT NULL DEFAULT '' + `last_update` varchar(255) NOT NULL DEFAULT '', + PRIMARY KEY(`id`) ) DEFAULT CHARSET=utf8; -- -- TABLE clients -- CREATE TABLE IF NOT EXISTS `clients` ( - `client_id` varchar(20) NOT NULL PRIMARY KEY, + `client_id` varchar(20) NOT NULL, `pw` varchar(20) NOT NULL DEFAULT '', `redirect_uri` varchar(200) NOT NULL DEFAULT '', `name` text, `icon` text, - `uid` int(11) NOT NULL DEFAULT 0 + `uid` int(11) NOT NULL DEFAULT 0, + PRIMARY KEY(`client_id`) ) DEFAULT CHARSET=utf8; -- -- TABLE config -- CREATE TABLE IF NOT EXISTS `config` ( - `id` int(10) unsigned NOT NULL auto_increment PRIMARY KEY, + `id` int(10) unsigned NOT NULL auto_increment, `cat` varchar(255) NOT NULL DEFAULT '', `k` varchar(255) NOT NULL DEFAULT '', `v` text NOT NULL, + PRIMARY KEY(`id`), INDEX `cat_k` (`cat`(30),`k`(30)) ) DEFAULT CHARSET=utf8; @@ -97,7 +104,7 @@ CREATE TABLE IF NOT EXISTS `config` ( -- TABLE contact -- CREATE TABLE IF NOT EXISTS `contact` ( - `id` int(11) NOT NULL auto_increment PRIMARY KEY, + `id` int(11) NOT NULL auto_increment, `uid` int(11) NOT NULL DEFAULT 0, `created` datetime NOT NULL DEFAULT '0000-00-00 00:00:00', `self` tinyint(1) NOT NULL DEFAULT 0, @@ -162,6 +169,7 @@ CREATE TABLE IF NOT EXISTS `contact` ( `notify_new_posts` tinyint(1) NOT NULL DEFAULT 0, `fetch_further_information` tinyint(1) NOT NULL DEFAULT 0, `ffi_keyword_blacklist` mediumtext NOT NULL, + PRIMARY KEY(`id`), INDEX `uid` (`uid`) ) DEFAULT CHARSET=utf8; @@ -169,7 +177,7 @@ CREATE TABLE IF NOT EXISTS `contact` ( -- TABLE conv -- CREATE TABLE IF NOT EXISTS `conv` ( - `id` int(10) unsigned NOT NULL auto_increment PRIMARY KEY, + `id` int(10) unsigned NOT NULL auto_increment, `guid` varchar(64) NOT NULL DEFAULT '', `recips` mediumtext NOT NULL, `uid` int(11) NOT NULL DEFAULT 0, @@ -177,6 +185,7 @@ CREATE TABLE IF NOT EXISTS `conv` ( `created` datetime NOT NULL DEFAULT '0000-00-00 00:00:00', `updated` datetime NOT NULL DEFAULT '0000-00-00 00:00:00', `subject` mediumtext NOT NULL, + PRIMARY KEY(`id`), INDEX `uid` (`uid`) ) DEFAULT CHARSET=utf8; @@ -184,27 +193,29 @@ CREATE TABLE IF NOT EXISTS `conv` ( -- TABLE deliverq -- CREATE TABLE IF NOT EXISTS `deliverq` ( - `id` int(10) unsigned NOT NULL auto_increment PRIMARY KEY, + `id` int(10) unsigned NOT NULL auto_increment, `cmd` varchar(32) NOT NULL DEFAULT '', `item` int(11) NOT NULL DEFAULT 0, - `contact` int(11) NOT NULL DEFAULT 0 + `contact` int(11) NOT NULL DEFAULT 0, + PRIMARY KEY(`id`) ) DEFAULT CHARSET=utf8; -- -- TABLE dsprphotoq -- CREATE TABLE IF NOT EXISTS `dsprphotoq` ( - `id` int(10) unsigned NOT NULL auto_increment PRIMARY KEY, + `id` int(10) unsigned NOT NULL auto_increment, `uid` int(11) NOT NULL DEFAULT 0, `msg` mediumtext NOT NULL, - `attempt` tinyint(4) NOT NULL DEFAULT 0 + `attempt` tinyint(4) NOT NULL DEFAULT 0, + PRIMARY KEY(`id`) ) DEFAULT CHARSET=utf8; -- -- TABLE event -- CREATE TABLE IF NOT EXISTS `event` ( - `id` int(11) NOT NULL auto_increment PRIMARY KEY, + `id` int(11) NOT NULL auto_increment, `uid` int(11) NOT NULL DEFAULT 0, `cid` int(11) NOT NULL DEFAULT 0, `uri` varchar(255) NOT NULL DEFAULT '', @@ -223,6 +234,7 @@ CREATE TABLE IF NOT EXISTS `event` ( `allow_gid` mediumtext NOT NULL, `deny_cid` mediumtext NOT NULL, `deny_gid` mediumtext NOT NULL, + PRIMARY KEY(`id`), INDEX `uid` (`uid`) ) DEFAULT CHARSET=utf8; @@ -230,7 +242,7 @@ CREATE TABLE IF NOT EXISTS `event` ( -- TABLE fcontact -- CREATE TABLE IF NOT EXISTS `fcontact` ( - `id` int(10) unsigned NOT NULL auto_increment PRIMARY KEY, + `id` int(10) unsigned NOT NULL auto_increment, `url` varchar(255) NOT NULL DEFAULT '', `name` varchar(255) NOT NULL DEFAULT '', `photo` varchar(255) NOT NULL DEFAULT '', @@ -246,6 +258,7 @@ CREATE TABLE IF NOT EXISTS `fcontact` ( `alias` varchar(255) NOT NULL DEFAULT '', `pubkey` text NOT NULL, `updated` datetime NOT NULL DEFAULT '0000-00-00 00:00:00', + PRIMARY KEY(`id`), INDEX `addr` (`addr`) ) DEFAULT CHARSET=utf8; @@ -253,20 +266,22 @@ CREATE TABLE IF NOT EXISTS `fcontact` ( -- TABLE ffinder -- CREATE TABLE IF NOT EXISTS `ffinder` ( - `id` int(10) unsigned NOT NULL auto_increment PRIMARY KEY, + `id` int(10) unsigned NOT NULL auto_increment, `uid` int(10) unsigned NOT NULL DEFAULT 0, `cid` int(10) unsigned NOT NULL DEFAULT 0, - `fid` int(10) unsigned NOT NULL DEFAULT 0 + `fid` int(10) unsigned NOT NULL DEFAULT 0, + PRIMARY KEY(`id`) ) DEFAULT CHARSET=utf8; -- -- TABLE fserver -- CREATE TABLE IF NOT EXISTS `fserver` ( - `id` int(11) NOT NULL auto_increment PRIMARY KEY, + `id` int(11) NOT NULL auto_increment, `server` varchar(255) NOT NULL DEFAULT '', `posturl` varchar(255) NOT NULL DEFAULT '', `key` text NOT NULL, + PRIMARY KEY(`id`), INDEX `server` (`server`) ) DEFAULT CHARSET=utf8; @@ -274,7 +289,7 @@ CREATE TABLE IF NOT EXISTS `fserver` ( -- TABLE fsuggest -- CREATE TABLE IF NOT EXISTS `fsuggest` ( - `id` int(11) NOT NULL auto_increment PRIMARY KEY, + `id` int(11) NOT NULL auto_increment, `uid` int(11) NOT NULL DEFAULT 0, `cid` int(11) NOT NULL DEFAULT 0, `name` varchar(255) NOT NULL DEFAULT '', @@ -282,16 +297,18 @@ CREATE TABLE IF NOT EXISTS `fsuggest` ( `request` varchar(255) NOT NULL DEFAULT '', `photo` varchar(255) NOT NULL DEFAULT '', `note` text NOT NULL, - `created` datetime NOT NULL DEFAULT '0000-00-00 00:00:00' + `created` datetime NOT NULL DEFAULT '0000-00-00 00:00:00', + PRIMARY KEY(`id`) ) DEFAULT CHARSET=utf8; -- -- TABLE gcign -- CREATE TABLE IF NOT EXISTS `gcign` ( - `id` int(11) NOT NULL auto_increment PRIMARY KEY, + `id` int(11) NOT NULL auto_increment, `uid` int(11) NOT NULL DEFAULT 0, `gcid` int(11) NOT NULL DEFAULT 0, + PRIMARY KEY(`id`), INDEX `uid` (`uid`), INDEX `gcid` (`gcid`) ) DEFAULT CHARSET=utf8; @@ -300,7 +317,7 @@ CREATE TABLE IF NOT EXISTS `gcign` ( -- TABLE gcontact -- CREATE TABLE IF NOT EXISTS `gcontact` ( - `id` int(10) unsigned NOT NULL auto_increment PRIMARY KEY, + `id` int(10) unsigned NOT NULL auto_increment, `name` varchar(255) NOT NULL DEFAULT '', `nick` varchar(255) NOT NULL DEFAULT '', `url` varchar(255) NOT NULL DEFAULT '', @@ -320,6 +337,7 @@ CREATE TABLE IF NOT EXISTS `gcontact` ( `addr` varchar(255) NOT NULL DEFAULT '', `generation` tinyint(3) NOT NULL DEFAULT 0, `server_url` varchar(255) NOT NULL DEFAULT '', + PRIMARY KEY(`id`), INDEX `nurl` (`nurl`), INDEX `updated` (`updated`) ) DEFAULT CHARSET=utf8; @@ -328,12 +346,13 @@ CREATE TABLE IF NOT EXISTS `gcontact` ( -- TABLE glink -- CREATE TABLE IF NOT EXISTS `glink` ( - `id` int(10) unsigned NOT NULL auto_increment PRIMARY KEY, + `id` int(10) unsigned NOT NULL auto_increment, `cid` int(11) NOT NULL DEFAULT 0, `uid` int(11) NOT NULL DEFAULT 0, `gcid` int(11) NOT NULL DEFAULT 0, `zcid` int(11) NOT NULL DEFAULT 0, `updated` datetime NOT NULL DEFAULT '0000-00-00 00:00:00', + PRIMARY KEY(`id`), INDEX `cid_uid_gcid_zcid` (`cid`,`uid`,`gcid`,`zcid`), INDEX `gcid` (`gcid`), INDEX `zcid` (`zcid`) @@ -343,11 +362,12 @@ CREATE TABLE IF NOT EXISTS `glink` ( -- TABLE group -- CREATE TABLE IF NOT EXISTS `group` ( - `id` int(10) unsigned NOT NULL auto_increment PRIMARY KEY, + `id` int(10) unsigned NOT NULL auto_increment, `uid` int(10) unsigned NOT NULL DEFAULT 0, `visible` tinyint(1) NOT NULL DEFAULT 0, `deleted` tinyint(1) NOT NULL DEFAULT 0, `name` varchar(255) NOT NULL DEFAULT '', + PRIMARY KEY(`id`), INDEX `uid` (`uid`) ) DEFAULT CHARSET=utf8; @@ -355,10 +375,11 @@ CREATE TABLE IF NOT EXISTS `group` ( -- TABLE group_member -- CREATE TABLE IF NOT EXISTS `group_member` ( - `id` int(10) unsigned NOT NULL auto_increment PRIMARY KEY, + `id` int(10) unsigned NOT NULL auto_increment, `uid` int(10) unsigned NOT NULL DEFAULT 0, `gid` int(10) unsigned NOT NULL DEFAULT 0, `contact-id` int(10) unsigned NOT NULL DEFAULT 0, + PRIMARY KEY(`id`), INDEX `uid_gid_contactid` (`uid`,`gid`,`contact-id`) ) DEFAULT CHARSET=utf8; @@ -366,7 +387,7 @@ CREATE TABLE IF NOT EXISTS `group_member` ( -- TABLE gserver -- CREATE TABLE IF NOT EXISTS `gserver` ( - `id` int(10) unsigned NOT NULL auto_increment PRIMARY KEY, + `id` int(10) unsigned NOT NULL auto_increment, `url` varchar(255) NOT NULL DEFAULT '', `nurl` varchar(255) NOT NULL DEFAULT '', `version` varchar(255) NOT NULL DEFAULT '', @@ -381,6 +402,7 @@ CREATE TABLE IF NOT EXISTS `gserver` ( `last_poco_query` datetime DEFAULT '0000-00-00 00:00:00', `last_contact` datetime DEFAULT '0000-00-00 00:00:00', `last_failure` datetime DEFAULT '0000-00-00 00:00:00', + PRIMARY KEY(`id`), INDEX `nurl` (`nurl`) ) DEFAULT CHARSET=utf8; @@ -388,11 +410,12 @@ CREATE TABLE IF NOT EXISTS `gserver` ( -- TABLE guid -- CREATE TABLE IF NOT EXISTS `guid` ( - `id` int(10) unsigned NOT NULL auto_increment PRIMARY KEY, + `id` int(10) unsigned NOT NULL auto_increment, `guid` varchar(255) NOT NULL DEFAULT '', `plink` varchar(255) NOT NULL DEFAULT '', `uri` varchar(255) NOT NULL DEFAULT '', `network` varchar(32) NOT NULL DEFAULT '', + PRIMARY KEY(`id`), INDEX `guid` (`guid`), INDEX `plink` (`plink`), INDEX `uri` (`uri`) @@ -402,11 +425,12 @@ CREATE TABLE IF NOT EXISTS `guid` ( -- TABLE hook -- CREATE TABLE IF NOT EXISTS `hook` ( - `id` int(11) NOT NULL auto_increment PRIMARY KEY, + `id` int(11) NOT NULL auto_increment, `hook` varchar(255) NOT NULL DEFAULT '', `file` varchar(255) NOT NULL DEFAULT '', `function` varchar(255) NOT NULL DEFAULT '', `priority` int(11) unsigned NOT NULL DEFAULT 0, + PRIMARY KEY(`id`), INDEX `hook_file_function` (`hook`(30),`file`(60),`function`(30)) ) DEFAULT CHARSET=utf8; @@ -414,7 +438,7 @@ CREATE TABLE IF NOT EXISTS `hook` ( -- TABLE intro -- CREATE TABLE IF NOT EXISTS `intro` ( - `id` int(10) unsigned NOT NULL auto_increment PRIMARY KEY, + `id` int(10) unsigned NOT NULL auto_increment, `uid` int(10) unsigned NOT NULL DEFAULT 0, `fid` int(11) NOT NULL DEFAULT 0, `contact-id` int(11) NOT NULL DEFAULT 0, @@ -424,18 +448,20 @@ CREATE TABLE IF NOT EXISTS `intro` ( `hash` varchar(255) NOT NULL DEFAULT '', `datetime` datetime NOT NULL DEFAULT '0000-00-00 00:00:00', `blocked` tinyint(1) NOT NULL DEFAULT 1, - `ignore` tinyint(1) NOT NULL DEFAULT 0 + `ignore` tinyint(1) NOT NULL DEFAULT 0, + PRIMARY KEY(`id`) ) DEFAULT CHARSET=utf8; -- -- TABLE item -- CREATE TABLE IF NOT EXISTS `item` ( - `id` int(10) unsigned NOT NULL auto_increment PRIMARY KEY, + `id` int(10) unsigned NOT NULL auto_increment, `guid` varchar(255) NOT NULL DEFAULT '', `uri` varchar(255) NOT NULL DEFAULT '', `uid` int(10) unsigned NOT NULL DEFAULT 0, `contact-id` int(11) NOT NULL DEFAULT 0, + `gcontact-id` int(11) unsigned NOT NULL DEFAULT 0, `type` varchar(255) NOT NULL DEFAULT '', `wall` tinyint(1) NOT NULL DEFAULT 0, `gravity` tinyint(1) NOT NULL DEFAULT 0, @@ -493,6 +519,7 @@ CREATE TABLE IF NOT EXISTS `item` ( `rendered-hash` varchar(32) NOT NULL DEFAULT '', `rendered-html` mediumtext NOT NULL, `global` tinyint(1) NOT NULL DEFAULT 0, + PRIMARY KEY(`id`), INDEX `guid` (`guid`), INDEX `uri` (`uri`), INDEX `parent` (`parent`), @@ -531,11 +558,12 @@ CREATE TABLE IF NOT EXISTS `item` ( -- TABLE item_id -- CREATE TABLE IF NOT EXISTS `item_id` ( - `id` int(11) NOT NULL auto_increment PRIMARY KEY, + `id` int(11) NOT NULL auto_increment, `iid` int(11) NOT NULL DEFAULT 0, `uid` int(11) NOT NULL DEFAULT 0, `sid` varchar(255) NOT NULL DEFAULT '', `service` varchar(255) NOT NULL DEFAULT '', + PRIMARY KEY(`id`), INDEX `uid` (`uid`), INDEX `sid` (`sid`), INDEX `service` (`service`), @@ -546,17 +574,18 @@ CREATE TABLE IF NOT EXISTS `item_id` ( -- TABLE locks -- CREATE TABLE IF NOT EXISTS `locks` ( - `id` int(11) NOT NULL auto_increment PRIMARY KEY, + `id` int(11) NOT NULL auto_increment, `name` varchar(128) NOT NULL DEFAULT '', `locked` tinyint(1) NOT NULL DEFAULT 0, - `created` datetime DEFAULT '0000-00-00 00:00:00' + `created` datetime DEFAULT '0000-00-00 00:00:00', + PRIMARY KEY(`id`) ) DEFAULT CHARSET=utf8; -- -- TABLE mail -- CREATE TABLE IF NOT EXISTS `mail` ( - `id` int(10) unsigned NOT NULL auto_increment PRIMARY KEY, + `id` int(10) unsigned NOT NULL auto_increment, `uid` int(10) unsigned NOT NULL DEFAULT 0, `guid` varchar(64) NOT NULL DEFAULT '', `from-name` varchar(255) NOT NULL DEFAULT '', @@ -573,6 +602,7 @@ CREATE TABLE IF NOT EXISTS `mail` ( `uri` varchar(255) NOT NULL DEFAULT '', `parent-uri` varchar(255) NOT NULL DEFAULT '', `created` datetime NOT NULL DEFAULT '0000-00-00 00:00:00', + PRIMARY KEY(`id`), INDEX `uid` (`uid`), INDEX `guid` (`guid`), INDEX `convid` (`convid`), @@ -585,7 +615,7 @@ CREATE TABLE IF NOT EXISTS `mail` ( -- TABLE mailacct -- CREATE TABLE IF NOT EXISTS `mailacct` ( - `id` int(11) NOT NULL auto_increment PRIMARY KEY, + `id` int(11) NOT NULL auto_increment, `uid` int(11) NOT NULL DEFAULT 0, `server` varchar(255) NOT NULL DEFAULT '', `port` int(11) NOT NULL DEFAULT 0, @@ -597,16 +627,18 @@ CREATE TABLE IF NOT EXISTS `mailacct` ( `action` int(11) NOT NULL DEFAULT 0, `movetofolder` varchar(255) NOT NULL DEFAULT '', `pubmail` tinyint(1) NOT NULL DEFAULT 0, - `last_check` datetime NOT NULL DEFAULT '0000-00-00 00:00:00' + `last_check` datetime NOT NULL DEFAULT '0000-00-00 00:00:00', + PRIMARY KEY(`id`) ) DEFAULT CHARSET=utf8; -- -- TABLE manage -- CREATE TABLE IF NOT EXISTS `manage` ( - `id` int(11) NOT NULL auto_increment PRIMARY KEY, + `id` int(11) NOT NULL auto_increment, `uid` int(11) NOT NULL DEFAULT 0, `mid` int(11) NOT NULL DEFAULT 0, + PRIMARY KEY(`id`), INDEX `uid_mid` (`uid`,`mid`) ) DEFAULT CHARSET=utf8; @@ -614,7 +646,7 @@ CREATE TABLE IF NOT EXISTS `manage` ( -- TABLE notify -- CREATE TABLE IF NOT EXISTS `notify` ( - `id` int(11) NOT NULL auto_increment PRIMARY KEY, + `id` int(11) NOT NULL auto_increment, `hash` varchar(64) NOT NULL DEFAULT '', `type` int(11) NOT NULL DEFAULT 0, `name` varchar(255) NOT NULL DEFAULT '', @@ -629,6 +661,7 @@ CREATE TABLE IF NOT EXISTS `notify` ( `seen` tinyint(1) NOT NULL DEFAULT 0, `verb` varchar(255) NOT NULL DEFAULT '', `otype` varchar(16) NOT NULL DEFAULT '', + PRIMARY KEY(`id`), INDEX `uid` (`uid`) ) DEFAULT CHARSET=utf8; @@ -636,11 +669,12 @@ CREATE TABLE IF NOT EXISTS `notify` ( -- TABLE notify-threads -- CREATE TABLE IF NOT EXISTS `notify-threads` ( - `id` int(11) NOT NULL auto_increment PRIMARY KEY, + `id` int(11) NOT NULL auto_increment, `notify-id` int(11) NOT NULL DEFAULT 0, `master-parent-item` int(10) unsigned NOT NULL DEFAULT 0, `parent-item` int(10) unsigned NOT NULL DEFAULT 0, `receiver-uid` int(11) NOT NULL DEFAULT 0, + PRIMARY KEY(`id`), INDEX `master-parent-item` (`master-parent-item`), INDEX `receiver-uid` (`receiver-uid`) ) DEFAULT CHARSET=utf8; @@ -649,11 +683,12 @@ CREATE TABLE IF NOT EXISTS `notify-threads` ( -- TABLE pconfig -- CREATE TABLE IF NOT EXISTS `pconfig` ( - `id` int(11) NOT NULL auto_increment PRIMARY KEY, + `id` int(11) NOT NULL auto_increment, `uid` int(11) NOT NULL DEFAULT 0, `cat` varchar(255) NOT NULL DEFAULT '', `k` varchar(255) NOT NULL DEFAULT '', `v` mediumtext NOT NULL, + PRIMARY KEY(`id`), INDEX `uid_cat_k` (`uid`,`cat`(30),`k`(30)) ) DEFAULT CHARSET=utf8; @@ -661,7 +696,7 @@ CREATE TABLE IF NOT EXISTS `pconfig` ( -- TABLE photo -- CREATE TABLE IF NOT EXISTS `photo` ( - `id` int(10) unsigned NOT NULL auto_increment PRIMARY KEY, + `id` int(10) unsigned NOT NULL auto_increment, `uid` int(10) unsigned NOT NULL DEFAULT 0, `contact-id` int(10) unsigned NOT NULL DEFAULT 0, `guid` varchar(64) NOT NULL DEFAULT '', @@ -683,6 +718,7 @@ CREATE TABLE IF NOT EXISTS `photo` ( `allow_gid` mediumtext NOT NULL, `deny_cid` mediumtext NOT NULL, `deny_gid` mediumtext NOT NULL, + PRIMARY KEY(`id`), INDEX `uid` (`uid`), INDEX `resource-id` (`resource-id`), INDEX `guid` (`guid`) @@ -692,7 +728,7 @@ CREATE TABLE IF NOT EXISTS `photo` ( -- TABLE poll -- CREATE TABLE IF NOT EXISTS `poll` ( - `id` int(11) NOT NULL auto_increment PRIMARY KEY, + `id` int(11) NOT NULL auto_increment, `uid` int(11) NOT NULL DEFAULT 0, `q0` mediumtext NOT NULL, `q1` mediumtext NOT NULL, @@ -704,6 +740,7 @@ CREATE TABLE IF NOT EXISTS `poll` ( `q7` mediumtext NOT NULL, `q8` mediumtext NOT NULL, `q9` mediumtext NOT NULL, + PRIMARY KEY(`id`), INDEX `uid` (`uid`) ) DEFAULT CHARSET=utf8; @@ -711,9 +748,10 @@ CREATE TABLE IF NOT EXISTS `poll` ( -- TABLE poll_result -- CREATE TABLE IF NOT EXISTS `poll_result` ( - `id` int(11) NOT NULL auto_increment PRIMARY KEY, + `id` int(11) NOT NULL auto_increment, `poll_id` int(11) NOT NULL DEFAULT 0, `choice` int(11) NOT NULL DEFAULT 0, + PRIMARY KEY(`id`), INDEX `poll_id` (`poll_id`), INDEX `choice` (`choice`) ) DEFAULT CHARSET=utf8; @@ -722,7 +760,7 @@ CREATE TABLE IF NOT EXISTS `poll_result` ( -- TABLE profile -- CREATE TABLE IF NOT EXISTS `profile` ( - `id` int(11) NOT NULL auto_increment PRIMARY KEY, + `id` int(11) NOT NULL auto_increment, `uid` int(11) NOT NULL DEFAULT 0, `profile-name` varchar(255) NOT NULL DEFAULT '', `is-default` tinyint(1) NOT NULL DEFAULT 0, @@ -763,6 +801,7 @@ CREATE TABLE IF NOT EXISTS `profile` ( `thumb` varchar(255) NOT NULL DEFAULT '', `publish` tinyint(1) NOT NULL DEFAULT 0, `net-publish` tinyint(1) NOT NULL DEFAULT 0, + PRIMARY KEY(`id`), INDEX `hometown` (`hometown`) ) DEFAULT CHARSET=utf8; @@ -770,39 +809,42 @@ CREATE TABLE IF NOT EXISTS `profile` ( -- TABLE profile_check -- CREATE TABLE IF NOT EXISTS `profile_check` ( - `id` int(10) unsigned NOT NULL auto_increment PRIMARY KEY, + `id` int(10) unsigned NOT NULL auto_increment, `uid` int(10) unsigned NOT NULL DEFAULT 0, `cid` int(10) unsigned NOT NULL DEFAULT 0, `dfrn_id` varchar(255) NOT NULL DEFAULT '', `sec` varchar(255) NOT NULL DEFAULT '', - `expire` int(11) NOT NULL DEFAULT 0 + `expire` int(11) NOT NULL DEFAULT 0, + PRIMARY KEY(`id`) ) DEFAULT CHARSET=utf8; -- -- TABLE push_subscriber -- CREATE TABLE IF NOT EXISTS `push_subscriber` ( - `id` int(11) NOT NULL auto_increment PRIMARY KEY, + `id` int(11) NOT NULL auto_increment, `uid` int(11) NOT NULL DEFAULT 0, `callback_url` varchar(255) NOT NULL DEFAULT '', `topic` varchar(255) NOT NULL DEFAULT '', `nickname` varchar(255) NOT NULL DEFAULT '', `push` int(11) NOT NULL DEFAULT 0, `last_update` datetime NOT NULL DEFAULT '0000-00-00 00:00:00', - `secret` varchar(255) NOT NULL DEFAULT '' + `secret` varchar(255) NOT NULL DEFAULT '', + PRIMARY KEY(`id`) ) DEFAULT CHARSET=utf8; -- -- TABLE queue -- CREATE TABLE IF NOT EXISTS `queue` ( - `id` int(11) NOT NULL auto_increment PRIMARY KEY, + `id` int(11) NOT NULL auto_increment, `cid` int(11) NOT NULL DEFAULT 0, `network` varchar(32) NOT NULL DEFAULT '', `created` datetime NOT NULL DEFAULT '0000-00-00 00:00:00', `last` datetime NOT NULL DEFAULT '0000-00-00 00:00:00', `content` mediumtext NOT NULL, `batch` tinyint(1) NOT NULL DEFAULT 0, + PRIMARY KEY(`id`), INDEX `cid` (`cid`), INDEX `created` (`created`), INDEX `last` (`last`), @@ -814,21 +856,23 @@ CREATE TABLE IF NOT EXISTS `queue` ( -- TABLE register -- CREATE TABLE IF NOT EXISTS `register` ( - `id` int(11) unsigned NOT NULL auto_increment PRIMARY KEY, + `id` int(11) unsigned NOT NULL auto_increment, `hash` varchar(255) NOT NULL DEFAULT '', `created` datetime NOT NULL DEFAULT '0000-00-00 00:00:00', `uid` int(11) unsigned NOT NULL DEFAULT 0, `password` varchar(255) NOT NULL DEFAULT '', - `language` varchar(16) NOT NULL DEFAULT '' + `language` varchar(16) NOT NULL DEFAULT '', + PRIMARY KEY(`id`) ) DEFAULT CHARSET=utf8; -- -- TABLE search -- CREATE TABLE IF NOT EXISTS `search` ( - `id` int(11) NOT NULL auto_increment PRIMARY KEY, + `id` int(11) NOT NULL auto_increment, `uid` int(11) NOT NULL DEFAULT 0, `term` varchar(255) NOT NULL DEFAULT '', + PRIMARY KEY(`id`), INDEX `uid` (`uid`), INDEX `term` (`term`) ) DEFAULT CHARSET=utf8; @@ -837,10 +881,11 @@ CREATE TABLE IF NOT EXISTS `search` ( -- TABLE session -- CREATE TABLE IF NOT EXISTS `session` ( - `id` bigint(20) unsigned NOT NULL auto_increment PRIMARY KEY, + `id` bigint(20) unsigned NOT NULL auto_increment, `sid` varchar(255) NOT NULL DEFAULT '', `data` text NOT NULL, `expire` int(10) unsigned NOT NULL DEFAULT 0, + PRIMARY KEY(`id`), INDEX `sid` (`sid`), INDEX `expire` (`expire`) ) DEFAULT CHARSET=utf8; @@ -849,12 +894,13 @@ CREATE TABLE IF NOT EXISTS `session` ( -- TABLE sign -- CREATE TABLE IF NOT EXISTS `sign` ( - `id` int(10) unsigned NOT NULL auto_increment PRIMARY KEY, + `id` int(10) unsigned NOT NULL auto_increment, `iid` int(10) unsigned NOT NULL DEFAULT 0, `retract_iid` int(10) unsigned NOT NULL DEFAULT 0, `signed_text` mediumtext NOT NULL, `signature` text NOT NULL, `signer` varchar(255) NOT NULL DEFAULT '', + PRIMARY KEY(`id`), INDEX `iid` (`iid`), INDEX `retract_iid` (`retract_iid`) ) DEFAULT CHARSET=utf8; @@ -863,12 +909,13 @@ CREATE TABLE IF NOT EXISTS `sign` ( -- TABLE spam -- CREATE TABLE IF NOT EXISTS `spam` ( - `id` int(11) NOT NULL auto_increment PRIMARY KEY, + `id` int(11) NOT NULL auto_increment, `uid` int(11) NOT NULL DEFAULT 0, `spam` int(11) NOT NULL DEFAULT 0, `ham` int(11) NOT NULL DEFAULT 0, `term` varchar(255) NOT NULL DEFAULT '', `date` datetime NOT NULL DEFAULT '0000-00-00 00:00:00', + PRIMARY KEY(`id`), INDEX `uid` (`uid`), INDEX `spam` (`spam`), INDEX `ham` (`ham`), @@ -879,7 +926,7 @@ CREATE TABLE IF NOT EXISTS `spam` ( -- TABLE term -- CREATE TABLE IF NOT EXISTS `term` ( - `tid` int(10) unsigned NOT NULL auto_increment PRIMARY KEY, + `tid` int(10) unsigned NOT NULL auto_increment, `oid` int(10) unsigned NOT NULL DEFAULT 0, `otype` tinyint(3) unsigned NOT NULL DEFAULT 0, `type` tinyint(3) unsigned NOT NULL DEFAULT 0, @@ -891,6 +938,7 @@ CREATE TABLE IF NOT EXISTS `term` ( `global` tinyint(1) NOT NULL DEFAULT 0, `aid` int(10) unsigned NOT NULL DEFAULT 0, `uid` int(10) unsigned NOT NULL DEFAULT 0, + PRIMARY KEY(`tid`), INDEX `oid_otype_type_term` (`oid`,`otype`,`type`,`term`), INDEX `uid_term_tid` (`uid`,`term`,`tid`), INDEX `type_term` (`type`,`term`), @@ -903,9 +951,10 @@ CREATE TABLE IF NOT EXISTS `term` ( -- TABLE thread -- CREATE TABLE IF NOT EXISTS `thread` ( - `iid` int(10) unsigned NOT NULL DEFAULT 0 PRIMARY KEY, + `iid` int(10) unsigned NOT NULL DEFAULT 0, `uid` int(10) unsigned NOT NULL DEFAULT 0, `contact-id` int(11) unsigned NOT NULL DEFAULT 0, + `gcontact-id` int(11) unsigned NOT NULL DEFAULT 0, `created` datetime NOT NULL DEFAULT '0000-00-00 00:00:00', `edited` datetime NOT NULL DEFAULT '0000-00-00 00:00:00', `commented` datetime NOT NULL DEFAULT '0000-00-00 00:00:00', @@ -926,6 +975,7 @@ CREATE TABLE IF NOT EXISTS `thread` ( `forum_mode` tinyint(1) NOT NULL DEFAULT 0, `mention` tinyint(1) NOT NULL DEFAULT 0, `network` varchar(32) NOT NULL DEFAULT '', + PRIMARY KEY(`iid`), INDEX `created` (`created`), INDEX `commented` (`commented`), INDEX `uid_network_commented` (`uid`,`network`,`commented`), @@ -941,25 +991,27 @@ CREATE TABLE IF NOT EXISTS `thread` ( -- TABLE tokens -- CREATE TABLE IF NOT EXISTS `tokens` ( - `id` varchar(40) NOT NULL PRIMARY KEY, + `id` varchar(40) NOT NULL, `secret` text NOT NULL, `client_id` varchar(20) NOT NULL DEFAULT '', `expires` int(11) NOT NULL DEFAULT 0, `scope` varchar(200) NOT NULL DEFAULT '', - `uid` int(11) NOT NULL DEFAULT 0 + `uid` int(11) NOT NULL DEFAULT 0, + PRIMARY KEY(`id`) ) DEFAULT CHARSET=utf8; -- -- TABLE unique_contacts -- CREATE TABLE IF NOT EXISTS `unique_contacts` ( - `id` int(11) NOT NULL auto_increment PRIMARY KEY, + `id` int(11) NOT NULL auto_increment, `url` varchar(255) NOT NULL DEFAULT '', `nick` varchar(255) NOT NULL DEFAULT '', `name` varchar(255) NOT NULL DEFAULT '', `avatar` varchar(255) NOT NULL DEFAULT '', `location` varchar(255) NOT NULL DEFAULT '', `about` text NOT NULL, + PRIMARY KEY(`id`), INDEX `url` (`url`) ) DEFAULT CHARSET=utf8; @@ -967,7 +1019,7 @@ CREATE TABLE IF NOT EXISTS `unique_contacts` ( -- TABLE user -- CREATE TABLE IF NOT EXISTS `user` ( - `uid` int(11) NOT NULL auto_increment PRIMARY KEY, + `uid` int(11) NOT NULL auto_increment, `guid` varchar(64) NOT NULL DEFAULT '', `username` varchar(255) NOT NULL DEFAULT '', `password` varchar(255) NOT NULL DEFAULT '', @@ -1009,6 +1061,7 @@ CREATE TABLE IF NOT EXISTS `user` ( `deny_cid` mediumtext NOT NULL, `deny_gid` mediumtext NOT NULL, `openidserver` text NOT NULL, + PRIMARY KEY(`uid`), INDEX `nickname` (`nickname`) ) DEFAULT CHARSET=utf8; @@ -1016,8 +1069,9 @@ CREATE TABLE IF NOT EXISTS `user` ( -- TABLE userd -- CREATE TABLE IF NOT EXISTS `userd` ( - `id` int(11) NOT NULL auto_increment PRIMARY KEY, + `id` int(11) NOT NULL auto_increment, `username` varchar(255) NOT NULL, + PRIMARY KEY(`id`), INDEX `username` (`username`) ) DEFAULT CHARSET=utf8; @@ -1025,12 +1079,13 @@ CREATE TABLE IF NOT EXISTS `userd` ( -- TABLE workerqueue -- CREATE TABLE IF NOT EXISTS `workerqueue` ( - `id` int(11) NOT NULL auto_increment PRIMARY KEY, + `id` int(11) NOT NULL auto_increment, `parameter` text NOT NULL, `priority` tinyint(3) unsigned NOT NULL DEFAULT 0, `created` datetime NOT NULL DEFAULT '0000-00-00 00:00:00', `pid` int(11) NOT NULL DEFAULT 0, `executed` datetime NOT NULL DEFAULT '0000-00-00 00:00:00', + PRIMARY KEY(`id`), INDEX `created` (`created`) ) DEFAULT CHARSET=utf8; diff --git a/include/dbstructure.php b/include/dbstructure.php index 851eb23284..42ddc31b7c 100644 --- a/include/dbstructure.php +++ b/include/dbstructure.php @@ -795,6 +795,7 @@ function db_definition() { "uri" => array("type" => "varchar(255)", "not null" => "1", "default" => ""), "uid" => array("type" => "int(10) unsigned", "not null" => "1", "default" => "0"), "contact-id" => array("type" => "int(11)", "not null" => "1", "default" => "0"), + "gcontact-id" => array("type" => "int(11) unsigned", "not null" => "1", "default" => "0"), "type" => array("type" => "varchar(255)", "not null" => "1", "default" => ""), "wall" => array("type" => "tinyint(1)", "not null" => "1", "default" => "0"), "gravity" => array("type" => "tinyint(1)", "not null" => "1", "default" => "0"), @@ -871,6 +872,7 @@ function db_definition() { "uid_thrparent" => array("uid","thr-parent"), "uid_parenturi" => array("uid","parent-uri"), "uid_contactid_created" => array("uid","contact-id","created"), + "uid_gcontactid_created" => array("uid","gcontact-id","created"), "wall_body" => array("wall","body(6)"), "uid_visible_moderated_created" => array("uid","visible","moderated","created"), "uid_uri" => array("uid","uri"), @@ -1287,6 +1289,7 @@ function db_definition() { "iid" => array("type" => "int(10) unsigned", "not null" => "1", "default" => "0", "primary" => "1"), "uid" => array("type" => "int(10) unsigned", "not null" => "1", "default" => "0"), "contact-id" => array("type" => "int(11) unsigned", "not null" => "1", "default" => "0"), + "gcontact-id" => array("type" => "int(11) unsigned", "not null" => "1", "default" => "0"), "created" => array("type" => "datetime", "not null" => "1", "default" => "0000-00-00 00:00:00"), "edited" => array("type" => "datetime", "not null" => "1", "default" => "0000-00-00 00:00:00"), "commented" => array("type" => "datetime", "not null" => "1", "default" => "0000-00-00 00:00:00"), diff --git a/include/diaspora.php b/include/diaspora.php index 75e4a7106b..fe5c141643 100644 --- a/include/diaspora.php +++ b/include/diaspora.php @@ -2488,6 +2488,14 @@ function diaspora_profile($importer,$xml,$msg) { datetime_convert(), 2, $contact['id'], $importer['uid']); } + // @todo: + /* + update_gcontact($contact["url"], $contact["network"], + $author["author-avatar"], $contact["name"], + $contact["nick"], $contact["location"], + $contact["about"]); + */ + $profileurl = ""; $author = q("SELECT * FROM `unique_contacts` WHERE `url`='%s' LIMIT 1", dbesc(normalise_link($contact['url']))); diff --git a/include/items.php b/include/items.php index c9e13b1a1f..ada3906f88 100644 --- a/include/items.php +++ b/include/items.php @@ -1338,6 +1338,9 @@ function item_store($arr,$force_parent = false, $notify = false, $dontcache = fa logger("item_store: Set network to ".$arr["network"]." for ".$arr["uri"], LOGGER_DEBUG); } + if ($arr["gcontact-id"] == 0) + $arr["gcontact-id"] = get_gcontact_id($arr['author-link'], $arr['network'], $arr['author-avatar'], $arr['author-name']); + if ($arr['guid'] != "") { // Checking if there is already an item with the same guid logger('checking for an item for user '.$arr['uid'].' on network '.$arr['network'].' with the guid '.$arr['guid'], LOGGER_DEBUG); diff --git a/include/ostatus.php b/include/ostatus.php index 1087596e2f..5426fc5fef 100644 --- a/include/ostatus.php +++ b/include/ostatus.php @@ -129,45 +129,50 @@ function ostatus_fetchauthor($xpath, $context, $importer, &$contact, $onlyfetch) if ($r AND !$onlyfetch) { // Update contact data - $update_contact = ($r[0]['name-date'] < datetime_convert('','','now -12 hours')); - if ($update_contact) { + + $value = $xpath->evaluate('atom:author/poco:displayName/text()', $context)->item(0)->nodeValue; + if ($value != "") + $contact["name"] = $value; + + $value = $xpath->evaluate('atom:author/poco:preferredUsername/text()', $context)->item(0)->nodeValue; + if ($value != "") + $contact["nick"] = $value; + + $value = $xpath->evaluate('atom:author/poco:note/text()', $context)->item(0)->nodeValue; + if ($value != "") + $contact["about"] = html2bbcode($value); + + $value = $xpath->evaluate('atom:author/poco:address/poco:formatted/text()', $context)->item(0)->nodeValue; + if ($value != "") + $contact["location"] = $value; + + if (($contact["name"] != $r[0]["name"]) OR ($contact["nick"] != $r[0]["nick"]) OR ($contact["about"] != $r[0]["about"]) OR ($contact["location"] != $r[0]["location"])) { + logger("Update contact data for contact ".$contact["id"], LOGGER_DEBUG); - $value = $xpath->evaluate('atom:author/poco:displayName/text()', $context)->item(0)->nodeValue; - if ($value != "") - $contact["name"] = $value; - - $value = $xpath->evaluate('atom:author/poco:preferredUsername/text()', $context)->item(0)->nodeValue; - if ($value != "") - $contact["nick"] = $value; - - $value = $xpath->evaluate('atom:author/poco:note/text()', $context)->item(0)->nodeValue; - if ($value != "") - $contact["about"] = html2bbcode($value); - - $value = $xpath->evaluate('atom:author/poco:address/poco:formatted/text()', $context)->item(0)->nodeValue; - if ($value != "") - $contact["location"] = $value; - q("UPDATE `contact` SET `name` = '%s', `nick` = '%s', `about` = '%s', `location` = '%s', `name-date` = '%s' WHERE `id` = %d AND `network` = '%s'", dbesc($contact["name"]), dbesc($contact["nick"]), dbesc($contact["about"]), dbesc($contact["location"]), dbesc(datetime_convert()), intval($contact["id"]), dbesc(NETWORK_OSTATUS)); poco_check($contact["url"], $contact["name"], $contact["network"], $author["author-avatar"], $contact["about"], $contact["location"], - "", "", "", datetime_convert(), 2, $contact["id"], $contact["uid"]); + "", "", "", datetime_convert(), 2, $contact["id"], $contact["uid"]); } - $update_photo = ($r[0]['avatar-date'] < datetime_convert('','','now -12 hours')); - - if ($update_photo AND isset($author["author-avatar"])) { + if (isset($author["author-avatar"]) AND ($author["author-avatar"] != $r[0]['photo'])) { logger("Update profile picture for contact ".$contact["id"], LOGGER_DEBUG); $photos = import_profile_photo($author["author-avatar"], $importer["uid"], $contact["id"]); q("UPDATE `contact` SET `photo` = '%s', `thumb` = '%s', `micro` = '%s', `avatar-date` = '%s' WHERE `id` = %d AND `network` = '%s'", - dbesc($photos[0]), dbesc($photos[1]), dbesc($photos[2]), + dbesc($author["author-avatar"]), dbesc($photos[1]), dbesc($photos[2]), dbesc(datetime_convert()), intval($contact["id"]), dbesc(NETWORK_OSTATUS)); } + + // @todo: Addr + update_gcontact($contact["url"], $contact["network"], + $author["author-avatar"], $contact["name"], + $contact["nick"], $contact["location"], + $contact["about"]); } return($author); diff --git a/include/socgraph.php b/include/socgraph.php index 89b09515ed..fcce0b4a54 100644 --- a/include/socgraph.php +++ b/include/socgraph.php @@ -326,28 +326,34 @@ function poco_check($profile_url, $name, $network, $profile_photo, $about, $loca ); } } else { - q("INSERT INTO `gcontact` (`name`, `nick`, `addr`, `network`, `url`, `nurl`, `photo`, `connect`, `server_url`, `created`, `updated`, `location`, `about`, `keywords`, `gender`, `generation`) - VALUES ('%s', '%s', '%s', '%s', '%s', '%s', '%s', '%s', '%s', '%s', '%s', '%s', '%s', '%s', '%s', %d)", - dbesc($name), - dbesc($nick), - dbesc($addr), - dbesc($network), - dbesc($profile_url), - dbesc(normalise_link($profile_url)), - dbesc($profile_photo), - dbesc($connect_url), - dbesc($server_url), - dbesc(datetime_convert()), - dbesc($updated), - dbesc($location), - dbesc($about), - dbesc($keywords), - dbesc($gender), - intval($generation) - ); - $x = q("SELECT * FROM `gcontact` WHERE `nurl` = '%s' LIMIT 1", + // Maybe another process had inserted the entry after the first check, so it again + $x = q("SELECT `id` FROM `gcontact` WHERE `nurl` = '%s' LIMIT 1", dbesc(normalise_link($profile_url)) ); + if(!$x) { + q("INSERT INTO `gcontact` (`name`, `nick`, `addr`, `network`, `url`, `nurl`, `photo`, `connect`, `server_url`, `created`, `updated`, `location`, `about`, `keywords`, `gender`, `generation`) + VALUES ('%s', '%s', '%s', '%s', '%s', '%s', '%s', '%s', '%s', '%s', '%s', '%s', '%s', '%s', '%s', %d)", + dbesc($name), + dbesc($nick), + dbesc($addr), + dbesc($network), + dbesc($profile_url), + dbesc(normalise_link($profile_url)), + dbesc($profile_photo), + dbesc($connect_url), + dbesc($server_url), + dbesc(datetime_convert()), + dbesc($updated), + dbesc($location), + dbesc($about), + dbesc($keywords), + dbesc($gender), + intval($generation) + ); + $x = q("SELECT `id` FROM `gcontact` WHERE `nurl` = '%s' LIMIT 1", + dbesc(normalise_link($profile_url)) + ); + } if(count($x)) $gcid = $x[0]['id']; } @@ -380,11 +386,11 @@ function poco_check($profile_url, $name, $network, $profile_photo, $about, $loca } // For unknown reasons there are sometimes duplicates - q("DELETE FROM `gcontact` WHERE `nurl` = '%s' AND `id` != %d AND - NOT EXISTS (SELECT `gcid` FROM `glink` WHERE `gcid` = `gcontact`.`id`)", - dbesc(normalise_link($profile_url)), - intval($gcid) - ); + //q("DELETE FROM `gcontact` WHERE `nurl` = '%s' AND `id` != %d AND + // NOT EXISTS (SELECT `gcid` FROM `glink` WHERE `gcid` = `gcontact`.`id`)", + // dbesc(normalise_link($profile_url)), + // intval($gcid) + //); return $gcid; } @@ -1481,4 +1487,78 @@ function poco_discover_server($data, $default_generation = 0) { } return $success; } + +function get_gcontact_id($url, $network, $avatar = "", $name = "", $nick = "", $location = "", $about = "", $addr = "") { + + $gcontact_id = 0; + + if ($network == NETWORK_STATUSNET) + $network = NETWORK_OSTATUS; + + $r = q("SELECT `id`, `name`, `nick`, `network`, `photo`, `location`, `about` FROM `gcontact` WHERE `nurl` = '%s' LIMIT 1", + dbesc(normalise_link($url))); + + if ($r) + $gcontact_id = $r[0]["id"]; + else { + q("INSERT INTO `gcontact` (`name`, `nick`, `addr` , `network`, `url`, `nurl`, `photo`, `created`, `updated`, `location`, `about`) + VALUES ('%s', '%s', '%s', '%s', '%s', '%s', '%s', '%s', '%s', '%s', '%s')", + dbesc($name), + dbesc($nick), + dbesc($addr), + dbesc($network), + dbesc($url), + dbesc(normalise_link($url)), + dbesc($avatar), + dbesc(datetime_convert()), + dbesc(datetime_convert()), + dbesc($location), + dbesc($about) + ); + + $r = q("SELECT `id` FROM `gcontact` WHERE `nurl` = '%s' LIMIT 1", dbesc(normalise_link($url))); + + if ($r) + $gcontact_id = $r[0]["id"]; + } + + return $gcontact_id; +} + +function update_gcontact($url, $network, $avatar = "", $name = "", $nick = "", $location = "", $about = "", $addr = "") { + + if ($network == NETWORK_STATUSNET) + $network = NETWORK_OSTATUS; + + $gcontact_id = get_gcontact_id($url, $network, $avatar, $name, $nick, $location, $about); + + if (!$gcontact_id) + return false; + + if (($avatar != $r[0]["photo"]) AND ($avatar != "")) + q("UPDATE `gcontact` SET `photo` = '%s', `updated` = '%s' WHERE `nurl` = '%s' AND `network` = '%s' AND (`generation` = 0 OR `photo` = '')", + dbesc($avatar), dbesc(datetime_convert()), dbesc(normalise_link($url)), dbesc($network)); + + if (($name != $r[0]["name"]) AND ($name != "")) + q("UPDATE `gcontact` SET `name` = '%s', `updated` = '%s' WHERE `nurl` = '%s' AND `network` = '%s' AND (`generation` = 0 OR `name` = '')", + dbesc($name), dbesc(datetime_convert()), dbesc(normalise_link($url)), dbesc($network)); + + if (($nick != $r[0]["nick"]) AND ($nick != "")) + q("UPDATE `gcontact` SET `nick` = '%s', `updated` = '%s' WHERE `nurl` = '%s' AND `network` = '%s' AND (`generation` = 0 OR `nick` = '')", + dbesc($nick), dbesc(datetime_convert()), dbesc(normalise_link($url)), dbesc($network)); + + if (($addr != $r[0]["addr"]) AND ($nick != "")) + q("UPDATE `gcontact` SET `addr` = '%s', `updated` = '%s' WHERE `nurl` = '%s' AND `network` = '%s' AND (`generation` = 0 OR `addr` = '')", + dbesc($addr), dbesc(datetime_convert()), dbesc(normalise_link($url)), dbesc($network)); + + if (($location != $r[0]["location"]) AND ($location != "")) + q("UPDATE `gcontact` SET `location` = '%s', `updated` = '%s' WHERE `nurl` = '%s' AND `network` = '%s' AND (`generation` = 0 OR `location` = '')", + dbesc($location), dbesc(datetime_convert()), dbesc(normalise_link($url)), dbesc($network)); + + if (($about != $r[0]["about"]) AND ($about != "")) + q("UPDATE `gcontact` SET `about` = '%s', `updated` = '%s' WHERE `nurl` = '%s' AND `network` = '%s' AND (`generation` = 0 OR `about` = '')", + dbesc($about), dbesc(datetime_convert()), dbesc(normalise_link($url)), dbesc($network)); + + return $gcontact_id; +} ?> diff --git a/include/threads.php b/include/threads.php index c12f43bb81..a671846594 100644 --- a/include/threads.php +++ b/include/threads.php @@ -1,6 +1,6 @@ %')."') and deleted = 0 ORDER BY `created` DESC) AS `temp1` ON $sql_table.$sql_parent = `temp1`.`parent` "; - $sql_extra3 .= " AND `contact-id` IN ($contact_str$contact_str_self) "; + $sql_extra3 .= " AND $sql_table.`contact-id` IN ($contact_str$contact_str_self) "; $sql_extra3 .= " AND EXISTS (SELECT `id` FROM `item` WHERE (`contact-id` IN ($contact_str) OR `allow_gid` LIKE '".protect_sprintf('%<'.intval($group).'>%')."') AND `deleted` = 0 - AND `parent` = $sql_table.$sql_parent) "; + AND `id` = $sql_table.$sql_parent) "; $o = replace_macros(get_markup_template("section_title.tpl"),array( '$title' => sprintf( t('Group: %s'), $r[0]['name']) @@ -582,11 +582,11 @@ function network_content(&$a, $update = 0) { intval($cid) ); if(count($r)) { - $sql_post_table = " INNER JOIN (SELECT DISTINCT(`parent`) FROM `item` - WHERE 1 $sql_options AND `contact-id` = ".intval($cid)." AND `deleted` = 0 - ORDER BY `item`.`received` DESC) AS `temp1` - ON $sql_table.$sql_parent = `temp1`.`parent` "; - $sql_extra = ""; + //$sql_post_table = " INNER JOIN (SELECT DISTINCT(`parent`) FROM `item` + // WHERE 1 $sql_options AND `contact-id` = ".intval($cid)." AND `deleted` = 0 + // ORDER BY `item`.`received` DESC) AS `temp1` + // ON $sql_table.$sql_parent = `temp1`.`parent` "; + $sql_extra = " AND ".$sql_table.".`contact-id` = ".intval($cid); $entries[0] = array( 'id' => 'network', diff --git a/update.php b/update.php index caa167617c..197e78de5c 100644 --- a/update.php +++ b/update.php @@ -1,6 +1,6 @@ Date: Wed, 6 Jan 2016 14:13:59 +0100 Subject: [PATCH 014/242] More fields in gcontact, contact search respects "hide" setting --- database.sql | 3 ++ include/dbstructure.php | 3 ++ include/diaspora.php | 49 +++++++---------- include/items.php | 3 +- include/ostatus.php | 8 +-- include/socgraph.php | 114 ++++++++++++++++++++++++++-------------- mod/dirfind.php | 16 ++++-- mod/item.php | 5 +- mod/poco.php | 6 +-- 9 files changed, 120 insertions(+), 87 deletions(-) diff --git a/database.sql b/database.sql index 1277585c9d..90604457bc 100644 --- a/database.sql +++ b/database.sql @@ -333,6 +333,8 @@ CREATE TABLE IF NOT EXISTS `gcontact` ( `keywords` text NOT NULL, `gender` varchar(32) NOT NULL DEFAULT '', `community` tinyint(1) NOT NULL DEFAULT 0, + `hide` tinyint(1) NOT NULL DEFAULT 0, + `nsfw` tinyint(1) NOT NULL DEFAULT 0, `network` varchar(255) NOT NULL DEFAULT '', `addr` varchar(255) NOT NULL DEFAULT '', `generation` tinyint(3) NOT NULL DEFAULT 0, @@ -536,6 +538,7 @@ CREATE TABLE IF NOT EXISTS `item` ( INDEX `uid_thrparent` (`uid`,`thr-parent`), INDEX `uid_parenturi` (`uid`,`parent-uri`), INDEX `uid_contactid_created` (`uid`,`contact-id`,`created`), + INDEX `uid_gcontactid_created` (`uid`,`gcontact-id`,`created`), INDEX `wall_body` (`wall`,`body`(6)), INDEX `uid_visible_moderated_created` (`uid`,`visible`,`moderated`,`created`), INDEX `uid_uri` (`uid`,`uri`), diff --git a/include/dbstructure.php b/include/dbstructure.php index 42ddc31b7c..1fc388d6c1 100644 --- a/include/dbstructure.php +++ b/include/dbstructure.php @@ -666,7 +666,10 @@ function db_definition() { "about" => array("type" => "text", "not null" => "1"), "keywords" => array("type" => "text", "not null" => "1"), "gender" => array("type" => "varchar(32)", "not null" => "1", "default" => ""), + "birthday" => array("type" => "varchar(32)", "not null" => "1", "default" => "0000-00-00"), "community" => array("type" => "tinyint(1)", "not null" => "1", "default" => "0"), + "hide" => array("type" => "tinyint(1)", "not null" => "1", "default" => "0"), + "nsfw" => array("type" => "tinyint(1)", "not null" => "1", "default" => "0"), "network" => array("type" => "varchar(255)", "not null" => "1", "default" => ""), "addr" => array("type" => "varchar(255)", "not null" => "1", "default" => ""), "generation" => array("type" => "tinyint(3)", "not null" => "1", "default" => "0"), diff --git a/include/diaspora.php b/include/diaspora.php index fe5c141643..59c1ac5a2a 100644 --- a/include/diaspora.php +++ b/include/diaspora.php @@ -2407,10 +2407,10 @@ function diaspora_profile($importer,$xml,$msg) { if(! $contact) return; - if($contact['blocked']) { - logger('diaspora_post: Ignoring this author.'); - return 202; - } + //if($contact['blocked']) { + // logger('diaspora_post: Ignoring this author.'); + // return 202; + //} $name = unxmlify($xml->first_name) . ((strlen($xml->last_name)) ? ' ' . unxmlify($xml->last_name) : ''); $image_url = unxmlify($xml->image_url); @@ -2418,6 +2418,8 @@ function diaspora_profile($importer,$xml,$msg) { $location = diaspora2bb(unxmlify($xml->location)); $about = diaspora2bb(unxmlify($xml->bio)); $gender = unxmlify($xml->gender); + $searchable = (unxmlify($xml->searchable) == "true"); + $nsfw = (unxmlify($xml->nsfw) == "true"); $tags = unxmlify($xml->tag_string); $tags = explode("#", $tags); @@ -2432,6 +2434,8 @@ function diaspora_profile($importer,$xml,$msg) { $keywords = implode(", ", $keywords); $handle_parts = explode("@", $diaspora_handle); + $nick = $handle_parts[0]; + if($name === '') { $name = $handle_parts[0]; } @@ -2466,10 +2470,12 @@ function diaspora_profile($importer,$xml,$msg) { /// @TODO Update name on item['author-name'] if the name changed. See consume_feed() /// (Not doing this currently because D* protocol is scheduled for revision soon). - $r = q("UPDATE `contact` SET `name` = '%s', `name-date` = '%s', `photo` = '%s', `thumb` = '%s', `micro` = '%s', `avatar-date` = '%s' , `bd` = '%s', `location` = '%s', `about` = '%s', `keywords` = '%s', `gender` = '%s' WHERE `id` = %d AND `uid` = %d", + $r = q("UPDATE `contact` SET `name` = '%s', `nick` = '%s', `addr` = '%s', `name-date` = '%s', `photo` = '%s', `thumb` = '%s', `micro` = '%s', `avatar-date` = '%s' , `bd` = '%s', `location` = '%s', `about` = '%s', `keywords` = '%s', `gender` = '%s' WHERE `id` = %d AND `uid` = %d", dbesc($name), + dbesc($nick), + dbesc($diaspora_handle), dbesc(datetime_convert()), - dbesc($images[0]), + dbesc($image_url), dbesc($images[1]), dbesc($images[2]), dbesc(datetime_convert()), @@ -2482,34 +2488,17 @@ function diaspora_profile($importer,$xml,$msg) { intval($importer['uid']) ); - if (unxmlify($xml->searchable) == "true") { + if ($searchable) { require_once('include/socgraph.php'); - poco_check($contact['url'], $name, NETWORK_DIASPORA, $images[0], $about, $location, $gender, $keywords, "", + poco_check($contact['url'], $name, NETWORK_DIASPORA, $image_url, $about, $location, $gender, $keywords, "", datetime_convert(), 2, $contact['id'], $importer['uid']); } - // @todo: - /* - update_gcontact($contact["url"], $contact["network"], - $author["author-avatar"], $contact["name"], - $contact["nick"], $contact["location"], - $contact["about"]); - */ - - $profileurl = ""; - $author = q("SELECT * FROM `unique_contacts` WHERE `url`='%s' LIMIT 1", - dbesc(normalise_link($contact['url']))); - - if (count($author) == 0) { - q("INSERT INTO `unique_contacts` (`url`, `name`, `avatar`, `location`, `about`) VALUES ('%s', '%s', '%s', '%s', '%s')", - dbesc(normalise_link($contact['url'])), dbesc($name), dbesc($location), dbesc($about), dbesc($images[0])); - - $author = q("SELECT id FROM unique_contacts WHERE url='%s' LIMIT 1", - dbesc(normalise_link($contact['url']))); - } else if (normalise_link($contact['url']).$name.$location.$about != normalise_link($author[0]["url"]).$author[0]["name"].$author[0]["location"].$author[0]["about"]) { - q("UPDATE unique_contacts SET name = '%s', avatar = '%s', `location` = '%s', `about` = '%s' WHERE url = '%s'", - dbesc($name), dbesc($images[0]), dbesc($location), dbesc($about), dbesc(normalise_link($contact['url']))); - } + update_gcontact(array("url" => $contact['url'], "network" => NETWORK_DIASPORA, "generation" => 2, + "photo" => $image_url, "name" => $name, "location" => $location, + "about" => $about, "birthday" => $birthday, "gender" => $gender, + "addr" => $diaspora_handle, "nick" => $nick, "keywords" => $keywords, + "hide" => !$searchable, "nsfw" => $nsfw)); /* if($r) { if($oldphotos) { diff --git a/include/items.php b/include/items.php index ada3906f88..549027671d 100644 --- a/include/items.php +++ b/include/items.php @@ -1339,7 +1339,8 @@ function item_store($arr,$force_parent = false, $notify = false, $dontcache = fa } if ($arr["gcontact-id"] == 0) - $arr["gcontact-id"] = get_gcontact_id($arr['author-link'], $arr['network'], $arr['author-avatar'], $arr['author-name']); + $arr["gcontact-id"] = get_gcontact_id(array("url" => $arr['author-link'], "network" => $arr['network'], + "photo" => $arr['author-avatar'], "name" => $arr['author-name'])); if ($arr['guid'] != "") { // Checking if there is already an item with the same guid diff --git a/include/ostatus.php b/include/ostatus.php index 5426fc5fef..4a999ae2c5 100644 --- a/include/ostatus.php +++ b/include/ostatus.php @@ -169,10 +169,10 @@ function ostatus_fetchauthor($xpath, $context, $importer, &$contact, $onlyfetch) } // @todo: Addr - update_gcontact($contact["url"], $contact["network"], - $author["author-avatar"], $contact["name"], - $contact["nick"], $contact["location"], - $contact["about"]); + update_gcontact(array("url" => $contact["url"], "network" => $contact["network"], + "photo" => $author["author-avatar"], "name" => $contact["name"], + "nick" => $contact["nick"], "location" => $contact["location"], + "about" => $contact["about"], "generation" => 2)); } return($author); diff --git a/include/socgraph.php b/include/socgraph.php index fcce0b4a54..4881ac28e8 100644 --- a/include/socgraph.php +++ b/include/socgraph.php @@ -1488,35 +1488,37 @@ function poco_discover_server($data, $default_generation = 0) { return $success; } -function get_gcontact_id($url, $network, $avatar = "", $name = "", $nick = "", $location = "", $about = "", $addr = "") { +function get_gcontact_id($contact) { $gcontact_id = 0; - if ($network == NETWORK_STATUSNET) - $network = NETWORK_OSTATUS; + if ($contact["network"] == NETWORK_STATUSNET) + $contact["network"] = NETWORK_OSTATUS; - $r = q("SELECT `id`, `name`, `nick`, `network`, `photo`, `location`, `about` FROM `gcontact` WHERE `nurl` = '%s' LIMIT 1", - dbesc(normalise_link($url))); + $r = q("SELECT `id` FROM `gcontact` WHERE `nurl` = '%s' LIMIT 1", + dbesc(normalise_link($contact["url"]))); if ($r) $gcontact_id = $r[0]["id"]; else { - q("INSERT INTO `gcontact` (`name`, `nick`, `addr` , `network`, `url`, `nurl`, `photo`, `created`, `updated`, `location`, `about`) - VALUES ('%s', '%s', '%s', '%s', '%s', '%s', '%s', '%s', '%s', '%s', '%s')", - dbesc($name), - dbesc($nick), - dbesc($addr), - dbesc($network), - dbesc($url), - dbesc(normalise_link($url)), - dbesc($avatar), + q("INSERT INTO `gcontact` (`name`, `nick`, `addr` , `network`, `url`, `nurl`, `photo`, `created`, `updated`, `location`, `about`, `generation`) + VALUES ('%s', '%s', '%s', '%s', '%s', '%s', '%s', '%s', '%s', '%s', '%s', %d)", + dbesc($contact["name"]), + dbesc($contact["nick"]), + dbesc($contact["addr"]), + dbesc($contact["network"]), + dbesc($contact["url"]), + dbesc(normalise_link($contact["url"])), + dbesc($contact["photo"]), dbesc(datetime_convert()), dbesc(datetime_convert()), - dbesc($location), - dbesc($about) + dbesc($contact["location"]), + dbesc($contact["about"]), + intval($contact["generation"]) ); - $r = q("SELECT `id` FROM `gcontact` WHERE `nurl` = '%s' LIMIT 1", dbesc(normalise_link($url))); + $r = q("SELECT `id` FROM `gcontact` WHERE `nurl` = '%s' LIMIT 1", + dbesc(normalise_link($contact["url"]))); if ($r) $gcontact_id = $r[0]["id"]; @@ -1525,39 +1527,71 @@ function get_gcontact_id($url, $network, $avatar = "", $name = "", $nick = "", $ return $gcontact_id; } -function update_gcontact($url, $network, $avatar = "", $name = "", $nick = "", $location = "", $about = "", $addr = "") { +function update_gcontact($contact) { - if ($network == NETWORK_STATUSNET) - $network = NETWORK_OSTATUS; - - $gcontact_id = get_gcontact_id($url, $network, $avatar, $name, $nick, $location, $about); + $gcontact_id = get_gcontact_id($contact); if (!$gcontact_id) return false; - if (($avatar != $r[0]["photo"]) AND ($avatar != "")) - q("UPDATE `gcontact` SET `photo` = '%s', `updated` = '%s' WHERE `nurl` = '%s' AND `network` = '%s' AND (`generation` = 0 OR `photo` = '')", - dbesc($avatar), dbesc(datetime_convert()), dbesc(normalise_link($url)), dbesc($network)); + $r = q("SELECT `name`, `nick`, `photo`, `location`, `about`, `addr`, `generation`, `birthday`, `gender`, `keywords`, `hide`, `nsfw` + FROM `gcontact` WHERE `id` = %d LIMIT 1", + intval($gcontact_id)); - if (($name != $r[0]["name"]) AND ($name != "")) - q("UPDATE `gcontact` SET `name` = '%s', `updated` = '%s' WHERE `nurl` = '%s' AND `network` = '%s' AND (`generation` = 0 OR `name` = '')", - dbesc($name), dbesc(datetime_convert()), dbesc(normalise_link($url)), dbesc($network)); + if ($contact["generation"] == 0) + $contact["generation"] = $r[0]["generation"]; - if (($nick != $r[0]["nick"]) AND ($nick != "")) - q("UPDATE `gcontact` SET `nick` = '%s', `updated` = '%s' WHERE `nurl` = '%s' AND `network` = '%s' AND (`generation` = 0 OR `nick` = '')", - dbesc($nick), dbesc(datetime_convert()), dbesc(normalise_link($url)), dbesc($network)); + if ($contact["photo"] == "") + $contact["photo"] = $r[0]["photo"]; - if (($addr != $r[0]["addr"]) AND ($nick != "")) - q("UPDATE `gcontact` SET `addr` = '%s', `updated` = '%s' WHERE `nurl` = '%s' AND `network` = '%s' AND (`generation` = 0 OR `addr` = '')", - dbesc($addr), dbesc(datetime_convert()), dbesc(normalise_link($url)), dbesc($network)); + if ($contact["name"] == "") + $contact["name"] = $r[0]["name"]; - if (($location != $r[0]["location"]) AND ($location != "")) - q("UPDATE `gcontact` SET `location` = '%s', `updated` = '%s' WHERE `nurl` = '%s' AND `network` = '%s' AND (`generation` = 0 OR `location` = '')", - dbesc($location), dbesc(datetime_convert()), dbesc(normalise_link($url)), dbesc($network)); + if ($contact["nick"] == "") + $contact["nick"] = $r[0]["nick"]; - if (($about != $r[0]["about"]) AND ($about != "")) - q("UPDATE `gcontact` SET `about` = '%s', `updated` = '%s' WHERE `nurl` = '%s' AND `network` = '%s' AND (`generation` = 0 OR `about` = '')", - dbesc($about), dbesc(datetime_convert()), dbesc(normalise_link($url)), dbesc($network)); + if ($contact["addr"] == "") + $contact["addr"] = $r[0]["addr"]; + + if ($contact["location"] =="") + $contact["location"] = $r[0]["location"]; + + if ($contact["about"] =="") + $contact["about"] = $r[0]["about"]; + + if ($contact["birthday"] =="") + $contact["birthday"] = $r[0]["birthday"]; + + if ($contact["gender"] =="") + $contact["gender"] = $r[0]["gender"]; + + if ($contact["keywords"] =="") + $contact["keywords"] = $r[0]["keywords"]; + + if (!isset($contact["hide"])) + $contact["hide"] = $r[0]["hide"]; + + if (!isset($contact["nsfw"])) + $contact["nsfw"] = $r[0]["nsfw"]; + + if ($contact["network"] == NETWORK_STATUSNET) + $contact["network"] = NETWORK_OSTATUS; + + if (($contact["photo"] != $r[0]["photo"]) OR ($contact["name"] != $r[0]["name"]) OR ($contact["nick"] != $r[0]["nick"]) OR ($contact["addr"] != $r[0]["addr"]) OR + ($contact["birthday"] != $r[0]["birthday"]) OR ($contact["gender"] != $r[0]["gender"]) OR ($contact["keywords"] != $r[0]["keywords"]) OR + ($contact["hide"] != $r[0]["hide"]) OR ($contact["nsfw"] != $r[0]["nsfw"]) OR + ($contact["location"] != $r[0]["location"]) OR ($contact["about"] != $r[0]["about"]) OR ($contact["generation"] < $r[0]["generation"])) { + + q("UPDATE `gcontact` SET `photo` = '%s', `name` = '%s', `nick` = '%s', `addr` = '%s', + `birthday` = '%s', `gender` = '%s', `keywords` = %d, `hide` = %d, `nsfw` = %d, + `location` = '%s', `about` = '%s', `generation` = %d, `updated` = '%s' + WHERE `nurl` = '%s' AND `network` = '%s' AND (`generation` = 0 OR `generation` >= %d)", + dbesc($contact["photo"]), dbesc($contact["name"]), dbesc($contact["nick"]), dbesc($contact["addr"]), + dbesc($contact["birthday"]), dbesc($contact["gender"]), dbesc($contact["keywords"]), + intval($contact["hide"]), intval($contact["nsfw"]), + dbesc($contact["location"]), dbesc($contact["about"]), intval($contact["generation"]), dbesc(datetime_convert()), + dbesc(normalise_link($contact["url"])), dbesc($contact["network"]), intval($contact["generation"])); + } return $gcontact_id; } diff --git a/mod/dirfind.php b/mod/dirfind.php index 3f9c82576a..0dfe4d67a9 100644 --- a/mod/dirfind.php +++ b/mod/dirfind.php @@ -94,9 +94,15 @@ function dirfind_content(&$a, $prefix = "") { else $ostatus = NETWORK_DFRN; - $count = q("SELECT count(*) AS `total` FROM `gcontact` WHERE `network` IN ('%s', '%s', '%s') AND - (`url` REGEXP '%s' OR `name` REGEXP '%s' OR `location` REGEXP '%s' OR - `about` REGEXP '%s' OR `keywords` REGEXP '%s')".$extra_sql, + $count = q("SELECT count(*) AS `total` FROM `gcontact` + LEFT JOIN `contact` ON `contact`.`nurl` = `gcontact`.`nurl` + AND `contact`.`uid` = %d AND NOT `contact`.`blocked` + AND NOT `contact`.`pending` AND `contact`.`rel` IN ('%s', '%s') + WHERE (`contact`.`id` > 0 OR (NOT `gcontact`.`hide` AND `gcontact`.`network` IN ('%s', '%s', '%s') AND + ((`gcontact`.`last_contact` >= `gcontact`.`last_failure`) OR (`gcontact`.`updated` >= `gcontact`.`last_failure`)))) AND + (`gcontact`.`url` REGEXP '%s' OR `gcontact`.`name` REGEXP '%s' OR `gcontact`.`location` REGEXP '%s' OR + `gcontact`.`about` REGEXP '%s' OR `gcontact`.`keywords` REGEXP '%s') $extra_sql", + intval(local_user()), dbesc(CONTACT_IS_SHARING), dbesc(CONTACT_IS_FRIEND), dbesc(NETWORK_DFRN), dbesc($ostatus), dbesc($diaspora), dbesc(escape_tags($search)), dbesc(escape_tags($search)), dbesc(escape_tags($search)), dbesc(escape_tags($search)), dbesc(escape_tags($search))); @@ -106,8 +112,8 @@ function dirfind_content(&$a, $prefix = "") { LEFT JOIN `contact` ON `contact`.`nurl` = `gcontact`.`nurl` AND `contact`.`uid` = %d AND NOT `contact`.`blocked` AND NOT `contact`.`pending` AND `contact`.`rel` IN ('%s', '%s') - WHERE `gcontact`.`network` IN ('%s', '%s', '%s') AND - ((`gcontact`.`last_contact` >= `gcontact`.`last_failure`) OR (`gcontact`.`updated` >= `gcontact`.`last_failure`)) AND + WHERE (`contact`.`id` > 0 OR (NOT `gcontact`.`hide` AND `gcontact`.`network` IN ('%s', '%s', '%s') AND + ((`gcontact`.`last_contact` >= `gcontact`.`last_failure`) OR (`gcontact`.`updated` >= `gcontact`.`last_failure`)))) AND (`gcontact`.`url` REGEXP '%s' OR `gcontact`.`name` REGEXP '%s' OR `gcontact`.`location` REGEXP '%s' OR `gcontact`.`about` REGEXP '%s' OR `gcontact`.`keywords` REGEXP '%s') $extra_sql GROUP BY `gcontact`.`nurl` diff --git a/mod/item.php b/mod/item.php index 2bf89f67f3..105f82708f 100644 --- a/mod/item.php +++ b/mod/item.php @@ -693,9 +693,8 @@ function item_post(&$a) { $datarray['postopts'] = $postopts; $datarray['origin'] = $origin; $datarray['moderated'] = $allow_moderated; - $datarray['gcontact-id'] = get_gcontact_id($datarray['author-link'], $datarray['network'], - $datarray['author-avatar'], $datarray['author-name']); - + $datarray['gcontact-id'] = get_gcontact_id(array("url" => $datarray['author-link'], "network" => $datarray['network'], + "photo" => $datarray['author-avatar'], "name" => $datarray['author-name'])); /** * These fields are for the convenience of plugins... * 'self' if true indicates the owner is posting on their own wall diff --git a/mod/poco.php b/mod/poco.php index ae03aef2cd..0a1b392169 100644 --- a/mod/poco.php +++ b/mod/poco.php @@ -61,8 +61,7 @@ function poco_init(&$a) { $update_limit = date("Y-m-d H:i:s",strtotime($_GET['updatedSince'])); if ($global) { - //$r = q("SELECT count(*) AS `total` FROM `gcontact` WHERE `updated` >= '%s' AND ((`last_contact` >= `last_failure`) OR (`updated` >= `last_failure`)) AND `network` IN ('%s')", - $r = q("SELECT count(*) AS `total` FROM `gcontact` WHERE `updated` >= '%s' AND `updated` >= `last_failure` AND `network` IN ('%s', '%s', '%s')", + $r = q("SELECT count(*) AS `total` FROM `gcontact` WHERE `updated` >= '%s' AND `updated` >= `last_failure` AND NOT `hide` AND `network` IN ('%s', '%s', '%s')", dbesc($update_limit), dbesc(NETWORK_DFRN), dbesc(NETWORK_DIASPORA), @@ -94,8 +93,7 @@ function poco_init(&$a) { if ($global) { logger("Start global query", LOGGER_DEBUG); - //$r = q("SELECT * FROM `gcontact` WHERE `updated` > '%s' AND `network` IN ('%s') AND ((`last_contact` >= `last_failure`) OR (`updated` > `last_failure`)) LIMIT %d, %d", - $r = q("SELECT * FROM `gcontact` WHERE `updated` > '%s' AND `network` IN ('%s', '%s', '%s') AND `updated` > `last_failure` + $r = q("SELECT * FROM `gcontact` WHERE `updated` > '%s' AND NOT `hide` AND `network` IN ('%s', '%s', '%s') AND `updated` > `last_failure` ORDER BY `updated` DESC LIMIT %d, %d", dbesc($update_limit), dbesc(NETWORK_DFRN), From 5ab2786c00b84b3546d6c6c820c0f278baf6fb33 Mon Sep 17 00:00:00 2001 From: Michael Vogel Date: Wed, 6 Jan 2016 22:23:12 +0100 Subject: [PATCH 015/242] Get rid of the table "unique_contacts" --- database.sql | 16 +---- doc/database.md | 1 - doc/database/db_unique_contacts.md | 14 ----- friendica_test_data.sql | 29 --------- include/Contact.php | 13 ---- include/api.php | 96 ++++++++---------------------- include/dbstructure.php | 15 ----- include/ostatus.php | 7 ++- mod/admin.php | 2 +- mod/display.php | 8 ++- 10 files changed, 38 insertions(+), 163 deletions(-) delete mode 100644 doc/database/db_unique_contacts.md diff --git a/database.sql b/database.sql index 90604457bc..4e6f3d35c7 100644 --- a/database.sql +++ b/database.sql @@ -332,6 +332,7 @@ CREATE TABLE IF NOT EXISTS `gcontact` ( `about` text NOT NULL, `keywords` text NOT NULL, `gender` varchar(32) NOT NULL DEFAULT '', + `birthday` varchar(32) NOT NULL DEFAULT '0000-00-00', `community` tinyint(1) NOT NULL DEFAULT 0, `hide` tinyint(1) NOT NULL DEFAULT 0, `nsfw` tinyint(1) NOT NULL DEFAULT 0, @@ -1003,21 +1004,6 @@ CREATE TABLE IF NOT EXISTS `tokens` ( PRIMARY KEY(`id`) ) DEFAULT CHARSET=utf8; --- --- TABLE unique_contacts --- -CREATE TABLE IF NOT EXISTS `unique_contacts` ( - `id` int(11) NOT NULL auto_increment, - `url` varchar(255) NOT NULL DEFAULT '', - `nick` varchar(255) NOT NULL DEFAULT '', - `name` varchar(255) NOT NULL DEFAULT '', - `avatar` varchar(255) NOT NULL DEFAULT '', - `location` varchar(255) NOT NULL DEFAULT '', - `about` text NOT NULL, - PRIMARY KEY(`id`), - INDEX `url` (`url`) -) DEFAULT CHARSET=utf8; - -- -- TABLE user -- diff --git a/doc/database.md b/doc/database.md index 1893f77d0c..2ef77c6dad 100644 --- a/doc/database.md +++ b/doc/database.md @@ -54,7 +54,6 @@ Database Tables | [term](help/database/db_term) | item taxonomy (categories, tags, etc.) table | | [thread](help/database/db_thread) | | | [tokens](help/database/db_tokens) | OAuth usage | -| [unique_contacts](help/database/db_unique_contacts) | | | [user](help/database/db_user) | local user table | | [userd](help/database/db_userd) | | | [workerqueue](help/database/db_workerqueue) | | diff --git a/doc/database/db_unique_contacts.md b/doc/database/db_unique_contacts.md deleted file mode 100644 index 491da6aacd..0000000000 --- a/doc/database/db_unique_contacts.md +++ /dev/null @@ -1,14 +0,0 @@ -Table unique_contacts -===================== - -| Field | Description | Type | Null | Key | Default | Extra | -|----------|------------------|--------------|------|-----|---------|----------------| -| id | sequential ID | int(11) | NO | PRI | NULL | auto_increment | -| url | | varchar(255) | NO | MUL | | | -| nick | | varchar(255) | NO | | | | -| name | | varchar(255) | NO | | | | -| avatar | | varchar(255) | NO | | | | -| location | | varchar(255) | NO | | | | -| about | | text | NO | | NULL | | - -Return to [database documentation](help/database) diff --git a/friendica_test_data.sql b/friendica_test_data.sql index c39a057651..45080e44d0 100644 --- a/friendica_test_data.sql +++ b/friendica_test_data.sql @@ -1657,35 +1657,6 @@ LOCK TABLES `tokens` WRITE; /*!40000 ALTER TABLE `tokens` ENABLE KEYS */; UNLOCK TABLES; --- --- Table structure for table `unique_contacts` --- - -DROP TABLE IF EXISTS `unique_contacts`; -/*!40101 SET @saved_cs_client = @@character_set_client */; -/*!40101 SET character_set_client = utf8 */; -CREATE TABLE `unique_contacts` ( - `id` int(11) NOT NULL AUTO_INCREMENT, - `url` varchar(255) NOT NULL DEFAULT '', - `nick` varchar(255) NOT NULL DEFAULT '', - `name` varchar(255) NOT NULL DEFAULT '', - `avatar` varchar(255) NOT NULL DEFAULT '', - `location` varchar(255) NOT NULL DEFAULT '', - `about` text NOT NULL, - PRIMARY KEY (`id`), - KEY `url` (`url`) -) ENGINE=InnoDB DEFAULT CHARSET=utf8; -/*!40101 SET character_set_client = @saved_cs_client */; - --- --- Dumping data for table `unique_contacts` --- - -LOCK TABLES `unique_contacts` WRITE; -/*!40000 ALTER TABLE `unique_contacts` DISABLE KEYS */; -/*!40000 ALTER TABLE `unique_contacts` ENABLE KEYS */; -UNLOCK TABLES; - -- -- Table structure for table `user` -- diff --git a/include/Contact.php b/include/Contact.php index a3cbbfed15..3185e87348 100644 --- a/include/Contact.php +++ b/include/Contact.php @@ -205,19 +205,6 @@ function get_contact_details_by_url($url, $uid = -1) { if ((($profile["addr"] == "") OR ($profile["name"] == "")) AND in_array($profile["network"], array(NETWORK_DFRN, NETWORK_DIASPORA, NETWORK_OSTATUS))) proc_run('php',"include/update_gcontact.php", $profile["gid"]); - - } else { - $r = q("SELECT `url`, `name`, `nick`, `avatar` AS `photo`, `location`, `about` FROM `unique_contacts` WHERE `url` = '%s'", - dbesc(normalise_link($url))); - - if (count($r)) { - $profile = $r[0]; - $profile["keywords"] = ""; - $profile["gender"] = ""; - $profile["community"] = false; - $profile["network"] = ""; - $profile["addr"] = ""; - } } // Fetching further contact data from the contact table diff --git a/include/api.php b/include/api.php index 790894d3fb..3bc7c8bab9 100644 --- a/include/api.php +++ b/include/api.php @@ -393,7 +393,7 @@ * Contact url or False if contact id is unknown */ function api_unique_id_to_url($id){ - $r = q("SELECT `url` FROM `unique_contacts` WHERE `id`=%d LIMIT 1", + $r = q("SELECT `url` FROM `gcontact` WHERE `id`=%d LIMIT 1", intval($id)); if ($r) return ($r[0]["url"]); @@ -503,9 +503,7 @@ $r = array(); if ($url != "") - $r = q("SELECT * FROM `unique_contacts` WHERE `url`='%s' LIMIT 1", $url); - elseif ($nick != "") - $r = q("SELECT * FROM `unique_contacts` WHERE `nick`='%s' LIMIT 1", $nick); + $r = q("SELECT * FROM `gcontact` WHERE `nurl`='%s' LIMIT 1", dbesc(normalise_link($url))); if ($r) { // If no nick where given, extract it from the address @@ -517,14 +515,14 @@ 'id_str' => (string) $r[0]["id"], 'name' => $r[0]["name"], 'screen_name' => (($r[0]['nick']) ? $r[0]['nick'] : $r[0]['name']), - 'location' => NULL, - 'description' => NULL, + 'location' => $r[0]["location"], + 'description' => $r[0]["about"], 'url' => $r[0]["url"], 'protected' => false, 'followers_count' => 0, 'friends_count' => 0, 'listed_count' => 0, - 'created_at' => api_date(0), + 'created_at' => api_date($r[0]["created"]), 'favourites_count' => 0, 'utc_offset' => 0, 'time_zone' => 'UTC', @@ -535,8 +533,8 @@ 'contributors_enabled' => false, 'is_translator' => false, 'is_translation_enabled' => false, - 'profile_image_url' => $r[0]["avatar"], - 'profile_image_url_https' => $r[0]["avatar"], + 'profile_image_url' => $r[0]["photo"], + 'profile_image_url_https' => $r[0]["photo"], 'following' => false, 'follow_request_sent' => false, 'notifications' => false, @@ -546,7 +544,7 @@ 'uid' => 0, 'cid' => 0, 'self' => 0, - 'network' => '', + 'network' => $r[0]["network"], ); return $ret; @@ -617,22 +615,14 @@ $uinfo[0]['nick'] = api_get_nick($uinfo[0]["url"]); } - // Fetching unique id - $r = q("SELECT id FROM `unique_contacts` WHERE `url`='%s' LIMIT 1", dbesc(normalise_link($uinfo[0]['url']))); - - // If not there, then add it - if (count($r) == 0) { - q("INSERT INTO `unique_contacts` (`url`, `name`, `nick`, `avatar`) VALUES ('%s', '%s', '%s', '%s')", - dbesc(normalise_link($uinfo[0]['url'])), dbesc($uinfo[0]['name']),dbesc($uinfo[0]['nick']), dbesc($uinfo[0]['micro'])); - - $r = q("SELECT `id` FROM `unique_contacts` WHERE `url`='%s' LIMIT 1", dbesc(normalise_link($uinfo[0]['url']))); - } - $network_name = network_to_name($uinfo[0]['network'], $uinfo[0]['url']); + $gcontact_id = get_gcontact_id(array("url" => $uinfo[0]['url'], "network" => $uinfo[0]['network'], + "photo" => $uinfo[0]['micro'], "name" => $uinfo[0]['name'])); + $ret = Array( - 'id' => intval($r[0]['id']), - 'id_str' => (string) intval($r[0]['id']), + 'id' => intval($gcontact_id), + 'id_str' => (string) intval($gcontact_id), 'name' => (($uinfo[0]['name']) ? $uinfo[0]['name'] : $uinfo[0]['nick']), 'screen_name' => (($uinfo[0]['nick']) ? $uinfo[0]['nick'] : $uinfo[0]['name']), 'location' => ($usr) ? $usr[0]['default-location'] : $network_name, @@ -666,45 +656,12 @@ function api_item_get_user(&$a, $item) { - $author = q("SELECT * FROM `unique_contacts` WHERE `url`='%s' LIMIT 1", - dbesc(normalise_link($item['author-link']))); + // Make sure that there is an entry in the global contacts for author and owner + get_gcontact_id(array("url" => $item['author-link'], "network" => $item['network'], + "photo" => $item['author-avatar'], "name" => $item['author-name'])); - if (count($author) == 0) { - q("INSERT INTO `unique_contacts` (`url`, `name`, `avatar`) VALUES ('%s', '%s', '%s')", - dbesc(normalise_link($item["author-link"])), dbesc($item["author-name"]), dbesc($item["author-avatar"])); - - $author = q("SELECT `id` FROM `unique_contacts` WHERE `url`='%s' LIMIT 1", - dbesc(normalise_link($item['author-link']))); - } else if ($item["author-link"].$item["author-name"] != $author[0]["url"].$author[0]["name"]) { - $r = q("SELECT `id` FROM `unique_contacts` WHERE `name` = '%s' AND `avatar` = '%s' AND url = '%s'", - dbesc($item["author-name"]), dbesc($item["author-avatar"]), - dbesc(normalise_link($item["author-link"]))); - - if (!$r) - q("UPDATE `unique_contacts` SET `name` = '%s', `avatar` = '%s' WHERE `url` = '%s'", - dbesc($item["author-name"]), dbesc($item["author-avatar"]), - dbesc(normalise_link($item["author-link"]))); - } - - $owner = q("SELECT `id` FROM `unique_contacts` WHERE `url`='%s' LIMIT 1", - dbesc(normalise_link($item['owner-link']))); - - if (count($owner) == 0) { - q("INSERT INTO `unique_contacts` (`url`, `name`, `avatar`) VALUES ('%s', '%s', '%s')", - dbesc(normalise_link($item["owner-link"])), dbesc($item["owner-name"]), dbesc($item["owner-avatar"])); - - $owner = q("SELECT `id` FROM `unique_contacts` WHERE `url`='%s' LIMIT 1", - dbesc(normalise_link($item['owner-link']))); - } else if ($item["owner-link"].$item["owner-name"] != $owner[0]["url"].$owner[0]["name"]) { - $r = q("SELECT `id` FROM `unique_contacts` WHERE `name` = '%s' AND `avatar` = '%s' AND url = '%s'", - dbesc($item["owner-name"]), dbesc($item["owner-avatar"]), - dbesc(normalise_link($item["owner-link"]))); - - if (!$r) - q("UPDATE `unique_contacts` SET `name` = '%s', `avatar` = '%s' WHERE `url` = '%s'", - dbesc($item["owner-name"]), dbesc($item["owner-avatar"]), - dbesc(normalise_link($item["owner-link"]))); - } + get_gcontact_id(array("url" => $item['owner-link'], "network" => $item['network'], + "photo" => $item['owner-avatar'], "name" => $item['owner-name'])); // Comments in threads may appear as wall-to-wall postings. // So only take the owner at the top posting. @@ -1073,7 +1030,7 @@ $in_reply_to_status_id= intval($lastwall['parent']); $in_reply_to_status_id_str = (string) intval($lastwall['parent']); - $r = q("SELECT * FROM `unique_contacts` WHERE `url` = '%s'", dbesc(normalise_link($lastwall['item-author']))); + $r = q("SELECT * FROM `gcontact` WHERE `nurl` = '%s'", dbesc(normalise_link($lastwall['item-author']))); if ($r) { if ($r[0]['nick'] == "") $r[0]['nick'] = api_get_nick($r[0]["url"]); @@ -1195,7 +1152,7 @@ $in_reply_to_status_id = intval($lastwall['parent']); $in_reply_to_status_id_str = (string) intval($lastwall['parent']); - $r = q("SELECT * FROM `unique_contacts` WHERE `url` = '%s'", dbesc(normalise_link($reply[0]['item-author']))); + $r = q("SELECT * FROM `gcontact` WHERE `nurl` = '%s'", dbesc(normalise_link($reply[0]['item-author']))); if ($r) { if ($r[0]['nick'] == "") $r[0]['nick'] = api_get_nick($r[0]["url"]); @@ -1256,9 +1213,9 @@ $userlist = array(); if (isset($_GET["q"])) { - $r = q("SELECT id FROM `unique_contacts` WHERE `name`='%s'", dbesc($_GET["q"])); + $r = q("SELECT id FROM `gcontact` WHERE `name`='%s'", dbesc($_GET["q"])); if (!count($r)) - $r = q("SELECT `id` FROM `unique_contacts` WHERE `nick`='%s'", dbesc($_GET["q"])); + $r = q("SELECT `id` FROM `gcontact` WHERE `nick`='%s'", dbesc($_GET["q"])); if (count($r)) { foreach ($r AS $user) { @@ -2341,7 +2298,7 @@ intval(api_user()), intval($in_reply_to_status_id)); if ($r) { - $r = q("SELECT * FROM `unique_contacts` WHERE `url` = '%s'", dbesc(normalise_link($r[0]['author-link']))); + $r = q("SELECT * FROM `gcontact` WHERE `url` = '%s'", dbesc(normalise_link($r[0]['author-link']))); if ($r) { if ($r[0]['nick'] == "") @@ -2596,7 +2553,7 @@ $stringify_ids = (x($_REQUEST,'stringify_ids')?$_REQUEST['stringify_ids']:false); - $r = q("SELECT `unique_contacts`.`id` FROM `contact`, `unique_contacts` WHERE `contact`.`nurl` = `unique_contacts`.`url` AND `uid` = %d AND NOT `self` AND NOT `blocked` AND NOT `pending` $sql_extra", + $r = q("SELECT `gcontact`.`id` FROM `contact`, `gcontact` WHERE `contact`.`nurl` = `gcontact`.`nurl` AND `uid` = %d AND NOT `self` AND NOT `blocked` AND NOT `pending` $sql_extra", intval(api_user()) ); @@ -3094,11 +3051,8 @@ //} - if ($nick != "") { - q("UPDATE `unique_contacts` SET `nick` = '%s' WHERE `nick` != '%s' AND url = '%s'", - dbesc($nick), dbesc($nick), dbesc(normalise_link($profile))); + if ($nick != "") return($nick); - } return(false); } diff --git a/include/dbstructure.php b/include/dbstructure.php index 1fc388d6c1..1b414c70fb 100644 --- a/include/dbstructure.php +++ b/include/dbstructure.php @@ -1340,21 +1340,6 @@ function db_definition() { "PRIMARY" => array("id"), ) ); - $database["unique_contacts"] = array( - "fields" => array( - "id" => array("type" => "int(11)", "not null" => "1", "extra" => "auto_increment", "primary" => "1"), - "url" => array("type" => "varchar(255)", "not null" => "1", "default" => ""), - "nick" => array("type" => "varchar(255)", "not null" => "1", "default" => ""), - "name" => array("type" => "varchar(255)", "not null" => "1", "default" => ""), - "avatar" => array("type" => "varchar(255)", "not null" => "1", "default" => ""), - "location" => array("type" => "varchar(255)", "not null" => "1", "default" => ""), - "about" => array("type" => "text", "not null" => "1"), - ), - "indexes" => array( - "PRIMARY" => array("id"), - "url" => array("url"), - ) - ); $database["user"] = array( "fields" => array( "uid" => array("type" => "int(11)", "not null" => "1", "extra" => "auto_increment", "primary" => "1"), diff --git a/include/ostatus.php b/include/ostatus.php index 4a999ae2c5..c1b8233298 100644 --- a/include/ostatus.php +++ b/include/ostatus.php @@ -1452,9 +1452,12 @@ function ostatus_entry($doc, $item, $owner, $toplevel = false, $repeat = false) $repeated_owner["about"] = ""; $repeated_owner["uid"] = 0; - $r =q("SELECT * FROM `unique_contacts` WHERE `url` = '%s'", normalise_link($repeated_item["author-link"])); + // Fetch the missing data from the global contacts + $r =q("SELECT * FROM `gcontact` WHERE `nurl` = '%s'", normalise_link($repeated_item["author-link"])); if ($r) { - $repeated_owner["nick"] = $r[0]["nick"]; + if ($r[0]["nick"] != "") + $repeated_owner["nick"] = $r[0]["nick"]; + $repeated_owner["location"] = $r[0]["location"]; $repeated_owner["about"] = $r[0]["about"]; } diff --git a/mod/admin.php b/mod/admin.php index 9e330fd1dc..0636a34201 100644 --- a/mod/admin.php +++ b/mod/admin.php @@ -341,7 +341,7 @@ function admin_page_site_post(&$a){ update_table("profile", array('photo', 'thumb'), $old_url, $new_url); update_table("term", array('url'), $old_url, $new_url); update_table("contact", array('photo','thumb','micro','url','nurl','request','notify','poll','confirm','poco'), $old_url, $new_url); - update_table("unique_contacts", array('url'), $old_url, $new_url); + update_table("gcontact", array('photo','url','nurl','server_url'), $old_url, $new_url); update_table("item", array('owner-link','owner-avatar','author-name','author-link','author-avatar','body','plink','tag'), $old_url, $new_url); // update config diff --git a/mod/display.php b/mod/display.php index 6d1f417e71..c173c5a912 100644 --- a/mod/display.php +++ b/mod/display.php @@ -179,8 +179,8 @@ function display_fetchauthor($a, $item) { $profiledata["nickname"] = $r[0]["nick"]; } - // Fetching profile data from unique contacts - $r = q("SELECT `avatar`, `nick`, `location`, `about` FROM `unique_contacts` WHERE `url` = '%s'", dbesc(normalise_link($profiledata["url"]))); + // Fetching profile data from global contacts + $r = q("SELECT `photo`, `nick`, `addr`, `location`, `about`, `gender` FROM `gcontact` WHERE `nurl` = '%s'", dbesc(normalise_link($profiledata["url"]))); if (count($r)) { if ($profiledata["photo"] == "") $profiledata["photo"] = $r[0]["avatar"]; @@ -190,6 +190,10 @@ function display_fetchauthor($a, $item) { $profiledata["about"] = $r[0]["about"]; if (($profiledata["nickname"] == "") AND ($r[0]["nick"] != "")) $profiledata["nickname"] = $r[0]["nick"]; + if ($profiledata["gender"] == "") + $profiledata["gender"] = $r[0]["gender"]; + if ($profiledata["addr"] == "") + $profiledata["addr"] = $r[0]["addr"]; } if (local_user()) { From fdb31abdfa191350da1fe07f13e85d8cb8f5a398 Mon Sep 17 00:00:00 2001 From: Michael Vogel Date: Thu, 7 Jan 2016 08:19:28 +0100 Subject: [PATCH 016/242] Use gcontact when adressing contacts in editor --- include/socgraph.php | 18 ++++++++++++------ mod/item.php | 23 +++++++++++++++++++++++ 2 files changed, 35 insertions(+), 6 deletions(-) diff --git a/include/socgraph.php b/include/socgraph.php index 4881ac28e8..a9cbedd667 100644 --- a/include/socgraph.php +++ b/include/socgraph.php @@ -784,6 +784,8 @@ function poco_check_server($server_url, $network = "", $force = false) { $version = trim(str_replace("X-Diaspora-Version:", "", $line)); $version = trim(str_replace("x-diaspora-version:", "", $version)); $network = NETWORK_DIASPORA; + $versionparts = explode("-", $version); + $version = $versionparts[0]; } } } @@ -1534,7 +1536,7 @@ function update_gcontact($contact) { if (!$gcontact_id) return false; - $r = q("SELECT `name`, `nick`, `photo`, `location`, `about`, `addr`, `generation`, `birthday`, `gender`, `keywords`, `hide`, `nsfw` + $r = q("SELECT `name`, `nick`, `photo`, `location`, `about`, `addr`, `generation`, `birthday`, `gender`, `keywords`, `hide`, `nsfw`, `network` FROM `gcontact` WHERE `id` = %d LIMIT 1", intval($gcontact_id)); @@ -1574,23 +1576,27 @@ function update_gcontact($contact) { if (!isset($contact["nsfw"])) $contact["nsfw"] = $r[0]["nsfw"]; + if ($contact["network"] =="") + $contact["network"] = $r[0]["network"]; + if ($contact["network"] == NETWORK_STATUSNET) $contact["network"] = NETWORK_OSTATUS; if (($contact["photo"] != $r[0]["photo"]) OR ($contact["name"] != $r[0]["name"]) OR ($contact["nick"] != $r[0]["nick"]) OR ($contact["addr"] != $r[0]["addr"]) OR ($contact["birthday"] != $r[0]["birthday"]) OR ($contact["gender"] != $r[0]["gender"]) OR ($contact["keywords"] != $r[0]["keywords"]) OR - ($contact["hide"] != $r[0]["hide"]) OR ($contact["nsfw"] != $r[0]["nsfw"]) OR + ($contact["hide"] != $r[0]["hide"]) OR ($contact["nsfw"] != $r[0]["nsfw"]) OR ($contact["network"] != $r[0]["network"]) OR ($contact["location"] != $r[0]["location"]) OR ($contact["about"] != $r[0]["about"]) OR ($contact["generation"] < $r[0]["generation"])) { - q("UPDATE `gcontact` SET `photo` = '%s', `name` = '%s', `nick` = '%s', `addr` = '%s', + q("UPDATE `gcontact` SET `photo` = '%s', `name` = '%s', `nick` = '%s', `addr` = '%s', `network` = '%s', `birthday` = '%s', `gender` = '%s', `keywords` = %d, `hide` = %d, `nsfw` = %d, `location` = '%s', `about` = '%s', `generation` = %d, `updated` = '%s' - WHERE `nurl` = '%s' AND `network` = '%s' AND (`generation` = 0 OR `generation` >= %d)", - dbesc($contact["photo"]), dbesc($contact["name"]), dbesc($contact["nick"]), dbesc($contact["addr"]), + WHERE `nurl` = '%s' AND (`generation` = 0 OR `generation` >= %d)", + dbesc($contact["photo"]), dbesc($contact["name"]), dbesc($contact["nick"]), + dbesc($contact["addr"]), dbesc($contact["network"]), dbesc($contact["birthday"]), dbesc($contact["gender"]), dbesc($contact["keywords"]), intval($contact["hide"]), intval($contact["nsfw"]), dbesc($contact["location"]), dbesc($contact["about"]), intval($contact["generation"]), dbesc(datetime_convert()), - dbesc(normalise_link($contact["url"])), dbesc($contact["network"]), intval($contact["generation"])); + dbesc(normalise_link($contact["url"])), intval($contact["generation"])); } return $gcontact_id; diff --git a/mod/item.php b/mod/item.php index 105f82708f..2d2a5710fe 100644 --- a/mod/item.php +++ b/mod/item.php @@ -137,6 +137,7 @@ function item_post(&$a) { AND (normalise_link($parent_contact["url"]) != normalise_link($thrparent[0]["author-link"]))) { $parent_contact = null; + // @todo: Use gcontact require_once("include/Scrape.php"); $probed_contact = probe_url($thrparent[0]["author-link"]); if ($probed_contact["network"] != NETWORK_FEED) { @@ -1098,6 +1099,7 @@ function handle_tag($a, &$body, &$inform, &$str_tags, $profile_uid, $tag, $netwo //is it a link or a full dfrn address? if((strpos($name,'@')) || (strpos($name,'http://'))) { $newname = $name; + //get the profile links $links = @lrdd($name); if(count($links)) { @@ -1209,8 +1211,29 @@ function handle_tag($a, &$body, &$inform, &$str_tags, $profile_uid, $tag, $netwo $inform .= 'cid:' . $r[0]['id']; } } + + if(!isset($profile)) { + $r = q("SELECT `url` FROM `gcontact` WHERE `addr` = '%s' LIMIT 1", + dbesc($name)); + if ($r) + $profile = $r[0]["url"]; + } + //if there is an url for this persons profile if(isset($profile)) { + + $r = q("SELECT `nick`, `name`, `network` FROM `gcontact` WHERE `nurl` = '%s' LIMIT 1", + dbesc(normalise_link($profile))); + if ($r) { + $newname = $r[0]["name"]; + + //set newname to nick + if(($r[0]['network'] === NETWORK_OSTATUS) OR ($r[0]['network'] === NETWORK_TWITTER) + OR ($r[0]['network'] === NETWORK_STATUSNET) OR ($r[0]['network'] === NETWORK_APPNET)) { + $newname = $r[0]['nick']; + } + } + $replaced = true; //create profile link $profile = str_replace(',','%2c',$profile); From 9521cdc18f25efeeaa47115ba167b3996d6d626e Mon Sep 17 00:00:00 2001 From: Michael Vogel Date: Thu, 7 Jan 2016 23:43:16 +0100 Subject: [PATCH 017/242] notify and alias are now in gcontact as well - the contact expansion in mod/item.php is renewed --- include/dbstructure.php | 2 + include/socgraph.php | 35 +++++++-- mod/display.php | 1 + mod/item.php | 159 ++++++++++++++++++++++++++++++++-------- 4 files changed, 162 insertions(+), 35 deletions(-) diff --git a/include/dbstructure.php b/include/dbstructure.php index 1b414c70fb..4b2cdb251c 100644 --- a/include/dbstructure.php +++ b/include/dbstructure.php @@ -672,6 +672,8 @@ function db_definition() { "nsfw" => array("type" => "tinyint(1)", "not null" => "1", "default" => "0"), "network" => array("type" => "varchar(255)", "not null" => "1", "default" => ""), "addr" => array("type" => "varchar(255)", "not null" => "1", "default" => ""), + "notify" => array("type" => "text", "not null" => "1"), + "alias" => array("type" => "varchar(255)", "not null" => "1", "default" => ""), "generation" => array("type" => "tinyint(3)", "not null" => "1", "default" => "0"), "server_url" => array("type" => "varchar(255)", "not null" => "1", "default" => ""), ), diff --git a/include/socgraph.php b/include/socgraph.php index a9cbedd667..0082cb43b2 100644 --- a/include/socgraph.php +++ b/include/socgraph.php @@ -227,6 +227,8 @@ function poco_check($profile_url, $name, $network, $profile_photo, $about, $loca $server_url = $x[0]["server_url"]; $nick = $x[0]["nick"]; $addr = $x[0]["addr"]; + $alias = $x[0]["alias"]; + $notify = $x[0]["notify"]; } else { $created = "0000-00-00 00:00:00"; $server_url = ""; @@ -234,6 +236,8 @@ function poco_check($profile_url, $name, $network, $profile_photo, $about, $loca $urlparts = parse_url($profile_url); $nick = end(explode("/", $urlparts["path"])); $addr = ""; + $alias = ""; + $notify = ""; } if ((($network == "") OR ($name == "") OR ($addr == "") OR ($profile_photo == "") OR ($server_url == "") OR $alternate) @@ -246,6 +250,8 @@ function poco_check($profile_url, $name, $network, $profile_photo, $about, $loca $name = $data["name"]; $nick = $data["nick"]; $addr = $data["addr"]; + $alias = $data["alias"]; + $notify = $data["notify"]; $profile_url = $data["url"]; $profile_photo = $data["photo"]; $server_url = $data["baseurl"]; @@ -301,12 +307,19 @@ function poco_check($profile_url, $name, $network, $profile_photo, $about, $loca if (($addr == "") AND ($x[0]['addr'] != "")) $addr = $x[0]['addr']; + if (($alias == "") AND ($x[0]['alias'] != "")) + $alias = $x[0]['alias']; + + if (($notify == "") AND ($x[0]['notify'] != "")) + $notify = $x[0]['notify']; + if (($generation == 0) AND ($x[0]['generation'] > 0)) $generation = $x[0]['generation']; if($x[0]['name'] != $name || $x[0]['photo'] != $profile_photo || $x[0]['updated'] < $updated) { q("UPDATE `gcontact` SET `name` = '%s', `addr` = '%s', `network` = '%s', `photo` = '%s', `connect` = '%s', `url` = '%s', `server_url` = '%s', - `updated` = '%s', `location` = '%s', `about` = '%s', `keywords` = '%s', `gender` = '%s', `generation` = %d + `updated` = '%s', `location` = '%s', `about` = '%s', `keywords` = '%s', `gender` = '%s', `generation` = %d, + `alias` = '$s', `notify` = '%s' WHERE (`generation` >= %d OR `generation` = 0) AND `nurl` = '%s'", dbesc($name), dbesc($addr), @@ -320,6 +333,8 @@ function poco_check($profile_url, $name, $network, $profile_photo, $about, $loca dbesc($about), dbesc($keywords), dbesc($gender), + dbesc($alias), + dbesc($notify), intval($generation), intval($generation), dbesc(normalise_link($profile_url)) @@ -331,8 +346,8 @@ function poco_check($profile_url, $name, $network, $profile_photo, $about, $loca dbesc(normalise_link($profile_url)) ); if(!$x) { - q("INSERT INTO `gcontact` (`name`, `nick`, `addr`, `network`, `url`, `nurl`, `photo`, `connect`, `server_url`, `created`, `updated`, `location`, `about`, `keywords`, `gender`, `generation`) - VALUES ('%s', '%s', '%s', '%s', '%s', '%s', '%s', '%s', '%s', '%s', '%s', '%s', '%s', '%s', '%s', %d)", + q("INSERT INTO `gcontact` (`name`, `nick`, `addr`, `network`, `url`, `nurl`, `photo`, `connect`, `server_url`, `created`, `updated`, `location`, `about`, `keywords`, `gender`, `alias`, `notify`, `generation`) + VALUES ('%s', '%s', '%s', '%s', '%s', '%s', '%s', '%s', '%s', '%s', '%s', '%s', '%s', '%s', '%s', '%s', '%s', %d)", dbesc($name), dbesc($nick), dbesc($addr), @@ -348,6 +363,8 @@ function poco_check($profile_url, $name, $network, $profile_photo, $about, $loca dbesc($about), dbesc($keywords), dbesc($gender), + dbesc($alias), + dbesc($notify), intval($generation) ); $x = q("SELECT `id` FROM `gcontact` WHERE `nurl` = '%s' LIMIT 1", @@ -1536,7 +1553,7 @@ function update_gcontact($contact) { if (!$gcontact_id) return false; - $r = q("SELECT `name`, `nick`, `photo`, `location`, `about`, `addr`, `generation`, `birthday`, `gender`, `keywords`, `hide`, `nsfw`, `network` + $r = q("SELECT `name`, `nick`, `photo`, `location`, `about`, `addr`, `generation`, `birthday`, `gender`, `keywords`, `hide`, `nsfw`, `network`, `alias`, `notify` FROM `gcontact` WHERE `id` = %d LIMIT 1", intval($gcontact_id)); @@ -1579,22 +1596,30 @@ function update_gcontact($contact) { if ($contact["network"] =="") $contact["network"] = $r[0]["network"]; + if ($contact["alias"] =="") + $contact["alias"] = $r[0]["alias"]; + + if ($contact["notify"] =="") + $contact["notify"] = $r[0]["notify"]; + if ($contact["network"] == NETWORK_STATUSNET) $contact["network"] = NETWORK_OSTATUS; if (($contact["photo"] != $r[0]["photo"]) OR ($contact["name"] != $r[0]["name"]) OR ($contact["nick"] != $r[0]["nick"]) OR ($contact["addr"] != $r[0]["addr"]) OR ($contact["birthday"] != $r[0]["birthday"]) OR ($contact["gender"] != $r[0]["gender"]) OR ($contact["keywords"] != $r[0]["keywords"]) OR ($contact["hide"] != $r[0]["hide"]) OR ($contact["nsfw"] != $r[0]["nsfw"]) OR ($contact["network"] != $r[0]["network"]) OR + ($contact["alias"] != $r[0]["alias"]) OR ($contact["notify"] != $r[0]["notify"]) OR ($contact["location"] != $r[0]["location"]) OR ($contact["about"] != $r[0]["about"]) OR ($contact["generation"] < $r[0]["generation"])) { q("UPDATE `gcontact` SET `photo` = '%s', `name` = '%s', `nick` = '%s', `addr` = '%s', `network` = '%s', `birthday` = '%s', `gender` = '%s', `keywords` = %d, `hide` = %d, `nsfw` = %d, + `alias` = '%s', `notify` = '%s', `location` = '%s', `about` = '%s', `generation` = %d, `updated` = '%s' WHERE `nurl` = '%s' AND (`generation` = 0 OR `generation` >= %d)", dbesc($contact["photo"]), dbesc($contact["name"]), dbesc($contact["nick"]), dbesc($contact["addr"]), dbesc($contact["network"]), dbesc($contact["birthday"]), dbesc($contact["gender"]), dbesc($contact["keywords"]), - intval($contact["hide"]), intval($contact["nsfw"]), + intval($contact["hide"]), intval($contact["nsfw"]), dbesc($contact["alias"]), dbesc($contact["notify"]), dbesc($contact["location"]), dbesc($contact["about"]), intval($contact["generation"]), dbesc(datetime_convert()), dbesc(normalise_link($contact["url"])), intval($contact["generation"])); } diff --git a/mod/display.php b/mod/display.php index c173c5a912..6ff599e2c7 100644 --- a/mod/display.php +++ b/mod/display.php @@ -180,6 +180,7 @@ function display_fetchauthor($a, $item) { } // Fetching profile data from global contacts + // @todo: should override everything else (but not Feeds) $r = q("SELECT `photo`, `nick`, `addr`, `location`, `about`, `gender` FROM `gcontact` WHERE `nurl` = '%s'", dbesc(normalise_link($profiledata["url"]))); if (count($r)) { if ($profiledata["photo"] == "") diff --git a/mod/item.php b/mod/item.php index 2d2a5710fe..56c5ccad95 100644 --- a/mod/item.php +++ b/mod/item.php @@ -137,15 +137,25 @@ function item_post(&$a) { AND (normalise_link($parent_contact["url"]) != normalise_link($thrparent[0]["author-link"]))) { $parent_contact = null; - // @todo: Use gcontact - require_once("include/Scrape.php"); - $probed_contact = probe_url($thrparent[0]["author-link"]); - if ($probed_contact["network"] != NETWORK_FEED) { - $parent_contact = $probed_contact; - $parent_contact["nurl"] = normalise_link($probed_contact["url"]); - $parent_contact["thumb"] = $probed_contact["photo"]; - $parent_contact["micro"] = $probed_contact["photo"]; - $parent_contact["addr"] = $probed_contact["addr"]; + $r = q("SELECT * FROM `gcontact` WHERE `nurl` = '%s' LIMIT 1", + dbesc(normalise_link($thrparent[0]["author-link"]))); + if (count($r)) { + $parent_contact = $r[0]; + $parent_contact["thumb"] = $parent_contact["photo"]; + $parent_contact["micro"] = $parent_contact["photo"]; + unset($parent_contact["id"]); + } + + if (!isset($parent_contact["nick"])) { + require_once("include/Scrape.php"); + $probed_contact = probe_url($thrparent[0]["author-link"]); + if ($probed_contact["network"] != NETWORK_FEED) { + $parent_contact = $probed_contact; + $parent_contact["nurl"] = normalise_link($probed_contact["url"]); + $parent_contact["thumb"] = $probed_contact["photo"]; + $parent_contact["micro"] = $probed_contact["photo"]; + $parent_contact["addr"] = $probed_contact["addr"]; + } } logger('no contact found: '.print_r($thrparent, true), LOGGER_DEBUG); } else @@ -1062,6 +1072,8 @@ function item_content(&$a) { * @return boolean true if replaced, false if not replaced */ function handle_tag($a, &$body, &$inform, &$str_tags, $profile_uid, $tag, $network = "") { + require_once("include/Scrape.php"); + require_once("include/socgraph.php"); $replaced = false; $r = null; @@ -1096,10 +1108,112 @@ function handle_tag($a, &$body, &$inform, &$str_tags, $profile_uid, $tag, $netwo $stat = false; //get the person's name $name = substr($tag,1); + + // Try to detect the contact in various ways + if ((strpos($name,'@')) || (strpos($name,'http://'))) { + // Is it in format @user@domain.tld or @http://domain.tld/...? + + // First check the contact table for the address + $r = q("SELECT `id`, `url`, `nick`, `name`, `alias`, `network`, `notify` FROM `contact` WHERE `addr` = '%s' AND `uid` = %d LIMIT 1", + dbesc($name), + intval($profile_uid) + ); + + // Then check in the contact table for the url + if (!$r) + $r = q("SELECT `id`, `url`, `nick`, `name`, `alias`, `notify`, `network` FROM `contact` WHERE `nurl` = '%s' AND `uid` = %d LIMIT 1", + dbesc(normalise_link($name)), + intval($profile_uid) + ); + + // Then check in the global contacts for the address + if (!$r) + $r = q("SELECT `url`, `name`, `nick`, `network`, `alias`, `notify` FROM `gcontact` WHERE `addr` = '%s' LIMIT 1", dbesc($name)); + + // Then check in the global contacts for the url + if (!$r) + $r = q("SELECT `url`, `name`, `nick`, `network`, `alias`, `notify` FROM `gcontact` WHERE `nurl` = '%s' LIMIT 1", dbesc(normalise_link($name))); + + // If the data isn't complete then refetch the data + if ($r AND ($r[0]["network"] == NETWORK_OSTATUS) AND (($r[0]["notify"] == "") OR ($r[0]["alias"] == ""))) + $r = false; + + if (!$r) { + $probed = probe_url($name); + if (isset($probed["url"])) { + update_gcontact($probed); + $r = q("SELECT `url`, `name`, `nick`, `network`, `alias`, `notify` FROM `gcontact` WHERE `nurl` = '%s' LIMIT 1", + dbesc(normalise_link($probed["url"]))); + } + } + } elseif (!$r) { + $newname = str_replace('_',' ',$name); + $r = false; + if (strrpos($name,'+')) { + // Is it in format @nick+number? + $tagcid = intval(substr($name,strrpos($name,'+') + 1)); + + $r = q("SELECT `id`, `url`, `nick`, `name`, `alias`, `network` FROM `contact` WHERE `id` = %d AND `uid` = %d LIMIT 1", + intval($tagcid), + intval($profile_uid) + ); + } + + //select someone by attag or nick and the name passed in the current network + if(!$r AND ($network != "")) + $r = q("SELECT `id`, `url`, `nick`, `name`, `alias`, `network` FROM `contact` WHERE `attag` = '%s' OR `nick` = '%s' AND `network` = '%s' AND `uid` = %d ORDER BY `attag` DESC LIMIT 1", + dbesc($name), + dbesc($name), + dbesc($network), + intval($profile_uid) + ); + + //select someone from this user's contacts by name in the current network + if (!$r AND ($network != "")) + $r = q("SELECT `id`, `url`, `nick`, `name`, `alias`, `network` FROM `contact` WHERE `name` = '%s' AND `network` = '%s' AND `uid` = %d LIMIT 1", + dbesc($newname), + dbesc($network), + intval($profile_uid) + ); + + //select someone by attag or nick and the name passed in + if(!$r) + $r = q("SELECT `id`, `url`, `nick`, `name`, `alias`, `network` FROM `contact` WHERE `attag` = '%s' OR `nick` = '%s' AND `uid` = %d ORDER BY `attag` DESC LIMIT 1", + dbesc($name), + dbesc($name), + intval($profile_uid) + ); + + + //select someone from this user's contacts by name + if(!$r) + $r = q("SELECT `id`, `url`, `nick`, `name`, `alias`, `network` FROM `contact` WHERE `name` = '%s' AND `uid` = %d LIMIT 1", + dbesc($newname), + intval($profile_uid) + ); + } + + if ($r) { + if(strlen($inform) AND (isset($r[0]["notify"]) OR isset($r[0]["id"]))) + $inform .= ','; + + if (isset($r[0]["id"])) + $inform .= 'cid:' . $r[0]["id"]; + elseif (isset($r[0]["notify"])) + $inform .= $r[0]["notify"]; + + $profile = $r[0]["url"]; + $alias = $r[0]["alias"]; + $newname = $r[0]["nick"]; + if (($newname == "") OR (($r[0]["network"] != NETWORK_OSTATUS) AND ($r[0]["network"] != NETWORK_TWITTER) + AND ($r[0]["network"] != NETWORK_STATUSNET) AND ($r[0]["network"] != NETWORK_APPNET))) + $newname = $r[0]["name"]; + } + +/* //is it a link or a full dfrn address? if((strpos($name,'@')) || (strpos($name,'http://'))) { $newname = $name; - //get the profile links $links = @lrdd($name); if(count($links)) { @@ -1176,6 +1290,8 @@ function handle_tag($a, &$body, &$inform, &$str_tags, $profile_uid, $tag, $netwo ); } } +*/ + /* } elseif(strstr($name,'_') || strstr($name,' ')) { //no id //get the real name $newname = str_replace('_',' ',$name); @@ -1192,6 +1308,8 @@ function handle_tag($a, &$body, &$inform, &$str_tags, $profile_uid, $tag, $netwo intval($profile_uid) ); }*/ + +/* //$r is set, if someone could be selected if(count($r)) { $profile = $r[0]['url']; @@ -1211,29 +1329,10 @@ function handle_tag($a, &$body, &$inform, &$str_tags, $profile_uid, $tag, $netwo $inform .= 'cid:' . $r[0]['id']; } } - - if(!isset($profile)) { - $r = q("SELECT `url` FROM `gcontact` WHERE `addr` = '%s' LIMIT 1", - dbesc($name)); - if ($r) - $profile = $r[0]["url"]; - } - +*/ //if there is an url for this persons profile if(isset($profile)) { - $r = q("SELECT `nick`, `name`, `network` FROM `gcontact` WHERE `nurl` = '%s' LIMIT 1", - dbesc(normalise_link($profile))); - if ($r) { - $newname = $r[0]["name"]; - - //set newname to nick - if(($r[0]['network'] === NETWORK_OSTATUS) OR ($r[0]['network'] === NETWORK_TWITTER) - OR ($r[0]['network'] === NETWORK_STATUSNET) OR ($r[0]['network'] === NETWORK_APPNET)) { - $newname = $r[0]['nick']; - } - } - $replaced = true; //create profile link $profile = str_replace(',','%2c',$profile); From 358a9fd6fda217a34b2fa589c50c603cb07fc914 Mon Sep 17 00:00:00 2001 From: Michael Vogel Date: Fri, 8 Jan 2016 00:35:46 +0100 Subject: [PATCH 018/242] Notify and alias will be fetched via OStatus --- include/ostatus.php | 15 +++++++++++---- mod/item.php | 9 +++++++-- 2 files changed, 18 insertions(+), 6 deletions(-) diff --git a/include/ostatus.php b/include/ostatus.php index c1b8233298..05a1efaaa8 100644 --- a/include/ostatus.php +++ b/include/ostatus.php @@ -130,6 +130,14 @@ function ostatus_fetchauthor($xpath, $context, $importer, &$contact, $onlyfetch) if ($r AND !$onlyfetch) { // Update contact data + $value = $xpath->query("atom:link[@rel='salmon']", $context)->item(0)->nodeValue; + if ($value != "") + $contact["notify"] = $value; + + $value = $xpath->evaluate('atom:author/uri/text()', $context)->item(0)->nodeValue; + if ($value != "") + $contact["alias"] = $value; + $value = $xpath->evaluate('atom:author/poco:displayName/text()', $context)->item(0)->nodeValue; if ($value != "") $contact["name"] = $value; @@ -169,10 +177,9 @@ function ostatus_fetchauthor($xpath, $context, $importer, &$contact, $onlyfetch) } // @todo: Addr - update_gcontact(array("url" => $contact["url"], "network" => $contact["network"], - "photo" => $author["author-avatar"], "name" => $contact["name"], - "nick" => $contact["nick"], "location" => $contact["location"], - "about" => $contact["about"], "generation" => 2)); + $contact["generation"] = 2; + $contact["photo"] = $author["author-avatar"]; + update_gcontact($contact); } return($author); diff --git a/mod/item.php b/mod/item.php index 56c5ccad95..eba8296e70 100644 --- a/mod/item.php +++ b/mod/item.php @@ -1109,6 +1109,11 @@ function handle_tag($a, &$body, &$inform, &$str_tags, $profile_uid, $tag, $netwo //get the person's name $name = substr($tag,1); + // Sometimes the tag detection doesn't seem to work right + // This is some workaround + $nameparts = explode(" ", $name); + $name = $nameparts[0]; + // Try to detect the contact in various ways if ((strpos($name,'@')) || (strpos($name,'http://'))) { // Is it in format @user@domain.tld or @http://domain.tld/...? @@ -1146,8 +1151,7 @@ function handle_tag($a, &$body, &$inform, &$str_tags, $profile_uid, $tag, $netwo dbesc(normalise_link($probed["url"]))); } } - } elseif (!$r) { - $newname = str_replace('_',' ',$name); + } else { $r = false; if (strrpos($name,'+')) { // Is it in format @nick+number? @@ -1330,6 +1334,7 @@ function handle_tag($a, &$body, &$inform, &$str_tags, $profile_uid, $tag, $netwo } } */ + //if there is an url for this persons profile if(isset($profile)) { From 6703ba468a02210d9c6f5079933f52919701dcc0 Mon Sep 17 00:00:00 2001 From: Michael Vogel Date: Fri, 8 Jan 2016 08:02:42 +0100 Subject: [PATCH 019/242] Profile data in gcontact overwrites profile data --- mod/display.php | 33 ++++++++++++++++++--------------- 1 file changed, 18 insertions(+), 15 deletions(-) diff --git a/mod/display.php b/mod/display.php index 6ff599e2c7..3a4674c323 100644 --- a/mod/display.php +++ b/mod/display.php @@ -180,21 +180,24 @@ function display_fetchauthor($a, $item) { } // Fetching profile data from global contacts - // @todo: should override everything else (but not Feeds) - $r = q("SELECT `photo`, `nick`, `addr`, `location`, `about`, `gender` FROM `gcontact` WHERE `nurl` = '%s'", dbesc(normalise_link($profiledata["url"]))); - if (count($r)) { - if ($profiledata["photo"] == "") - $profiledata["photo"] = $r[0]["avatar"]; - if (($profiledata["address"] == "") AND ($profiledata["network"] != NETWORK_DIASPORA)) - $profiledata["address"] = $r[0]["location"]; - if (($profiledata["about"] == "") AND ($profiledata["network"] != NETWORK_DIASPORA)) - $profiledata["about"] = $r[0]["about"]; - if (($profiledata["nickname"] == "") AND ($r[0]["nick"] != "")) - $profiledata["nickname"] = $r[0]["nick"]; - if ($profiledata["gender"] == "") - $profiledata["gender"] = $r[0]["gender"]; - if ($profiledata["addr"] == "") - $profiledata["addr"] = $r[0]["addr"]; + if ($profiledata["network"] != NETWORK_FEED) { + $r = q("SELECT `photo`, `nick`, `addr`, `location`, `about`, `gender` FROM `gcontact` WHERE `nurl` = '%s'", dbesc(normalise_link($profiledata["url"]))); + if (count($r)) { + if ($r[0]["avatar"] != "") + $profiledata["photo"] = $r[0]["avatar"]; + if (($r[0]["location"] != "") AND ($profiledata["network"] != NETWORK_DIASPORA)) + $profiledata["address"] = $r[0]["location"]; + if (($r[0]["about"] != "") AND ($profiledata["network"] != NETWORK_DIASPORA)) + $profiledata["about"] = $r[0]["about"]; + if (($r[0]["nick"] != "") AND ($r[0]["nick"] != "")) + $profiledata["nickname"] = $r[0]["nick"]; + if ($r[0]["gender"] != "") + $profiledata["gender"] = $r[0]["gender"]; + if ($r[0]["addr"] != "") + $profiledata["addr"] = $r[0]["addr"]; + if ($r[0]["keywords"] != "") + $profiledata["keywords"] = $r[0]["keywords"]; + } } if (local_user()) { From 885dc1df81c9ab752f9f5d66894786944184a9c9 Mon Sep 17 00:00:00 2001 From: Michael Vogel Date: Sun, 10 Jan 2016 09:19:00 +0100 Subject: [PATCH 020/242] gcontact update script, rebuilt follow page, query speedup for community and network groups --- include/Contact.php | 162 ++++++++++++++++++++++++++++++++++++++ include/acl_selectors.php | 15 +++- include/cron.php | 5 +- include/dbstructure.php | 4 +- include/group.php | 17 +++- include/identity.php | 3 + include/threads.php | 2 +- mod/community.php | 9 +-- mod/contacts.php | 43 ++-------- mod/display.php | 59 +++++++------- mod/follow.php | 28 +++++-- mod/network.php | 38 +++++---- view/global.css | 4 + 13 files changed, 287 insertions(+), 102 deletions(-) diff --git a/include/Contact.php b/include/Contact.php index 3185e87348..5aaaa11bff 100644 --- a/include/Contact.php +++ b/include/Contact.php @@ -500,3 +500,165 @@ function get_contact($url, $uid = 0) { return $contactid; } + +/** + * @brief Returns posts from a given gcontact + * + * @param App $a argv application class + * @param int $gcontact_id Global contact + * + * @return string posts in HTML + */ +function posts_from_gcontact($a, $gcontact_id) { + + require_once('include/conversation.php'); + + // There are no posts with "uid = 0" with connector networks + // This speeds up the query a lot + $r = q("SELECT `network` FROM `gcontact` WHERE `id` = %d", dbesc($gcontact_id)); + if (in_array($r[0]["network"], array(NETWORK_DFRN, NETWORK_DIASPORA, NETWORK_OSTATUS, ""))) + $sql = "(`item`.`uid` = 0 OR (`item`.`uid` = %d AND `item`.`private`))"; + else + $sql = "`item`.`uid` = %d"; + + if(get_config('system', 'old_pager')) { + $r = q("SELECT COUNT(*) AS `total` FROM `item` + WHERE `gcontact-id` = %d and $sql", + intval($gcontact_id), + intval(local_user())); + + $a->set_pager_total($r[0]['total']); + } + + $r = q("SELECT `item`.`uri`, `item`.*, `item`.`id` AS `item_id`, + `author-name` AS `name`, `owner-avatar` AS `photo`, + `owner-link` AS `url`, `owner-avatar` AS `thumb` + FROM `item` + WHERE `gcontact-id` = %d AND $sql AND + NOT `deleted` AND NOT `moderated` AND `visible` + ORDER BY `item`.`created` DESC LIMIT %d, %d", + intval($gcontact_id), + intval(local_user()), + intval($a->pager['start']), + intval($a->pager['itemspage']) + ); + + $o = conversation($a,$r,'community',false); + + if(!get_config('system', 'old_pager')) { + $o .= alt_pager($a,count($r)); + } else { + $o .= paginate($a); + } + + return $o; +} + +/** + * @brief set the gcontact-id in all item entries + * + * This job has to be started multiple times until all entries are set. + * It isn't started in the update function since it would consume too much time and can be done in the background. + */ +function item_set_gcontact() { + define ('POST_UPDATE_VERSION', 1192); + + // Was the script completed? + if (get_config("system", "post_update_version") >= POST_UPDATE_VERSION) + return; + + // Check if the first step is done (Setting "gcontact-id" in the item table) + $r = q("SELECT `author-link`, `author-name`, `author-avatar`, `uid`, `network` FROM `item` WHERE `gcontact-id` = 0 LIMIT 1000"); + if (!$r) { + // Are there unfinished entries in the thread table? + $r = q("SELECT COUNT(*) AS `total` FROM `thread` + INNER JOIN `item` ON `item`.`id` =`thread`.`iid` + WHERE `thread`.`gcontact-id` = 0 AND + (`thread`.`uid` IN (SELECT `uid` from `user`) OR `thread`.`uid` = 0)"); + + if ($r AND ($r[0]["total"] == 0)) { + set_config("system", "post_update_version", POST_UPDATE_VERSION); + return false; + } + + // Update the thread table from the item table + q("UPDATE `thread` INNER JOIN `item` ON `item`.`id`=`thread`.`iid` + SET `thread`.`gcontact-id` = `item`.`gcontact-id` + WHERE `thread`.`gcontact-id` = 0 AND + (`thread`.`uid` IN (SELECT `uid` from `user`) OR `thread`.`uid` = 0)"); + + return false; + } + + $item_arr = array(); + foreach ($r AS $item) { + $index = $item["author-link"]."-".$item["uid"]; + $item_arr[$index] = array("author-link" => $item["author-link"], + "uid" => $item["uid"], + "network" => $item["network"]); + } + + // Set the "gcontact-id" in the item table and add a new gcontact entry if needed + foreach($item_arr AS $item) { + $gcontact_id = get_gcontact_id(array("url" => $item['author-link'], "network" => $item['network'], + "photo" => $item['author-avatar'], "name" => $item['author-name'])); + q("UPDATE `item` SET `gcontact-id` = %d WHERE `uid` = %d AND `author-link` = '%s' AND `gcontact-id` = 0", + intval($gcontact_id), intval($item["uid"]), dbesc($item["author-link"])); + } + return true; +} + +/** + * @brief Returns posts from a given contact + * + * @param App $a argv application class + * @param int $contact_id contact + * + * @return string posts in HTML + */ +function posts_from_contact($a, $contact_id) { + + require_once('include/conversation.php'); + + $r = q("SELECT `url` FROM `contact` WHERE `id` = %d", intval($contact_id)); + if (!$r) + return false; + + $contact = $r[0]; + + if(get_config('system', 'old_pager')) { + $r = q("SELECT COUNT(*) AS `total` FROM `item` + WHERE `item`.`uid` = %d AND `author-link` IN ('%s', '%s')", + intval(local_user()), + dbesc(str_replace("https://", "http://", $contact["url"])), + dbesc(str_replace("http://", "https://", $contact["url"]))); + + $a->set_pager_total($r[0]['total']); + } + + $r = q("SELECT `item`.`uri`, `item`.*, `item`.`id` AS `item_id`, + `author-name` AS `name`, `owner-avatar` AS `photo`, + `owner-link` AS `url`, `owner-avatar` AS `thumb` + FROM `item` FORCE INDEX (uid_contactid_created) + WHERE `item`.`uid` = %d AND `contact-id` = %d + AND `author-link` IN ('%s', '%s') + AND NOT `deleted` AND NOT `moderated` AND `visible` + ORDER BY `item`.`created` DESC LIMIT %d, %d", + intval(local_user()), + intval($contact_id), + dbesc(str_replace("https://", "http://", $contact["url"])), + dbesc(str_replace("http://", "https://", $contact["url"])), + intval($a->pager['start']), + intval($a->pager['itemspage']) + ); + + $o .= conversation($a,$r,'community',false); + + if(!get_config('system', 'old_pager')) + $o .= alt_pager($a,count($r)); + else + $o .= paginate($a); + + return $o; +} +?> diff --git a/include/acl_selectors.php b/include/acl_selectors.php index 4ef3d05ea3..d5730a93a9 100644 --- a/include/acl_selectors.php +++ b/include/acl_selectors.php @@ -407,7 +407,7 @@ function acl_lookup(&$a, $out_type = 'json') { $search = $_REQUEST['query']; } -// logger("Searching for ".$search." - type ".$type, LOGGER_DEBUG); + logger("Searching for ".$search." - type ".$type, LOGGER_DEBUG); if ($search!=""){ $sql_extra = "AND `name` LIKE '%%".dbesc($search)."%%'"; @@ -503,7 +503,7 @@ function acl_lookup(&$a, $out_type = 'json') { } } - if ($type=='' || $type=='c'){ + if ($type==''){ $r = q("SELECT `id`, `name`, `nick`, `micro`, `network`, `url`, `attag`, forum FROM `contact` WHERE `uid` = %d AND `self` = 0 AND `blocked` = 0 AND `pending` = 0 AND `archive` = 0 AND `notify` != '' @@ -514,6 +514,17 @@ function acl_lookup(&$a, $out_type = 'json') { dbesc(NETWORK_OSTATUS), dbesc(NETWORK_STATUSNET) ); } + elseif ($type=='c'){ + + $r = q("SELECT `id`, `name`, `nick`, `micro`, `network`, `url`, `attag`, forum FROM `contact` + WHERE `uid` = %d AND `self` = 0 AND `blocked` = 0 AND `pending` = 0 AND `archive` = 0 AND `notify` != '' + AND NOT (`network` IN ('%s')) + $sql_extra2 + ORDER BY `name` ASC ", + intval(local_user()), + dbesc(NETWORK_STATUSNET) + ); + } elseif($type == 'm') { $r = q("SELECT `id`, `name`, `nick`, `micro`, `network`, `url`, `attag` FROM `contact` WHERE `uid` = %d AND `self` = 0 AND `blocked` = 0 AND `pending` = 0 AND `archive` = 0 diff --git a/include/cron.php b/include/cron.php index a6e81f6bfd..b1db9278af 100644 --- a/include/cron.php +++ b/include/cron.php @@ -133,9 +133,8 @@ function cron_run(&$argv, &$argc){ // Check every conversation check_conversations(false); - // Follow your friends from your legacy OStatus account - // Doesn't work - // ostatus_check_follow_friends(); + // Set the gcontact-id in the item table if missing + item_set_gcontact(); // update nodeinfo data nodeinfo_cron(); diff --git a/include/dbstructure.php b/include/dbstructure.php index 4b2cdb251c..7fed50e741 100644 --- a/include/dbstructure.php +++ b/include/dbstructure.php @@ -877,7 +877,7 @@ function db_definition() { "uid_thrparent" => array("uid","thr-parent"), "uid_parenturi" => array("uid","parent-uri"), "uid_contactid_created" => array("uid","contact-id","created"), - "uid_gcontactid_created" => array("uid","gcontact-id","created"), + "gcontactid_uid_created" => array("gcontact-id","uid","created"), "wall_body" => array("wall","body(6)"), "uid_visible_moderated_created" => array("uid","visible","moderated","created"), "uid_uri" => array("uid","uri"), @@ -1324,6 +1324,8 @@ function db_definition() { "uid_network_created" => array("uid","network","created"), "uid_contactid_commented" => array("uid","contact-id","commented"), "uid_contactid_created" => array("uid","contact-id","created"), + "uid_gcontactid_commented" => array("uid","gcontact-id","commented"), + "uid_gcontactid_created" => array("uid","gcontact-id","created"), "wall_private_received" => array("wall","private","received"), "uid_created" => array("uid","created"), "uid_commented" => array("uid","commented"), diff --git a/include/group.php b/include/group.php index fd1c97dfde..a1375e00df 100644 --- a/include/group.php +++ b/include/group.php @@ -297,17 +297,26 @@ function group_side($every="contacts",$each="group",$editmode = "standard", $gro return $o; } -function expand_groups($a,$check_dead = false) { +function expand_groups($a,$check_dead = false, $use_gcontact = false) { if(! (is_array($a) && count($a))) return array(); $groups = implode(',', $a); $groups = dbesc($groups); - $r = q("SELECT `contact-id` FROM `group_member` WHERE `gid` IN ( $groups )"); + + if ($use_gcontact) + $r = q("SELECT `gcontact`.`id` AS `contact-id` FROM `group_member` + INNER JOIN `contact` ON `contact`.`id` = `group_member`.`contact-id` + INNER JOIN `gcontact` ON `gcontact`.`nurl` = `contact`.`nurl` + WHERE `gid` IN ($groups)"); + else + $r = q("SELECT `contact-id` FROM `group_member` WHERE `gid` IN ( $groups )"); + + $ret = array(); if(count($r)) foreach($r as $rr) $ret[] = $rr['contact-id']; - if($check_dead) { + if($check_dead AND !$use_gcontact) { require_once('include/acl_selectors.php'); $ret = prune_deadguys($ret); } @@ -366,4 +375,4 @@ function groups_count_unseen() { ); return $r; -} \ No newline at end of file +} diff --git a/include/identity.php b/include/identity.php index fb405b90f1..fdd28f81ce 100644 --- a/include/identity.php +++ b/include/identity.php @@ -300,6 +300,7 @@ function profile_sidebar($profile, $block = 0) { $account_type = ""; if((x($profile,'address') == 1) + || (x($profile,'location') == 1) || (x($profile,'locality') == 1) || (x($profile,'region') == 1) || (x($profile,'postal-code') == 1) @@ -368,6 +369,8 @@ function profile_sidebar($profile, $block = 0) { if (isset($p["address"])) $p["address"] = bbcode($p["address"]); + else + $p["address"] = bbcode($p["location"]); if (isset($p["photo"])) $p["photo"] = proxy_url($p["photo"], false, PROXY_SIZE_SMALL); diff --git a/include/threads.php b/include/threads.php index a671846594..44a7e65384 100644 --- a/include/threads.php +++ b/include/threads.php @@ -111,7 +111,7 @@ function update_thread_uri($itemuri, $uid) { } function update_thread($itemid, $setmention = false) { - $items = q("SELECT `uid`, `guid`, `title`, `body`, `created`, `edited`, `commented`, `received`, `changed`, `wall`, `private`, `pubmail`, `moderated`, `visible`, `spam`, `starred`, `bookmark`, `contact-id`, + $items = q("SELECT `uid`, `guid`, `title`, `body`, `created`, `edited`, `commented`, `received`, `changed`, `wall`, `private`, `pubmail`, `moderated`, `visible`, `spam`, `starred`, `bookmark`, `contact-id`, 'gcontact-id`, `deleted`, `origin`, `forum_mode`, `network` FROM `item` WHERE `id` = %d AND (`parent` = %d OR `parent` = 0) LIMIT 1", intval($itemid), intval($itemid)); if (!$items) diff --git a/mod/community.php b/mod/community.php index d6f87762bd..86bd18c869 100644 --- a/mod/community.php +++ b/mod/community.php @@ -143,14 +143,13 @@ function community_getpublicitems($start, $itemspage) { $r = q("SELECT `item`.`uri`, `item`.*, `item`.`id` AS `item_id`, `author-name` AS `name`, `owner-avatar` AS `photo`, `owner-link` AS `url`, `owner-avatar` AS `thumb` - FROM `item` WHERE `item`.`uid` = 0 AND `item`.`id` = `item`.`parent` - AND `item`.`allow_cid` = '' AND `item`.`allow_gid` = '' - AND `item`.`deny_cid` = '' AND `item`.`deny_gid` = '' - ORDER BY `item`.`received` DESC LIMIT %d, %d", + FROM `thread` + INNER JOIN `item` ON `item`.`id` = `thread`.`iid` + WHERE `thread`.`uid` = 0 + ORDER BY `thread`.`created` DESC LIMIT %d, %d", intval($start), intval($itemspage) ); return($r); - } diff --git a/mod/contacts.php b/mod/contacts.php index 0a8aad9d72..ac7c7d85a1 100644 --- a/mod/contacts.php +++ b/mod/contacts.php @@ -345,7 +345,6 @@ function _contact_archive($contact_id, $orig_record) { return $r; } function _contact_drop($contact_id, $orig_record) { - require_once('include/Contact.php'); $a = get_app(); terminate_friendship($a->user,$a->contact,$orig_record); @@ -890,50 +889,24 @@ function contacts_tab($a, $contact_id, $active_tab) { function contact_posts($a, $contact_id) { - require_once('include/conversation.php'); - - $r = q("SELECT * FROM `contact` WHERE `id` = %d", intval($contact_id)); + $r = q("SELECT `url` FROM `contact` WHERE `id` = %d", intval($contact_id)); if ($r) { $contact = $r[0]; $a->page['aside'] = ""; profile_load($a, "", 0, get_contact_details_by_url($contact["url"])); - } - - if(get_config('system', 'old_pager')) { - $r = q("SELECT COUNT(*) AS `total` FROM `item` - WHERE `item`.`uid` = %d AND `author-link` IN ('%s', '%s')", - intval(local_user()), - dbesc(str_replace("https://", "http://", $contact["url"])), - dbesc(str_replace("http://", "https://", $contact["url"]))); - - $a->set_pager_total($r[0]['total']); - } - - $r = q("SELECT `item`.`uri`, `item`.*, `item`.`id` AS `item_id`, - `author-name` AS `name`, `owner-avatar` AS `photo`, - `owner-link` AS `url`, `owner-avatar` AS `thumb` - FROM `item` FORCE INDEX (uid_contactid_created) - WHERE `item`.`uid` = %d AND `contact-id` = %d - AND `author-link` IN ('%s', '%s') - ORDER BY `item`.`created` DESC LIMIT %d, %d", - intval(local_user()), - intval($contact_id), - dbesc(str_replace("https://", "http://", $contact["url"])), - dbesc(str_replace("http://", "https://", $contact["url"])), - intval($a->pager['start']), - intval($a->pager['itemspage']) - ); + } else + $profile = ""; $tab_str = contacts_tab($a, $contact_id, 1); $o .= $tab_str; - $o .= conversation($a,$r,'community',false); + if ($contact["url"]) { + $r = q("SELECT `id` FROM `gcontact` WHERE `nurl` = '%s' LIMIT 1", + dbesc(normalise_link($contact["url"]))); - if(!get_config('system', 'old_pager')) { - $o .= alt_pager($a,count($r)); - } else { - $o .= paginate($a); + if ($r[0]["id"] <> 0) + $o .= posts_from_gcontact($a, $r[0]["id"]); } return $o; diff --git a/mod/display.php b/mod/display.php index 3a4674c323..41cad5c6a9 100644 --- a/mod/display.php +++ b/mod/display.php @@ -154,49 +154,48 @@ function display_fetchauthor($a, $item) { $profiledata["about"] = ""; } + // Don't show details from Diaspora contacts if you don't follow the contact + $showdetails = ($profiledata["network"] != NETWORK_DIASPORA); + // Fetching further contact data from the contact table - $r = q("SELECT `uid`, `network`, `photo`, `nick`, `location`, `about` FROM `contact` WHERE `nurl` = '%s' AND `uid` = %d AND `network` = '%s'", - dbesc(normalise_link($profiledata["url"])), intval($item["uid"]), dbesc($item["network"])); - + $r = q("SELECT `uid`, `network`, `photo`, `nick`, `addr`, `location`, `about`, `gender`, `keywords` + FROM `contact` WHERE `nurl` = '%s' AND `uid` = %d AND `network` = '%s' AND `rel` IN (%d, %d)", + dbesc(normalise_link($profiledata["url"])), intval($item["uid"]), dbesc($item["network"]), + intval(CONTACT_IS_SHARING), intval(CONTACT_IS_FRIEND)); if (!count($r)) - $r = q("SELECT `uid`, `network`, `photo`, `nick`, `location`, `about` FROM `contact` WHERE `nurl` = '%s' AND `uid` = %d", - dbesc(normalise_link($profiledata["url"])), intval($item["uid"])); - - if (!count($r)) - $r = q("SELECT `uid`, `network`, `photo`, `nick`, `location`, `about` FROM `contact` WHERE `nurl` = '%s' AND `uid` = 0", - dbesc(normalise_link($profiledata["url"]))); + $r = q("SELECT `uid`, `network`, `photo`, `nick`, `addr`, `location`, `about`, `gender`, `keywords` + FROM `contact` WHERE `nurl` = '%s' AND `uid` = %d AND `rel` IN (%d, %d)", + dbesc(normalise_link($profiledata["url"])), intval($item["uid"]), + intval(CONTACT_IS_SHARING), intval(CONTACT_IS_FRIEND)); if (count($r)) { - if ((($r[0]["uid"] != local_user()) OR !local_user()) AND ($profiledata["network"] == NETWORK_DIASPORA)) { - $r[0]["location"] = ""; - $r[0]["about"] = ""; - } - $profiledata["photo"] = $r[0]["photo"]; - $profiledata["address"] = $r[0]["location"]; - $profiledata["about"] = $r[0]["about"]; - if ($r[0]["nick"] != "") - $profiledata["nickname"] = $r[0]["nick"]; + $profiledata["nickname"] = $r[0]["nick"]; + $profiledata["addr"] = $r[0]["addr"]; + $profiledata["keywords"] = $r[0]["keywords"]; + + if (($r[0]["uid"] != 0) OR $showdetails) { + $showdetails = true; + $profiledata["address"] = $r[0]["location"]; + $profiledata["about"] = $r[0]["about"]; + $profiledata["gender"] = $r[0]["gender"]; + } } // Fetching profile data from global contacts if ($profiledata["network"] != NETWORK_FEED) { - $r = q("SELECT `photo`, `nick`, `addr`, `location`, `about`, `gender` FROM `gcontact` WHERE `nurl` = '%s'", dbesc(normalise_link($profiledata["url"]))); + $r = q("SELECT `photo`, `nick`, `addr`, `location`, `about`, `gender`, `keywords` FROM `gcontact` WHERE `nurl` = '%s'", dbesc(normalise_link($profiledata["url"]))); if (count($r)) { - if ($r[0]["avatar"] != "") - $profiledata["photo"] = $r[0]["avatar"]; - if (($r[0]["location"] != "") AND ($profiledata["network"] != NETWORK_DIASPORA)) + $profiledata["photo"] = $r[0]["photo"]; + $profiledata["nickname"] = $r[0]["nick"]; + $profiledata["addr"] = $r[0]["addr"]; + $profiledata["keywords"] = $r[0]["keywords"]; + + if ($showdetails) { $profiledata["address"] = $r[0]["location"]; - if (($r[0]["about"] != "") AND ($profiledata["network"] != NETWORK_DIASPORA)) $profiledata["about"] = $r[0]["about"]; - if (($r[0]["nick"] != "") AND ($r[0]["nick"] != "")) - $profiledata["nickname"] = $r[0]["nick"]; - if ($r[0]["gender"] != "") $profiledata["gender"] = $r[0]["gender"]; - if ($r[0]["addr"] != "") - $profiledata["addr"] = $r[0]["addr"]; - if ($r[0]["keywords"] != "") - $profiledata["keywords"] = $r[0]["keywords"]; + } } } diff --git a/mod/follow.php b/mod/follow.php index cc08831285..b92a0d980f 100644 --- a/mod/follow.php +++ b/mod/follow.php @@ -2,6 +2,7 @@ require_once('include/Scrape.php'); require_once('include/follow.php'); +require_once('include/Contact.php'); require_once('include/contact_selectors.php'); function follow_content(&$a) { @@ -75,15 +76,18 @@ function follow_content(&$a) { } $myaddr = $r[0]["url"]; + $gcontact_id = 0; // Makes the connection request for friendica contacts easier $_SESSION["fastlane"] = $ret["url"]; - $r = q("SELECT `location`, `about`, `keywords` FROM `gcontact` WHERE `nurl` = '%s'", + $r = q("SELECT `id`, `location`, `about`, `keywords` FROM `gcontact` WHERE `nurl` = '%s'", normalise_link($ret["url"])); if (!$r) $r = array(array("location" => "", "about" => "", "keywords" => "")); + else + $gcontact_id = $r[0]["id"]; if($ret['network'] === NETWORK_DIASPORA) { $r[0]["location"] = ""; @@ -95,11 +99,12 @@ function follow_content(&$a) { if ($ret["addr"] != "") $header .= " <".$ret["addr"].">"; - $header .= " (".network_to_name($ret['network'], $ret['url']).")"; + //$header .= " (".network_to_name($ret['network'], $ret['url']).")"; + $header = t("Connect/Follow"); $o = replace_macros($tpl,array( '$header' => htmlentities($header), - '$photo' => proxy_url($ret["photo"], false, PROXY_SIZE_SMALL), + //'$photo' => proxy_url($ret["photo"], false, PROXY_SIZE_SMALL), '$desc' => "", '$pls_answer' => t('Please answer the following:'), '$does_know_you' => array('knowyou', sprintf(t('Does %s know you?'),$ret["name"]), false, '', array(t('No'),t('Yes'))), @@ -121,13 +126,26 @@ function follow_content(&$a) { '$url_label' => t("Profile URL"), '$myaddr' => $myaddr, '$request' => $request, - '$location' => bbcode($r[0]["location"]), + /*'$location' => bbcode($r[0]["location"]), '$location_label' => t("Location:"), '$about' => bbcode($r[0]["about"], false, false), - '$about_label' => t("About:"), + '$about_label' => t("About:"), */ '$keywords' => $r[0]["keywords"], '$keywords_label' => t("Tags:") )); + + $a->page['aside'] = ""; + profile_load($a, "", 0, get_contact_details_by_url($ret["url"])); + + // Show last public posts + if ($gcontact_id <> 0) { + $o .= replace_macros(get_markup_template('section_title.tpl'), + array('$title' => t('Status Messages and Posts') + )); + + $o .= posts_from_gcontact($a, $gcontact_id); + } + return $o; } diff --git a/mod/network.php b/mod/network.php index 4b9493bc61..a12fa4ec36 100644 --- a/mod/network.php +++ b/mod/network.php @@ -312,6 +312,9 @@ function network_content(&$a, $update = 0) { return login(false); } + // Rawmode is used for fetching new content at the end of the page + $rawmode = (isset($_GET["mode"]) AND ($_GET["mode"] == "raw")); + /// @TODO Is this really necessary? $a is already available to hooks $arr = array('query' => $a->query_string); call_hooks('network_content_init', $arr); @@ -470,7 +473,7 @@ function network_content(&$a, $update = 0) { } set_pconfig(local_user(), 'network.view', 'net.selected', ($nets ? $nets : 'all')); - if(! $update) { + if(!$update AND !$rawmode) { if($group) { if(($t = group_public_members($group)) && (! get_pconfig(local_user(),'system','nowarn_insecure'))) { notice( sprintf( tt('Warning: This group contains %s member from an insecure network.', @@ -549,27 +552,30 @@ function network_content(&$a, $update = 0) { } $contacts = expand_groups(array($group)); - - $contact_str_self = ""; + $gcontacts = expand_groups(array($group), false, true); if((is_array($contacts)) && count($contacts)) { + $contact_str_self = ""; + $gcontact_str_self = ""; + $contact_str = implode(',',$contacts); - $self = q("SELECT `id` FROM `contact` WHERE `uid` = %d AND `self`", intval($_SESSION['uid'])); - if (count($self)) - $contact_str_self = ",".$self[0]["id"]; - } - else { - $contact_str = ' 0 '; + $gcontact_str = implode(',',$gcontacts); + $self = q("SELECT `contact`.`id`, `gcontact`.`id` AS `gid` FROM `contact` + INNER JOIN `gcontact` ON `gcontact`.`nurl` = `contact`.`nurl` + WHERE `uid` = %d AND `self`", intval($_SESSION['uid'])); + if (count($self)) { + $contact_str_self = $self[0]["id"]; + $gcontact_str_self = $self[0]["gid"]; + } + + $sql_post_table = " INNER JOIN `item` AS `temp1` ON `temp1`.`id` = ".$sql_table.".".$sql_parent; + $sql_extra3 .= " AND ($sql_table.`contact-id` IN ($contact_str) "; + $sql_extra3 .= " OR ($sql_table.`contact-id` = '$contact_str_self' AND `temp1`.`allow_gid` LIKE '".protect_sprintf('%<'.intval($group).'>%')."' AND `temp1`.`private`))"; + } else { + $sql_extra3 .= " AND false "; info( t('Group is empty')); } - //$sql_post_table = " INNER JOIN (SELECT DISTINCT(`parent`) FROM `item` WHERE (`contact-id` IN ($contact_str) OR `allow_gid` like '".protect_sprintf('%<'.intval($group).'>%')."') and deleted = 0 ORDER BY `created` DESC) AS `temp1` ON $sql_table.$sql_parent = `temp1`.`parent` "; - - $sql_extra3 .= " AND $sql_table.`contact-id` IN ($contact_str$contact_str_self) "; - $sql_extra3 .= " AND EXISTS (SELECT `id` FROM `item` WHERE (`contact-id` IN ($contact_str) - OR `allow_gid` LIKE '".protect_sprintf('%<'.intval($group).'>%')."') AND `deleted` = 0 - AND `id` = $sql_table.$sql_parent) "; - $o = replace_macros(get_markup_template("section_title.tpl"),array( '$title' => sprintf( t('Group: %s'), $r[0]['name']) )) . $o; diff --git a/view/global.css b/view/global.css index 05940508ca..900df53146 100644 --- a/view/global.css +++ b/view/global.css @@ -321,3 +321,7 @@ ul.credits li { .p-addr { clear: both; } + +#live-community { + clear: both; +} From 214f381e81cfe754c0b1e5e301d297192da83170 Mon Sep 17 00:00:00 2001 From: Michael Vogel Date: Sun, 10 Jan 2016 12:37:49 +0100 Subject: [PATCH 021/242] Code cleanup --- mod/item.php | 121 --------------------------------------------------- 1 file changed, 121 deletions(-) diff --git a/mod/item.php b/mod/item.php index eba8296e70..80a10179e8 100644 --- a/mod/item.php +++ b/mod/item.php @@ -1214,127 +1214,6 @@ function handle_tag($a, &$body, &$inform, &$str_tags, $profile_uid, $tag, $netwo $newname = $r[0]["name"]; } -/* - //is it a link or a full dfrn address? - if((strpos($name,'@')) || (strpos($name,'http://'))) { - $newname = $name; - //get the profile links - $links = @lrdd($name); - if(count($links)) { - //for all links, collect how is to inform and how's profile is to link - foreach($links as $link) { - if($link['@attributes']['rel'] === 'http://webfinger.net/rel/profile-page') - $profile = $link['@attributes']['href']; - if($link['@attributes']['rel'] === 'salmon') { - if(strlen($inform)) - $inform .= ','; - $inform .= 'url:' . str_replace(',','%2c',$link['@attributes']['href']); - } - } - } - } elseif (($network != NETWORK_OSTATUS) AND ($network != NETWORK_TWITTER) AND - ($network != NETWORK_STATUSNET) AND ($network != NETWORK_APPNET)) { - //if it is a name rather than an address - $newname = $name; - $alias = ''; - $tagcid = 0; - //is it some generated name? - if(strrpos($newname,'+')) { - //get the id - $tagcid = intval(substr($newname,strrpos($newname,'+') + 1)); - //remove the next word from tag's name - if(strpos($name,' ')) { - $name = substr($name,0,strpos($name,' ')); - } - } - if($tagcid) { //if there was an id - //select contact with that id from the logged in user's contact list - $r = q("SELECT * FROM `contact` WHERE `id` = %d AND `uid` = %d LIMIT 1", - intval($tagcid), - intval($profile_uid) - ); - } - else { - $newname = str_replace('_',' ',$name); - - // At first try to fetch a contact according to the given network - if ($network != "") { - //select someone from this user's contacts by name - $r = q("SELECT * FROM `contact` WHERE `name` = '%s' AND `network` = '%s' AND `uid` = %d LIMIT 1", - dbesc($newname), - dbesc($network), - intval($profile_uid) - ); - if(! $r) { - //select someone by attag or nick and the name passed in - $r = q("SELECT * FROM `contact` WHERE `attag` = '%s' OR `nick` = '%s' AND `network` = '%s' AND `uid` = %d ORDER BY `attag` DESC LIMIT 1", - dbesc($name), - dbesc($name), - dbesc($network), - intval($profile_uid) - ); - } - } else - $r = false; - - if(! $r) { - //select someone from this user's contacts by name - $r = q("SELECT * FROM `contact` WHERE `name` = '%s' AND `uid` = %d LIMIT 1", - dbesc($newname), - intval($profile_uid) - ); - } - - if(! $r) { - //select someone by attag or nick and the name passed in - $r = q("SELECT * FROM `contact` WHERE `attag` = '%s' OR `nick` = '%s' AND `uid` = %d ORDER BY `attag` DESC LIMIT 1", - dbesc($name), - dbesc($name), - intval($profile_uid) - ); - } - } -*/ - -/* } elseif(strstr($name,'_') || strstr($name,' ')) { //no id - //get the real name - $newname = str_replace('_',' ',$name); - //select someone from this user's contacts by name - $r = q("SELECT * FROM `contact` WHERE `name` = '%s' AND `uid` = %d LIMIT 1", - dbesc($newname), - intval($profile_uid) - ); - } else { - //select someone by attag or nick and the name passed in - $r = q("SELECT * FROM `contact` WHERE `attag` = '%s' OR `nick` = '%s' AND `uid` = %d ORDER BY `attag` DESC LIMIT 1", - dbesc($name), - dbesc($name), - intval($profile_uid) - ); - }*/ - -/* - //$r is set, if someone could be selected - if(count($r)) { - $profile = $r[0]['url']; - //set newname to nick, find alias - if(($r[0]['network'] === NETWORK_OSTATUS) OR ($r[0]['network'] === NETWORK_TWITTER) - OR ($r[0]['network'] === NETWORK_STATUSNET) OR ($r[0]['network'] === NETWORK_APPNET)) { - $newname = $r[0]['nick']; - $stat = true; - if($r[0]['alias']) - $alias = $r[0]['alias']; - } - else - $newname = $r[0]['name']; - //add person's id to $inform - if(strlen($inform)) - $inform .= ','; - $inform .= 'cid:' . $r[0]['id']; - } - } -*/ - //if there is an url for this persons profile if(isset($profile)) { From 2f49e984bd3556338ad934ba821dfe9bd56b6636 Mon Sep 17 00:00:00 2001 From: Michael Vogel Date: Sun, 10 Jan 2016 14:12:05 +0100 Subject: [PATCH 022/242] Updated database.sql file, further code cleanup --- database.sql | 6 +++++- mod/network.php | 4 ---- 2 files changed, 5 insertions(+), 5 deletions(-) diff --git a/database.sql b/database.sql index 4e6f3d35c7..df5ec74e29 100644 --- a/database.sql +++ b/database.sql @@ -338,6 +338,8 @@ CREATE TABLE IF NOT EXISTS `gcontact` ( `nsfw` tinyint(1) NOT NULL DEFAULT 0, `network` varchar(255) NOT NULL DEFAULT '', `addr` varchar(255) NOT NULL DEFAULT '', + `notify` text NOT NULL, + `alias` varchar(255) NOT NULL DEFAULT '', `generation` tinyint(3) NOT NULL DEFAULT 0, `server_url` varchar(255) NOT NULL DEFAULT '', PRIMARY KEY(`id`), @@ -539,7 +541,7 @@ CREATE TABLE IF NOT EXISTS `item` ( INDEX `uid_thrparent` (`uid`,`thr-parent`), INDEX `uid_parenturi` (`uid`,`parent-uri`), INDEX `uid_contactid_created` (`uid`,`contact-id`,`created`), - INDEX `uid_gcontactid_created` (`uid`,`gcontact-id`,`created`), + INDEX `gcontactid_uid_created` (`gcontact-id`,`uid`,`created`), INDEX `wall_body` (`wall`,`body`(6)), INDEX `uid_visible_moderated_created` (`uid`,`visible`,`moderated`,`created`), INDEX `uid_uri` (`uid`,`uri`), @@ -986,6 +988,8 @@ CREATE TABLE IF NOT EXISTS `thread` ( INDEX `uid_network_created` (`uid`,`network`,`created`), INDEX `uid_contactid_commented` (`uid`,`contact-id`,`commented`), INDEX `uid_contactid_created` (`uid`,`contact-id`,`created`), + INDEX `uid_gcontactid_commented` (`uid`,`gcontact-id`,`commented`), + INDEX `uid_gcontactid_created` (`uid`,`gcontact-id`,`created`), INDEX `wall_private_received` (`wall`,`private`,`received`), INDEX `uid_created` (`uid`,`created`), INDEX `uid_commented` (`uid`,`commented`) diff --git a/mod/network.php b/mod/network.php index a12fa4ec36..3317dc684b 100644 --- a/mod/network.php +++ b/mod/network.php @@ -588,10 +588,6 @@ function network_content(&$a, $update = 0) { intval($cid) ); if(count($r)) { - //$sql_post_table = " INNER JOIN (SELECT DISTINCT(`parent`) FROM `item` - // WHERE 1 $sql_options AND `contact-id` = ".intval($cid)." AND `deleted` = 0 - // ORDER BY `item`.`received` DESC) AS `temp1` - // ON $sql_table.$sql_parent = `temp1`.`parent` "; $sql_extra = " AND ".$sql_table.".`contact-id` = ".intval($cid); $entries[0] = array( From 23731fc9aafb5625c4a3a8e714a77711b84a3a96 Mon Sep 17 00:00:00 2001 From: Michael Vogel Date: Sun, 10 Jan 2016 15:44:23 +0100 Subject: [PATCH 023/242] Bugfix: The display hadn't fetched the correct contact for the uid. --- include/bbcode.php | 20 ++++++++++++++++++-- mod/display.php | 16 ++++++++++------ 2 files changed, 28 insertions(+), 8 deletions(-) diff --git a/include/bbcode.php b/include/bbcode.php index b68a7c5b18..6a44e19ec4 100644 --- a/include/bbcode.php +++ b/include/bbcode.php @@ -3,6 +3,7 @@ require_once("include/oembed.php"); require_once('include/event.php'); require_once('include/map.php'); require_once('mod/proxy.php'); +require_once('include/Contact.php'); function bb_PictureCacheExt($matches) { if (strpos($matches[3], "data:image/") === 0) @@ -541,8 +542,23 @@ function bb_ShareAttributes($share, $simplehtml) { $reldate = (($posted) ? " " . relative_date($posted) : ''); } - $userid = GetProfileUsername($profile,$author, false); - $userid_compact = GetProfileUsername($profile,$author, true); + $data = get_contact_details_by_url($profile); + + if (isset($data["name"]) AND isset($data["addr"])) + $userid_compact = $data["name"]." (".$data["addr"].")"; + else + $userid_compact = GetProfileUsername($profile,$author, true); + + if (isset($data["addr"])) + $userid = $data["addr"]; + else + $userid = GetProfileUsername($profile,$author, false); + + if (isset($data["name"])) + $author = $data["name"]; + + if (isset($data["photo"])) + $avatar = $data["photo"]; $preshare = trim($share[1]); diff --git a/mod/display.php b/mod/display.php index 41cad5c6a9..c41d2f045f 100644 --- a/mod/display.php +++ b/mod/display.php @@ -158,23 +158,25 @@ function display_fetchauthor($a, $item) { $showdetails = ($profiledata["network"] != NETWORK_DIASPORA); // Fetching further contact data from the contact table - $r = q("SELECT `uid`, `network`, `photo`, `nick`, `addr`, `location`, `about`, `gender`, `keywords` + $r = q("SELECT `uid`, `network`, `name`, `photo`, `nick`, `addr`, `location`, `about`, `gender`, `keywords` FROM `contact` WHERE `nurl` = '%s' AND `uid` = %d AND `network` = '%s' AND `rel` IN (%d, %d)", - dbesc(normalise_link($profiledata["url"])), intval($item["uid"]), dbesc($item["network"]), + dbesc(normalise_link($profiledata["url"])), intval(local_user()), dbesc($item["network"]), intval(CONTACT_IS_SHARING), intval(CONTACT_IS_FRIEND)); if (!count($r)) - $r = q("SELECT `uid`, `network`, `photo`, `nick`, `addr`, `location`, `about`, `gender`, `keywords` + $r = q("SELECT `uid`, `network`, `name`, `photo`, `nick`, `addr`, `location`, `about`, `gender`, `keywords` FROM `contact` WHERE `nurl` = '%s' AND `uid` = %d AND `rel` IN (%d, %d)", - dbesc(normalise_link($profiledata["url"])), intval($item["uid"]), + dbesc(normalise_link($profiledata["url"])), intval(local_user()), intval(CONTACT_IS_SHARING), intval(CONTACT_IS_FRIEND)); if (count($r)) { + $profiledata["name"] = $r[0]["name"]; $profiledata["photo"] = $r[0]["photo"]; $profiledata["nickname"] = $r[0]["nick"]; $profiledata["addr"] = $r[0]["addr"]; $profiledata["keywords"] = $r[0]["keywords"]; + $profiledata["network"] = $r[0]["network"]; - if (($r[0]["uid"] != 0) OR $showdetails) { + if (local_user() OR $showdetails) { $showdetails = true; $profiledata["address"] = $r[0]["location"]; $profiledata["about"] = $r[0]["about"]; @@ -184,12 +186,14 @@ function display_fetchauthor($a, $item) { // Fetching profile data from global contacts if ($profiledata["network"] != NETWORK_FEED) { - $r = q("SELECT `photo`, `nick`, `addr`, `location`, `about`, `gender`, `keywords` FROM `gcontact` WHERE `nurl` = '%s'", dbesc(normalise_link($profiledata["url"]))); + $r = q("SELECT `name`, `photo`, `nick`, `addr`, `location`, `about`, `gender`, `keywords` FROM `gcontact` WHERE `nurl` = '%s'", dbesc(normalise_link($profiledata["url"]))); if (count($r)) { + $profiledata["name"] = $r[0]["name"]; $profiledata["photo"] = $r[0]["photo"]; $profiledata["nickname"] = $r[0]["nick"]; $profiledata["addr"] = $r[0]["addr"]; $profiledata["keywords"] = $r[0]["keywords"]; + $profiledata["network"] = $r[0]["network"]; if ($showdetails) { $profiledata["address"] = $r[0]["location"]; From b4631cebed8acfac5c2e7329b2fb76324f734d9b Mon Sep 17 00:00:00 2001 From: Michael Vogel Date: Sun, 10 Jan 2016 17:10:56 +0100 Subject: [PATCH 024/242] Fixed SQL problems --- include/threads.php | 2 +- mod/network.php | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/include/threads.php b/include/threads.php index 44a7e65384..dddcc4cdd3 100644 --- a/include/threads.php +++ b/include/threads.php @@ -111,7 +111,7 @@ function update_thread_uri($itemuri, $uid) { } function update_thread($itemid, $setmention = false) { - $items = q("SELECT `uid`, `guid`, `title`, `body`, `created`, `edited`, `commented`, `received`, `changed`, `wall`, `private`, `pubmail`, `moderated`, `visible`, `spam`, `starred`, `bookmark`, `contact-id`, 'gcontact-id`, + $items = q("SELECT `uid`, `guid`, `title`, `body`, `created`, `edited`, `commented`, `received`, `changed`, `wall`, `private`, `pubmail`, `moderated`, `visible`, `spam`, `starred`, `bookmark`, `contact-id`, `gcontact-id`, `deleted`, `origin`, `forum_mode`, `network` FROM `item` WHERE `id` = %d AND (`parent` = %d OR `parent` = 0) LIMIT 1", intval($itemid), intval($itemid)); if (!$items) diff --git a/mod/network.php b/mod/network.php index 3317dc684b..a07c5868ec 100644 --- a/mod/network.php +++ b/mod/network.php @@ -670,7 +670,7 @@ function network_content(&$a, $update = 0) { } if($conv) - $sql_extra3 .= " AND `mention`"; + $sql_extra3 .= " AND $sql_table.`mention`"; if($update) { From 6b85fa17bbc187604001df799dfabab7f0656819 Mon Sep 17 00:00:00 2001 From: Michael Vogel Date: Sun, 10 Jan 2016 19:06:34 +0100 Subject: [PATCH 025/242] Added some documentation --- include/Contact.php | 4 ++-- include/socgraph.php | 42 +++++++++++++++++++++++++++++++++++------- mod/contacts.php | 4 +++- mod/display.php | 2 +- 4 files changed, 41 insertions(+), 11 deletions(-) diff --git a/include/Contact.php b/include/Contact.php index 5aaaa11bff..81692fa840 100644 --- a/include/Contact.php +++ b/include/Contact.php @@ -533,7 +533,7 @@ function posts_from_gcontact($a, $gcontact_id) { $r = q("SELECT `item`.`uri`, `item`.*, `item`.`id` AS `item_id`, `author-name` AS `name`, `owner-avatar` AS `photo`, `owner-link` AS `url`, `owner-avatar` AS `thumb` - FROM `item` + FROM `item` FORCE INDEX (`gcontactid_uid_created`) WHERE `gcontact-id` = %d AND $sql AND NOT `deleted` AND NOT `moderated` AND `visible` ORDER BY `item`.`created` DESC LIMIT %d, %d", @@ -639,7 +639,7 @@ function posts_from_contact($a, $contact_id) { $r = q("SELECT `item`.`uri`, `item`.*, `item`.`id` AS `item_id`, `author-name` AS `name`, `owner-avatar` AS `photo`, `owner-link` AS `url`, `owner-avatar` AS `thumb` - FROM `item` FORCE INDEX (uid_contactid_created) + FROM `item` FORCE INDEX (`uid_contactid_created`) WHERE `item`.`uid` = %d AND `contact-id` = %d AND `author-link` IN ('%s', '%s') AND NOT `deleted` AND NOT `moderated` AND `visible` diff --git a/include/socgraph.php b/include/socgraph.php index 0082cb43b2..00fc439b7e 100644 --- a/include/socgraph.php +++ b/include/socgraph.php @@ -1507,6 +1507,12 @@ function poco_discover_server($data, $default_generation = 0) { return $success; } +/** + * @brief Fetch the gcontact id, add an entry if not existed + * + * @param arr $contact contact array + * @return bool|int Returns false if not found, integer if contact was found + */ function get_gcontact_id($contact) { $gcontact_id = 0; @@ -1546,6 +1552,12 @@ function get_gcontact_id($contact) { return $gcontact_id; } +/** + * @brief Updates the gcontact table from a given array + * + * @param arr $contact contact array + * @return bool|int Returns false if not found, integer if contact was found + */ function update_gcontact($contact) { $gcontact_id = get_gcontact_id($contact); @@ -1553,7 +1565,7 @@ function update_gcontact($contact) { if (!$gcontact_id) return false; - $r = q("SELECT `name`, `nick`, `photo`, `location`, `about`, `addr`, `generation`, `birthday`, `gender`, `keywords`, `hide`, `nsfw`, `network`, `alias`, `notify` + $r = q("SELECT `name`, `nick`, `photo`, `location`, `about`, `addr`, `generation`, `birthday`, `gender`, `keywords`, `hide`, `nsfw`, `network`, `alias`, `notify`, `url` FROM `gcontact` WHERE `id` = %d LIMIT 1", intval($gcontact_id)); @@ -1599,6 +1611,9 @@ function update_gcontact($contact) { if ($contact["alias"] =="") $contact["alias"] = $r[0]["alias"]; + if ($contact["url"] =="") + $contact["url"] = $r[0]["url"]; + if ($contact["notify"] =="") $contact["notify"] = $r[0]["notify"]; @@ -1608,22 +1623,35 @@ function update_gcontact($contact) { if (($contact["photo"] != $r[0]["photo"]) OR ($contact["name"] != $r[0]["name"]) OR ($contact["nick"] != $r[0]["nick"]) OR ($contact["addr"] != $r[0]["addr"]) OR ($contact["birthday"] != $r[0]["birthday"]) OR ($contact["gender"] != $r[0]["gender"]) OR ($contact["keywords"] != $r[0]["keywords"]) OR ($contact["hide"] != $r[0]["hide"]) OR ($contact["nsfw"] != $r[0]["nsfw"]) OR ($contact["network"] != $r[0]["network"]) OR - ($contact["alias"] != $r[0]["alias"]) OR ($contact["notify"] != $r[0]["notify"]) OR + ($contact["alias"] != $r[0]["alias"]) OR ($contact["notify"] != $r[0]["notify"]) OR ($contact["url"] != $r[0]["url"]) OR ($contact["location"] != $r[0]["location"]) OR ($contact["about"] != $r[0]["about"]) OR ($contact["generation"] < $r[0]["generation"])) { q("UPDATE `gcontact` SET `photo` = '%s', `name` = '%s', `nick` = '%s', `addr` = '%s', `network` = '%s', `birthday` = '%s', `gender` = '%s', `keywords` = %d, `hide` = %d, `nsfw` = %d, - `alias` = '%s', `notify` = '%s', + `alias` = '%s', `notify` = '%s', `url` = '%s', `location` = '%s', `about` = '%s', `generation` = %d, `updated` = '%s' WHERE `nurl` = '%s' AND (`generation` = 0 OR `generation` >= %d)", dbesc($contact["photo"]), dbesc($contact["name"]), dbesc($contact["nick"]), - dbesc($contact["addr"]), dbesc($contact["network"]), - dbesc($contact["birthday"]), dbesc($contact["gender"]), dbesc($contact["keywords"]), - intval($contact["hide"]), intval($contact["nsfw"]), dbesc($contact["alias"]), dbesc($contact["notify"]), - dbesc($contact["location"]), dbesc($contact["about"]), intval($contact["generation"]), dbesc(datetime_convert()), + dbesc($contact["addr"]), dbesc($contact["network"]), dbesc($contact["birthday"]), + dbesc($contact["gender"]), dbesc($contact["keywords"]), intval($contact["hide"]), + intval($contact["nsfw"]), dbesc($contact["alias"]), dbesc($contact["notify"]), + dbesc($contact["url"]), dbesc($contact["location"]), dbesc($contact["about"]), + intval($contact["generation"]), dbesc(datetime_convert()), dbesc(normalise_link($contact["url"])), intval($contact["generation"])); } return $gcontact_id; } + +/** + * @brief Updates the gcontact entry from probe + * + * @param str $url profile link + */ +function update_gcontact_from_probe($url) { + $data = probe_url($url); + + if ($data["network"] != NETWORK_PHANTOM) + update_gcontact($data); +} ?> diff --git a/mod/contacts.php b/mod/contacts.php index ac7c7d85a1..f83b1b5daa 100644 --- a/mod/contacts.php +++ b/mod/contacts.php @@ -302,7 +302,7 @@ function _contact_update_profile($contact_id) { `uri-date` = '%s', `avatar-date` = '%s' WHERE `id` = %d", - dbesc($photos[0]), + dbesc($data["photo"]), dbesc($photos[1]), dbesc($photos[2]), dbesc(datetime_convert()), @@ -311,6 +311,8 @@ function _contact_update_profile($contact_id) { intval($contact_id) ); + // Update the entry in the gcontact table + update_gcontact_from_probe($data["url"]); } function _contact_block($contact_id, $orig_record) { diff --git a/mod/display.php b/mod/display.php index c41d2f045f..c53e92d05b 100644 --- a/mod/display.php +++ b/mod/display.php @@ -186,7 +186,7 @@ function display_fetchauthor($a, $item) { // Fetching profile data from global contacts if ($profiledata["network"] != NETWORK_FEED) { - $r = q("SELECT `name`, `photo`, `nick`, `addr`, `location`, `about`, `gender`, `keywords` FROM `gcontact` WHERE `nurl` = '%s'", dbesc(normalise_link($profiledata["url"]))); + $r = q("SELECT `name`, `photo`, `nick`, `addr`, `location`, `about`, `gender`, `keywords`, `network` FROM `gcontact` WHERE `nurl` = '%s'", dbesc(normalise_link($profiledata["url"]))); if (count($r)) { $profiledata["name"] = $r[0]["name"]; $profiledata["photo"] = $r[0]["photo"]; From 8d9a905c8073bd7bf3eec0aed6d9ac95f9d5792d Mon Sep 17 00:00:00 2001 From: Michael Vogel Date: Sun, 10 Jan 2016 23:08:25 +0100 Subject: [PATCH 026/242] Bugfix: Public posts to Diaspora could fail --- include/Scrape.php | 7 ++++--- include/cron.php | 18 ++++++++++++++++++ 2 files changed, 22 insertions(+), 3 deletions(-) diff --git a/include/Scrape.php b/include/Scrape.php index cb192c77c2..9cc7086157 100644 --- a/include/Scrape.php +++ b/include/Scrape.php @@ -559,10 +559,11 @@ function probe_url($url, $mode = PROBE_NORMAL, $level = 1) { $pubkey = $hcard_key; } } - if($diaspora && $diaspora_base && $diaspora_guid) { - if($mode == PROBE_DIASPORA || ! $notify) { - $notify = $diaspora_base . 'receive/users/' . $diaspora_guid; + $diaspora_notify = $diaspora_base.'receive/users/'.$diaspora_guid; + + if($mode == PROBE_DIASPORA || ! $notify || ($notify == $diaspora_notify)) { + $notify = $diaspora_notify; $batch = $diaspora_base . 'receive/public' ; } if(strpos($url,'@')) diff --git a/include/cron.php b/include/cron.php index a6e81f6bfd..78d5ca1541 100644 --- a/include/cron.php +++ b/include/cron.php @@ -229,6 +229,24 @@ function cron_run(&$argv, &$argc){ set_config('system','cache_last_cleared', time()); } + // Repair missing Diaspora settings + $r = q("SELECT `id`, `url` FROM `contact` + WHERE `uid` > 0 AND `network` = '%s' AND (`batch` = '' OR `notify` = '' OR `poll` = '' OR pubkey = '') + ORDER BY RAND() LIMIT 50", dbesc(NETWORK_DIASPORA)); + if ($r) { + foreach ($r AS $contact) { + if (poco_reachable($contact["url"])) { + $data = probe_url($contact["url"]); + if ($data["network"] == NETWORK_DIASPORA) { + logger("Repair contact ".$contact["id"]." ".$contact["url"], LOGGER_DEBUG); + q("UPDATE `contact` SET `batch` = '%s', `notify` = '%s', `poll` = '%s', pubkey = '%s' WHERE `id` = %d", + dbesc($data["batch"]), dbesc($data["notify"]), dbesc($data["poll"]), dbesc($data["pubkey"]), + intval($contact["id"])); + } + } + } + } + $manual_id = 0; $generation = 0; $force = false; From bfdbc0c81821f48a5d7965fde3fae8127ee87084 Mon Sep 17 00:00:00 2001 From: Tobias Diekershoff Date: Mon, 11 Jan 2016 07:54:52 +0100 Subject: [PATCH 027/242] don't mention FB in newhere tipps --- mod/newmember.php | 5 ----- 1 file changed, 5 deletions(-) diff --git a/mod/newmember.php b/mod/newmember.php index 8028e7e08d..aa55c3a098 100644 --- a/mod/newmember.php +++ b/mod/newmember.php @@ -45,11 +45,6 @@ function newmember_content(&$a) { $o .= '
    '; - if(in_array('facebook', $a->plugins)) - $o .= '
  • ' . '' . t('Facebook') . '
    ' . t("Authorise the Facebook Connector if you currently have a Facebook account and we will \x28optionally\x29 import all your Facebook friends and conversations.") . '
  • ' . EOL; - else - $o .= '
  • ' . '' . t('Facebook') . '
    ' . t("If this is your own personal server, installing the Facebook addon may ease your transition to the free social web.") . '
  • ' . EOL; - $mail_disabled = ((function_exists('imap_open') && (! get_config('system','imap_disabled'))) ? 0 : 1); if(! $mail_disabled) From 5c568df9a6d0136d44e60a2d9a45393efff35b69 Mon Sep 17 00:00:00 2001 From: Tobias Diekershoff Date: Mon, 11 Jan 2016 08:57:51 +0100 Subject: [PATCH 028/242] remove unsupported themes from list of allowed themes --- htconfig.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/htconfig.php b/htconfig.php index 508de9a323..fe6c0d82ee 100644 --- a/htconfig.php +++ b/htconfig.php @@ -57,7 +57,7 @@ $a->config['system']['huburl'] = '[internal]'; // allowed themes (change this from admin panel after installation) -$a->config['system']['allowed_themes'] = 'dispy,quattro,vier,darkzero,duepuntozero,greenzero,purplezero,slackr,diabook'; +$a->config['system']['allowed_themes'] = 'quattro,vier,duepuntozero'; // default system theme From 941b5fd11e7a7abe83940edfa5cfe74e1920c957 Mon Sep 17 00:00:00 2001 From: Michael Vogel Date: Mon, 11 Jan 2016 14:24:54 +0100 Subject: [PATCH 029/242] Some added logging --- include/diaspora.php | 29 ++++++++++++++++++----------- 1 file changed, 18 insertions(+), 11 deletions(-) diff --git a/include/diaspora.php b/include/diaspora.php index 59c1ac5a2a..1cf8897af9 100644 --- a/include/diaspora.php +++ b/include/diaspora.php @@ -2640,11 +2640,12 @@ function diaspora_send_status($item,$owner,$contact,$public_batch = false) { } logger('diaspora_send_status: '.$owner['username'].' -> '.$contact['name'].' base message: '.$msg, LOGGER_DATA); + logger('send guid '.$item['guid'], LOGGER_DEBUG); $slap = 'xml=' . urlencode(urlencode(diaspora_msg_build($msg,$owner,$contact,$owner['uprvkey'],$contact['pubkey'],$public_batch))); //$slap = 'xml=' . urlencode(diaspora_msg_build($msg,$owner,$contact,$owner['uprvkey'],$contact['pubkey'],$public_batch)); - $return_code = diaspora_transmit($owner,$contact,$slap,$public_batch); + $return_code = diaspora_transmit($owner,$contact,$slap,$public_batch,false,$item['guid']); logger('diaspora_send_status: guid: '.$item['guid'].' result '.$return_code, LOGGER_DEBUG); @@ -2755,10 +2756,12 @@ function diaspora_send_images($item,$owner,$contact,$images,$public_batch = fals logger('diaspora_send_photo: base message: ' . $msg, LOGGER_DATA); + logger('send guid '.$r[0]['guid'], LOGGER_DEBUG); + $slap = 'xml=' . urlencode(urlencode(diaspora_msg_build($msg,$owner,$contact,$owner['uprvkey'],$contact['pubkey'],$public_batch))); //$slap = 'xml=' . urlencode(diaspora_msg_build($msg,$owner,$contact,$owner['uprvkey'],$contact['pubkey'],$public_batch)); - diaspora_transmit($owner,$contact,$slap,$public_batch); + diaspora_transmit($owner,$contact,$slap,$public_batch,false,$r[0]['guid']); } } @@ -2829,11 +2832,12 @@ function diaspora_send_followup($item,$owner,$contact,$public_batch = false) { )); logger('diaspora_followup: base message: ' . $msg, LOGGER_DATA); + logger('send guid '.$item['guid'], LOGGER_DEBUG); $slap = 'xml=' . urlencode(urlencode(diaspora_msg_build($msg,$owner,$contact,$owner['uprvkey'],$contact['pubkey'],$public_batch))); //$slap = 'xml=' . urlencode(diaspora_msg_build($msg,$owner,$contact,$owner['uprvkey'],$contact['pubkey'],$public_batch)); - return(diaspora_transmit($owner,$contact,$slap,$public_batch)); + return(diaspora_transmit($owner,$contact,$slap,$public_batch,false,$item['guid'])); } @@ -2965,12 +2969,12 @@ function diaspora_send_relay($item,$owner,$contact,$public_batch = false) { )); logger('diaspora_send_relay: base message: ' . $msg, LOGGER_DATA); - + logger('send guid '.$item['guid'], LOGGER_DEBUG); $slap = 'xml=' . urlencode(urlencode(diaspora_msg_build($msg,$owner,$contact,$owner['uprvkey'],$contact['pubkey'],$public_batch))); //$slap = 'xml=' . urlencode(diaspora_msg_build($msg,$owner,$contact,$owner['uprvkey'],$contact['pubkey'],$public_batch)); - return(diaspora_transmit($owner,$contact,$slap,$public_batch)); + return(diaspora_transmit($owner,$contact,$slap,$public_batch,false,$item['guid'])); } @@ -3002,10 +3006,12 @@ function diaspora_send_retraction($item,$owner,$contact,$public_batch = false) { '$signature' => xmlify(base64_encode(rsa_sign($signed_text,$owner['uprvkey'],'sha256'))) )); + logger('send guid '.$item['guid'], LOGGER_DEBUG); + $slap = 'xml=' . urlencode(urlencode(diaspora_msg_build($msg,$owner,$contact,$owner['uprvkey'],$contact['pubkey'],$public_batch))); //$slap = 'xml=' . urlencode(diaspora_msg_build($msg,$owner,$contact,$owner['uprvkey'],$contact['pubkey'],$public_batch)); - return(diaspora_transmit($owner,$contact,$slap,$public_batch)); + return(diaspora_transmit($owner,$contact,$slap,$public_batch,false,$item['guid'])); } function diaspora_send_mail($item,$owner,$contact) { @@ -3062,16 +3068,17 @@ function diaspora_send_mail($item,$owner,$contact) { } logger('diaspora_conversation: ' . print_r($xmsg,true), LOGGER_DATA); + logger('send guid '.$item['guid'], LOGGER_DEBUG); $slap = 'xml=' . urlencode(urlencode(diaspora_msg_build($xmsg,$owner,$contact,$owner['uprvkey'],$contact['pubkey'],false))); //$slap = 'xml=' . urlencode(diaspora_msg_build($xmsg,$owner,$contact,$owner['uprvkey'],$contact['pubkey'],false)); - return(diaspora_transmit($owner,$contact,$slap,false)); + return(diaspora_transmit($owner,$contact,$slap,false,false,$item['guid'])); } -function diaspora_transmit($owner,$contact,$slap,$public_batch,$queue_run=false) { +function diaspora_transmit($owner,$contact,$slap,$public_batch,$queue_run=false,$guid = "") { $enabled = intval(get_config('system','diaspora_enabled')); if(! $enabled) { @@ -3084,9 +3091,9 @@ function diaspora_transmit($owner,$contact,$slap,$public_batch,$queue_run=false) if(! $dest_url) { logger('diaspora_transmit: no url for contact: ' . $contact['id'] . ' batch mode =' . $public_batch); return 0; - } + } - logger('diaspora_transmit: ' . $logid . ' ' . $dest_url); + logger('diaspora_transmit: '.$logid.'-'.$guid.' '.$dest_url); if( (! $queue_run) && (was_recently_delayed($contact['id'])) ) { $return_code = 0; @@ -3101,7 +3108,7 @@ function diaspora_transmit($owner,$contact,$slap,$public_batch,$queue_run=false) } } - logger('diaspora_transmit: ' . $logid . ' returns: ' . $return_code); + logger('diaspora_transmit: '.$logid.'-'.$guid.' returns: '.$return_code); if((! $return_code) || (($return_code == 503) && (stristr($a->get_curl_headers(),'retry-after')))) { logger('diaspora_transmit: queue message'); From 012107f5f775de6fe87d8c8d37e797d2316758c5 Mon Sep 17 00:00:00 2001 From: Michael Vogel Date: Mon, 11 Jan 2016 20:17:31 +0100 Subject: [PATCH 030/242] Table documentation added --- doc/database/db_gcontact.md | 5 ++++ doc/database/db_item.md | 1 + doc/database/db_thread.md | 51 +++++++++++++++++++------------------ 3 files changed, 32 insertions(+), 25 deletions(-) diff --git a/doc/database/db_gcontact.md b/doc/database/db_gcontact.md index 8e9de43c96..c47e726228 100644 --- a/doc/database/db_gcontact.md +++ b/doc/database/db_gcontact.md @@ -18,9 +18,14 @@ Table gcontact | about | | text | NO | | NULL | | | keywords | puplic keywords (interests) | text | NO | | NULL | | | gender | | varchar(32) | NO | | | | +| birthday | | varchar(32) | NO | | 0000-00-00 | | | community | 1 if contact is forum account | tinyint(1) | NO | | 0 | | +| hide | 1 = should be hidden from search | tinyint(1) | NO | | 0 | | +| nsfw | 1 = contact posts nsfw content | tinyint(1) | NO | | 0 | | | network | social network protocol | varchar(255) | NO | | | | | addr | | varchar(255) | NO | | | | +| notify | | text | NO | | | | +| alias | | varchar(255) | NO | | | | | generation | | tinyint(3) | NO | | 0 | | | server_url | baseurl of the contacts server | varchar(255) | NO | | | | diff --git a/doc/database/db_item.md b/doc/database/db_item.md index 3ed986a781..00fa213c89 100644 --- a/doc/database/db_item.md +++ b/doc/database/db_item.md @@ -8,6 +8,7 @@ Table item | uri | | varchar(255) | NO | MUL | | | | uid | user.id which owns this copy of the item | int(10) unsigned | NO | MUL | 0 | | | contact-id | contact.id | int(11) | NO | MUL | 0 | | +| gcontact-id | ID of the global contact | int(11) | NO | MUL | 0 | | | type | | varchar(255) | NO | | | | | wall | This item was posted to the wall of uid | tinyint(1) | NO | MUL | 0 | | | gravity | | tinyint(1) | NO | | 0 | | diff --git a/doc/database/db_thread.md b/doc/database/db_thread.md index 78af5cb37a..4c912bec10 100644 --- a/doc/database/db_thread.md +++ b/doc/database/db_thread.md @@ -1,30 +1,31 @@ Table thread ============ -| Field | Description | Type | Null | Key | Default | Extra | -|------------|------------------|------------------|------|-----|---------------------|-------| -| iid | sequential ID | int(10) unsigned | NO | PRI | 0 | | -| uid | | int(10) unsigned | NO | MUL | 0 | | -| contact-id | | int(11) unsigned | NO | | 0 | | -| created | | datetime | NO | MUL | 0000-00-00 00:00:00 | | -| edited | | datetime | NO | | 0000-00-00 00:00:00 | | -| commented | | datetime | NO | MUL | 0000-00-00 00:00:00 | | -| received | | datetime | NO | | 0000-00-00 00:00:00 | | -| changed | | datetime | NO | | 0000-00-00 00:00:00 | | -| wall | | tinyint(1) | NO | MUL | 0 | | -| private | | tinyint(1) | NO | | 0 | | -| pubmail | | tinyint(1) | NO | | 0 | | -| moderated | | tinyint(1) | NO | | 0 | | -| visible | | tinyint(1) | NO | | 0 | | -| spam | | tinyint(1) | NO | | 0 | | -| starred | | tinyint(1) | NO | | 0 | | -| ignored | | tinyint(1) | NO | | 0 | | -| bookmark | | tinyint(1) | NO | | 0 | | -| unseen | | tinyint(1) | NO | | 1 | | -| deleted | | tinyint(1) | NO | | 0 | | -| origin | | tinyint(1) | NO | | 0 | | -| forum_mode | | tinyint(1) | NO | | 0 | | -| mention | | tinyint(1) | NO | | 0 | | -| network | | varchar(32) | NO | | | | +| Field | Description | Type | Null | Key | Default | Extra | +|-------------|------------------|------------------|------|-----|---------------------|-------| +| iid | sequential ID | int(10) unsigned | NO | PRI | 0 | | +| uid | | int(10) unsigned | NO | MUL | 0 | | +| contact-id | | int(11) unsigned | NO | | 0 | | +| gcontact-id | Global Contact | int(11) unsigned | NO | | 0 | | +| created | | datetime | NO | MUL | 0000-00-00 00:00:00 | | +| edited | | datetime | NO | | 0000-00-00 00:00:00 | | +| commented | | datetime | NO | MUL | 0000-00-00 00:00:00 | | +| received | | datetime | NO | | 0000-00-00 00:00:00 | | +| changed | | datetime | NO | | 0000-00-00 00:00:00 | | +| wall | | tinyint(1) | NO | MUL | 0 | | +| private | | tinyint(1) | NO | | 0 | | +| pubmail | | tinyint(1) | NO | | 0 | | +| moderated | | tinyint(1) | NO | | 0 | | +| visible | | tinyint(1) | NO | | 0 | | +| spam | | tinyint(1) | NO | | 0 | | +| starred | | tinyint(1) | NO | | 0 | | +| ignored | | tinyint(1) | NO | | 0 | | +| bookmark | | tinyint(1) | NO | | 0 | | +| unseen | | tinyint(1) | NO | | 1 | | +| deleted | | tinyint(1) | NO | | 0 | | +| origin | | tinyint(1) | NO | | 0 | | +| forum_mode | | tinyint(1) | NO | | 0 | | +| mention | | tinyint(1) | NO | | 0 | | +| network | | varchar(32) | NO | | | | Return to [database documentation](help/database) From d1d7ab799c2237fc6df7e94bcb78cd773c53c442 Mon Sep 17 00:00:00 2001 From: Michael Vogel Date: Mon, 11 Jan 2016 20:21:42 +0100 Subject: [PATCH 031/242] Added some more documentation --- include/ostatus.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/include/ostatus.php b/include/ostatus.php index 05a1efaaa8..b7799fa9df 100644 --- a/include/ostatus.php +++ b/include/ostatus.php @@ -176,7 +176,7 @@ function ostatus_fetchauthor($xpath, $context, $importer, &$contact, $onlyfetch) dbesc(datetime_convert()), intval($contact["id"]), dbesc(NETWORK_OSTATUS)); } - // @todo: Addr + /// @todo Add the "addr" field $contact["generation"] = 2; $contact["photo"] = $author["author-avatar"]; update_gcontact($contact); From 86da77e8ee7da6682e16a282d57b36e8d2cefeff Mon Sep 17 00:00:00 2001 From: Michael Vogel Date: Wed, 13 Jan 2016 10:53:38 +0100 Subject: [PATCH 032/242] Added two to-dos to do. --- include/Contact.php | 1 + include/socgraph.php | 2 ++ 2 files changed, 3 insertions(+) diff --git a/include/Contact.php b/include/Contact.php index 81692fa840..c10bb9b791 100644 --- a/include/Contact.php +++ b/include/Contact.php @@ -402,6 +402,7 @@ function get_contact($url, $uid = 0) { $contactid = 0; // is it an address in the format user@server.tld? + /// @todo use gcontact and/or the addr field for a lookup if (!strstr($url, "http") OR strstr($url, "@")) { $data = probe_url($url); $url = $data["url"]; diff --git a/include/socgraph.php b/include/socgraph.php index 00fc439b7e..a01c9c5cb0 100644 --- a/include/socgraph.php +++ b/include/socgraph.php @@ -1560,6 +1560,8 @@ function get_gcontact_id($contact) { */ function update_gcontact($contact) { + /// @todo update contact table as well + $gcontact_id = get_gcontact_id($contact); if (!$gcontact_id) From 556f76de01cab922d2e1346c32c60681adbc60d3 Mon Sep 17 00:00:00 2001 From: rabuzarus <> Date: Wed, 13 Jan 2016 19:56:21 +0100 Subject: [PATCH 033/242] vier: mobile view - fix word breaking --- view/global.css | 6 ++++-- view/theme/vier/style.css | 2 ++ 2 files changed, 6 insertions(+), 2 deletions(-) diff --git a/view/global.css b/view/global.css index 05940508ca..fcb5875a04 100644 --- a/view/global.css +++ b/view/global.css @@ -93,7 +93,7 @@ span.connector { /* Shared Messages */ .shared_header { - height: 32px; + min-height: 32px; color: #999; border-top: 1px solid #D2D2D2; padding-top: 5px; @@ -118,10 +118,12 @@ span.connector { -moz-border-radius: 4px; border-radius: 4px; float: left; + margin-right: 9px; } .shared_header span { - margin-left: 9px; + display: table-cell; + float: none; } blockquote.shared_content { diff --git a/view/theme/vier/style.css b/view/theme/vier/style.css index 84b3ff2361..defeec7023 100644 --- a/view/theme/vier/style.css +++ b/view/theme/vier/style.css @@ -1055,6 +1055,7 @@ aside .vcard .title { aside .vcard dl { height: auto; overflow: auto; + word-break: break-word; } aside .vcard .account-type { margin-bottom: 13px; @@ -1412,6 +1413,7 @@ section.minimal { /* font-size: 14px; */ max-width: 660px; word-wrap: break-word; + word-break: break-word; /* line-height: 1.36; */ padding-bottom: 6px; } From 9b5c6ed58044bff41347ed2f742d7d26cbcb2975 Mon Sep 17 00:00:00 2001 From: Michael Vogel Date: Thu, 14 Jan 2016 19:38:59 +0100 Subject: [PATCH 034/242] Twitter shortening should now work even the shortening would be in the link --- include/plaintext.php | 40 +++++++++++++++++++++++++++++++++++++--- 1 file changed, 37 insertions(+), 3 deletions(-) diff --git a/include/plaintext.php b/include/plaintext.php index cb56850d4f..05431bee2d 100644 --- a/include/plaintext.php +++ b/include/plaintext.php @@ -90,6 +90,14 @@ function get_attached_data($body) { $post["text"] = $body; } } + + if (preg_match_all("(\[url\]([$URLSearchString]*)\[\/url\])ism", $body, $links, PREG_SET_ORDER)) { + if (count($links) == 1) { + $post["type"] = "text"; + $post["url"] = $links[0][1]; + $post["text"] = $body; + } + } if (!isset($post["type"])) { $post["type"] = "text"; $post["text"] = trim($body); @@ -129,9 +137,17 @@ function plaintext($a, $b, $limit = 0, $includedlinks = false, $htmlmode = 2) { require_once("include/html2plain.php"); require_once("include/network.php"); + // Remove the hash tags + $URLSearchString = "^\[\]"; + $body = preg_replace("/([#@])\[url\=([$URLSearchString]*)\](.*?)\[\/url\]/ism", '$1$3', $b["body"]); + + // Add an URL element if the text contains a raw link + $body = preg_replace("/([^\]\='".'"'."]|^)(https?\:\/\/[a-zA-Z0-9\:\/\-\?\&\;\.\=\_\~\#\%\$\!\+\,]+)/ism", '$1[url]$2[/url]', $body); + // At first look at data that is attached via "type-..." stuff // This will hopefully replaced with a dedicated bbcode later - $post = get_attached_data($b["body"]); + //$post = get_attached_data($b["body"]); + $post = get_attached_data($body); if (($b["title"] != "") AND ($post["text"] != "")) $post["text"] = trim($b["title"]."\n\n".$post["text"]); @@ -146,6 +162,8 @@ function plaintext($a, $b, $limit = 0, $includedlinks = false, $htmlmode = 2) { if ($includedlinks) { if ($post["type"] == "link") $link = $post["url"]; + elseif ($post["type"] == "text") + $link = $post["url"]; elseif ($post["type"] == "video") $link = $post["url"]; elseif ($post["type"] == "photo") @@ -161,8 +179,22 @@ function plaintext($a, $b, $limit = 0, $includedlinks = false, $htmlmode = 2) { // But: if the link is beyond the limit, then it has to be added. if (($link != "") AND strstr($msg, $link)) { $pos = strpos($msg, $link); - if (($limit == 0) OR ($pos < $limit)) + + // Will the text be shortened in the link? + // Or is the link the last item in the post? + if (($limit > 0) AND ($pos < $limit) AND (($pos + 23 > $limit) OR ($pos + strlen($link) == strlen($msg)))) + $msg = trim(str_replace($link, "", $msg)); + elseif (($limit == 0) OR ($pos < $limit)) { + // The limit has to be increased since it will be shortened - but not now + // Only do it with Twitter (htmlmode = 8) + if (($limit > 0) AND (strlen($link) > 23) AND ($htmlmode == 8)) + $limit = $limit - 23 + strlen($link); + $link = ""; + + if ($post["type"] == "text") + unset($post["url"]); + } } } @@ -178,7 +210,9 @@ function plaintext($a, $b, $limit = 0, $includedlinks = false, $htmlmode = 2) { if (iconv_strlen($msg, "UTF-8") > $limit) { - if (!isset($post["url"])) { + if (($post["type"] == "text") AND isset($post["url"])) + $post["url"] = $b["plink"]; + elseif (!isset($post["url"])) { $limit = $limit - 23; $post["url"] = $b["plink"]; } elseif (strpos($b["body"], "[share") !== false) From c4ba035ee314295c5a6a62ed49554f09a50c86f4 Mon Sep 17 00:00:00 2001 From: Michael Vogel Date: Thu, 14 Jan 2016 21:56:37 +0100 Subject: [PATCH 035/242] Add some analysing stuff, rendered value is written now more often --- boot.php | 28 +++++++++++++++++++++++++++- include/conversation.php | 10 +++++----- include/cron.php | 2 +- include/diaspora.php | 6 +++++- include/items.php | 5 +++-- include/text.php | 8 ++++++-- include/threads.php | 8 +++++--- 7 files changed, 52 insertions(+), 15 deletions(-) diff --git a/boot.php b/boot.php index 7d8c7040de..ae98e92409 100644 --- a/boot.php +++ b/boot.php @@ -467,6 +467,7 @@ class App { public $is_tablet; public $is_friendica_app; public $performance = array(); + public $callstack = array(); public $nav_sel; @@ -552,7 +553,15 @@ class App { $this->performance["rendering"] = 0; $this->performance["parser"] = 0; $this->performance["marktime"] = 0; - $this->performance["markstart"] = microtime(true); + + $this->performance["file"] = 0; + $this->performance["file"] = 0; + + $this->callstack["database"] = array(); + $this->callstack["network"] = array(); + $this->callstack["file"] = array(); + $this->callstack["rendering"] = array(); + $this->callstack["parser"] = array(); $this->config = array(); $this->page = array(); @@ -1016,6 +1025,23 @@ class App { $this->performance[$value] += (float)$duration; $this->performance["marktime"] += (float)$duration; + + // Trace the different functions with their timestamps + $trace = debug_backtrace(DEBUG_BACKTRACE_IGNORE_ARGS, 5); + + array_shift($trace); + + $function = array(); + foreach ($trace AS $func) + $function[] = $func["function"]; + + $function = implode(", ", $function); + + //$last = array_pop($trace); + //$function = $last["function"]; + + $this->callstack[$value][$function] += (float)$duration; + } function mark_timestamp($mark) { diff --git a/include/conversation.php b/include/conversation.php index 7eae1e052e..d8c5e4461d 100644 --- a/include/conversation.php +++ b/include/conversation.php @@ -315,11 +315,11 @@ function localize_item(&$item){ } // add zrl's to public images - $photo_pattern = "/\[url=(.*?)\/photos\/(.*?)\/image\/(.*?)\]\[img(.*?)\]h(.*?)\[\/img\]\[\/url\]/is"; - if(preg_match($photo_pattern,$item['body'])) { - $photo_replace = '[url=' . zrl('$1' . '/photos/' . '$2' . '/image/' . '$3' ,true) . '][img' . '$4' . ']h' . '$5' . '[/img][/url]'; - $item['body'] = bb_tag_preg_replace($photo_pattern, $photo_replace, 'url', $item['body']); - } +// $photo_pattern = "/\[url=(.*?)\/photos\/(.*?)\/image\/(.*?)\]\[img(.*?)\]h(.*?)\[\/img\]\[\/url\]/is"; +// if(preg_match($photo_pattern,$item['body'])) { +// $photo_replace = '[url=' . zrl('$1' . '/photos/' . '$2' . '/image/' . '$3' ,true) . '][img' . '$4' . ']h' . '$5' . '[/img][/url]'; +// $item['body'] = bb_tag_preg_replace($photo_pattern, $photo_replace, 'url', $item['body']); +// } // add sparkle links to appropriate permalinks diff --git a/include/cron.php b/include/cron.php index 09d141702e..ed7edc6994 100644 --- a/include/cron.php +++ b/include/cron.php @@ -230,7 +230,7 @@ function cron_run(&$argv, &$argc){ // Repair missing Diaspora settings $r = q("SELECT `id`, `url` FROM `contact` - WHERE `uid` > 0 AND `network` = '%s' AND (`batch` = '' OR `notify` = '' OR `poll` = '' OR pubkey = '') + WHERE `network` = '%s' AND (`batch` = '' OR `notify` = '' OR `poll` = '' OR pubkey = '') ORDER BY RAND() LIMIT 50", dbesc(NETWORK_DIASPORA)); if ($r) { foreach ($r AS $contact) { diff --git a/include/diaspora.php b/include/diaspora.php index 1cf8897af9..f03486fc21 100644 --- a/include/diaspora.php +++ b/include/diaspora.php @@ -1973,11 +1973,15 @@ function diaspora_photo($importer,$xml,$msg,$attempt=1) { array($remote_photo_name, 'scaled_full_' . $remote_photo_name)); if(strpos($parent_item['body'],$link_text) === false) { + + $parent_item['body'] = $link_text . $parent_item['body']; + $r = q("UPDATE `item` SET `body` = '%s', `visible` = 1 WHERE `id` = %d AND `uid` = %d", - dbesc($link_text . $parent_item['body']), + dbesc($parent_item['body']), intval($parent_item['id']), intval($parent_item['uid']) ); + put_item_in_cache($parent_item, true); update_thread($parent_item['id']); } diff --git a/include/items.php b/include/items.php index 549027671d..62526d4486 100644 --- a/include/items.php +++ b/include/items.php @@ -955,8 +955,9 @@ function add_page_info_data($data) { $a = get_app(); $hashtags = "\n"; foreach ($data["keywords"] AS $keyword) { - $hashtag = str_replace(array(" ", "+", "/", ".", "#", "'"), - array("","", "", "", "", ""), $keyword); + /// @todo make a positive list of allowed characters + $hashtag = str_replace(array(" ", "+", "/", ".", "#", "'", "’", "`", "(", ")", "„", "“"), + array("","", "", "", "", "", "", "", "", "", "", ""), $keyword); $hashtags .= "#[url=".$a->get_baseurl()."/search?tag=".rawurlencode($hashtag)."]".$hashtag."[/url] "; } } diff --git a/include/text.php b/include/text.php index 1b03c39d26..3f4fe07d69 100644 --- a/include/text.php +++ b/include/text.php @@ -20,10 +20,10 @@ function replace_macros($s,$r) { $stamp1 = microtime(true); $a = get_app(); - + // pass $baseurl to all templates $r['$baseurl'] = z_root(); - + $t = $a->template_engine(); try { @@ -1415,9 +1415,13 @@ function prepare_body(&$item,$attach = false, $preview = false) { $item['hashtags'] = $hashtags; $item['mentions'] = $mentions; + $test = $item["rendered-html"]; put_item_in_cache($item, true); $s = $item["rendered-html"]; + //if ($test != $s) + // $s .= "
    *********************************
    ".$test; + $prep_arr = array('item' => $item, 'html' => $s, 'preview' => $preview); call_hooks('prepare_body', $prep_arr); $s = $prep_arr['html']; diff --git a/include/threads.php b/include/threads.php index dddcc4cdd3..e542295d7b 100644 --- a/include/threads.php +++ b/include/threads.php @@ -112,7 +112,7 @@ function update_thread_uri($itemuri, $uid) { function update_thread($itemid, $setmention = false) { $items = q("SELECT `uid`, `guid`, `title`, `body`, `created`, `edited`, `commented`, `received`, `changed`, `wall`, `private`, `pubmail`, `moderated`, `visible`, `spam`, `starred`, `bookmark`, `contact-id`, `gcontact-id`, - `deleted`, `origin`, `forum_mode`, `network` FROM `item` WHERE `id` = %d AND (`parent` = %d OR `parent` = 0) LIMIT 1", intval($itemid), intval($itemid)); + `deleted`, `origin`, `forum_mode`, `network`, `rendered-html`, `rendered-hash` FROM `item` WHERE `id` = %d AND (`parent` = %d OR `parent` = 0) LIMIT 1", intval($itemid), intval($itemid)); if (!$items) return; @@ -125,7 +125,7 @@ function update_thread($itemid, $setmention = false) { $sql = ""; foreach ($item AS $field => $data) - if (!in_array($field, array("guid", "title", "body"))) { + if (!in_array($field, array("guid", "title", "body", "rendered-html", "rendered-hash"))) { if ($sql != "") $sql .= ", "; @@ -142,9 +142,11 @@ function update_thread($itemid, $setmention = false) { if (!$items) return; - $result = q("UPDATE `item` SET `title` = '%s', `body` = '%s' WHERE `id` = %d", + $result = q("UPDATE `item` SET `title` = '%s', `body` = '%s', `rendered-html` = '%s', `rendered-hash` = '%s' WHERE `id` = %d", dbesc($item["title"]), dbesc($item["body"]), + dbesc($item["rendered-html"]), + dbesc($item["rendered-hash"]), intval($items[0]["id"]) ); logger("Updating public shadow for post ".$items[0]["id"]." - guid ".$item["guid"]." Result: ".print_r($result, true), LOGGER_DEBUG); From d5e1f33506dbb83d333e7ecd5e776c44eca35cb7 Mon Sep 17 00:00:00 2001 From: Michael Vogel Date: Thu, 14 Jan 2016 23:59:51 +0100 Subject: [PATCH 036/242] OEmbed and parse_url are now cached in dedicated tables --- boot.php | 2 +- include/dbstructure.php | 20 ++++++++++++++++++++ include/items.php | 7 +------ include/oembed.php | 18 +++++++++++++++--- mod/parse_url.php | 13 +++++++++++-- update.php | 2 +- 6 files changed, 49 insertions(+), 13 deletions(-) diff --git a/boot.php b/boot.php index ae98e92409..049dc91105 100644 --- a/boot.php +++ b/boot.php @@ -36,7 +36,7 @@ define ( 'FRIENDICA_PLATFORM', 'Friendica'); define ( 'FRIENDICA_CODENAME', 'Asparagus'); define ( 'FRIENDICA_VERSION', '3.5-dev' ); define ( 'DFRN_PROTOCOL_VERSION', '2.23' ); -define ( 'DB_UPDATE_VERSION', 1192 ); +define ( 'DB_UPDATE_VERSION', 1193 ); /** * @brief Constant with a HTML line break. diff --git a/include/dbstructure.php b/include/dbstructure.php index 7fed50e741..35bacd7f83 100644 --- a/include/dbstructure.php +++ b/include/dbstructure.php @@ -1021,6 +1021,26 @@ function db_definition() { "receiver-uid" => array("receiver-uid"), ) ); + $database["oembed"] = array( + "fields" => array( + "url" => array("type" => "varchar(255)", "not null" => "1", "primary" => "1"), + "content" => array("type" => "text", "not null" => "1"), + ), + "indexes" => array( + "PRIMARY" => array("url"), + ) + ); + $database["parsed_url"] = array( + "fields" => array( + "url" => array("type" => "varchar(255)", "not null" => "1", "primary" => "1"), + "guessing" => array("type" => "tinyint(1)", "not null" => "1", "default" => "0", "primary" => "1"), + "oembed" => array("type" => "tinyint(1)", "not null" => "1", "default" => "0", "primary" => "1"), + "content" => array("type" => "text", "not null" => "1"), + ), + "indexes" => array( + "PRIMARY" => array("url", "guessing", "oembed"), + ) + ); $database["pconfig"] = array( "fields" => array( "id" => array("type" => "int(11)", "not null" => "1", "extra" => "auto_increment", "primary" => "1"), diff --git a/include/items.php b/include/items.php index 62526d4486..a74ca3b360 100644 --- a/include/items.php +++ b/include/items.php @@ -968,12 +968,7 @@ function add_page_info_data($data) { function query_page_info($url, $no_photos = false, $photo = "", $keywords = false, $keyword_blacklist = "") { require_once("mod/parse_url.php"); - $data = Cache::get("parse_url:".$url); - if (is_null($data)){ - $data = parseurl_getsiteinfo($url, true); - Cache::set("parse_url:".$url,serialize($data), CACHE_DAY); - } else - $data = unserialize($data); + $data = parseurl_getsiteinfo_cached($url, true); if ($photo != "") $data["images"][0]["src"] = $photo; diff --git a/include/oembed.php b/include/oembed.php index c848a4580c..5113064581 100755 --- a/include/oembed.php +++ b/include/oembed.php @@ -13,7 +13,13 @@ function oembed_fetch_url($embedurl, $no_rich_type = false){ $a = get_app(); - $txt = Cache::get($a->videowidth . $embedurl); + $r = q("SELECT * FROM `oembed` WHERE `url` = '%s'", + dbesc(normalise_link($embedurl))); + + if ($r) + $txt = $r[0]["content"]; + else + $txt = Cache::get($a->videowidth . $embedurl); // These media files should now be caught in bbcode.php // left here as a fallback in case this is called from another source @@ -66,8 +72,14 @@ function oembed_fetch_url($embedurl, $no_rich_type = false){ if ($txt[0]!="{") $txt='{"type":"error"}'; - else //save in cache + else { //save in cache + $j = json_decode($txt); + if ($j->type != "error") + q("INSERT INTO `oembed` (`url`, `content`) VALUES ('%s', '%s')", + dbesc(normalise_link($embedurl)), dbesc($txt)); + Cache::set($a->videowidth . $embedurl,$txt, CACHE_DAY); + } } $j = json_decode($txt); @@ -85,7 +97,7 @@ function oembed_fetch_url($embedurl, $no_rich_type = false){ // If fetching information doesn't work, then improve via internal functions if (($j->type == "error") OR ($no_rich_type AND ($j->type == "rich"))) { require_once("mod/parse_url.php"); - $data = parseurl_getsiteinfo($embedurl, true, false); + $data = parseurl_getsiteinfo_cached($embedurl, true, false); $j->type = $data["type"]; if ($j->type == "photo") { diff --git a/mod/parse_url.php b/mod/parse_url.php index 28869b4c12..8aa0c17ee1 100644 --- a/mod/parse_url.php +++ b/mod/parse_url.php @@ -56,7 +56,15 @@ function completeurl($url, $scheme) { function parseurl_getsiteinfo_cached($url, $no_guessing = false, $do_oembed = true) { - $data = Cache::get("parse_url:".$no_guessing.":".$do_oembed.":".$url); + if ($url == "") + return false; + + $r = q("SELECT * FROM `parsed_url` WHERE `url` = '%s' AND `guessing` = %d AND `oembed` = %d", + dbesc(normalise_link($url)), intval(!$no_guessing), intval($do_oembed)); + + if ($r) + $data = $r[0]["content"]; + if (!is_null($data)) { $data = unserialize($data); return $data; @@ -64,7 +72,8 @@ function parseurl_getsiteinfo_cached($url, $no_guessing = false, $do_oembed = tr $data = parseurl_getsiteinfo($url, $no_guessing, $do_oembed); - Cache::set("parse_url:".$no_guessing.":".$do_oembed.":".$url,serialize($data), CACHE_DAY); + q("INSERT INTO `parsed_url` (`url`, `guessing`, `oembed`, `content`) VALUES ('%s', %d, %d, '%s')", + dbesc(normalise_link($url)), intval(!$no_guessing), intval($do_oembed), dbesc(serialize($data))); return $data; } diff --git a/update.php b/update.php index 197e78de5c..a825c82e92 100644 --- a/update.php +++ b/update.php @@ -1,6 +1,6 @@ Date: Fri, 15 Jan 2016 00:58:57 +0100 Subject: [PATCH 037/242] Add the creation date to the cache tables --- include/dbstructure.php | 4 ++++ include/oembed.php | 4 ++-- mod/parse_url.php | 4 ++-- 3 files changed, 8 insertions(+), 4 deletions(-) diff --git a/include/dbstructure.php b/include/dbstructure.php index 35bacd7f83..43dfbd7b35 100644 --- a/include/dbstructure.php +++ b/include/dbstructure.php @@ -1025,9 +1025,11 @@ function db_definition() { "fields" => array( "url" => array("type" => "varchar(255)", "not null" => "1", "primary" => "1"), "content" => array("type" => "text", "not null" => "1"), + "created" => array("type" => "datetime", "not null" => "1", "default" => "0000-00-00 00:00:00"), ), "indexes" => array( "PRIMARY" => array("url"), + "created" => array("created"), ) ); $database["parsed_url"] = array( @@ -1036,9 +1038,11 @@ function db_definition() { "guessing" => array("type" => "tinyint(1)", "not null" => "1", "default" => "0", "primary" => "1"), "oembed" => array("type" => "tinyint(1)", "not null" => "1", "default" => "0", "primary" => "1"), "content" => array("type" => "text", "not null" => "1"), + "created" => array("type" => "datetime", "not null" => "1", "default" => "0000-00-00 00:00:00"), ), "indexes" => array( "PRIMARY" => array("url", "guessing", "oembed"), + "created" => array("created"), ) ); $database["pconfig"] = array( diff --git a/include/oembed.php b/include/oembed.php index 5113064581..b1770f6890 100755 --- a/include/oembed.php +++ b/include/oembed.php @@ -75,8 +75,8 @@ function oembed_fetch_url($embedurl, $no_rich_type = false){ else { //save in cache $j = json_decode($txt); if ($j->type != "error") - q("INSERT INTO `oembed` (`url`, `content`) VALUES ('%s', '%s')", - dbesc(normalise_link($embedurl)), dbesc($txt)); + q("INSERT INTO `oembed` (`url`, `content`, `created`) VALUES ('%s', '%s', '%s')", + dbesc(normalise_link($embedurl)), dbesc($txt), dbesc(datetime_convert())); Cache::set($a->videowidth . $embedurl,$txt, CACHE_DAY); } diff --git a/mod/parse_url.php b/mod/parse_url.php index 8aa0c17ee1..1ca5dc1dac 100644 --- a/mod/parse_url.php +++ b/mod/parse_url.php @@ -72,8 +72,8 @@ function parseurl_getsiteinfo_cached($url, $no_guessing = false, $do_oembed = tr $data = parseurl_getsiteinfo($url, $no_guessing, $do_oembed); - q("INSERT INTO `parsed_url` (`url`, `guessing`, `oembed`, `content`) VALUES ('%s', %d, %d, '%s')", - dbesc(normalise_link($url)), intval(!$no_guessing), intval($do_oembed), dbesc(serialize($data))); + q("INSERT INTO `parsed_url` (`url`, `guessing`, `oembed`, `content`, `created`) VALUES ('%s', %d, %d, '%s', '%s')", + dbesc(normalise_link($url)), intval(!$no_guessing), intval($do_oembed), dbesc(serialize($data)), dbesc(datetime_convert())); return $data; } From a4104d7c17242c5f583891df7ed1f10f3ca94de2 Mon Sep 17 00:00:00 2001 From: Tobias Diekershoff Date: Tue, 17 Nov 2015 11:34:47 +0100 Subject: [PATCH 038/242] 1st stuff for federation stats in the admin panel --- mod/admin.php | 53 +++++++++++++++++++++++-- view/global.css | 6 +++ view/templates/admin_aside.tpl | 10 ++--- view/templates/admin_federation.tpl | 60 +++++++++++++++++++++++++++++ 4 files changed, 120 insertions(+), 9 deletions(-) create mode 100644 view/templates/admin_federation.tpl diff --git a/mod/admin.php b/mod/admin.php index 0636a34201..886d7a4d9d 100644 --- a/mod/admin.php +++ b/mod/admin.php @@ -121,15 +121,17 @@ function admin_content(&$a) { /** * Side bar links */ - + $aside = Array(); // array( url, name, extra css classes ) - $aside = Array( + // not part of $aside to make the template more adjustable + $asidesubpages = Array( 'site' => Array($a->get_baseurl(true)."/admin/site/", t("Site") , "site"), 'users' => Array($a->get_baseurl(true)."/admin/users/", t("Users") , "users"), 'plugins'=> Array($a->get_baseurl(true)."/admin/plugins/", t("Plugins") , "plugins"), 'themes' => Array($a->get_baseurl(true)."/admin/themes/", t("Themes") , "themes"), 'dbsync' => Array($a->get_baseurl(true)."/admin/dbsync/", t('DB updates'), "dbsync"), 'queue' => Array($a->get_baseurl(true)."/admin/queue/", t('Inspect Queue'), "queue"), + 'federation' => Array($a->get_baseurl(true)."/admin/federation/", t('Federation Statistics'), "federation"), //'update' => Array($a->get_baseurl(true)."/admin/update/", t("Software Update") , "update") ); @@ -150,7 +152,8 @@ function admin_content(&$a) { $t = get_markup_template("admin_aside.tpl"); $a->page['aside'] .= replace_macros( $t, array( - '$admin' => $aside, + '$admin' => $aside, + '$subpages' => $asidesubpages, '$admtxt' => t('Admin'), '$plugadmtxt' => t('Plugin Features'), '$logtxt' => t('Logs'), @@ -192,6 +195,9 @@ function admin_content(&$a) { case 'queue': $o = admin_page_queue($a); break; + case 'federation': + $o = admin_page_federation($a); + break; default: notice( t("Item not found.") ); } @@ -208,6 +214,47 @@ function admin_content(&$a) { } } +/** + * Admin Federation Stats Page; display some numbers from gserver + * @param App $a + * returning string + */ +function admin_page_federation(&$a) { + // get counts on active friendica, diaspora, redmatrix, hubzilla, gnu + // social and statusnet nodes this node is knowing + // + // We are looking for the following platforms in the DB, "Red" should find + // all variants of that platform ID string as the q() function is stripping + // off one % two of them are needed in the query + $platforms = array('Diaspora', 'Friendica', '%%red%%', 'Hubzilla', 'GNU Social', 'StatusNet'); + $counts = array(); + foreach ($platforms as $p) { + // get a totaö count for the platform, the name and version of the + // highest version and the protocol tpe + $c = q('select count(*), platform, network, version from gserver where platform like "'.$p.'" and last_contact > last_failure order by version asc;'); + // what versions for that platform do we know at all? + // again only the active nodes + $v = q('select count(*), version from gserver where last_contact > last_failure and platform like "'.$p.'" group by version order by version;'); + // the 3rd array item is needed for the JavaScript graphs as JS does + // not like some characters in the names of variables... + $counts[$p]=array($c[0], $v, str_replace(array(' ','%'),'',$p)); + } + // some helpful text + $intro = t('This page offers you some numbers to the known part of the federated social network your Friendica node is part of. These numbers are not complete but only reflect the part of the network your node is aware of.'); + $hint = t('The Auto Discovered Contact Directory feature is not enabled, it will improve the data displayed here.'); + // load the template, replace the macros and return the page content + $t = get_markup_template("admin_federation.tpl"); + return replace_macros($t, array( + '$title' => t('Administration'), + '$page' => t('Federation Statistics'), + '$intro' => $intro, + '$hint' => $hint, + '$autoactive' => get_config('system', 'poco_completion'), + '$counts' => $counts, + '$version' => FRIENDICA_VERSION, + '$legendtext' => t('Currently this node is aware of nodes from the following platforms:'), + )); +} /** * Admin Inspect Queue Page * @param App $a diff --git a/view/global.css b/view/global.css index f468633e7c..ce69e2e27d 100644 --- a/view/global.css +++ b/view/global.css @@ -276,9 +276,15 @@ a { #poke-recip-label, #poke-action-label, #prvmail-message-label { margin: 10px 0 10px; } +.version-match { + font-weight: bold; + color: #00a700; +} +ul.federation-stats, ul.credits { list-style: none; } +ul.federation-stats li, ul.credits li { float: left; width: 240px; diff --git a/view/templates/admin_aside.tpl b/view/templates/admin_aside.tpl index 4a6af88148..7753ce9151 100644 --- a/view/templates/admin_aside.tpl +++ b/view/templates/admin_aside.tpl @@ -10,14 +10,12 @@ }); }); +

    {{$admtxt}}

    {{if $admin.update}} diff --git a/view/templates/admin_federation.tpl b/view/templates/admin_federation.tpl new file mode 100644 index 0000000000..1fe8d27105 --- /dev/null +++ b/view/templates/admin_federation.tpl @@ -0,0 +1,60 @@ + + +
    +

    {{$title}} - {{$page}}

    +

    {{$intro}}

    + {{if not $autoactive}} +

    {{$hint}}

    + {{/if}} +

    {{$legendtext}} +

      + {{foreach $counts as $c}} +
    • {{$c[0]['platform']}} ({{$c[0]['count(*)']}})
    • + {{/foreach}} +
    +

    +
    + + + +{{foreach $counts as $c}} + + + + + + + +{{/foreach}} +
    {{$c[0]['platform']}}{{$c[0]['count(*)']}} + {{$c[0]['network']}}
    + + +
      +{{foreach $c[1] as $v}} +
    • {{if ($c[0]['platform']==='Friendica' and $version===$v['version']) }}{{$v['version']}}{{else}}{{$v['version']}}{{/if}} ({{$v['count(*)']}})
    • +{{/foreach}} +
    +
    From 4af584cec22827aee495e9d6bdd7366306254b06 Mon Sep 17 00:00:00 2001 From: Tobias Diekershoff Date: Thu, 26 Nov 2015 10:22:00 +0100 Subject: [PATCH 039/242] small fix for the ShaShape font --- view/fonts/shashape.css | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/view/fonts/shashape.css b/view/fonts/shashape.css index b34cac7980..5f4494dde7 100644 --- a/view/fonts/shashape.css +++ b/view/fonts/shashape.css @@ -177,7 +177,7 @@ content: "Z"; } .shashape.hash:before{ - content: "/"; + content: "#"; } .shashape.tag:before{ content: "="; From 25bb977b870feebed0c0bf759d9b82e3eac3b785 Mon Sep 17 00:00:00 2001 From: Tobias Diekershoff Date: Mon, 30 Nov 2015 07:43:45 +0100 Subject: [PATCH 040/242] better names for some variable to reflect their intention --- mod/admin.php | 16 ++++++++-------- 1 file changed, 8 insertions(+), 8 deletions(-) diff --git a/mod/admin.php b/mod/admin.php index 886d7a4d9d..5e9c705ea4 100644 --- a/mod/admin.php +++ b/mod/admin.php @@ -121,10 +121,10 @@ function admin_content(&$a) { /** * Side bar links */ - $aside = Array(); + $aside_tools = Array(); // array( url, name, extra css classes ) // not part of $aside to make the template more adjustable - $asidesubpages = Array( + $aside_sub = Array( 'site' => Array($a->get_baseurl(true)."/admin/site/", t("Site") , "site"), 'users' => Array($a->get_baseurl(true)."/admin/users/", t("Users") , "users"), 'plugins'=> Array($a->get_baseurl(true)."/admin/plugins/", t("Plugins") , "plugins"), @@ -138,7 +138,7 @@ function admin_content(&$a) { /* get plugins admin page */ $r = q("SELECT `name` FROM `addon` WHERE `plugin_admin`=1 ORDER BY `name`"); - $aside['plugins_admin']=Array(); + $aside_tools['plugins_admin']=Array(); foreach ($r as $h){ $plugin =$h['name']; $aside['plugins_admin'][] = Array($a->get_baseurl(true)."/admin/plugins/".$plugin, $plugin, "plugin"); @@ -146,14 +146,14 @@ function admin_content(&$a) { $a->plugins_admin[] = $plugin; } - $aside['logs'] = Array($a->get_baseurl(true)."/admin/logs/", t("Logs"), "logs"); - $aside['diagnostics_probe'] = Array($a->get_baseurl(true).'/probe/', t('probe address'), 'probe'); - $aside['diagnostics_webfinger'] = Array($a->get_baseurl(true).'/webfinger/', t('check webfinger'), 'webfinger'); + $aside_tools['logs'] = Array($a->get_baseurl(true)."/admin/logs/", t("Logs"), "logs"); + $aside_tools['diagnostics_probe'] = Array($a->get_baseurl(true).'/probe/', t('probe address'), 'probe'); + $aside_tools['diagnostics_webfinger'] = Array($a->get_baseurl(true).'/webfinger/', t('check webfinger'), 'webfinger'); $t = get_markup_template("admin_aside.tpl"); $a->page['aside'] .= replace_macros( $t, array( - '$admin' => $aside, - '$subpages' => $asidesubpages, + '$admin' => $aside_tools, + '$subpages' => $aside_sub, '$admtxt' => t('Admin'), '$plugadmtxt' => t('Plugin Features'), '$logtxt' => t('Logs'), From ce399928759320a29d9bfe47e60e607fe88408d9 Mon Sep 17 00:00:00 2001 From: Tobias Diekershoff Date: Tue, 1 Dec 2015 08:47:57 +0100 Subject: [PATCH 041/242] combine some versions for ~f and D* --- mod/admin.php | 63 ++++++++++++++++++++++++++++++++++++++++++++++++--- 1 file changed, 60 insertions(+), 3 deletions(-) diff --git a/mod/admin.php b/mod/admin.php index 5e9c705ea4..39677fb386 100644 --- a/mod/admin.php +++ b/mod/admin.php @@ -229,12 +229,69 @@ function admin_page_federation(&$a) { $platforms = array('Diaspora', 'Friendica', '%%red%%', 'Hubzilla', 'GNU Social', 'StatusNet'); $counts = array(); foreach ($platforms as $p) { - // get a totaö count for the platform, the name and version of the + // get a total count for the platform, the name and version of the // highest version and the protocol tpe - $c = q('select count(*), platform, network, version from gserver where platform like "'.$p.'" and last_contact > last_failure order by version asc;'); + $c = q('select count(*), platform, network, version from gserver + where platform like "'.$p.'" and last_contact > last_failure + order by version asc;'); // what versions for that platform do we know at all? // again only the active nodes - $v = q('select count(*), version from gserver where last_contact > last_failure and platform like "'.$p.'" group by version order by version;'); + $v = q('select count(*), version from gserver + where last_contact > last_failure and platform like "'.$p.'" + group by version + order by version;'); + // + // clean up version numbers + // + // in the DB the Diaspora versions have the format x.x.x.x-xx the last + // part (-xx) should be removed to clean up the versions from the "head + // commit" information and combined into a single entry for x.x.x.x + if ($p=='Diaspora') { + $newV = array(); + $newVv = array(); + foreach($v as $vv) { + $newVC = $vv['count(*)']; + $newVV = $vv['version']; + $posDash = strpos($newVV, '-'); + if ($posDash) + $newVV = substr($newVV, 0, $posDash); + if (isset($newV[$newVV])) + { + $newV[$newVV] += $newVC; + } else { + $newV[$newVV] = $newVC; + } + } + foreach ($newV as $key => $value) { + array_push($newVv, array('count(*)'=>$value, 'version'=>$key)); + } + $v = $newVv; + } + // early friendica versions have the format x.x.xxxx where xxxx is the + // DB version stamp; those should be operated out and versions be + // conbined + if ($p=='Friendica') { + $newV = array(); + $newVv = array(); + foreach ($v as $vv) { + $newVC = $vv['count(*)']; + $newVV = $vv['version']; + $lastDot = strrpos($newVV,'.'); + $len = strlen($newVV)-1; + if ($lastDot == $len-4) + $newVV = substr($newVV, 0, $lastDot); + if (isset($newV[$newVV])) + { + $newV[$newVV] += $newVC; + } else { + $newV[$newVV] = $newVC; + } + } + foreach ($newV as $key => $value) { + array_push($newVv, array('count(*)'=>$value, 'version'=>$key)); + } + $v = $newVv; + } // the 3rd array item is needed for the JavaScript graphs as JS does // not like some characters in the names of variables... $counts[$p]=array($c[0], $v, str_replace(array(' ','%'),'',$p)); From 0905f18c0f2cbace91dd95a839e573ac89c1ad3c Mon Sep 17 00:00:00 2001 From: Tobias Diekershoff Date: Wed, 9 Dec 2015 20:48:43 +0100 Subject: [PATCH 042/242] allow -rc in friendica version listings --- mod/admin.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/mod/admin.php b/mod/admin.php index 39677fb386..772d186ed5 100644 --- a/mod/admin.php +++ b/mod/admin.php @@ -278,7 +278,7 @@ function admin_page_federation(&$a) { $newVV = $vv['version']; $lastDot = strrpos($newVV,'.'); $len = strlen($newVV)-1; - if ($lastDot == $len-4) + if (($lastDot == $len-4) && (!strrpos($newVV,'-rc')==$len-3)) $newVV = substr($newVV, 0, $lastDot); if (isset($newV[$newVV])) { From 8b189aca9ec45ad2c42e7a47ac7c78eaa5a7d91b Mon Sep 17 00:00:00 2001 From: Tobias Diekershoff Date: Sat, 26 Dec 2015 08:49:38 +0100 Subject: [PATCH 043/242] some doxygen stuff --- mod/admin.php | 53 ++++++++++++++++++++++++++++++++++++--------------- 1 file changed, 38 insertions(+), 15 deletions(-) diff --git a/mod/admin.php b/mod/admin.php index 772d186ed5..8add5d7f03 100644 --- a/mod/admin.php +++ b/mod/admin.php @@ -7,9 +7,18 @@ require_once("include/remoteupdate.php"); require_once("include/enotify.php"); require_once("include/text.php"); - /** + * @brief process send data from the admin panels subpages + * + * This function acts as relais for processing the data send from the subpages + * of the admin panel. Depending on the 1st parameter of the url (argv[1]) + * specialized functions are called to process the data from the subpages. + * + * The function itself does not return anything, but the subsequencely function + * return the HTML for the pages of the admin panel. + * * @param App $a + * */ function admin_post(&$a){ @@ -100,6 +109,8 @@ function admin_post(&$a){ } /** + * This function generates the content for the admin panel. + * @brief generates content of the admin panel pages * @param App $a * @return string */ @@ -215,9 +226,17 @@ function admin_content(&$a) { } /** - * Admin Federation Stats Page; display some numbers from gserver + * This function generates the "Federation Statistics" subpage for the admin + * panel. The page lists some numbers to the part of "The Federation" known to + * the node. This data includes the different connected networks (e.g. + * Diaspora, Hubzilla, GNU Social) and the used versions in the different + * networks. + * + * The returned string contains the HTML code of the subpage for display. + * + * @brief subpage with some stats about "the federstion" network * @param App $a - * returning string + * @return string */ function admin_page_federation(&$a) { // get counts on active friendica, diaspora, redmatrix, hubzilla, gnu @@ -313,9 +332,9 @@ function admin_page_federation(&$a) { )); } /** - * Admin Inspect Queue Page + * @brief Admin Inspect Queue Page * @param App $a - * return string + * @return string */ function admin_page_queue(&$a) { // get content from the queue table @@ -337,7 +356,7 @@ function admin_page_queue(&$a) { )); } /** - * Admin Summary Page + * @brief Admin Summary Page * @param App $a * @return string */ @@ -390,8 +409,8 @@ function admin_page_summary(&$a) { /** - * Admin Site Page - * @param App $a + * @brief process send data from Admin Site Page + * @param App $a */ function admin_page_site_post(&$a){ if (!x($_POST,"page_site")){ @@ -705,6 +724,7 @@ function admin_page_site_post(&$a){ } /** + * @brief generate Admin Site subpage * @param App $a * @return string */ @@ -915,7 +935,11 @@ function admin_page_site(&$a) { } - +/** + * @brief generates admin panel subpage for DB syncronization + * @param App $a + * @return string + **/ function admin_page_dbsync(&$a) { $o = ''; @@ -995,8 +1019,7 @@ function admin_page_dbsync(&$a) { } /** - * Users admin page - * + * @brief process data send by Users admin page * @param App $a */ function admin_page_users_post(&$a){ @@ -1091,6 +1114,7 @@ function admin_page_users_post(&$a){ } /** + * @brief admin panel subpage for User management * @param App $a * @return string */ @@ -1251,8 +1275,7 @@ function admin_page_users(&$a){ /** - * Plugins admin page - * + * @brief Plugins admin page * @param App $a * @return string */ @@ -1624,8 +1647,7 @@ function admin_page_themes(&$a){ /** - * Logs admin page - * + * @brief prosesses data send by Logs admin page * @param App $a */ @@ -1650,6 +1672,7 @@ function admin_page_logs_post(&$a) { } /** + * @brief generates admin panel subpage for Logs * @param App $a * @return string */ From c1aa668fef4335f7694f696bd8f8d3ebd6b42d23 Mon Sep 17 00:00:00 2001 From: Tobias Diekershoff Date: Sun, 27 Dec 2015 07:28:04 +0100 Subject: [PATCH 044/242] add log viewer to the aside menu of the admin panel --- view/templates/admin_aside.tpl | 2 ++ 1 file changed, 2 insertions(+) diff --git a/view/templates/admin_aside.tpl b/view/templates/admin_aside.tpl index 7753ce9151..9291477af9 100644 --- a/view/templates/admin_aside.tpl +++ b/view/templates/admin_aside.tpl @@ -37,6 +37,8 @@

    {{$logtxt}}

    {{$diagnosticstxt}}

    From ddb17d36a2791cf6ec3c66d5bd8276982663f182 Mon Sep 17 00:00:00 2001 From: Tobias Diekershoff Date: Sun, 27 Dec 2015 08:21:14 +0100 Subject: [PATCH 045/242] added PHP logging hint fields to the template --- view/templates/admin_logs.tpl | 22 ++++++++++++---------- 1 file changed, 12 insertions(+), 10 deletions(-) diff --git a/view/templates/admin_logs.tpl b/view/templates/admin_logs.tpl index 4cc0acb66c..e79c7d7af7 100644 --- a/view/templates/admin_logs.tpl +++ b/view/templates/admin_logs.tpl @@ -1,19 +1,21 @@
    -

    {{$title}} - {{$page}}

    +

    {{$title}} - {{$page}}

    - + - {{include file="field_checkbox.tpl" field=$debugging}} - {{include file="field_input.tpl" field=$logfile}} - {{include file="field_select.tpl" field=$loglevel}} + {{include file="field_checkbox.tpl" field=$debugging}} + {{include file="field_input.tpl" field=$logfile}} + {{include file="field_select.tpl" field=$loglevel}} -
    +
    + +

    {{$phpheader}}

    +
    +

    {{$phphint}}

    +
    {{$phplogcode}}
    +
    -

    {{$logname}}

    -
    {{$data}}
    - -
    From 0a5c9e96a884cce4bcae6ced5d5572c19224f74c Mon Sep 17 00:00:00 2001 From: Tobias Diekershoff Date: Sun, 27 Dec 2015 08:22:30 +0100 Subject: [PATCH 046/242] moved viewing of friendica logs into a separate subpage, thus created a new template --- view/templates/admin_viewlogs.tpl | 6 ++++++ 1 file changed, 6 insertions(+) create mode 100644 view/templates/admin_viewlogs.tpl diff --git a/view/templates/admin_viewlogs.tpl b/view/templates/admin_viewlogs.tpl new file mode 100644 index 0000000000..c80264c52a --- /dev/null +++ b/view/templates/admin_viewlogs.tpl @@ -0,0 +1,6 @@ +
    +

    {{$title}} - {{$page}}

    + +

    {{$logname}}

    +
    {{$data}}
    +
    From 4d1545a1a924e82b73d894c715376ef55004a5b7 Mon Sep 17 00:00:00 2001 From: Tobias Diekershoff Date: Sun, 27 Dec 2015 08:23:26 +0100 Subject: [PATCH 047/242] viewing and configuration of logs are now on separate subpages in the admin panel --- mod/admin.php | 93 +++++++++++++++++++++++++++++++++++++++++++++------ 1 file changed, 83 insertions(+), 10 deletions(-) diff --git a/mod/admin.php b/mod/admin.php index 8add5d7f03..c54b0e9cb8 100644 --- a/mod/admin.php +++ b/mod/admin.php @@ -158,6 +158,7 @@ function admin_content(&$a) { } $aside_tools['logs'] = Array($a->get_baseurl(true)."/admin/logs/", t("Logs"), "logs"); + $aside_tools['viewlogs'] = Array($a->get_baseurl(true)."/admin/viewlogs/", t("View Logs"), 'viewlogs'); $aside_tools['diagnostics_probe'] = Array($a->get_baseurl(true).'/probe/', t('probe address'), 'probe'); $aside_tools['diagnostics_webfinger'] = Array($a->get_baseurl(true).'/webfinger/', t('check webfinger'), 'webfinger'); @@ -165,12 +166,12 @@ function admin_content(&$a) { $a->page['aside'] .= replace_macros( $t, array( '$admin' => $aside_tools, '$subpages' => $aside_sub, - '$admtxt' => t('Admin'), - '$plugadmtxt' => t('Plugin Features'), - '$logtxt' => t('Logs'), - '$diagnosticstxt' => t('diagnostics'), - '$h_pending' => t('User registrations waiting for confirmation'), - '$admurl'=> $a->get_baseurl(true)."/admin/" + '$admtxt' => t('Admin'), + '$plugadmtxt' => t('Plugin Features'), + '$logtxt' => t('Logs'), + '$diagnosticstxt' => t('diagnostics'), + '$h_pending' => t('User registrations waiting for confirmation'), + '$admurl'=> $a->get_baseurl(true)."/admin/" )); @@ -197,6 +198,9 @@ function admin_content(&$a) { case 'logs': $o = admin_page_logs($a); break; + case 'viewlogs': + $o = admin_page_viewlogs($a); + break; case 'dbsync': $o = admin_page_dbsync($a); break; @@ -1672,7 +1676,18 @@ function admin_page_logs_post(&$a) { } /** - * @brief generates admin panel subpage for Logs + * @brief generates admin panel subpage for configuration of the logs + * + * This function take the view/templates/admin_logs.tpl file and generates a + * page where admin can configure the logging of friendica. + * + * Displaying the log is separated from the log config as the logfile can get + * big depending on the settings and changing settings regarding the logs can + * thus waste bandwidth. + * + * The string returned contains the content of the template file with replaced + * macros. + * * @param App $a * @return string */ @@ -1688,7 +1703,7 @@ function admin_page_logs(&$a){ $t = get_markup_template("admin_logs.tpl"); - $f = get_config('system','logfile'); +/* $f = get_config('system','logfile'); $data = ''; @@ -1717,14 +1732,14 @@ readable."); } fclose($fp); } - } + }*/ return replace_macros($t, array( '$title' => t('Administration'), '$page' => t('Logs'), '$submit' => t('Save Settings'), '$clear' => t('Clear'), - '$data' => $data, +// '$data' => $data, '$baseurl' => $a->get_baseurl(true), '$logname' => get_config('system','logfile'), @@ -1734,9 +1749,67 @@ readable."); '$loglevel' => array('loglevel', t("Log level"), get_config('system','loglevel'), "", $log_choices), '$form_security_token' => get_form_security_token("admin_logs"), + '$phpheader' => t("PHP logging"), + '$phphint' => t("To enable logging of PHP errors and warnings you can add the following to the .htconfig.php file of your installation. The filename set in the 'error_log' line is relative to the friendica top-level directory and must be writeable by the web server. The option '1' for 'log_errors' and 'display_errors' is to enable these options, set to '0' to disable them."), + '$phplogcode' => "error_reporting(E_ERROR | E_WARNING | E_PARSE );\nini_set('error_log','php.out');\nini_set('log_errors','1');\nini_set('display_errors', '1');", )); } +/** + * @brief generates admin panel subpage to view the Friendica log + * + * This function loads the template view/templates/admin_viewlogs.tpl to + * display the systemlog content. The filename for the systemlog of friendica + * is relative to the base directory and taken from the config entry 'logfile' + * in the 'system' category. + * + * Displaying the log is separated from the log config as the logfile can get + * big depending on the settings and changing settings regarding the logs can + * thus waste bandwidth. + * + * The string returned contains the content of the template file with replaced + * macros. + * + * @param App $a + * @return string + */ +function admin_page_viewlogs(&$a){ + $t = get_markup_template("admin_viewlogs.tpl"); + $f = get_config('system','logfile'); + $data = ''; + + if(!file_exists($f)) { + $data = t("Error trying to open $f log file.\r\n
    Check to see if file $f exist and is readable."); + } + else { + $fp = fopen($f, 'r'); + if(!$fp) { + $data = t("Couldn't open $f log file.\r\n
    Check to see if file $f is readable."); + } + else { + $fstat = fstat($fp); + $size = $fstat['size']; + if($size != 0) + { + if($size > 5000000 || $size < 0) + $size = 5000000; + $seek = fseek($fp,0-$size,SEEK_END); + if($seek === 0) { + $data = escape_tags(fread($fp,$size)); + while(! feof($fp)) + $data .= escape_tags(fread($fp,4096)); + } + } + fclose($fp); + } + } + return replace_macros($t, array( + '$title' => t('Administration'), + '$page' => t('View Logs'), + '$data' => $data, + '$logname' => get_config('system','logfile') + )); +} /** * @param App $a */ From 0d5fed5b3bfba169f98742a7de4188bea7a31e76 Mon Sep 17 00:00:00 2001 From: Tobias Diekershoff Date: Sun, 27 Dec 2015 08:27:53 +0100 Subject: [PATCH 048/242] beautification of HTML code --- view/templates/admin_aside.tpl | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/view/templates/admin_aside.tpl b/view/templates/admin_aside.tpl index 9291477af9..5c9cce0d0c 100644 --- a/view/templates/admin_aside.tpl +++ b/view/templates/admin_aside.tpl @@ -37,8 +37,7 @@

    {{$logtxt}}

    {{$diagnosticstxt}}

    From 1030c5f4b63df897c4cc96880063fc6ff0e56cb6 Mon Sep 17 00:00:00 2001 From: Tobias Diekershoff Date: Sun, 27 Dec 2015 16:03:42 +0100 Subject: [PATCH 049/242] some doc texts --- mod/admin.php | 18 +++++++++++++++--- 1 file changed, 15 insertions(+), 3 deletions(-) diff --git a/mod/admin.php b/mod/admin.php index c54b0e9cb8..616e8fcd4a 100644 --- a/mod/admin.php +++ b/mod/admin.php @@ -337,6 +337,14 @@ function admin_page_federation(&$a) { } /** * @brief Admin Inspect Queue Page + * + * Generates a page for the admin to have a look into the current queue of + * postings that are not deliverabke. Shown are the name and url of the + * recipient, the delivery network and the dates when the posting was generated + * and the last time tried to deliver the posting. + * + * The returned string holds the content of the page. + * * @param App $a * @return string */ @@ -361,6 +369,12 @@ function admin_page_queue(&$a) { } /** * @brief Admin Summary Page + * + * The summary page is the "start page" of the admin panel. It gives the admin + * a first overview of the open adminastrative tasks. + * + * The returned string contains the HTML content of the generated page. + * * @param App $a * @return string */ @@ -1660,14 +1674,12 @@ function admin_page_logs_post(&$a) { check_form_security_token_redirectOnErr('/admin/logs', 'admin_logs'); $logfile = ((x($_POST,'logfile')) ? notags(trim($_POST['logfile'])) : ''); - $debugging = ((x($_POST,'debugging')) ? true : false); + $debugging = ((x($_POST,'debugging')) ? true : false); $loglevel = ((x($_POST,'loglevel')) ? intval(trim($_POST['loglevel'])) : 0); set_config('system','logfile', $logfile); set_config('system','debugging', $debugging); set_config('system','loglevel', $loglevel); - - } info( t("Log settings updated.") ); From 8e7d53cd417951f855cd9aae51bd9993e5b969e0 Mon Sep 17 00:00:00 2001 From: Tobias Diekershoff Date: Mon, 4 Jan 2016 08:19:32 +0100 Subject: [PATCH 050/242] added Chart.js 1.0.2 to friendica library and use it instead of CDN version for graphs --- library/Chart.js-1.0.2/Chart.min.js | 11 +++++++++++ library/Chart.js-1.0.2/LICENSE.md | 7 +++++++ library/Chart.js-1.0.2/README.md | 20 ++++++++++++++++++++ view/templates/admin_federation.tpl | 2 +- 4 files changed, 39 insertions(+), 1 deletion(-) create mode 100644 library/Chart.js-1.0.2/Chart.min.js create mode 100644 library/Chart.js-1.0.2/LICENSE.md create mode 100644 library/Chart.js-1.0.2/README.md diff --git a/library/Chart.js-1.0.2/Chart.min.js b/library/Chart.js-1.0.2/Chart.min.js new file mode 100644 index 0000000000..3a0a2c8734 --- /dev/null +++ b/library/Chart.js-1.0.2/Chart.min.js @@ -0,0 +1,11 @@ +/*! + * Chart.js + * http://chartjs.org/ + * Version: 1.0.2 + * + * Copyright 2015 Nick Downie + * Released under the MIT license + * https://github.com/nnnick/Chart.js/blob/master/LICENSE.md + */ +(function(){"use strict";var t=this,i=t.Chart,e=function(t){this.canvas=t.canvas,this.ctx=t;var i=function(t,i){return t["offset"+i]?t["offset"+i]:document.defaultView.getComputedStyle(t).getPropertyValue(i)},e=this.width=i(t.canvas,"Width"),n=this.height=i(t.canvas,"Height");t.canvas.width=e,t.canvas.height=n;var e=this.width=t.canvas.width,n=this.height=t.canvas.height;return this.aspectRatio=this.width/this.height,s.retinaScale(this),this};e.defaults={global:{animation:!0,animationSteps:60,animationEasing:"easeOutQuart",showScale:!0,scaleOverride:!1,scaleSteps:null,scaleStepWidth:null,scaleStartValue:null,scaleLineColor:"rgba(0,0,0,.1)",scaleLineWidth:1,scaleShowLabels:!0,scaleLabel:"<%=value%>",scaleIntegersOnly:!0,scaleBeginAtZero:!1,scaleFontFamily:"'Helvetica Neue', 'Helvetica', 'Arial', sans-serif",scaleFontSize:12,scaleFontStyle:"normal",scaleFontColor:"#666",responsive:!1,maintainAspectRatio:!0,showTooltips:!0,customTooltips:!1,tooltipEvents:["mousemove","touchstart","touchmove","mouseout"],tooltipFillColor:"rgba(0,0,0,0.8)",tooltipFontFamily:"'Helvetica Neue', 'Helvetica', 'Arial', sans-serif",tooltipFontSize:14,tooltipFontStyle:"normal",tooltipFontColor:"#fff",tooltipTitleFontFamily:"'Helvetica Neue', 'Helvetica', 'Arial', sans-serif",tooltipTitleFontSize:14,tooltipTitleFontStyle:"bold",tooltipTitleFontColor:"#fff",tooltipYPadding:6,tooltipXPadding:6,tooltipCaretSize:8,tooltipCornerRadius:6,tooltipXOffset:10,tooltipTemplate:"<%if (label){%><%=label%>: <%}%><%= value %>",multiTooltipTemplate:"<%= value %>",multiTooltipKeyBackground:"#fff",onAnimationProgress:function(){},onAnimationComplete:function(){}}},e.types={};var s=e.helpers={},n=s.each=function(t,i,e){var s=Array.prototype.slice.call(arguments,3);if(t)if(t.length===+t.length){var n;for(n=0;n=0;s--){var n=t[s];if(i(n))return n}},s.inherits=function(t){var i=this,e=t&&t.hasOwnProperty("constructor")?t.constructor:function(){return i.apply(this,arguments)},s=function(){this.constructor=e};return s.prototype=i.prototype,e.prototype=new s,e.extend=r,t&&a(e.prototype,t),e.__super__=i.prototype,e}),c=s.noop=function(){},u=s.uid=function(){var t=0;return function(){return"chart-"+t++}}(),d=s.warn=function(t){window.console&&"function"==typeof window.console.warn&&console.warn(t)},p=s.amd="function"==typeof define&&define.amd,f=s.isNumber=function(t){return!isNaN(parseFloat(t))&&isFinite(t)},g=s.max=function(t){return Math.max.apply(Math,t)},m=s.min=function(t){return Math.min.apply(Math,t)},v=(s.cap=function(t,i,e){if(f(i)){if(t>i)return i}else if(f(e)&&e>t)return e;return t},s.getDecimalPlaces=function(t){return t%1!==0&&f(t)?t.toString().split(".")[1].length:0}),S=s.radians=function(t){return t*(Math.PI/180)},x=(s.getAngleFromPoint=function(t,i){var e=i.x-t.x,s=i.y-t.y,n=Math.sqrt(e*e+s*s),o=2*Math.PI+Math.atan2(s,e);return 0>e&&0>s&&(o+=2*Math.PI),{angle:o,distance:n}},s.aliasPixel=function(t){return t%2===0?0:.5}),y=(s.splineCurve=function(t,i,e,s){var n=Math.sqrt(Math.pow(i.x-t.x,2)+Math.pow(i.y-t.y,2)),o=Math.sqrt(Math.pow(e.x-i.x,2)+Math.pow(e.y-i.y,2)),a=s*n/(n+o),h=s*o/(n+o);return{inner:{x:i.x-a*(e.x-t.x),y:i.y-a*(e.y-t.y)},outer:{x:i.x+h*(e.x-t.x),y:i.y+h*(e.y-t.y)}}},s.calculateOrderOfMagnitude=function(t){return Math.floor(Math.log(t)/Math.LN10)}),C=(s.calculateScaleRange=function(t,i,e,s,n){var o=2,a=Math.floor(i/(1.5*e)),h=o>=a,l=g(t),r=m(t);l===r&&(l+=.5,r>=.5&&!s?r-=.5:l+=.5);for(var c=Math.abs(l-r),u=y(c),d=Math.ceil(l/(1*Math.pow(10,u)))*Math.pow(10,u),p=s?0:Math.floor(r/(1*Math.pow(10,u)))*Math.pow(10,u),f=d-p,v=Math.pow(10,u),S=Math.round(f/v);(S>a||a>2*S)&&!h;)if(S>a)v*=2,S=Math.round(f/v),S%1!==0&&(h=!0);else if(n&&u>=0){if(v/2%1!==0)break;v/=2,S=Math.round(f/v)}else v/=2,S=Math.round(f/v);return h&&(S=o,v=f/S),{steps:S,stepValue:v,min:p,max:p+S*v}},s.template=function(t,i){function e(t,i){var e=/\W/.test(t)?new Function("obj","var p=[],print=function(){p.push.apply(p,arguments);};with(obj){p.push('"+t.replace(/[\r\t\n]/g," ").split("<%").join(" ").replace(/((^|%>)[^\t]*)'/g,"$1\r").replace(/\t=(.*?)%>/g,"',$1,'").split(" ").join("');").split("%>").join("p.push('").split("\r").join("\\'")+"');}return p.join('');"):s[t]=s[t];return i?e(i):e}if(t instanceof Function)return t(i);var s={};return e(t,i)}),w=(s.generateLabels=function(t,i,e,s){var o=new Array(i);return labelTemplateString&&n(o,function(i,n){o[n]=C(t,{value:e+s*(n+1)})}),o},s.easingEffects={linear:function(t){return t},easeInQuad:function(t){return t*t},easeOutQuad:function(t){return-1*t*(t-2)},easeInOutQuad:function(t){return(t/=.5)<1?.5*t*t:-0.5*(--t*(t-2)-1)},easeInCubic:function(t){return t*t*t},easeOutCubic:function(t){return 1*((t=t/1-1)*t*t+1)},easeInOutCubic:function(t){return(t/=.5)<1?.5*t*t*t:.5*((t-=2)*t*t+2)},easeInQuart:function(t){return t*t*t*t},easeOutQuart:function(t){return-1*((t=t/1-1)*t*t*t-1)},easeInOutQuart:function(t){return(t/=.5)<1?.5*t*t*t*t:-0.5*((t-=2)*t*t*t-2)},easeInQuint:function(t){return 1*(t/=1)*t*t*t*t},easeOutQuint:function(t){return 1*((t=t/1-1)*t*t*t*t+1)},easeInOutQuint:function(t){return(t/=.5)<1?.5*t*t*t*t*t:.5*((t-=2)*t*t*t*t+2)},easeInSine:function(t){return-1*Math.cos(t/1*(Math.PI/2))+1},easeOutSine:function(t){return 1*Math.sin(t/1*(Math.PI/2))},easeInOutSine:function(t){return-0.5*(Math.cos(Math.PI*t/1)-1)},easeInExpo:function(t){return 0===t?1:1*Math.pow(2,10*(t/1-1))},easeOutExpo:function(t){return 1===t?1:1*(-Math.pow(2,-10*t/1)+1)},easeInOutExpo:function(t){return 0===t?0:1===t?1:(t/=.5)<1?.5*Math.pow(2,10*(t-1)):.5*(-Math.pow(2,-10*--t)+2)},easeInCirc:function(t){return t>=1?t:-1*(Math.sqrt(1-(t/=1)*t)-1)},easeOutCirc:function(t){return 1*Math.sqrt(1-(t=t/1-1)*t)},easeInOutCirc:function(t){return(t/=.5)<1?-0.5*(Math.sqrt(1-t*t)-1):.5*(Math.sqrt(1-(t-=2)*t)+1)},easeInElastic:function(t){var i=1.70158,e=0,s=1;return 0===t?0:1==(t/=1)?1:(e||(e=.3),st?-.5*s*Math.pow(2,10*(t-=1))*Math.sin(2*(1*t-i)*Math.PI/e):s*Math.pow(2,-10*(t-=1))*Math.sin(2*(1*t-i)*Math.PI/e)*.5+1)},easeInBack:function(t){var i=1.70158;return 1*(t/=1)*t*((i+1)*t-i)},easeOutBack:function(t){var i=1.70158;return 1*((t=t/1-1)*t*((i+1)*t+i)+1)},easeInOutBack:function(t){var i=1.70158;return(t/=.5)<1?.5*t*t*(((i*=1.525)+1)*t-i):.5*((t-=2)*t*(((i*=1.525)+1)*t+i)+2)},easeInBounce:function(t){return 1-w.easeOutBounce(1-t)},easeOutBounce:function(t){return(t/=1)<1/2.75?7.5625*t*t:2/2.75>t?1*(7.5625*(t-=1.5/2.75)*t+.75):2.5/2.75>t?1*(7.5625*(t-=2.25/2.75)*t+.9375):1*(7.5625*(t-=2.625/2.75)*t+.984375)},easeInOutBounce:function(t){return.5>t?.5*w.easeInBounce(2*t):.5*w.easeOutBounce(2*t-1)+.5}}),b=s.requestAnimFrame=function(){return window.requestAnimationFrame||window.webkitRequestAnimationFrame||window.mozRequestAnimationFrame||window.oRequestAnimationFrame||window.msRequestAnimationFrame||function(t){return window.setTimeout(t,1e3/60)}}(),P=s.cancelAnimFrame=function(){return window.cancelAnimationFrame||window.webkitCancelAnimationFrame||window.mozCancelAnimationFrame||window.oCancelAnimationFrame||window.msCancelAnimationFrame||function(t){return window.clearTimeout(t,1e3/60)}}(),L=(s.animationLoop=function(t,i,e,s,n,o){var a=0,h=w[e]||w.linear,l=function(){a++;var e=a/i,r=h(e);t.call(o,r,e,a),s.call(o,r,e),i>a?o.animationFrame=b(l):n.apply(o)};b(l)},s.getRelativePosition=function(t){var i,e,s=t.originalEvent||t,n=t.currentTarget||t.srcElement,o=n.getBoundingClientRect();return s.touches?(i=s.touches[0].clientX-o.left,e=s.touches[0].clientY-o.top):(i=s.clientX-o.left,e=s.clientY-o.top),{x:i,y:e}},s.addEvent=function(t,i,e){t.addEventListener?t.addEventListener(i,e):t.attachEvent?t.attachEvent("on"+i,e):t["on"+i]=e}),k=s.removeEvent=function(t,i,e){t.removeEventListener?t.removeEventListener(i,e,!1):t.detachEvent?t.detachEvent("on"+i,e):t["on"+i]=c},F=(s.bindEvents=function(t,i,e){t.events||(t.events={}),n(i,function(i){t.events[i]=function(){e.apply(t,arguments)},L(t.chart.canvas,i,t.events[i])})},s.unbindEvents=function(t,i){n(i,function(i,e){k(t.chart.canvas,e,i)})}),R=s.getMaximumWidth=function(t){var i=t.parentNode;return i.clientWidth},T=s.getMaximumHeight=function(t){var i=t.parentNode;return i.clientHeight},A=(s.getMaximumSize=s.getMaximumWidth,s.retinaScale=function(t){var i=t.ctx,e=t.canvas.width,s=t.canvas.height;window.devicePixelRatio&&(i.canvas.style.width=e+"px",i.canvas.style.height=s+"px",i.canvas.height=s*window.devicePixelRatio,i.canvas.width=e*window.devicePixelRatio,i.scale(window.devicePixelRatio,window.devicePixelRatio))}),M=s.clear=function(t){t.ctx.clearRect(0,0,t.width,t.height)},W=s.fontString=function(t,i,e){return i+" "+t+"px "+e},z=s.longestText=function(t,i,e){t.font=i;var s=0;return n(e,function(i){var e=t.measureText(i).width;s=e>s?e:s}),s},B=s.drawRoundedRectangle=function(t,i,e,s,n,o){t.beginPath(),t.moveTo(i+o,e),t.lineTo(i+s-o,e),t.quadraticCurveTo(i+s,e,i+s,e+o),t.lineTo(i+s,e+n-o),t.quadraticCurveTo(i+s,e+n,i+s-o,e+n),t.lineTo(i+o,e+n),t.quadraticCurveTo(i,e+n,i,e+n-o),t.lineTo(i,e+o),t.quadraticCurveTo(i,e,i+o,e),t.closePath()};e.instances={},e.Type=function(t,i,s){this.options=i,this.chart=s,this.id=u(),e.instances[this.id]=this,i.responsive&&this.resize(),this.initialize.call(this,t)},a(e.Type.prototype,{initialize:function(){return this},clear:function(){return M(this.chart),this},stop:function(){return P(this.animationFrame),this},resize:function(t){this.stop();var i=this.chart.canvas,e=R(this.chart.canvas),s=this.options.maintainAspectRatio?e/this.chart.aspectRatio:T(this.chart.canvas);return i.width=this.chart.width=e,i.height=this.chart.height=s,A(this.chart),"function"==typeof t&&t.apply(this,Array.prototype.slice.call(arguments,1)),this},reflow:c,render:function(t){return t&&this.reflow(),this.options.animation&&!t?s.animationLoop(this.draw,this.options.animationSteps,this.options.animationEasing,this.options.onAnimationProgress,this.options.onAnimationComplete,this):(this.draw(),this.options.onAnimationComplete.call(this)),this},generateLegend:function(){return C(this.options.legendTemplate,this)},destroy:function(){this.clear(),F(this,this.events);var t=this.chart.canvas;t.width=this.chart.width,t.height=this.chart.height,t.style.removeProperty?(t.style.removeProperty("width"),t.style.removeProperty("height")):(t.style.removeAttribute("width"),t.style.removeAttribute("height")),delete e.instances[this.id]},showTooltip:function(t,i){"undefined"==typeof this.activeElements&&(this.activeElements=[]);var o=function(t){var i=!1;return t.length!==this.activeElements.length?i=!0:(n(t,function(t,e){t!==this.activeElements[e]&&(i=!0)},this),i)}.call(this,t);if(o||i){if(this.activeElements=t,this.draw(),this.options.customTooltips&&this.options.customTooltips(!1),t.length>0)if(this.datasets&&this.datasets.length>1){for(var a,h,r=this.datasets.length-1;r>=0&&(a=this.datasets[r].points||this.datasets[r].bars||this.datasets[r].segments,h=l(a,t[0]),-1===h);r--);var c=[],u=[],d=function(){var t,i,e,n,o,a=[],l=[],r=[];return s.each(this.datasets,function(i){t=i.points||i.bars||i.segments,t[h]&&t[h].hasValue()&&a.push(t[h])}),s.each(a,function(t){l.push(t.x),r.push(t.y),c.push(s.template(this.options.multiTooltipTemplate,t)),u.push({fill:t._saved.fillColor||t.fillColor,stroke:t._saved.strokeColor||t.strokeColor})},this),o=m(r),e=g(r),n=m(l),i=g(l),{x:n>this.chart.width/2?n:i,y:(o+e)/2}}.call(this,h);new e.MultiTooltip({x:d.x,y:d.y,xPadding:this.options.tooltipXPadding,yPadding:this.options.tooltipYPadding,xOffset:this.options.tooltipXOffset,fillColor:this.options.tooltipFillColor,textColor:this.options.tooltipFontColor,fontFamily:this.options.tooltipFontFamily,fontStyle:this.options.tooltipFontStyle,fontSize:this.options.tooltipFontSize,titleTextColor:this.options.tooltipTitleFontColor,titleFontFamily:this.options.tooltipTitleFontFamily,titleFontStyle:this.options.tooltipTitleFontStyle,titleFontSize:this.options.tooltipTitleFontSize,cornerRadius:this.options.tooltipCornerRadius,labels:c,legendColors:u,legendColorBackground:this.options.multiTooltipKeyBackground,title:t[0].label,chart:this.chart,ctx:this.chart.ctx,custom:this.options.customTooltips}).draw()}else n(t,function(t){var i=t.tooltipPosition();new e.Tooltip({x:Math.round(i.x),y:Math.round(i.y),xPadding:this.options.tooltipXPadding,yPadding:this.options.tooltipYPadding,fillColor:this.options.tooltipFillColor,textColor:this.options.tooltipFontColor,fontFamily:this.options.tooltipFontFamily,fontStyle:this.options.tooltipFontStyle,fontSize:this.options.tooltipFontSize,caretHeight:this.options.tooltipCaretSize,cornerRadius:this.options.tooltipCornerRadius,text:C(this.options.tooltipTemplate,t),chart:this.chart,custom:this.options.customTooltips}).draw()},this);return this}},toBase64Image:function(){return this.chart.canvas.toDataURL.apply(this.chart.canvas,arguments)}}),e.Type.extend=function(t){var i=this,s=function(){return i.apply(this,arguments)};if(s.prototype=o(i.prototype),a(s.prototype,t),s.extend=e.Type.extend,t.name||i.prototype.name){var n=t.name||i.prototype.name,l=e.defaults[i.prototype.name]?o(e.defaults[i.prototype.name]):{};e.defaults[n]=a(l,t.defaults),e.types[n]=s,e.prototype[n]=function(t,i){var o=h(e.defaults.global,e.defaults[n],i||{});return new s(t,o,this)}}else d("Name not provided for this chart, so it hasn't been registered");return i},e.Element=function(t){a(this,t),this.initialize.apply(this,arguments),this.save()},a(e.Element.prototype,{initialize:function(){},restore:function(t){return t?n(t,function(t){this[t]=this._saved[t]},this):a(this,this._saved),this},save:function(){return this._saved=o(this),delete this._saved._saved,this},update:function(t){return n(t,function(t,i){this._saved[i]=this[i],this[i]=t},this),this},transition:function(t,i){return n(t,function(t,e){this[e]=(t-this._saved[e])*i+this._saved[e]},this),this},tooltipPosition:function(){return{x:this.x,y:this.y}},hasValue:function(){return f(this.value)}}),e.Element.extend=r,e.Point=e.Element.extend({display:!0,inRange:function(t,i){var e=this.hitDetectionRadius+this.radius;return Math.pow(t-this.x,2)+Math.pow(i-this.y,2)=this.startAngle&&e.angle<=this.endAngle,o=e.distance>=this.innerRadius&&e.distance<=this.outerRadius;return n&&o},tooltipPosition:function(){var t=this.startAngle+(this.endAngle-this.startAngle)/2,i=(this.outerRadius-this.innerRadius)/2+this.innerRadius;return{x:this.x+Math.cos(t)*i,y:this.y+Math.sin(t)*i}},draw:function(t){var i=this.ctx;i.beginPath(),i.arc(this.x,this.y,this.outerRadius,this.startAngle,this.endAngle),i.arc(this.x,this.y,this.innerRadius,this.endAngle,this.startAngle,!0),i.closePath(),i.strokeStyle=this.strokeColor,i.lineWidth=this.strokeWidth,i.fillStyle=this.fillColor,i.fill(),i.lineJoin="bevel",this.showStroke&&i.stroke()}}),e.Rectangle=e.Element.extend({draw:function(){var t=this.ctx,i=this.width/2,e=this.x-i,s=this.x+i,n=this.base-(this.base-this.y),o=this.strokeWidth/2;this.showStroke&&(e+=o,s-=o,n+=o),t.beginPath(),t.fillStyle=this.fillColor,t.strokeStyle=this.strokeColor,t.lineWidth=this.strokeWidth,t.moveTo(e,this.base),t.lineTo(e,n),t.lineTo(s,n),t.lineTo(s,this.base),t.fill(),this.showStroke&&t.stroke()},height:function(){return this.base-this.y},inRange:function(t,i){return t>=this.x-this.width/2&&t<=this.x+this.width/2&&i>=this.y&&i<=this.base}}),e.Tooltip=e.Element.extend({draw:function(){var t=this.chart.ctx;t.font=W(this.fontSize,this.fontStyle,this.fontFamily),this.xAlign="center",this.yAlign="above";var i=this.caretPadding=2,e=t.measureText(this.text).width+2*this.xPadding,s=this.fontSize+2*this.yPadding,n=s+this.caretHeight+i;this.x+e/2>this.chart.width?this.xAlign="left":this.x-e/2<0&&(this.xAlign="right"),this.y-n<0&&(this.yAlign="below");var o=this.x-e/2,a=this.y-n;if(t.fillStyle=this.fillColor,this.custom)this.custom(this);else{switch(this.yAlign){case"above":t.beginPath(),t.moveTo(this.x,this.y-i),t.lineTo(this.x+this.caretHeight,this.y-(i+this.caretHeight)),t.lineTo(this.x-this.caretHeight,this.y-(i+this.caretHeight)),t.closePath(),t.fill();break;case"below":a=this.y+i+this.caretHeight,t.beginPath(),t.moveTo(this.x,this.y+i),t.lineTo(this.x+this.caretHeight,this.y+i+this.caretHeight),t.lineTo(this.x-this.caretHeight,this.y+i+this.caretHeight),t.closePath(),t.fill()}switch(this.xAlign){case"left":o=this.x-e+(this.cornerRadius+this.caretHeight);break;case"right":o=this.x-(this.cornerRadius+this.caretHeight)}B(t,o,a,e,s,this.cornerRadius),t.fill(),t.fillStyle=this.textColor,t.textAlign="center",t.textBaseline="middle",t.fillText(this.text,o+e/2,a+s/2)}}}),e.MultiTooltip=e.Element.extend({initialize:function(){this.font=W(this.fontSize,this.fontStyle,this.fontFamily),this.titleFont=W(this.titleFontSize,this.titleFontStyle,this.titleFontFamily),this.height=this.labels.length*this.fontSize+(this.labels.length-1)*(this.fontSize/2)+2*this.yPadding+1.5*this.titleFontSize,this.ctx.font=this.titleFont;var t=this.ctx.measureText(this.title).width,i=z(this.ctx,this.font,this.labels)+this.fontSize+3,e=g([i,t]);this.width=e+2*this.xPadding;var s=this.height/2;this.y-s<0?this.y=s:this.y+s>this.chart.height&&(this.y=this.chart.height-s),this.x>this.chart.width/2?this.x-=this.xOffset+this.width:this.x+=this.xOffset},getLineHeight:function(t){var i=this.y-this.height/2+this.yPadding,e=t-1;return 0===t?i+this.titleFontSize/2:i+(1.5*this.fontSize*e+this.fontSize/2)+1.5*this.titleFontSize},draw:function(){if(this.custom)this.custom(this);else{B(this.ctx,this.x,this.y-this.height/2,this.width,this.height,this.cornerRadius);var t=this.ctx;t.fillStyle=this.fillColor,t.fill(),t.closePath(),t.textAlign="left",t.textBaseline="middle",t.fillStyle=this.titleTextColor,t.font=this.titleFont,t.fillText(this.title,this.x+this.xPadding,this.getLineHeight(0)),t.font=this.font,s.each(this.labels,function(i,e){t.fillStyle=this.textColor,t.fillText(i,this.x+this.xPadding+this.fontSize+3,this.getLineHeight(e+1)),t.fillStyle=this.legendColorBackground,t.fillRect(this.x+this.xPadding,this.getLineHeight(e+1)-this.fontSize/2,this.fontSize,this.fontSize),t.fillStyle=this.legendColors[e].fill,t.fillRect(this.x+this.xPadding,this.getLineHeight(e+1)-this.fontSize/2,this.fontSize,this.fontSize)},this)}}}),e.Scale=e.Element.extend({initialize:function(){this.fit()},buildYLabels:function(){this.yLabels=[];for(var t=v(this.stepValue),i=0;i<=this.steps;i++)this.yLabels.push(C(this.templateString,{value:(this.min+i*this.stepValue).toFixed(t)}));this.yLabelWidth=this.display&&this.showLabels?z(this.ctx,this.font,this.yLabels):0},addXLabel:function(t){this.xLabels.push(t),this.valuesCount++,this.fit()},removeXLabel:function(){this.xLabels.shift(),this.valuesCount--,this.fit()},fit:function(){this.startPoint=this.display?this.fontSize:0,this.endPoint=this.display?this.height-1.5*this.fontSize-5:this.height,this.startPoint+=this.padding,this.endPoint-=this.padding;var t,i=this.endPoint-this.startPoint;for(this.calculateYRange(i),this.buildYLabels(),this.calculateXLabelRotation();i>this.endPoint-this.startPoint;)i=this.endPoint-this.startPoint,t=this.yLabelWidth,this.calculateYRange(i),this.buildYLabels(),tthis.yLabelWidth+10?e/2:this.yLabelWidth+10,this.xLabelRotation=0,this.display){var n,o=z(this.ctx,this.font,this.xLabels);this.xLabelWidth=o;for(var a=Math.floor(this.calculateX(1)-this.calculateX(0))-6;this.xLabelWidth>a&&0===this.xLabelRotation||this.xLabelWidth>a&&this.xLabelRotation<=90&&this.xLabelRotation>0;)n=Math.cos(S(this.xLabelRotation)),t=n*e,i=n*s,t+this.fontSize/2>this.yLabelWidth+8&&(this.xScalePaddingLeft=t+this.fontSize/2),this.xScalePaddingRight=this.fontSize/2,this.xLabelRotation++,this.xLabelWidth=n*o;this.xLabelRotation>0&&(this.endPoint-=Math.sin(S(this.xLabelRotation))*o+3)}else this.xLabelWidth=0,this.xScalePaddingRight=this.padding,this.xScalePaddingLeft=this.padding},calculateYRange:c,drawingArea:function(){return this.startPoint-this.endPoint},calculateY:function(t){var i=this.drawingArea()/(this.min-this.max);return this.endPoint-i*(t-this.min)},calculateX:function(t){var i=(this.xLabelRotation>0,this.width-(this.xScalePaddingLeft+this.xScalePaddingRight)),e=i/Math.max(this.valuesCount-(this.offsetGridLines?0:1),1),s=e*t+this.xScalePaddingLeft;return this.offsetGridLines&&(s+=e/2),Math.round(s)},update:function(t){s.extend(this,t),this.fit()},draw:function(){var t=this.ctx,i=(this.endPoint-this.startPoint)/this.steps,e=Math.round(this.xScalePaddingLeft);this.display&&(t.fillStyle=this.textColor,t.font=this.font,n(this.yLabels,function(n,o){var a=this.endPoint-i*o,h=Math.round(a),l=this.showHorizontalLines;t.textAlign="right",t.textBaseline="middle",this.showLabels&&t.fillText(n,e-10,a),0!==o||l||(l=!0),l&&t.beginPath(),o>0?(t.lineWidth=this.gridLineWidth,t.strokeStyle=this.gridLineColor):(t.lineWidth=this.lineWidth,t.strokeStyle=this.lineColor),h+=s.aliasPixel(t.lineWidth),l&&(t.moveTo(e,h),t.lineTo(this.width,h),t.stroke(),t.closePath()),t.lineWidth=this.lineWidth,t.strokeStyle=this.lineColor,t.beginPath(),t.moveTo(e-5,h),t.lineTo(e,h),t.stroke(),t.closePath()},this),n(this.xLabels,function(i,e){var s=this.calculateX(e)+x(this.lineWidth),n=this.calculateX(e-(this.offsetGridLines?.5:0))+x(this.lineWidth),o=this.xLabelRotation>0,a=this.showVerticalLines;0!==e||a||(a=!0),a&&t.beginPath(),e>0?(t.lineWidth=this.gridLineWidth,t.strokeStyle=this.gridLineColor):(t.lineWidth=this.lineWidth,t.strokeStyle=this.lineColor),a&&(t.moveTo(n,this.endPoint),t.lineTo(n,this.startPoint-3),t.stroke(),t.closePath()),t.lineWidth=this.lineWidth,t.strokeStyle=this.lineColor,t.beginPath(),t.moveTo(n,this.endPoint),t.lineTo(n,this.endPoint+5),t.stroke(),t.closePath(),t.save(),t.translate(s,o?this.endPoint+12:this.endPoint+8),t.rotate(-1*S(this.xLabelRotation)),t.font=this.font,t.textAlign=o?"right":"center",t.textBaseline=o?"middle":"top",t.fillText(i,0,0),t.restore()},this))}}),e.RadialScale=e.Element.extend({initialize:function(){this.size=m([this.height,this.width]),this.drawingArea=this.display?this.size/2-(this.fontSize/2+this.backdropPaddingY):this.size/2},calculateCenterOffset:function(t){var i=this.drawingArea/(this.max-this.min);return(t-this.min)*i},update:function(){this.lineArc?this.drawingArea=this.display?this.size/2-(this.fontSize/2+this.backdropPaddingY):this.size/2:this.setScaleSize(),this.buildYLabels()},buildYLabels:function(){this.yLabels=[];for(var t=v(this.stepValue),i=0;i<=this.steps;i++)this.yLabels.push(C(this.templateString,{value:(this.min+i*this.stepValue).toFixed(t)}))},getCircumference:function(){return 2*Math.PI/this.valuesCount},setScaleSize:function(){var t,i,e,s,n,o,a,h,l,r,c,u,d=m([this.height/2-this.pointLabelFontSize-5,this.width/2]),p=this.width,g=0;for(this.ctx.font=W(this.pointLabelFontSize,this.pointLabelFontStyle,this.pointLabelFontFamily),i=0;ip&&(p=t.x+s,n=i),t.x-sp&&(p=t.x+e,n=i):i>this.valuesCount/2&&t.x-e0){var s,n=e*(this.drawingArea/this.steps),o=this.yCenter-n;if(this.lineWidth>0)if(t.strokeStyle=this.lineColor,t.lineWidth=this.lineWidth,this.lineArc)t.beginPath(),t.arc(this.xCenter,this.yCenter,n,0,2*Math.PI),t.closePath(),t.stroke();else{t.beginPath();for(var a=0;a=0;i--){if(this.angleLineWidth>0){var e=this.getPointPosition(i,this.calculateCenterOffset(this.max));t.beginPath(),t.moveTo(this.xCenter,this.yCenter),t.lineTo(e.x,e.y),t.stroke(),t.closePath()}var s=this.getPointPosition(i,this.calculateCenterOffset(this.max)+5);t.font=W(this.pointLabelFontSize,this.pointLabelFontStyle,this.pointLabelFontFamily),t.fillStyle=this.pointLabelFontColor;var o=this.labels.length,a=this.labels.length/2,h=a/2,l=h>i||i>o-h,r=i===h||i===o-h;t.textAlign=0===i?"center":i===a?"center":a>i?"left":"right",t.textBaseline=r?"middle":l?"bottom":"top",t.fillText(this.labels[i],s.x,s.y)}}}}}),s.addEvent(window,"resize",function(){var t;return function(){clearTimeout(t),t=setTimeout(function(){n(e.instances,function(t){t.options.responsive&&t.resize(t.render,!0)})},50)}}()),p?define(function(){return e}):"object"==typeof module&&module.exports&&(module.exports=e),t.Chart=e,e.noConflict=function(){return t.Chart=i,e}}).call(this),function(){"use strict";var t=this,i=t.Chart,e=i.helpers,s={scaleBeginAtZero:!0,scaleShowGridLines:!0,scaleGridLineColor:"rgba(0,0,0,.05)",scaleGridLineWidth:1,scaleShowHorizontalLines:!0,scaleShowVerticalLines:!0,barShowStroke:!0,barStrokeWidth:2,barValueSpacing:5,barDatasetSpacing:1,legendTemplate:'
      <% for (var i=0; i
    • <%if(datasets[i].label){%><%=datasets[i].label%><%}%>
    • <%}%>
    '};i.Type.extend({name:"Bar",defaults:s,initialize:function(t){var s=this.options;this.ScaleClass=i.Scale.extend({offsetGridLines:!0,calculateBarX:function(t,i,e){var n=this.calculateBaseWidth(),o=this.calculateX(e)-n/2,a=this.calculateBarWidth(t);return o+a*i+i*s.barDatasetSpacing+a/2},calculateBaseWidth:function(){return this.calculateX(1)-this.calculateX(0)-2*s.barValueSpacing},calculateBarWidth:function(t){var i=this.calculateBaseWidth()-(t-1)*s.barDatasetSpacing;return i/t}}),this.datasets=[],this.options.showTooltips&&e.bindEvents(this,this.options.tooltipEvents,function(t){var i="mouseout"!==t.type?this.getBarsAtEvent(t):[];this.eachBars(function(t){t.restore(["fillColor","strokeColor"])}),e.each(i,function(t){t.fillColor=t.highlightFill,t.strokeColor=t.highlightStroke}),this.showTooltip(i)}),this.BarClass=i.Rectangle.extend({strokeWidth:this.options.barStrokeWidth,showStroke:this.options.barShowStroke,ctx:this.chart.ctx}),e.each(t.datasets,function(i){var s={label:i.label||null,fillColor:i.fillColor,strokeColor:i.strokeColor,bars:[]};this.datasets.push(s),e.each(i.data,function(e,n){s.bars.push(new this.BarClass({value:e,label:t.labels[n],datasetLabel:i.label,strokeColor:i.strokeColor,fillColor:i.fillColor,highlightFill:i.highlightFill||i.fillColor,highlightStroke:i.highlightStroke||i.strokeColor}))},this)},this),this.buildScale(t.labels),this.BarClass.prototype.base=this.scale.endPoint,this.eachBars(function(t,i,s){e.extend(t,{width:this.scale.calculateBarWidth(this.datasets.length),x:this.scale.calculateBarX(this.datasets.length,s,i),y:this.scale.endPoint}),t.save()},this),this.render()},update:function(){this.scale.update(),e.each(this.activeElements,function(t){t.restore(["fillColor","strokeColor"])}),this.eachBars(function(t){t.save()}),this.render()},eachBars:function(t){e.each(this.datasets,function(i,s){e.each(i.bars,t,this,s)},this)},getBarsAtEvent:function(t){for(var i,s=[],n=e.getRelativePosition(t),o=function(t){s.push(t.bars[i])},a=0;a<% for (var i=0; i
  • <%if(segments[i].label){%><%=segments[i].label%><%}%>
  • <%}%>
'};i.Type.extend({name:"Doughnut",defaults:s,initialize:function(t){this.segments=[],this.outerRadius=(e.min([this.chart.width,this.chart.height])-this.options.segmentStrokeWidth/2)/2,this.SegmentArc=i.Arc.extend({ctx:this.chart.ctx,x:this.chart.width/2,y:this.chart.height/2}),this.options.showTooltips&&e.bindEvents(this,this.options.tooltipEvents,function(t){var i="mouseout"!==t.type?this.getSegmentsAtEvent(t):[];e.each(this.segments,function(t){t.restore(["fillColor"])}),e.each(i,function(t){t.fillColor=t.highlightColor}),this.showTooltip(i)}),this.calculateTotal(t),e.each(t,function(t,i){this.addData(t,i,!0)},this),this.render()},getSegmentsAtEvent:function(t){var i=[],s=e.getRelativePosition(t);return e.each(this.segments,function(t){t.inRange(s.x,s.y)&&i.push(t)},this),i},addData:function(t,i,e){var s=i||this.segments.length;this.segments.splice(s,0,new this.SegmentArc({value:t.value,outerRadius:this.options.animateScale?0:this.outerRadius,innerRadius:this.options.animateScale?0:this.outerRadius/100*this.options.percentageInnerCutout,fillColor:t.color,highlightColor:t.highlight||t.color,showStroke:this.options.segmentShowStroke,strokeWidth:this.options.segmentStrokeWidth,strokeColor:this.options.segmentStrokeColor,startAngle:1.5*Math.PI,circumference:this.options.animateRotate?0:this.calculateCircumference(t.value),label:t.label})),e||(this.reflow(),this.update())},calculateCircumference:function(t){return 2*Math.PI*(Math.abs(t)/this.total)},calculateTotal:function(t){this.total=0,e.each(t,function(t){this.total+=Math.abs(t.value)},this)},update:function(){this.calculateTotal(this.segments),e.each(this.activeElements,function(t){t.restore(["fillColor"])}),e.each(this.segments,function(t){t.save()}),this.render()},removeData:function(t){var i=e.isNumber(t)?t:this.segments.length-1;this.segments.splice(i,1),this.reflow(),this.update()},reflow:function(){e.extend(this.SegmentArc.prototype,{x:this.chart.width/2,y:this.chart.height/2}),this.outerRadius=(e.min([this.chart.width,this.chart.height])-this.options.segmentStrokeWidth/2)/2,e.each(this.segments,function(t){t.update({outerRadius:this.outerRadius,innerRadius:this.outerRadius/100*this.options.percentageInnerCutout})},this)},draw:function(t){var i=t?t:1;this.clear(),e.each(this.segments,function(t,e){t.transition({circumference:this.calculateCircumference(t.value),outerRadius:this.outerRadius,innerRadius:this.outerRadius/100*this.options.percentageInnerCutout},i),t.endAngle=t.startAngle+t.circumference,t.draw(),0===e&&(t.startAngle=1.5*Math.PI),e<% for (var i=0; i
  • <%if(datasets[i].label){%><%=datasets[i].label%><%}%>
  • <%}%>'};i.Type.extend({name:"Line",defaults:s,initialize:function(t){this.PointClass=i.Point.extend({strokeWidth:this.options.pointDotStrokeWidth,radius:this.options.pointDotRadius,display:this.options.pointDot,hitDetectionRadius:this.options.pointHitDetectionRadius,ctx:this.chart.ctx,inRange:function(t){return Math.pow(t-this.x,2)0&&ithis.scale.endPoint?t.controlPoints.outer.y=this.scale.endPoint:t.controlPoints.outer.ythis.scale.endPoint?t.controlPoints.inner.y=this.scale.endPoint:t.controlPoints.inner.y0&&(s.lineTo(h[h.length-1].x,this.scale.endPoint),s.lineTo(h[0].x,this.scale.endPoint),s.fillStyle=t.fillColor,s.closePath(),s.fill()),e.each(h,function(t){t.draw()})},this)}})}.call(this),function(){"use strict";var t=this,i=t.Chart,e=i.helpers,s={scaleShowLabelBackdrop:!0,scaleBackdropColor:"rgba(255,255,255,0.75)",scaleBeginAtZero:!0,scaleBackdropPaddingY:2,scaleBackdropPaddingX:2,scaleShowLine:!0,segmentShowStroke:!0,segmentStrokeColor:"#fff",segmentStrokeWidth:2,animationSteps:100,animationEasing:"easeOutBounce",animateRotate:!0,animateScale:!1,legendTemplate:'
      <% for (var i=0; i
    • <%if(segments[i].label){%><%=segments[i].label%><%}%>
    • <%}%>
    '};i.Type.extend({name:"PolarArea",defaults:s,initialize:function(t){this.segments=[],this.SegmentArc=i.Arc.extend({showStroke:this.options.segmentShowStroke,strokeWidth:this.options.segmentStrokeWidth,strokeColor:this.options.segmentStrokeColor,ctx:this.chart.ctx,innerRadius:0,x:this.chart.width/2,y:this.chart.height/2}),this.scale=new i.RadialScale({display:this.options.showScale,fontStyle:this.options.scaleFontStyle,fontSize:this.options.scaleFontSize,fontFamily:this.options.scaleFontFamily,fontColor:this.options.scaleFontColor,showLabels:this.options.scaleShowLabels,showLabelBackdrop:this.options.scaleShowLabelBackdrop,backdropColor:this.options.scaleBackdropColor,backdropPaddingY:this.options.scaleBackdropPaddingY,backdropPaddingX:this.options.scaleBackdropPaddingX,lineWidth:this.options.scaleShowLine?this.options.scaleLineWidth:0,lineColor:this.options.scaleLineColor,lineArc:!0,width:this.chart.width,height:this.chart.height,xCenter:this.chart.width/2,yCenter:this.chart.height/2,ctx:this.chart.ctx,templateString:this.options.scaleLabel,valuesCount:t.length}),this.updateScaleRange(t),this.scale.update(),e.each(t,function(t,i){this.addData(t,i,!0)},this),this.options.showTooltips&&e.bindEvents(this,this.options.tooltipEvents,function(t){var i="mouseout"!==t.type?this.getSegmentsAtEvent(t):[];e.each(this.segments,function(t){t.restore(["fillColor"])}),e.each(i,function(t){t.fillColor=t.highlightColor}),this.showTooltip(i)}),this.render()},getSegmentsAtEvent:function(t){var i=[],s=e.getRelativePosition(t);return e.each(this.segments,function(t){t.inRange(s.x,s.y)&&i.push(t)},this),i},addData:function(t,i,e){var s=i||this.segments.length;this.segments.splice(s,0,new this.SegmentArc({fillColor:t.color,highlightColor:t.highlight||t.color,label:t.label,value:t.value,outerRadius:this.options.animateScale?0:this.scale.calculateCenterOffset(t.value),circumference:this.options.animateRotate?0:this.scale.getCircumference(),startAngle:1.5*Math.PI})),e||(this.reflow(),this.update())},removeData:function(t){var i=e.isNumber(t)?t:this.segments.length-1;this.segments.splice(i,1),this.reflow(),this.update()},calculateTotal:function(t){this.total=0,e.each(t,function(t){this.total+=t.value},this),this.scale.valuesCount=this.segments.length},updateScaleRange:function(t){var i=[];e.each(t,function(t){i.push(t.value)});var s=this.options.scaleOverride?{steps:this.options.scaleSteps,stepValue:this.options.scaleStepWidth,min:this.options.scaleStartValue,max:this.options.scaleStartValue+this.options.scaleSteps*this.options.scaleStepWidth}:e.calculateScaleRange(i,e.min([this.chart.width,this.chart.height])/2,this.options.scaleFontSize,this.options.scaleBeginAtZero,this.options.scaleIntegersOnly);e.extend(this.scale,s,{size:e.min([this.chart.width,this.chart.height]),xCenter:this.chart.width/2,yCenter:this.chart.height/2})},update:function(){this.calculateTotal(this.segments),e.each(this.segments,function(t){t.save()}),this.reflow(),this.render()},reflow:function(){e.extend(this.SegmentArc.prototype,{x:this.chart.width/2,y:this.chart.height/2}),this.updateScaleRange(this.segments),this.scale.update(),e.extend(this.scale,{xCenter:this.chart.width/2,yCenter:this.chart.height/2}),e.each(this.segments,function(t){t.update({outerRadius:this.scale.calculateCenterOffset(t.value)})},this)},draw:function(t){var i=t||1;this.clear(),e.each(this.segments,function(t,e){t.transition({circumference:this.scale.getCircumference(),outerRadius:this.scale.calculateCenterOffset(t.value)},i),t.endAngle=t.startAngle+t.circumference,0===e&&(t.startAngle=1.5*Math.PI),e<% for (var i=0; i
  • <%if(datasets[i].label){%><%=datasets[i].label%><%}%>
  • <%}%>'},initialize:function(t){this.PointClass=i.Point.extend({strokeWidth:this.options.pointDotStrokeWidth,radius:this.options.pointDotRadius,display:this.options.pointDot,hitDetectionRadius:this.options.pointHitDetectionRadius,ctx:this.chart.ctx}),this.datasets=[],this.buildScale(t),this.options.showTooltips&&e.bindEvents(this,this.options.tooltipEvents,function(t){var i="mouseout"!==t.type?this.getPointsAtEvent(t):[];this.eachPoints(function(t){t.restore(["fillColor","strokeColor"])}),e.each(i,function(t){t.fillColor=t.highlightFill,t.strokeColor=t.highlightStroke}),this.showTooltip(i)}),e.each(t.datasets,function(i){var s={label:i.label||null,fillColor:i.fillColor,strokeColor:i.strokeColor,pointColor:i.pointColor,pointStrokeColor:i.pointStrokeColor,points:[]};this.datasets.push(s),e.each(i.data,function(e,n){var o;this.scale.animation||(o=this.scale.getPointPosition(n,this.scale.calculateCenterOffset(e))),s.points.push(new this.PointClass({value:e,label:t.labels[n],datasetLabel:i.label,x:this.options.animation?this.scale.xCenter:o.x,y:this.options.animation?this.scale.yCenter:o.y,strokeColor:i.pointStrokeColor,fillColor:i.pointColor,highlightFill:i.pointHighlightFill||i.pointColor,highlightStroke:i.pointHighlightStroke||i.pointStrokeColor}))},this)},this),this.render()},eachPoints:function(t){e.each(this.datasets,function(i){e.each(i.points,t,this)},this)},getPointsAtEvent:function(t){var i=e.getRelativePosition(t),s=e.getAngleFromPoint({x:this.scale.xCenter,y:this.scale.yCenter},i),n=2*Math.PI/this.scale.valuesCount,o=Math.round((s.angle-1.5*Math.PI)/n),a=[];return(o>=this.scale.valuesCount||0>o)&&(o=0),s.distance<=this.scale.drawingArea&&e.each(this.datasets,function(t){a.push(t.points[o])}),a},buildScale:function(t){this.scale=new i.RadialScale({display:this.options.showScale,fontStyle:this.options.scaleFontStyle,fontSize:this.options.scaleFontSize,fontFamily:this.options.scaleFontFamily,fontColor:this.options.scaleFontColor,showLabels:this.options.scaleShowLabels,showLabelBackdrop:this.options.scaleShowLabelBackdrop,backdropColor:this.options.scaleBackdropColor,backdropPaddingY:this.options.scaleBackdropPaddingY,backdropPaddingX:this.options.scaleBackdropPaddingX,lineWidth:this.options.scaleShowLine?this.options.scaleLineWidth:0,lineColor:this.options.scaleLineColor,angleLineColor:this.options.angleLineColor,angleLineWidth:this.options.angleShowLineOut?this.options.angleLineWidth:0,pointLabelFontColor:this.options.pointLabelFontColor,pointLabelFontSize:this.options.pointLabelFontSize,pointLabelFontFamily:this.options.pointLabelFontFamily,pointLabelFontStyle:this.options.pointLabelFontStyle,height:this.chart.height,width:this.chart.width,xCenter:this.chart.width/2,yCenter:this.chart.height/2,ctx:this.chart.ctx,templateString:this.options.scaleLabel,labels:t.labels,valuesCount:t.datasets[0].data.length}),this.scale.setScaleSize(),this.updateScaleRange(t.datasets),this.scale.buildYLabels()},updateScaleRange:function(t){var i=function(){var i=[];return e.each(t,function(t){t.data?i=i.concat(t.data):e.each(t.points,function(t){i.push(t.value)})}),i}(),s=this.options.scaleOverride?{steps:this.options.scaleSteps,stepValue:this.options.scaleStepWidth,min:this.options.scaleStartValue,max:this.options.scaleStartValue+this.options.scaleSteps*this.options.scaleStepWidth}:e.calculateScaleRange(i,e.min([this.chart.width,this.chart.height])/2,this.options.scaleFontSize,this.options.scaleBeginAtZero,this.options.scaleIntegersOnly);e.extend(this.scale,s)},addData:function(t,i){this.scale.valuesCount++,e.each(t,function(t,e){var s=this.scale.getPointPosition(this.scale.valuesCount,this.scale.calculateCenterOffset(t));this.datasets[e].points.push(new this.PointClass({value:t,label:i,x:s.x,y:s.y,strokeColor:this.datasets[e].pointStrokeColor,fillColor:this.datasets[e].pointColor}))},this),this.scale.labels.push(i),this.reflow(),this.update()},removeData:function(){this.scale.valuesCount--,this.scale.labels.shift(),e.each(this.datasets,function(t){t.points.shift()},this),this.reflow(),this.update()},update:function(){this.eachPoints(function(t){t.save()}),this.reflow(),this.render()},reflow:function(){e.extend(this.scale,{width:this.chart.width,height:this.chart.height,size:e.min([this.chart.width,this.chart.height]),xCenter:this.chart.width/2,yCenter:this.chart.height/2}),this.updateScaleRange(this.datasets),this.scale.setScaleSize(),this.scale.buildYLabels()},draw:function(t){var i=t||1,s=this.chart.ctx;this.clear(),this.scale.draw(),e.each(this.datasets,function(t){e.each(t.points,function(t,e){t.hasValue()&&t.transition(this.scale.getPointPosition(e,this.scale.calculateCenterOffset(t.value)),i)},this),s.lineWidth=this.options.datasetStrokeWidth,s.strokeStyle=t.strokeColor,s.beginPath(),e.each(t.points,function(t,i){0===i?s.moveTo(t.x,t.y):s.lineTo(t.x,t.y)},this),s.closePath(),s.stroke(),s.fillStyle=t.fillColor,s.fill(),e.each(t.points,function(t){t.hasValue()&&t.draw()})},this)}})}.call(this); \ No newline at end of file diff --git a/library/Chart.js-1.0.2/LICENSE.md b/library/Chart.js-1.0.2/LICENSE.md new file mode 100644 index 0000000000..e10bc0ff1f --- /dev/null +++ b/library/Chart.js-1.0.2/LICENSE.md @@ -0,0 +1,7 @@ +Copyright (c) 2013-2015 Nick Downie + +Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions: + +The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. diff --git a/library/Chart.js-1.0.2/README.md b/library/Chart.js-1.0.2/README.md new file mode 100644 index 0000000000..7c4fa8bf6d --- /dev/null +++ b/library/Chart.js-1.0.2/README.md @@ -0,0 +1,20 @@ +# Chart.js + +[![Build Status](https://travis-ci.org/nnnick/Chart.js.svg?branch=master)](https://travis-ci.org/nnnick/Chart.js) [![Code Climate](https://codeclimate.com/github/nnnick/Chart.js/badges/gpa.svg)](https://codeclimate.com/github/nnnick/Chart.js) + + +*Simple HTML5 Charts using the canvas element* [chartjs.org](http://www.chartjs.org) + +## Documentation + +You can find documentation at [chartjs.org/docs](http://www.chartjs.org/docs/). The markdown files that build the site are available under `/docs`. Please note - in some of the json examples of configuration you might notice some liquid tags - this is just for the generating the site html, please disregard. + +## Bugs, issues and contributing + +Before submitting an issue or a pull request to the project, please take a moment to look over the [contributing guidelines](https://github.com/nnnick/Chart.js/blob/master/CONTRIBUTING.md) first. + +For support using Chart.js, please post questions with the [`chartjs` tag on Stack Overflow](http://stackoverflow.com/questions/tagged/chartjs). + +## License + +Chart.js is available under the [MIT license](http://opensource.org/licenses/MIT). diff --git a/view/templates/admin_federation.tpl b/view/templates/admin_federation.tpl index 1fe8d27105..2cc12ad0ae 100644 --- a/view/templates/admin_federation.tpl +++ b/view/templates/admin_federation.tpl @@ -1,4 +1,4 @@ - +

    {{$title}} - {{$page}}

    From 5099f43c423909e257f601186b0f6697f9d4a928 Mon Sep 17 00:00:00 2001 From: Tobias Diekershoff Date: Mon, 4 Jan 2016 09:54:12 +0100 Subject: [PATCH 051/242] only show platforms with counts > 0 --- view/templates/admin_federation.tpl | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/view/templates/admin_federation.tpl b/view/templates/admin_federation.tpl index 2cc12ad0ae..cd452c666d 100644 --- a/view/templates/admin_federation.tpl +++ b/view/templates/admin_federation.tpl @@ -9,7 +9,9 @@

    {{$legendtext}}

      {{foreach $counts as $c}} + {{if $c[0]['count(*)'] > 0}}
    • {{$c[0]['platform']}} ({{$c[0]['count(*)']}})
    • + {{/if}} {{/foreach}}

    @@ -30,6 +32,7 @@ document.getElementById('FederationLegend').innerHTML = myDoughnutChart.generate {{foreach $counts as $c}} +{{if $c[0]['count(*)'] > 0}} +{{/if}} {{/foreach}}
    {{$c[0]['platform']}} {{$c[0]['count(*)']}} @@ -56,5 +59,6 @@ var my{{$c[2]}}DoughnutChart = new Chart(ctx).Doughnut({{$c[2]}}data,
    From e3fd0a269b8ab29c2af2fb84a2714d92ee50681d Mon Sep 17 00:00:00 2001 From: Tobias Diekershoff Date: Mon, 4 Jan 2016 09:55:30 +0100 Subject: [PATCH 052/242] some doc strings, sort platforms for federation stats page --- mod/admin.php | 24 ++++++++++++++++++++++-- 1 file changed, 22 insertions(+), 2 deletions(-) diff --git a/mod/admin.php b/mod/admin.php index 616e8fcd4a..34e9b5c03b 100644 --- a/mod/admin.php +++ b/mod/admin.php @@ -238,7 +238,7 @@ function admin_content(&$a) { * * The returned string contains the HTML code of the subpage for display. * - * @brief subpage with some stats about "the federstion" network + * @brief subpage with some stats about "the federation" network * @param App $a * @return string */ @@ -249,7 +249,9 @@ function admin_page_federation(&$a) { // We are looking for the following platforms in the DB, "Red" should find // all variants of that platform ID string as the q() function is stripping // off one % two of them are needed in the query - $platforms = array('Diaspora', 'Friendica', '%%red%%', 'Hubzilla', 'GNU Social', 'StatusNet'); + // Add more platforms if you like, when one returns 0 known nodes it is not + // displayed on the stats page. + $platforms = array('Friendica', 'Diaspora', '%%red%%', 'Hubzilla', 'GNU Social', 'StatusNet'); $counts = array(); foreach ($platforms as $p) { // get a total count for the platform, the name and version of the @@ -333,6 +335,7 @@ function admin_page_federation(&$a) { '$counts' => $counts, '$version' => FRIENDICA_VERSION, '$legendtext' => t('Currently this node is aware of nodes from the following platforms:'), + '$baseurl' => $a->get_baseurl(), )); } /** @@ -743,6 +746,9 @@ function admin_page_site_post(&$a){ /** * @brief generate Admin Site subpage + * + * This function generates the main configuration page of the admin panel. + * * @param App $a * @return string */ @@ -955,6 +961,13 @@ function admin_page_site(&$a) { /** * @brief generates admin panel subpage for DB syncronization + * + * This page checks if the database of friendica is in sync with the specs. + * Should this not be the case, it attemps to sync the structure and notifies + * the admin if the automatic process was failing. + * + * The returned string holds the HTML code of the page. + * * @param App $a * @return string **/ @@ -1133,6 +1146,13 @@ function admin_page_users_post(&$a){ /** * @brief admin panel subpage for User management + * + * This function generates the admin panel page for user management of the + * node. It offers functionality to add/block/delete users and offers some + * statistics about the userbase. + * + * The returned string holds the HTML code of the page. + * * @param App $a * @return string */ From 7a7ffb2299e6614c00545a35f3d1a844bed52982 Mon Sep 17 00:00:00 2001 From: Tobias Diekershoff Date: Sun, 10 Jan 2016 13:04:07 +0100 Subject: [PATCH 053/242] issue 2240 when no addon are installed hint the location of sources in the admin panel --- mod/admin.php | 2 ++ view/templates/admin_plugins.tpl | 6 ++++++ 2 files changed, 8 insertions(+) diff --git a/mod/admin.php b/mod/admin.php index 34e9b5c03b..16c3a23d4d 100644 --- a/mod/admin.php +++ b/mod/admin.php @@ -1441,6 +1441,8 @@ function admin_page_plugins(&$a){ '$baseurl' => $a->get_baseurl(true), '$function' => 'plugins', '$plugins' => $plugins, + '$pcount' => count($plugins), + '$noplugshint' => sprintf( t('There are currently no plugins available on your node. You can find the official plugin repository at %1$s and might find other interesting plugins in the open plugin registry at %2$s'), 'https://github.com/friendica/friendica-addons', 'http://addons.friendi.ca'), '$form_security_token' => get_form_security_token("admin_themes"), )); } diff --git a/view/templates/admin_plugins.tpl b/view/templates/admin_plugins.tpl index 6caa04a3a4..fb1f26a90c 100644 --- a/view/templates/admin_plugins.tpl +++ b/view/templates/admin_plugins.tpl @@ -2,6 +2,11 @@

    {{$title}} - {{$page}}

    {{$reload}} + {{if $pcount eq 0}} +
    + {{$noplugshint}} +
    + {{else}}
      {{foreach $plugins as $p}}
    • @@ -13,4 +18,5 @@
    • {{/foreach}}
    + {{/if}}
    From 629c69d9ddd27806d56cccac872c22d730360d4d Mon Sep 17 00:00:00 2001 From: Tobias Diekershoff Date: Fri, 15 Jan 2016 19:35:45 +0100 Subject: [PATCH 054/242] only show the reload link if plugins are found --- view/templates/admin_plugins.tpl | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/view/templates/admin_plugins.tpl b/view/templates/admin_plugins.tpl index fb1f26a90c..75565dd2ed 100644 --- a/view/templates/admin_plugins.tpl +++ b/view/templates/admin_plugins.tpl @@ -1,12 +1,12 @@

    {{$title}} - {{$page}}

    - {{$reload}} {{if $pcount eq 0}} -
    +
    {{$noplugshint}}
    {{else}} + {{$reload}}
      {{foreach $plugins as $p}}
    • From 11aa76c270e616862728107c0612767040e74d2a Mon Sep 17 00:00:00 2001 From: Tobias Diekershoff Date: Fri, 15 Jan 2016 20:03:41 +0100 Subject: [PATCH 055/242] Theme listing works again, added some docs for theme and plugin listing funkctions --- mod/admin.php | 23 +++++++++++++++++++++-- 1 file changed, 21 insertions(+), 2 deletions(-) diff --git a/mod/admin.php b/mod/admin.php index 16c3a23d4d..a72eed9e37 100644 --- a/mod/admin.php +++ b/mod/admin.php @@ -1314,6 +1314,15 @@ function admin_page_users(&$a){ /** * @brief Plugins admin page + * + * This function generates the admin panel page for managing plugins on the + * friendica node. + * + * The template used for displaying the list of plugins and the details of the + * plugin are the same as used for the templates. + * + * The returned string returned hulds the HTML code of the page. + * * @param App $a * @return string */ @@ -1507,7 +1516,15 @@ function rebuild_theme_table($themes) { /** - * Themes admin page + * @brief Themes admin page + * + * This function generates the admin panel page to control the themes available + * on the friendica node. + * + * The template used for displaying the list of themes and the details of the + * themes are the same as used for the plugins. + * + * The returned string contains the HTML code of the admin panel page. * * @param App $a * @return string @@ -1619,6 +1636,7 @@ function admin_page_themes(&$a){ if(! stristr($screenshot[0],$theme)) $screenshot = null; + $t = get_markup_template("admin_plugins_details.tpl"); return replace_macros($t, array( '$title' => t('Administration'), @@ -1626,7 +1644,6 @@ function admin_page_themes(&$a){ '$toggle' => t('Toggle'), '$settings' => t('Settings'), '$baseurl' => $a->get_baseurl(true), - '$plugin' => $theme, '$status' => $status, '$action' => $action, @@ -1679,6 +1696,8 @@ function admin_page_themes(&$a){ '$baseurl' => $a->get_baseurl(true), '$function' => 'themes', '$plugins' => $xthemes, + '$pcount' => count($themes), + '$noplugshint' => sprintf(t('No themes found on the system. They should be paced in %1$s'),'/view/themes'), '$experimental' => t('[Experimental]'), '$unsupported' => t('[Unsupported]'), '$form_security_token' => get_form_security_token("admin_themes"), From 954e4f2754e4e497a313d0b80ce528318df52731 Mon Sep 17 00:00:00 2001 From: Tobias Diekershoff Date: Fri, 15 Jan 2016 20:40:01 +0100 Subject: [PATCH 056/242] more docs --- mod/admin.php | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/mod/admin.php b/mod/admin.php index a72eed9e37..f3fb56f603 100644 --- a/mod/admin.php +++ b/mod/admin.php @@ -1316,7 +1316,9 @@ function admin_page_users(&$a){ * @brief Plugins admin page * * This function generates the admin panel page for managing plugins on the - * friendica node. + * friendica node. If a plugin name is given a single page showing the details + * for this addon is generated. If no name is given, a list of available + * plugins is shown. * * The template used for displaying the list of plugins and the details of the * plugin are the same as used for the templates. @@ -1519,7 +1521,9 @@ function rebuild_theme_table($themes) { * @brief Themes admin page * * This function generates the admin panel page to control the themes available - * on the friendica node. + * on the friendica node. If the name of a theme is given as parameter a page + * with the details for the theme is shown. Otherwise a list of available + * themes is generated. * * The template used for displaying the list of themes and the details of the * themes are the same as used for the plugins. From 90a8d6f0f5dddfc8eb99e53ea06ea58010dd6379 Mon Sep 17 00:00:00 2001 From: Michael Vogel Date: Fri, 15 Jan 2016 23:27:25 +0100 Subject: [PATCH 057/242] Several performance improvements --- boot.php | 5 + database.sql | 26 ++++- doc/database.md | 2 + doc/database/db_oembed.md | 10 ++ doc/database/db_parsed_url.md | 12 ++ include/Contact.php | 28 ++--- include/conversation.php | 8 +- include/cron.php | 199 +++++++++++++++++++--------------- include/text.php | 10 +- index.php | 1 + mod/community.php | 4 + view/theme/vier/style.php | 48 ++++++-- 12 files changed, 236 insertions(+), 117 deletions(-) create mode 100644 doc/database/db_oembed.md create mode 100644 doc/database/db_parsed_url.md diff --git a/boot.php b/boot.php index 049dc91105..1b1c6a84d6 100644 --- a/boot.php +++ b/boot.php @@ -912,6 +912,10 @@ class App { } function get_cached_avatar_image($avatar_image){ + return $avatar_image; + + // The following code is deactivated. It doesn't seem to make any sense and it slows down the system. + /* if($this->cached_profile_image[$avatar_image]) return $this->cached_profile_image[$avatar_image]; @@ -931,6 +935,7 @@ class App { } } return $this->cached_profile_image[$avatar_image]; + */ } diff --git a/database.sql b/database.sql index df5ec74e29..70b315ea24 100644 --- a/database.sql +++ b/database.sql @@ -1,6 +1,6 @@ -- ------------------------------------------ -- Friendica 3.5-dev (Asparagus) --- DB_UPDATE_VERSION 1192 +-- DB_UPDATE_VERSION 1193 -- ------------------------------------------ @@ -685,6 +685,30 @@ CREATE TABLE IF NOT EXISTS `notify-threads` ( INDEX `receiver-uid` (`receiver-uid`) ) DEFAULT CHARSET=utf8; +-- +-- TABLE oembed +-- +CREATE TABLE IF NOT EXISTS `oembed` ( + `url` varchar(255) NOT NULL, + `content` text NOT NULL, + `created` datetime NOT NULL DEFAULT '0000-00-00 00:00:00', + PRIMARY KEY(`url`), + INDEX `created` (`created`) +) DEFAULT CHARSET=utf8; + +-- +-- TABLE parsed_url +-- +CREATE TABLE IF NOT EXISTS `parsed_url` ( + `url` varchar(255) NOT NULL, + `guessing` tinyint(1) NOT NULL DEFAULT 0, + `oembed` tinyint(1) NOT NULL DEFAULT 0, + `content` text NOT NULL, + `created` datetime NOT NULL DEFAULT '0000-00-00 00:00:00', + PRIMARY KEY(`url`,`guessing`,`oembed`), + INDEX `created` (`created`) +) DEFAULT CHARSET=utf8; + -- -- TABLE pconfig -- diff --git a/doc/database.md b/doc/database.md index 2ef77c6dad..a0b28f4e84 100644 --- a/doc/database.md +++ b/doc/database.md @@ -38,6 +38,8 @@ Database Tables | [manage](help/database/db_manage) | table of accounts that can "su" each other | | [notify](help/database/db_notify) | notifications | | [notify-threads](help/database/db_notify-threads) | | +| [oembed](help/database/db_oembed) | cache for OEmbed queries | +| [parsed_url](help/database/db_parsed_url) | cache for "parse_url" queries | | [pconfig](help/database/db_pconfig) | personal (per user) configuration storage | | [photo](help/database/db_photo) | photo storage | | [poll](help/database/db_poll) | data for polls | diff --git a/doc/database/db_oembed.md b/doc/database/db_oembed.md new file mode 100644 index 0000000000..5e994eca39 --- /dev/null +++ b/doc/database/db_oembed.md @@ -0,0 +1,10 @@ +Table oembed +============ + +| Field | Description | Type | Null | Key | Default | Extra | +| ------------ | ---------------------------------- | ------------ | ---- | --- | ------------------- | ----- | +| url | page url | varchar(255) | NO | PRI | NULL | | +| content | OEmbed data of the page | text | NO | | NULL | | +| created | datetime of creation | datetime | NO | MUL | 0000-00-00 00:00:00 | | + +Return to [database documentation](help/database) diff --git a/doc/database/db_parsed_url.md b/doc/database/db_parsed_url.md new file mode 100644 index 0000000000..ada42c2ea6 --- /dev/null +++ b/doc/database/db_parsed_url.md @@ -0,0 +1,12 @@ +Table parsed_url +================ + +| Field | Description | Type | Null | Key | Default | Extra | +| ------------ | ---------------------------------- | ------------ | ---- | --- | ------------------- | ----- | +| url | page url | varchar(255) | NO | PRI | NULL | | +| guessing | is the "guessing" mode active? | tinyint(1) | NO | PRI | 0 | | +| oembed | is the data the result of oembed? | tinyint(1) | NO | PRI | 0 | | +| content | page data | text | NO | | NULL | | +| created | datetime of creation | datetime | NO | MUL | 0000-00-00 00:00:00 | | + +Return to [database documentation](help/database) diff --git a/include/Contact.php b/include/Contact.php index c10bb9b791..93d6237cbf 100644 --- a/include/Contact.php +++ b/include/Contact.php @@ -211,40 +211,40 @@ function get_contact_details_by_url($url, $uid = -1) { $r = q("SELECT `id`, `uid`, `url`, `network`, `name`, `nick`, `addr`, `location`, `about`, `keywords`, `gender`, `photo`, `addr`, `forum`, `prv`, `bd` FROM `contact` WHERE `nurl` = '%s' AND `uid` = %d AND `network` = '%s'", dbesc(normalise_link($url)), intval($uid), dbesc($profile["network"])); - if (!count($r)) + if (!count($r) AND !isset($profile)) $r = q("SELECT `id`, `uid`, `url`, `network`, `name`, `nick`, `addr`, `location`, `about`, `keywords`, `gender`, `photo`, `addr`, `forum`, `prv`, `bd` FROM `contact` WHERE `nurl` = '%s' AND `uid` = %d", dbesc(normalise_link($url)), intval($uid)); - if (!count($r)) + if (!count($r) AND !isset($profile)) $r = q("SELECT `id`, `uid`, `url`, `network`, `name`, `nick`, `addr`, `location`, `about`, `keywords`, `gender`, `photo`, `addr`, `forum`, `prv`, `bd` FROM `contact` WHERE `nurl` = '%s' AND `uid` = 0", dbesc(normalise_link($url))); if ($r) { - if (isset($r[0]["url"]) AND $r[0]["url"]) + if (!isset($profile["url"]) AND $r[0]["url"]) $profile["url"] = $r[0]["url"]; - if (isset($r[0]["name"]) AND $r[0]["name"]) + if (!isset($profile["name"]) AND $r[0]["name"]) $profile["name"] = $r[0]["name"]; - if (isset($r[0]["nick"]) AND $r[0]["nick"] AND ($profile["nick"] == "")) + if (!isset($profile["nick"]) AND $r[0]["nick"]) $profile["nick"] = $r[0]["nick"]; - if (isset($r[0]["addr"]) AND $r[0]["addr"] AND ($profile["addr"] == "")) + if (!isset($profile["addr"]) AND $r[0]["addr"]) $profile["addr"] = $r[0]["addr"]; - if (isset($r[0]["photo"]) AND $r[0]["photo"]) + if (!isset($profile["photo"]) AND $r[0]["photo"]) $profile["photo"] = $r[0]["photo"]; - if (isset($r[0]["location"]) AND $r[0]["location"]) + if (!isset($profile["location"]) AND $r[0]["location"]) $profile["location"] = $r[0]["location"]; - if (isset($r[0]["about"]) AND $r[0]["about"]) + if (!isset($profile["about"]) AND $r[0]["about"]) $profile["about"] = $r[0]["about"]; - if (isset($r[0]["keywords"]) AND $r[0]["keywords"]) + if (!isset($profile["keywords"]) AND $r[0]["keywords"]) $profile["keywords"] = $r[0]["keywords"]; - if (isset($r[0]["gender"]) AND $r[0]["gender"]) + if (!isset($profile["gender"]) AND $r[0]["gender"]) $profile["gender"] = $r[0]["gender"]; if (isset($r[0]["forum"]) OR isset($r[0]["prv"])) $profile["community"] = ($r[0]["forum"] OR $r[0]["prv"]); - if (isset($r[0]["network"]) AND $r[0]["network"]) + if (!isset($profile["network"]) AND $r[0]["network"]) $profile["network"] = $r[0]["network"]; - if (isset($r[0]["addr"]) AND $r[0]["addr"]) + if (!isset($profile["addr"]) AND $r[0]["addr"]) $profile["addr"] = $r[0]["addr"]; - if (isset($r[0]["bd"]) AND $r[0]["bd"]) + if (!isset($profile["bd"]) AND $r[0]["bd"]) $profile["bd"] = $r[0]["bd"]; if ($r[0]["uid"] == 0) $profile["cid"] = 0; diff --git a/include/conversation.php b/include/conversation.php index d8c5e4461d..5268c9e29c 100644 --- a/include/conversation.php +++ b/include/conversation.php @@ -811,16 +811,16 @@ function best_link_url($item,&$sparkle,$ssl_state = false) { if((local_user()) && (local_user() == $item['uid'])) { if(isset($a->contacts) && x($a->contacts,$clean_url)) { if($a->contacts[$clean_url]['network'] === NETWORK_DFRN) { - $best_url = $a->get_baseurl($ssl_state) . '/redir/' . $a->contacts[$clean_url]['id']; + $best_url = 'redir/'.$a->contacts[$clean_url]['id']; $sparkle = true; } else $best_url = $a->contacts[$clean_url]['url']; } } elseif (local_user()) { - $r = q("SELECT `id`, `network` FROM `contact` WHERE `network` = '%s' AND `uid` = %d AND `nurl` = '%s'", + $r = q("SELECT `id` FROM `contact` WHERE `network` = '%s' AND `uid` = %d AND `nurl` = '%s' LIMIT 1", dbesc(NETWORK_DFRN), intval(local_user()), dbesc(normalise_link($clean_url))); if ($r) { - $best_url = $a->get_baseurl($ssl_state).'/redir/'.$r[0]['id']; + $best_url = 'redir/'.$r[0]['id']; $sparkle = true; } } @@ -876,7 +876,7 @@ function item_photo_menu($item){ if(local_user() && local_user() == $item['uid'] && link_compare($item['url'],$item['author-link'])) { $cid = $item['contact-id']; } else { - $r = q("SELECT `id`, `network` FROM `contact` WHERE `uid` = %d AND `nurl` = '%s' ORDER BY `uid` DESC LIMIT 1", + $r = q("SELECT `id`, `network` FROM `contact` WHERE `uid` = %d AND `nurl` = '%s' LIMIT 1", intval(local_user()), dbesc(normalise_link($item['author-link']))); if ($r) { $cid = $r[0]["id"]; diff --git a/include/cron.php b/include/cron.php index ed7edc6994..bf3243cb60 100644 --- a/include/cron.php +++ b/include/cron.php @@ -158,93 +158,11 @@ function cron_run(&$argv, &$argc){ proc_run('php','include/expire.php'); } - $last = get_config('system','cache_last_cleared'); + // Clear cache entries + cron_clear_cache($a); - if($last) { - $next = $last + (3600); // Once per hour - $clear_cache = ($next <= time()); - } else - $clear_cache = true; - - if ($clear_cache) { - // clear old cache - Cache::clear(); - - // clear old item cache files - clear_cache(); - - // clear cache for photos - clear_cache($a->get_basepath(), $a->get_basepath()."/photo"); - - // clear smarty cache - clear_cache($a->get_basepath()."/view/smarty3/compiled", $a->get_basepath()."/view/smarty3/compiled"); - - // clear cache for image proxy - if (!get_config("system", "proxy_disabled")) { - clear_cache($a->get_basepath(), $a->get_basepath()."/proxy"); - - $cachetime = get_config('system','proxy_cache_time'); - if (!$cachetime) $cachetime = PROXY_DEFAULT_TIME; - - q('DELETE FROM `photo` WHERE `uid` = 0 AND `resource-id` LIKE "pic:%%" AND `created` < NOW() - INTERVAL %d SECOND', $cachetime); - } - - // Maximum table size in megabyte - $max_tablesize = intval(get_config('system','optimize_max_tablesize')) * 1000000; - if ($max_tablesize == 0) - $max_tablesize = 100 * 1000000; // Default are 100 MB - - // Minimum fragmentation level in percent - $fragmentation_level = intval(get_config('system','optimize_fragmentation')) / 100; - if ($fragmentation_level == 0) - $fragmentation_level = 0.3; // Default value is 30% - - // Optimize some tables that need to be optimized - $r = q("SHOW TABLE STATUS"); - foreach($r as $table) { - - // Don't optimize tables that are too large - if ($table["Data_length"] > $max_tablesize) - continue; - - // Don't optimize empty tables - if ($table["Data_length"] == 0) - continue; - - // Calculate fragmentation - $fragmentation = $table["Data_free"] / $table["Data_length"]; - - logger("Table ".$table["Name"]." - Fragmentation level: ".round($fragmentation * 100, 2), LOGGER_DEBUG); - - // Don't optimize tables that needn't to be optimized - if ($fragmentation < $fragmentation_level) - continue; - - // So optimize it - logger("Optimize Table ".$table["Name"], LOGGER_DEBUG); - q("OPTIMIZE TABLE `%s`", dbesc($table["Name"])); - } - - set_config('system','cache_last_cleared', time()); - } - - // Repair missing Diaspora settings - $r = q("SELECT `id`, `url` FROM `contact` - WHERE `network` = '%s' AND (`batch` = '' OR `notify` = '' OR `poll` = '' OR pubkey = '') - ORDER BY RAND() LIMIT 50", dbesc(NETWORK_DIASPORA)); - if ($r) { - foreach ($r AS $contact) { - if (poco_reachable($contact["url"])) { - $data = probe_url($contact["url"]); - if ($data["network"] == NETWORK_DIASPORA) { - logger("Repair contact ".$contact["id"]." ".$contact["url"], LOGGER_DEBUG); - q("UPDATE `contact` SET `batch` = '%s', `notify` = '%s', `poll` = '%s', pubkey = '%s' WHERE `id` = %d", - dbesc($data["batch"]), dbesc($data["notify"]), dbesc($data["poll"]), dbesc($data["pubkey"]), - intval($contact["id"])); - } - } - } - } + // Repair missing Diaspora values in contacts + cron_repair_diaspora($a); $manual_id = 0; $generation = 0; @@ -390,6 +308,115 @@ function cron_run(&$argv, &$argc){ return; } +/** + * @brief Clear cache entries + * + * @param App $a + */ +function cron_clear_cache(&$a) { + + $last = get_config('system','cache_last_cleared'); + + if($last) { + $next = $last + (3600); // Once per hour + $clear_cache = ($next <= time()); + } else + $clear_cache = true; + + if (!$clear_cache) + return; + + // clear old cache + Cache::clear(); + + // clear old item cache files + clear_cache(); + + // clear cache for photos + clear_cache($a->get_basepath(), $a->get_basepath()."/photo"); + + // clear smarty cache + clear_cache($a->get_basepath()."/view/smarty3/compiled", $a->get_basepath()."/view/smarty3/compiled"); + + // clear cache for image proxy + if (!get_config("system", "proxy_disabled")) { + clear_cache($a->get_basepath(), $a->get_basepath()."/proxy"); + + $cachetime = get_config('system','proxy_cache_time'); + if (!$cachetime) $cachetime = PROXY_DEFAULT_TIME; + + q('DELETE FROM `photo` WHERE `uid` = 0 AND `resource-id` LIKE "pic:%%" AND `created` < NOW() - INTERVAL %d SECOND', $cachetime); + } + + // Delete the cached OEmbed entries that are older than one year + q("DELETE FROM `oembed` WHERE `created` < NOW() - INTERVAL 1 YEAR"); + + // Delete the cached "parse_url" entries that are older than one year + q("DELETE FROM `parsed_url` WHERE `created` < NOW() - INTERVAL 1 YEAR"); + + // Maximum table size in megabyte + $max_tablesize = intval(get_config('system','optimize_max_tablesize')) * 1000000; + if ($max_tablesize == 0) + $max_tablesize = 100 * 1000000; // Default are 100 MB + + // Minimum fragmentation level in percent + $fragmentation_level = intval(get_config('system','optimize_fragmentation')) / 100; + if ($fragmentation_level == 0) + $fragmentation_level = 0.3; // Default value is 30% + + // Optimize some tables that need to be optimized + $r = q("SHOW TABLE STATUS"); + foreach($r as $table) { + + // Don't optimize tables that are too large + if ($table["Data_length"] > $max_tablesize) + continue; + + // Don't optimize empty tables + if ($table["Data_length"] == 0) + continue; + + // Calculate fragmentation + $fragmentation = $table["Data_free"] / $table["Data_length"]; + + logger("Table ".$table["Name"]." - Fragmentation level: ".round($fragmentation * 100, 2), LOGGER_DEBUG); + + // Don't optimize tables that needn't to be optimized + if ($fragmentation < $fragmentation_level) + continue; + + // So optimize it + logger("Optimize Table ".$table["Name"], LOGGER_DEBUG); + q("OPTIMIZE TABLE `%s`", dbesc($table["Name"])); + } + + set_config('system','cache_last_cleared', time()); +} + +/** + * @brief Repair missing values in Diaspora contacts + * + * @param App $a + */ +function cron_repair_diaspora(&$a) { + $r = q("SELECT `id`, `url` FROM `contact` + WHERE `network` = '%s' AND (`batch` = '' OR `notify` = '' OR `poll` = '' OR pubkey = '') + ORDER BY RAND() LIMIT 50", dbesc(NETWORK_DIASPORA)); + if ($r) { + foreach ($r AS $contact) { + if (poco_reachable($contact["url"])) { + $data = probe_url($contact["url"]); + if ($data["network"] == NETWORK_DIASPORA) { + logger("Repair contact ".$contact["id"]." ".$contact["url"], LOGGER_DEBUG); + q("UPDATE `contact` SET `batch` = '%s', `notify` = '%s', `poll` = '%s', pubkey = '%s' WHERE `id` = %d", + dbesc($data["batch"]), dbesc($data["notify"]), dbesc($data["poll"]), dbesc($data["pubkey"]), + intval($contact["id"])); + } + } + } + } +} + if (array_search(__file__,get_included_files())===0){ cron_run($_SERVER["argv"],$_SERVER["argc"]); killme(); diff --git a/include/text.php b/include/text.php index 3f4fe07d69..7e0aec97e2 100644 --- a/include/text.php +++ b/include/text.php @@ -1416,7 +1416,15 @@ function prepare_body(&$item,$attach = false, $preview = false) { $item['mentions'] = $mentions; $test = $item["rendered-html"]; - put_item_in_cache($item, true); + + // Update the cached values if there is no "zrl=..." on the links + $update = (!local_user() and !remote_user() and ($item["uid"] == 0)); + + // Or update it if the current viewer is the intented viewer + if (($item["uid"] == local_user()) AND ($item["uid"] != 0)) + $update = true; + + put_item_in_cache($item, $update); $s = $item["rendered-html"]; //if ($test != $s) diff --git a/index.php b/index.php index 89ed058465..bf926d1fe7 100644 --- a/index.php +++ b/index.php @@ -556,6 +556,7 @@ EOT; $page = $a->page; $profile = $a->profile; +header("X-Friendica-Version: ".FRIENDICA_VERSION); header("Content-type: text/html; charset=utf-8"); diff --git a/mod/community.php b/mod/community.php index 86bd18c869..b6d72a3555 100644 --- a/mod/community.php +++ b/mod/community.php @@ -14,6 +14,10 @@ function community_content(&$a, $update = 0) { $o = ''; + // Currently the community page isn't able to handle update requests + if ($update) + return; + if((get_config('system','block_public')) && (! local_user()) && (! remote_user())) { notice( t('Public access denied.') . EOL); return; diff --git a/view/theme/vier/style.php b/view/theme/vier/style.php index 72731a9beb..3d3c776745 100644 --- a/view/theme/vier/style.php +++ b/view/theme/vier/style.php @@ -1,12 +1,7 @@ $modified) + $modified = $stylemodified; + +$modified = gmdate('r', $modified); + +$etag = md5($stylecss); + +// Only send the CSS file if it was changed +header('Cache-Control: public'); +header('ETag: "'.$etag.'"'); +header('Last-Modified: '.$modified); + +if (isset($_SERVER['HTTP_IF_MODIFIED_SINCE']) || isset($_SERVER['HTTP_IF_NONE_MATCH'])) { + + $cached_modified = gmdate('r', strtotime($_SERVER['HTTP_IF_MODIFIED_SINCE'])); + $cached_etag = str_replace(array('"', "-gzip"), array('', ''), + stripslashes($_SERVER['HTTP_IF_NONE_MATCH'])); + + if (($cached_modified == $modified) AND ($cached_etag == $etag)) { + header('HTTP/1.1 304 Not Modified'); + exit(); + } +} echo $stylecss; From 092c2e54333b3cecd49f034623886c7fd8c8981a Mon Sep 17 00:00:00 2001 From: Michael Vogel Date: Fri, 15 Jan 2016 23:32:13 +0100 Subject: [PATCH 058/242] Removed some test code --- boot.php | 3 --- include/conversation.php | 10 +++++----- include/text.php | 5 ----- 3 files changed, 5 insertions(+), 13 deletions(-) diff --git a/boot.php b/boot.php index 1b1c6a84d6..4f0bec62b1 100644 --- a/boot.php +++ b/boot.php @@ -1042,9 +1042,6 @@ class App { $function = implode(", ", $function); - //$last = array_pop($trace); - //$function = $last["function"]; - $this->callstack[$value][$function] += (float)$duration; } diff --git a/include/conversation.php b/include/conversation.php index 5268c9e29c..6c33be84fb 100644 --- a/include/conversation.php +++ b/include/conversation.php @@ -315,11 +315,11 @@ function localize_item(&$item){ } // add zrl's to public images -// $photo_pattern = "/\[url=(.*?)\/photos\/(.*?)\/image\/(.*?)\]\[img(.*?)\]h(.*?)\[\/img\]\[\/url\]/is"; -// if(preg_match($photo_pattern,$item['body'])) { -// $photo_replace = '[url=' . zrl('$1' . '/photos/' . '$2' . '/image/' . '$3' ,true) . '][img' . '$4' . ']h' . '$5' . '[/img][/url]'; -// $item['body'] = bb_tag_preg_replace($photo_pattern, $photo_replace, 'url', $item['body']); -// } + $photo_pattern = "/\[url=(.*?)\/photos\/(.*?)\/image\/(.*?)\]\[img(.*?)\]h(.*?)\[\/img\]\[\/url\]/is"; + if(preg_match($photo_pattern,$item['body'])) { + $photo_replace = '[url=' . zrl('$1' . '/photos/' . '$2' . '/image/' . '$3' ,true) . '][img' . '$4' . ']h' . '$5' . '[/img][/url]'; + $item['body'] = bb_tag_preg_replace($photo_pattern, $photo_replace, 'url', $item['body']); + } // add sparkle links to appropriate permalinks diff --git a/include/text.php b/include/text.php index 7e0aec97e2..200e2c9bca 100644 --- a/include/text.php +++ b/include/text.php @@ -1415,8 +1415,6 @@ function prepare_body(&$item,$attach = false, $preview = false) { $item['hashtags'] = $hashtags; $item['mentions'] = $mentions; - $test = $item["rendered-html"]; - // Update the cached values if there is no "zrl=..." on the links $update = (!local_user() and !remote_user() and ($item["uid"] == 0)); @@ -1427,9 +1425,6 @@ function prepare_body(&$item,$attach = false, $preview = false) { put_item_in_cache($item, $update); $s = $item["rendered-html"]; - //if ($test != $s) - // $s .= "
      *********************************
      ".$test; - $prep_arr = array('item' => $item, 'html' => $s, 'preview' => $preview); call_hooks('prepare_body', $prep_arr); $s = $prep_arr['html']; From 571d1544e4ca30b3c4b591322b53bf8d62caddea Mon Sep 17 00:00:00 2001 From: Michael Vogel Date: Sat, 16 Jan 2016 08:58:22 +0100 Subject: [PATCH 059/242] I guess it is enough to set a variable to zero once ... --- boot.php | 3 --- 1 file changed, 3 deletions(-) diff --git a/boot.php b/boot.php index 4f0bec62b1..963f5c454a 100644 --- a/boot.php +++ b/boot.php @@ -554,9 +554,6 @@ class App { $this->performance["parser"] = 0; $this->performance["marktime"] = 0; - $this->performance["file"] = 0; - $this->performance["file"] = 0; - $this->callstack["database"] = array(); $this->callstack["network"] = array(); $this->callstack["file"] = array(); From 5769c08cbc7cac1881c7919695a8737f846fda2e Mon Sep 17 00:00:00 2001 From: Michael Vogel Date: Sat, 16 Jan 2016 09:16:51 +0100 Subject: [PATCH 060/242] This line vanished accidentally ... --- boot.php | 1 + 1 file changed, 1 insertion(+) diff --git a/boot.php b/boot.php index 963f5c454a..2242ba476d 100644 --- a/boot.php +++ b/boot.php @@ -553,6 +553,7 @@ class App { $this->performance["rendering"] = 0; $this->performance["parser"] = 0; $this->performance["marktime"] = 0; + $this->performance["markstart"] = microtime(true); $this->callstack["database"] = array(); $this->callstack["network"] = array(); From 20fe67f3782e6ad90fed64d70f752d6524d20157 Mon Sep 17 00:00:00 2001 From: Tobias Diekershoff Date: Sat, 16 Jan 2016 11:52:21 +0100 Subject: [PATCH 061/242] removed remote update functionality from admin panel --- include/remoteupdate.php | 261 -------------------------- mod/admin.php | 59 ------ view/templates/admin_remoteupdate.tpl | 99 ---------- 3 files changed, 419 deletions(-) delete mode 100644 include/remoteupdate.php delete mode 100644 view/templates/admin_remoteupdate.tpl diff --git a/include/remoteupdate.php b/include/remoteupdate.php deleted file mode 100644 index 9effc9b6e9..0000000000 --- a/include/remoteupdate.php +++ /dev/null @@ -1,261 +0,0 @@ -tags as $i=>$v){ - $i = (float)$i; - if ($i>$tag) $tag=$i; - } - - if ($tag==0.0) return false; - $f = fetch_url("https://raw.github.com/".F9KREPO."/".$tag."/boot.php","r"); - preg_match("|'FRIENDICA_VERSION', *'([^']*)'|", $f, $m); - $version = $m[1]; - - $lv = explode(".", FRIENDICA_VERSION); - $rv = explode(".",$version); - foreach($lv as $i=>$v){ - if ((int)$lv[$i] < (int)$rv[$i]) { - return array($tag, $version, "https://github.com/friendica/friendica/zipball/".$tag); - break; - } - } - return false; -} -function canWeWrite(){ - $bd = dirname(dirname(__file__)); - return is_writable( $bd."/boot.php" ); -} - -function out($txt){ echo "§".$txt."§"; ob_end_flush(); flush();} - -function up_count($path){ - - $file_count = 0; - - $dir_handle = opendir($path); - - if (!$dir_handle) return -1; - - while ($file = readdir($dir_handle)) { - - if ($file == '.' || $file == '..') continue; - $file_count++; - - if (is_dir($path . $file)){ - $file_count += up_count($path . $file . DIRECTORY_SEPARATOR); - } - - } - - closedir($dir_handle); - - return $file_count; -} - - - -function up_unzip($file, $folder="/tmp"){ - $folder.="/"; - $zip = zip_open($file); - if ($zip) { - while ($zip_entry = zip_read($zip)) { - $zip_entry_name = zip_entry_name($zip_entry); - if (substr($zip_entry_name,strlen($zip_entry_name)-1,1)=="/"){ - mkdir($folder.$zip_entry_name,0777, true); - } else { - $fp = fopen($folder.$zip_entry_name, "w"); - if (zip_entry_open($zip, $zip_entry, "r")) { - $buf = zip_entry_read($zip_entry, zip_entry_filesize($zip_entry)); - fwrite($fp,"$buf"); - zip_entry_close($zip_entry); - fclose($fp); - } - } - } - zip_close($zip); - } -} - -/** - * Walk recoursively in a folder and call a callback function on every - * dir entry. - * args: - * $dir string base dir to walk - * $callback function callback function - * $sort int 0: ascending, 1: descending - * $cb_argv any extra value passed to callback - * - * callback signature: - * function name($fn, $dir [, $argv]) - * $fn string full dir entry name - * $dir string start dir path - * $argv any user value to callback - * - */ -function up_walktree($dir, $callback=Null, $sort=0, $cb_argv=Null , $startdir=Null){ - if (is_null($callback)) return; - if (is_null($startdir)) $startdir = $dir; - $res = scandir($dir, $sort); - foreach($res as $i=>$v){ - if ($v!="." && $v!=".."){ - $fn = $dir."/".$v; - if ($sort==0) $callback($fn, $startdir, $cb_argv); - if (is_dir($fn)) up_walktree($fn, $callback, $sort, $cb_argv, $startdir); - if ($sort==1) $callback($fn, $startdir, $cb_argv); - } - } - -} - -function up_copy($fn, $dir){ - global $up_countfiles, $up_totalfiles, $up_lastp; - $up_countfiles++; $prc=(int)(((float)$up_countfiles/(float)$up_totalfiles)*100); - - if (strpos($fn, ".gitignore")>-1 || strpos($fn, ".htaccess")>-1) return; - $ddest = dirname(dirname(__file__)); - $fd = str_replace($dir, $ddest, $fn); - - if (is_dir($fn) && !is_dir($fd)) { - $re=mkdir($fd,0777,true); - } - if (!is_dir($fn)){ - $re=copy($fn, $fd); - } - - if ($re===false) { - out("ERROR. Abort."); - killme(); - } - out("copy@Copy@$prc%"); -} - -function up_ftp($fn, $dir, $argv){ - global $up_countfiles, $up_totalfiles, $up_lastp; - $up_countfiles++; $prc=(int)(((float)$up_countfiles/(float)$up_totalfiles)*100); - - if (strpos($fn, ".gitignore")>-1 || strpos($fn, ".htaccess")>-1) return; - - list($ddest, $conn_id) = $argv; - $l = strlen($ddest)-1; - if (substr($ddest,$l,1)=="/") $ddest = substr($ddest,0,$l); - $fd = str_replace($dir, $ddest, $fn); - - if (is_dir($fn)){ - if (ftp_nlist($conn_id, $fd)===false) { - $ret = ftp_mkdir($conn_id, $fd); - } else { - $ret=true; - } - } else { - $ret = ftp_put($conn_id, $fd, $fn, FTP_BINARY); - } - if (!$ret) { - out("ERROR. Abort."); - killme(); - } - out("copy@Copy@$prc%"); -} - -function up_rm($fn, $dir){ - if (is_dir($fn)){ - rmdir($fn); - } else { - unlink($fn); - } -} - -function up_dlfile($url, $file) { - $in = fopen ($url, "r"); - $out = fopen ($file, "w"); - - $fs = filesize($url); - - - if (!$in || !$out) return false; - - $s=0; $count=0; - while (!feof ($in)) { - $line = fgets ($in, 1024); - fwrite( $out, $line); - - $count++; $s += strlen($line); - if ($count==50){ - $count=0; - $sp=$s/1024.0; $ex="Kb"; - if ($sp>1024) { $sp=$sp/1024; $ex="Mb"; } - if ($sp>1024) { $sp=$sp/1024; $ex="Gb"; } - $sp = ((int)($sp*100))/100; - out("dwl@Download@".$sp.$ex); - } - } - fclose($in); - return true; -} - -function doUpdate($remotefile, $ftpdata=false){ - global $up_totalfiles; - - - $localtmpfile = tempnam("/tmp", "fk"); - out("dwl@Download@starting..."); - $rt= up_dlfile($remotefile, $localtmpfile); - if ($rt==false || filesize($localtmpfile)==0){ - out("dwl@Download@ERROR."); - unlink($localtmpfile); - return; - } - out("dwl@Download@Ok."); - - out("unzip@Unzip@"); - $tmpdirname = $localfile."ex"; - mkdir($tmpdirname); - up_unzip($localtmpfile, $tmpdirname); - $basedir = glob($tmpdirname."/*"); $basedir=$basedir[0]; - out ("unzip@Unzip@Ok."); - - $up_totalfiles = up_count($basedir."/"); - - if (canWeWrite()){ - out("copy@Copy@"); - up_walktree($basedir, 'up_copy'); - } - if ($ftpdata!==false && is_array($ftpdata) && $ftpdata['ftphost']!="" ){ - out("ftpcon@Connect to FTP@"); - $conn_id = ftp_connect($ftpdata['ftphost']); - $login_result = ftp_login($conn_id, $ftpdata['ftpuser'], $ftpdata['ftppwd']); - - if ((!$conn_id) || (!$login_result)) { - out("ftpcon@Connect to FTP@FAILED"); - up_clean($tmpdirname, $localtmpfile); - return; - } else { - out("ftpcon@Connect to FTP@Ok."); - } - out("copy@Copy@"); - up_walktree($basedir, 'up_ftp', 0, array( $ftpdata['ftppath'], $conn_id)); - - ftp_close($conn_id); - } - - up_clean($tmpdirname, $localtmpfile); - -} - -function up_clean($tmpdirname, $localtmpfile){ - out("clean@Clean up@"); - unlink($localtmpfile); - up_walktree($tmpdirname, 'up_rm', 1); - rmdir($tmpdirname); - out("clean@Clean up@Ok."); -} diff --git a/mod/admin.php b/mod/admin.php index f3fb56f603..52367e8a2c 100644 --- a/mod/admin.php +++ b/mod/admin.php @@ -3,7 +3,6 @@ /** * Friendica admin */ -require_once("include/remoteupdate.php"); require_once("include/enotify.php"); require_once("include/text.php"); @@ -1867,61 +1866,3 @@ function admin_page_viewlogs(&$a){ '$logname' => get_config('system','logfile') )); } -/** - * @param App $a - */ -function admin_page_remoteupdate_post(&$a) { - // this function should be called via ajax post - if(!is_site_admin()) { - return; - } - - - if (x($_POST,'remotefile') && $_POST['remotefile']!=""){ - $remotefile = $_POST['remotefile']; - $ftpdata = (x($_POST['ftphost'])?$_POST:false); - doUpdate($remotefile, $ftpdata); - } else { - echo "No remote file to download. Abort!"; - } - - killme(); -} - -/** - * @param App $a - * @return string - */ -function admin_page_remoteupdate(&$a) { - if(!is_site_admin()) { - return login(false); - } - - $canwrite = canWeWrite(); - $canftp = function_exists('ftp_connect'); - - $needupdate = true; - $u = checkUpdate(); - if (!is_array($u)){ - $needupdate = false; - $u = array('','',''); - } - - $tpl = get_markup_template("admin_remoteupdate.tpl"); - return replace_macros($tpl, array( - '$baseurl' => $a->get_baseurl(true), - '$submit' => t("Update now"), - '$close' => t("Close"), - '$localversion' => FRIENDICA_VERSION, - '$remoteversion' => $u[1], - '$needupdate' => $needupdate, - '$canwrite' => $canwrite, - '$canftp' => $canftp, - '$ftphost' => array('ftphost', t("FTP Host"), '',''), - '$ftppath' => array('ftppath', t("FTP Path"), '/',''), - '$ftpuser' => array('ftpuser', t("FTP User"), '',''), - '$ftppwd' => array('ftppwd', t("FTP Password"), '',''), - '$remotefile'=>array('remotefile','', $u['2'],''), - )); - -} diff --git a/view/templates/admin_remoteupdate.tpl b/view/templates/admin_remoteupdate.tpl deleted file mode 100644 index c3e85f2e80..0000000000 --- a/view/templates/admin_remoteupdate.tpl +++ /dev/null @@ -1,99 +0,0 @@ - - - - -
      -
      Your version:
      {{$localversion}}
      -{{if $needupdate}} -
      New version:
      {{$remoteversion}}
      - -
      - - - {{if $canwrite}} -
      - {{else}} -

      Your friendica installation is not writable by web server.

      - {{if $canftp}} -

      You can try to update via FTP

      - {{include file="field_input.tpl" field=$ftphost}} - {{include file="field_input.tpl" field=$ftppath}} - {{include file="field_input.tpl" field=$ftpuser}} - {{include file="field_password.tpl" field=$ftppwd}} -
      - {{/if}} - {{/if}} -
      -{{else}} -

      No updates

      -{{/if}} -
      From 22752039178e3d61844e6c1dafc8f1abd06b09cc Mon Sep 17 00:00:00 2001 From: Michael Vogel Date: Sat, 16 Jan 2016 12:32:11 +0100 Subject: [PATCH 062/242] Just some improved queries --- include/acl_selectors.php | 4 ++-- include/config.php | 4 ++-- include/text.php | 6 +++--- 3 files changed, 7 insertions(+), 7 deletions(-) diff --git a/include/acl_selectors.php b/include/acl_selectors.php index d5730a93a9..69181b7359 100644 --- a/include/acl_selectors.php +++ b/include/acl_selectors.php @@ -20,7 +20,7 @@ function group_select($selname,$selclass,$preselected = false,$size = 4) { $o .= " + +{{foreach $features as $g => $f}} +

      {{$f.0}}

      + +
      + {{foreach $f.1 as $fcat}} + {{include file="field_yesno.tpl" field=$fcat.0}} + {{include file="field_yesno.tpl" field=$fcat.1}} + {{/foreach}} + +
      + +
      +
      +{{/foreach}} + + diff --git a/view/templates/admin_settings_head.tpl b/view/templates/admin_settings_head.tpl new file mode 100644 index 0000000000..25c0f804e4 --- /dev/null +++ b/view/templates/admin_settings_head.tpl @@ -0,0 +1,9 @@ + From 78e282734f9f829c0251f2645ba73cbd5f0ce0cf Mon Sep 17 00:00:00 2001 From: rabuzarus <> Date: Sun, 17 Jan 2016 12:59:06 +0100 Subject: [PATCH 070/242] feature management for admins: delete double entries from merging process --- mod/admin.php | 6 ------ 1 file changed, 6 deletions(-) diff --git a/mod/admin.php b/mod/admin.php index 035a937e0c..95ab2b0c5a 100644 --- a/mod/admin.php +++ b/mod/admin.php @@ -212,9 +212,6 @@ function admin_content(&$a) { case 'viewlogs': $o = admin_page_viewlogs($a); break; - case 'viewlogs': - $o = admin_page_viewlogs($a); - break; case 'dbsync': $o = admin_page_dbsync($a); break; @@ -224,9 +221,6 @@ function admin_content(&$a) { case 'federation': $o = admin_page_federation($a); break; - case 'federation': - $o = admin_page_federation($a); - break; default: notice( t("Item not found.") ); } From f4286356824a30c32450714347c32af389506ba9 Mon Sep 17 00:00:00 2001 From: rabuzarus <> Date: Sun, 17 Jan 2016 15:54:58 +0100 Subject: [PATCH 071/242] vier: add missing forumlist_profile --- view/templates/events.tpl | 2 +- view/templates/profile_advanced.tpl | 2 +- view/theme/vier/templates/profile_advanced.tpl | 11 +++++++---- 3 files changed, 9 insertions(+), 6 deletions(-) diff --git a/view/templates/events.tpl b/view/templates/events.tpl index 525a5e0677..f723cb44c4 100644 --- a/view/templates/events.tpl +++ b/view/templates/events.tpl @@ -1,6 +1,6 @@ {{$tabs}} -

      {{$title}}

      +{{include file="section_title.tpl"}} diff --git a/view/templates/profile_advanced.tpl b/view/templates/profile_advanced.tpl index 084fdf3b77..32de6bfa9f 100644 --- a/view/templates/profile_advanced.tpl +++ b/view/templates/profile_advanced.tpl @@ -1,5 +1,5 @@ -

      {{$title}}

      +{{include file="section_title.tpl"}}
      {{$profile.fullname.0}}
      diff --git a/view/theme/vier/templates/profile_advanced.tpl b/view/theme/vier/templates/profile_advanced.tpl index 809aa4c13a..8451188f0d 100644 --- a/view/theme/vier/templates/profile_advanced.tpl +++ b/view/theme/vier/templates/profile_advanced.tpl @@ -4,7 +4,7 @@
    {{/if}} -

    {{$title}}

    +{{include file="section_title.tpl"}}
    {{$profile.fullname.0}}
    @@ -171,6 +171,9 @@
    {{/if}} - - - +{{if $profile.forumlist}} +
    +
    {{$profile.forumlist.0}}
    +
    {{$profile.forumlist.1}}
    +
    +{{/if}} From 98be92f48c1c23278f18b4ff4807bda118425f2f Mon Sep 17 00:00:00 2001 From: Tobias Diekershoff Date: Sun, 17 Jan 2016 22:25:05 +0100 Subject: [PATCH 072/242] DE update to the strings --- view/de/messages.po | 1604 +++++++++++++++++++++---------------------- view/de/strings.php | 55 +- 2 files changed, 796 insertions(+), 863 deletions(-) diff --git a/view/de/messages.po b/view/de/messages.po index f209b453f1..ca8d2d0a2a 100644 --- a/view/de/messages.po +++ b/view/de/messages.po @@ -32,8 +32,8 @@ msgid "" msgstr "" "Project-Id-Version: friendica\n" "Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2015-12-27 08:40+0100\n" -"PO-Revision-Date: 2016-01-03 07:15+0000\n" +"POT-Creation-Date: 2016-01-16 16:21+0100\n" +"PO-Revision-Date: 2016-01-17 21:19+0000\n" "Last-Translator: bavatar \n" "Language-Team: German (http://www.transifex.com/Friendica/friendica/language/de/)\n" "MIME-Version: 1.0\n" @@ -42,15 +42,15 @@ msgstr "" "Language: de\n" "Plural-Forms: nplurals=2; plural=(n != 1);\n" -#: mod/contacts.php:50 include/identity.php:389 +#: mod/contacts.php:50 include/identity.php:395 msgid "Network:" msgstr "Netzwerk" -#: mod/contacts.php:51 mod/contacts.php:986 mod/videos.php:37 -#: mod/viewcontacts.php:105 mod/dirfind.php:208 mod/network.php:596 +#: mod/contacts.php:51 mod/contacts.php:961 mod/videos.php:37 +#: mod/viewcontacts.php:105 mod/dirfind.php:214 mod/network.php:598 #: mod/allfriends.php:77 mod/match.php:82 mod/directory.php:172 #: mod/common.php:123 mod/suggest.php:95 mod/photos.php:41 -#: include/identity.php:295 +#: include/identity.php:298 msgid "Forum" msgstr "Forum" @@ -61,7 +61,7 @@ msgid_plural "%d contacts edited" msgstr[0] "%d Kontakt bearbeitet." msgstr[1] "%d Kontakte bearbeitet" -#: mod/contacts.php:159 mod/contacts.php:382 +#: mod/contacts.php:159 mod/contacts.php:383 msgid "Could not access contact record." msgstr "Konnte nicht auf die Kontaktdaten zugreifen." @@ -73,15 +73,15 @@ msgstr "Konnte das ausgewählte Profil nicht finden." msgid "Contact updated." msgstr "Kontakt aktualisiert." -#: mod/contacts.php:208 mod/dfrn_request.php:578 +#: mod/contacts.php:208 mod/dfrn_request.php:575 msgid "Failed to update contact record." msgstr "Aktualisierung der Kontaktdaten fehlgeschlagen." -#: mod/contacts.php:364 mod/manage.php:96 mod/display.php:493 +#: mod/contacts.php:365 mod/manage.php:96 mod/display.php:504 #: mod/profile_photo.php:19 mod/profile_photo.php:175 #: mod/profile_photo.php:186 mod/profile_photo.php:199 -#: mod/ostatus_subscribe.php:9 mod/follow.php:10 mod/follow.php:72 -#: mod/follow.php:137 mod/item.php:169 mod/item.php:181 mod/group.php:19 +#: mod/ostatus_subscribe.php:9 mod/follow.php:11 mod/follow.php:73 +#: mod/follow.php:155 mod/item.php:180 mod/item.php:192 mod/group.php:19 #: mod/dfrn_confirm.php:55 mod/fsuggest.php:78 mod/wall_upload.php:77 #: mod/wall_upload.php:80 mod/viewcontacts.php:40 mod/notifications.php:69 #: mod/message.php:45 mod/message.php:181 mod/crepair.php:117 @@ -95,123 +95,123 @@ msgstr "Aktualisierung der Kontaktdaten fehlgeschlagen." #: mod/api.php:26 mod/api.php:31 mod/notes.php:22 mod/poke.php:149 #: mod/repair_ostatus.php:9 mod/invite.php:15 mod/invite.php:101 #: mod/photos.php:171 mod/photos.php:1105 mod/regmod.php:110 -#: mod/uimport.php:23 mod/attach.php:33 include/items.php:5070 index.php:383 +#: mod/uimport.php:23 mod/attach.php:33 include/items.php:5073 index.php:383 msgid "Permission denied." msgstr "Zugriff verweigert." -#: mod/contacts.php:403 +#: mod/contacts.php:404 msgid "Contact has been blocked" msgstr "Kontakt wurde blockiert" -#: mod/contacts.php:403 +#: mod/contacts.php:404 msgid "Contact has been unblocked" msgstr "Kontakt wurde wieder freigegeben" -#: mod/contacts.php:414 +#: mod/contacts.php:415 msgid "Contact has been ignored" msgstr "Kontakt wurde ignoriert" -#: mod/contacts.php:414 +#: mod/contacts.php:415 msgid "Contact has been unignored" msgstr "Kontakt wird nicht mehr ignoriert" -#: mod/contacts.php:426 +#: mod/contacts.php:427 msgid "Contact has been archived" msgstr "Kontakt wurde archiviert" -#: mod/contacts.php:426 +#: mod/contacts.php:427 msgid "Contact has been unarchived" msgstr "Kontakt wurde aus dem Archiv geholt" -#: mod/contacts.php:453 mod/contacts.php:801 +#: mod/contacts.php:454 mod/contacts.php:802 msgid "Do you really want to delete this contact?" msgstr "Möchtest Du wirklich diesen Kontakt löschen?" -#: mod/contacts.php:455 mod/follow.php:105 mod/message.php:216 +#: mod/contacts.php:456 mod/follow.php:110 mod/message.php:216 #: mod/settings.php:1094 mod/settings.php:1100 mod/settings.php:1108 #: mod/settings.php:1112 mod/settings.php:1117 mod/settings.php:1123 #: mod/settings.php:1129 mod/settings.php:1135 mod/settings.php:1161 #: mod/settings.php:1162 mod/settings.php:1163 mod/settings.php:1164 -#: mod/settings.php:1165 mod/dfrn_request.php:850 mod/register.php:238 +#: mod/settings.php:1165 mod/dfrn_request.php:857 mod/register.php:238 #: mod/suggest.php:29 mod/profiles.php:658 mod/profiles.php:661 -#: mod/profiles.php:687 mod/api.php:105 include/items.php:4902 +#: mod/profiles.php:687 mod/api.php:105 include/items.php:4905 msgid "Yes" msgstr "Ja" -#: mod/contacts.php:458 mod/tagrm.php:11 mod/tagrm.php:94 mod/follow.php:116 +#: mod/contacts.php:459 mod/tagrm.php:11 mod/tagrm.php:94 mod/follow.php:121 #: mod/videos.php:131 mod/message.php:219 mod/fbrowser.php:93 #: mod/fbrowser.php:128 mod/settings.php:651 mod/settings.php:677 -#: mod/dfrn_request.php:864 mod/suggest.php:32 mod/editpost.php:148 -#: mod/photos.php:247 mod/photos.php:336 include/conversation.php:1221 -#: include/items.php:4905 +#: mod/dfrn_request.php:871 mod/suggest.php:32 mod/editpost.php:148 +#: mod/photos.php:247 mod/photos.php:336 include/conversation.php:1220 +#: include/items.php:4908 msgid "Cancel" msgstr "Abbrechen" -#: mod/contacts.php:470 +#: mod/contacts.php:471 msgid "Contact has been removed." msgstr "Kontakt wurde entfernt." -#: mod/contacts.php:511 +#: mod/contacts.php:512 #, php-format msgid "You are mutual friends with %s" msgstr "Du hast mit %s eine beidseitige Freundschaft" -#: mod/contacts.php:515 +#: mod/contacts.php:516 #, php-format msgid "You are sharing with %s" msgstr "Du teilst mit %s" -#: mod/contacts.php:520 +#: mod/contacts.php:521 #, php-format msgid "%s is sharing with you" msgstr "%s teilt mit Dir" -#: mod/contacts.php:540 +#: mod/contacts.php:541 msgid "Private communications are not available for this contact." msgstr "Private Kommunikation ist für diesen Kontakt nicht verfügbar." -#: mod/contacts.php:543 mod/admin.php:647 +#: mod/contacts.php:544 mod/admin.php:790 msgid "Never" msgstr "Niemals" -#: mod/contacts.php:547 +#: mod/contacts.php:548 msgid "(Update was successful)" msgstr "(Aktualisierung war erfolgreich)" -#: mod/contacts.php:547 +#: mod/contacts.php:548 msgid "(Update was not successful)" msgstr "(Aktualisierung war nicht erfolgreich)" -#: mod/contacts.php:549 +#: mod/contacts.php:550 msgid "Suggest friends" msgstr "Kontakte vorschlagen" -#: mod/contacts.php:553 +#: mod/contacts.php:554 #, php-format msgid "Network type: %s" msgstr "Netzwerktyp: %s" -#: mod/contacts.php:566 +#: mod/contacts.php:567 msgid "Communications lost with this contact!" msgstr "Verbindungen mit diesem Kontakt verloren!" -#: mod/contacts.php:569 +#: mod/contacts.php:570 msgid "Fetch further information for feeds" msgstr "Weitere Informationen zu Feeds holen" -#: mod/contacts.php:570 mod/admin.php:656 +#: mod/contacts.php:571 mod/admin.php:799 msgid "Disabled" msgstr "Deaktiviert" -#: mod/contacts.php:570 +#: mod/contacts.php:571 msgid "Fetch information" msgstr "Beziehe Information" -#: mod/contacts.php:570 +#: mod/contacts.php:571 msgid "Fetch information and keywords" msgstr "Beziehe Information und Schlüsselworte" -#: mod/contacts.php:586 mod/manage.php:143 mod/fsuggest.php:107 +#: mod/contacts.php:587 mod/manage.php:143 mod/fsuggest.php:107 #: mod/message.php:342 mod/message.php:525 mod/crepair.php:196 #: mod/events.php:574 mod/content.php:712 mod/install.php:261 #: mod/install.php:299 mod/mood.php:137 mod/profiles.php:696 @@ -221,308 +221,308 @@ msgstr "Beziehe Information und Schlüsselworte" #: object/Item.php:710 view/theme/cleanzero/config.php:80 #: view/theme/dispy/config.php:70 view/theme/quattro/config.php:64 #: view/theme/diabook/config.php:148 view/theme/diabook/theme.php:633 -#: view/theme/clean/config.php:83 view/theme/vier/config.php:107 -#: view/theme/duepuntozero/config.php:59 +#: view/theme/vier/config.php:107 view/theme/duepuntozero/config.php:59 msgid "Submit" msgstr "Senden" -#: mod/contacts.php:587 +#: mod/contacts.php:588 msgid "Profile Visibility" msgstr "Profil-Sichtbarkeit" -#: mod/contacts.php:588 +#: mod/contacts.php:589 #, php-format msgid "" "Please choose the profile you would like to display to %s when viewing your " "profile securely." msgstr "Bitte wähle eines Deiner Profile das angezeigt werden soll, wenn %s Dein Profil aufruft." -#: mod/contacts.php:589 +#: mod/contacts.php:590 msgid "Contact Information / Notes" msgstr "Kontakt Informationen / Notizen" -#: mod/contacts.php:590 +#: mod/contacts.php:591 msgid "Edit contact notes" msgstr "Notizen zum Kontakt bearbeiten" -#: mod/contacts.php:595 mod/contacts.php:977 mod/viewcontacts.php:97 +#: mod/contacts.php:596 mod/contacts.php:952 mod/viewcontacts.php:97 #: mod/nogroup.php:41 #, php-format msgid "Visit %s's profile [%s]" msgstr "Besuche %ss Profil [%s]" -#: mod/contacts.php:596 +#: mod/contacts.php:597 msgid "Block/Unblock contact" msgstr "Kontakt blockieren/freischalten" -#: mod/contacts.php:597 +#: mod/contacts.php:598 msgid "Ignore contact" msgstr "Ignoriere den Kontakt" -#: mod/contacts.php:598 +#: mod/contacts.php:599 msgid "Repair URL settings" msgstr "URL Einstellungen reparieren" -#: mod/contacts.php:599 +#: mod/contacts.php:600 msgid "View conversations" msgstr "Unterhaltungen anzeigen" -#: mod/contacts.php:601 +#: mod/contacts.php:602 msgid "Delete contact" msgstr "Lösche den Kontakt" -#: mod/contacts.php:605 +#: mod/contacts.php:606 msgid "Last update:" msgstr "Letzte Aktualisierung: " -#: mod/contacts.php:607 +#: mod/contacts.php:608 msgid "Update public posts" msgstr "Öffentliche Beiträge aktualisieren" -#: mod/contacts.php:609 mod/admin.php:1656 +#: mod/contacts.php:610 msgid "Update now" msgstr "Jetzt aktualisieren" -#: mod/contacts.php:611 mod/dirfind.php:190 mod/allfriends.php:65 -#: mod/match.php:71 mod/suggest.php:82 include/contact_widgets.php:32 -#: include/Contact.php:310 include/conversation.php:924 +#: mod/contacts.php:612 mod/follow.php:103 mod/dirfind.php:196 +#: mod/allfriends.php:65 mod/match.php:71 mod/suggest.php:82 +#: include/contact_widgets.php:32 include/Contact.php:297 +#: include/conversation.php:924 msgid "Connect/Follow" msgstr "Verbinden/Folgen" -#: mod/contacts.php:614 mod/contacts.php:805 mod/contacts.php:864 -#: mod/admin.php:1120 +#: mod/contacts.php:615 mod/contacts.php:806 mod/contacts.php:865 +#: mod/admin.php:1281 msgid "Unblock" msgstr "Entsperren" -#: mod/contacts.php:614 mod/contacts.php:805 mod/contacts.php:864 -#: mod/admin.php:1119 +#: mod/contacts.php:615 mod/contacts.php:806 mod/contacts.php:865 +#: mod/admin.php:1280 msgid "Block" msgstr "Sperren" -#: mod/contacts.php:615 mod/contacts.php:806 mod/contacts.php:871 +#: mod/contacts.php:616 mod/contacts.php:807 mod/contacts.php:872 msgid "Unignore" msgstr "Ignorieren aufheben" -#: mod/contacts.php:615 mod/contacts.php:806 mod/contacts.php:871 +#: mod/contacts.php:616 mod/contacts.php:807 mod/contacts.php:872 #: mod/notifications.php:54 mod/notifications.php:179 #: mod/notifications.php:259 msgid "Ignore" msgstr "Ignorieren" -#: mod/contacts.php:618 +#: mod/contacts.php:619 msgid "Currently blocked" msgstr "Derzeit geblockt" -#: mod/contacts.php:619 +#: mod/contacts.php:620 msgid "Currently ignored" msgstr "Derzeit ignoriert" -#: mod/contacts.php:620 +#: mod/contacts.php:621 msgid "Currently archived" msgstr "Momentan archiviert" -#: mod/contacts.php:621 mod/notifications.php:172 mod/notifications.php:251 +#: mod/contacts.php:622 mod/notifications.php:172 mod/notifications.php:251 msgid "Hide this contact from others" msgstr "Verbirg diesen Kontakt vor andere" -#: mod/contacts.php:621 +#: mod/contacts.php:622 msgid "" "Replies/likes to your public posts may still be visible" msgstr "Antworten/Likes auf deine öffentlichen Beiträge könnten weiterhin sichtbar sein" -#: mod/contacts.php:622 +#: mod/contacts.php:623 msgid "Notification for new posts" msgstr "Benachrichtigung bei neuen Beiträgen" -#: mod/contacts.php:622 +#: mod/contacts.php:623 msgid "Send a notification of every new post of this contact" msgstr "Sende eine Benachrichtigung, wann immer dieser Kontakt einen neuen Beitrag schreibt." -#: mod/contacts.php:625 +#: mod/contacts.php:626 msgid "Blacklisted keywords" msgstr "Blacklistete Schlüsselworte " -#: mod/contacts.php:625 +#: mod/contacts.php:626 msgid "" "Comma separated list of keywords that should not be converted to hashtags, " "when \"Fetch information and keywords\" is selected" msgstr "Komma-Separierte Liste mit Schlüsselworten, die nicht in Hashtags konvertiert werden, wenn \"Beziehe Information und Schlüsselworte\" aktiviert wurde" -#: mod/contacts.php:632 mod/follow.php:121 mod/notifications.php:255 +#: mod/contacts.php:633 mod/follow.php:126 mod/notifications.php:255 msgid "Profile URL" msgstr "Profil URL" -#: mod/contacts.php:635 mod/follow.php:125 mod/notifications.php:244 -#: mod/events.php:566 mod/directory.php:145 include/identity.php:304 -#: include/bb2diaspora.php:170 include/event.php:36 include/event.php:60 +#: mod/contacts.php:636 mod/notifications.php:244 mod/events.php:566 +#: mod/directory.php:145 include/identity.php:308 include/bb2diaspora.php:170 +#: include/event.php:36 include/event.php:60 msgid "Location:" msgstr "Ort:" -#: mod/contacts.php:637 mod/follow.php:127 mod/notifications.php:246 -#: mod/directory.php:153 include/identity.php:313 include/identity.php:630 +#: mod/contacts.php:638 mod/notifications.php:246 mod/directory.php:153 +#: include/identity.php:317 include/identity.php:631 msgid "About:" msgstr "Über:" -#: mod/contacts.php:639 mod/follow.php:129 mod/notifications.php:248 -#: include/identity.php:624 +#: mod/contacts.php:640 mod/follow.php:134 mod/notifications.php:248 +#: include/identity.php:625 msgid "Tags:" msgstr "Tags" -#: mod/contacts.php:684 +#: mod/contacts.php:685 msgid "Suggestions" msgstr "Kontaktvorschläge" -#: mod/contacts.php:687 +#: mod/contacts.php:688 msgid "Suggest potential friends" msgstr "Freunde vorschlagen" -#: mod/contacts.php:692 mod/group.php:192 +#: mod/contacts.php:693 mod/group.php:192 msgid "All Contacts" msgstr "Alle Kontakte" -#: mod/contacts.php:695 +#: mod/contacts.php:696 msgid "Show all contacts" msgstr "Alle Kontakte anzeigen" -#: mod/contacts.php:700 +#: mod/contacts.php:701 msgid "Unblocked" msgstr "Ungeblockt" -#: mod/contacts.php:703 +#: mod/contacts.php:704 msgid "Only show unblocked contacts" msgstr "Nur nicht-blockierte Kontakte anzeigen" -#: mod/contacts.php:709 +#: mod/contacts.php:710 msgid "Blocked" msgstr "Geblockt" -#: mod/contacts.php:712 +#: mod/contacts.php:713 msgid "Only show blocked contacts" msgstr "Nur blockierte Kontakte anzeigen" -#: mod/contacts.php:718 +#: mod/contacts.php:719 msgid "Ignored" msgstr "Ignoriert" -#: mod/contacts.php:721 +#: mod/contacts.php:722 msgid "Only show ignored contacts" msgstr "Nur ignorierte Kontakte anzeigen" -#: mod/contacts.php:727 +#: mod/contacts.php:728 msgid "Archived" msgstr "Archiviert" -#: mod/contacts.php:730 +#: mod/contacts.php:731 msgid "Only show archived contacts" msgstr "Nur archivierte Kontakte anzeigen" -#: mod/contacts.php:736 +#: mod/contacts.php:737 msgid "Hidden" msgstr "Verborgen" -#: mod/contacts.php:739 +#: mod/contacts.php:740 msgid "Only show hidden contacts" msgstr "Nur verborgene Kontakte anzeigen" -#: mod/contacts.php:792 mod/contacts.php:840 mod/viewcontacts.php:116 +#: mod/contacts.php:793 mod/contacts.php:841 mod/viewcontacts.php:116 #: include/identity.php:741 include/identity.php:744 include/text.php:1012 #: include/nav.php:123 include/nav.php:187 view/theme/diabook/theme.php:125 msgid "Contacts" msgstr "Kontakte" -#: mod/contacts.php:796 +#: mod/contacts.php:797 msgid "Search your contacts" msgstr "Suche in deinen Kontakten" -#: mod/contacts.php:797 +#: mod/contacts.php:798 msgid "Finding: " msgstr "Funde: " -#: mod/contacts.php:798 mod/directory.php:210 include/contact_widgets.php:34 +#: mod/contacts.php:799 mod/directory.php:210 include/contact_widgets.php:34 msgid "Find" msgstr "Finde" -#: mod/contacts.php:804 mod/settings.php:146 mod/settings.php:676 +#: mod/contacts.php:805 mod/settings.php:146 mod/settings.php:676 msgid "Update" msgstr "Aktualisierungen" -#: mod/contacts.php:807 mod/contacts.php:878 +#: mod/contacts.php:808 mod/contacts.php:879 msgid "Archive" msgstr "Archivieren" -#: mod/contacts.php:807 mod/contacts.php:878 +#: mod/contacts.php:808 mod/contacts.php:879 msgid "Unarchive" msgstr "Aus Archiv zurückholen" -#: mod/contacts.php:808 mod/group.php:171 mod/admin.php:1118 +#: mod/contacts.php:809 mod/group.php:171 mod/admin.php:1279 #: mod/content.php:440 mod/content.php:743 mod/settings.php:713 #: mod/photos.php:1723 object/Item.php:134 include/conversation.php:635 msgid "Delete" msgstr "Löschen" -#: mod/contacts.php:821 include/identity.php:686 include/nav.php:75 +#: mod/contacts.php:822 include/identity.php:686 include/nav.php:75 msgid "Status" msgstr "Status" -#: mod/contacts.php:824 include/identity.php:689 +#: mod/contacts.php:825 mod/follow.php:143 include/identity.php:689 msgid "Status Messages and Posts" msgstr "Statusnachrichten und Beiträge" -#: mod/contacts.php:829 mod/profperm.php:104 mod/newmember.php:32 -#: include/identity.php:578 include/identity.php:664 include/identity.php:694 +#: mod/contacts.php:830 mod/profperm.php:104 mod/newmember.php:32 +#: include/identity.php:579 include/identity.php:665 include/identity.php:694 #: include/nav.php:76 view/theme/diabook/theme.php:124 msgid "Profile" msgstr "Profil" -#: mod/contacts.php:832 include/identity.php:697 +#: mod/contacts.php:833 include/identity.php:697 msgid "Profile Details" msgstr "Profildetails" -#: mod/contacts.php:843 +#: mod/contacts.php:844 msgid "View all contacts" msgstr "Alle Kontakte anzeigen" -#: mod/contacts.php:849 mod/common.php:134 +#: mod/contacts.php:850 mod/common.php:134 msgid "Common Friends" msgstr "Gemeinsame Freunde" -#: mod/contacts.php:852 +#: mod/contacts.php:853 msgid "View all common friends" msgstr "Alle Kontakte anzeigen" -#: mod/contacts.php:856 +#: mod/contacts.php:857 msgid "Repair" msgstr "Reparieren" -#: mod/contacts.php:859 +#: mod/contacts.php:860 msgid "Advanced Contact Settings" msgstr "Fortgeschrittene Kontakteinstellungen" -#: mod/contacts.php:867 +#: mod/contacts.php:868 msgid "Toggle Blocked status" msgstr "Geblockt-Status ein-/ausschalten" -#: mod/contacts.php:874 +#: mod/contacts.php:875 msgid "Toggle Ignored status" msgstr "Ignoriert-Status ein-/ausschalten" -#: mod/contacts.php:881 +#: mod/contacts.php:882 msgid "Toggle Archive status" msgstr "Archiviert-Status ein-/ausschalten" -#: mod/contacts.php:949 +#: mod/contacts.php:924 msgid "Mutual Friendship" msgstr "Beidseitige Freundschaft" -#: mod/contacts.php:953 +#: mod/contacts.php:928 msgid "is a fan of yours" msgstr "ist ein Fan von dir" -#: mod/contacts.php:957 +#: mod/contacts.php:932 msgid "you are a fan of" msgstr "Du bist Fan von" -#: mod/contacts.php:978 mod/nogroup.php:42 +#: mod/contacts.php:953 mod/nogroup.php:42 msgid "Edit contact" msgstr "Kontakt bearbeiten" @@ -572,23 +572,23 @@ msgstr "Sichtbar für" msgid "All Contacts (with secure profile access)" msgstr "Alle Kontakte (mit gesichertem Profilzugriff)" -#: mod/display.php:82 mod/display.php:280 mod/display.php:497 -#: mod/viewsrc.php:15 mod/admin.php:196 mod/admin.php:1163 mod/admin.php:1384 -#: mod/notice.php:15 include/items.php:4861 +#: mod/display.php:82 mod/display.php:291 mod/display.php:508 +#: mod/viewsrc.php:15 mod/admin.php:211 mod/admin.php:1334 mod/admin.php:1567 +#: mod/notice.php:15 include/items.php:4864 msgid "Item not found." msgstr "Beitrag nicht gefunden." -#: mod/display.php:209 mod/videos.php:197 mod/viewcontacts.php:35 -#: mod/community.php:18 mod/dfrn_request.php:779 mod/search.php:93 +#: mod/display.php:220 mod/videos.php:197 mod/viewcontacts.php:35 +#: mod/community.php:18 mod/dfrn_request.php:786 mod/search.php:93 #: mod/search.php:99 mod/directory.php:37 mod/photos.php:976 msgid "Public access denied." msgstr "Öffentlicher Zugriff verweigert." -#: mod/display.php:328 mod/profile.php:155 +#: mod/display.php:339 mod/profile.php:155 msgid "Access to this profile has been restricted." msgstr "Der Zugriff zu diesem Profil wurde eingeschränkt." -#: mod/display.php:490 +#: mod/display.php:501 msgid "Item has been removed." msgstr "Eintrag wurde entfernt." @@ -623,7 +623,7 @@ msgid "" " join." msgstr "Auf der Quick Start Seite findest Du eine kurze Einleitung in die einzelnen Funktionen Deines Profils und die Netzwerk-Reiter, wo Du interessante Foren findest und neue Kontakte knüpfst." -#: mod/newmember.php:22 mod/admin.php:1215 mod/admin.php:1460 +#: mod/newmember.php:22 mod/admin.php:1386 mod/admin.php:1644 #: mod/settings.php:99 include/nav.php:182 view/theme/diabook/theme.php:544 #: view/theme/diabook/theme.php:648 msgid "Settings" @@ -685,60 +685,44 @@ msgstr "Trage ein paar öffentliche Stichwörter in Dein Standardprofil ein, die msgid "Connecting" msgstr "Verbindungen knüpfen" -#: mod/newmember.php:49 mod/newmember.php:51 include/contact_selectors.php:81 -msgid "Facebook" -msgstr "Facebook" - -#: mod/newmember.php:49 -msgid "" -"Authorise the Facebook Connector if you currently have a Facebook account " -"and we will (optionally) import all your Facebook friends and conversations." -msgstr "Richte die Verbindung zu Facebook ein, wenn Du im Augenblick ein Facebook-Konto hast und (optional) Deine Facebook-Freunde und -Unterhaltungen importieren willst." - #: mod/newmember.php:51 -msgid "" -"If this is your own personal server, installing the Facebook addon " -"may ease your transition to the free social web." -msgstr "Wenn dies Dein privater Server ist, könnte die Installation des Facebook Connectors Deinen Umzug ins freie soziale Netz angenehmer gestalten." - -#: mod/newmember.php:56 msgid "Importing Emails" msgstr "Emails Importieren" -#: mod/newmember.php:56 +#: mod/newmember.php:51 msgid "" "Enter your email access information on your Connector Settings page if you " "wish to import and interact with friends or mailing lists from your email " "INBOX" msgstr "Gib Deine E-Mail-Zugangsinformationen auf der Connector-Einstellungsseite ein, falls Du E-Mails aus Deinem Posteingang importieren und mit Freunden und Mailinglisten interagieren willst." -#: mod/newmember.php:58 +#: mod/newmember.php:53 msgid "Go to Your Contacts Page" msgstr "Gehe zu deiner Kontakt-Seite" -#: mod/newmember.php:58 +#: mod/newmember.php:53 msgid "" "Your Contacts page is your gateway to managing friendships and connecting " "with friends on other networks. Typically you enter their address or site " "URL in the Add New Contact dialog." msgstr "Die Kontakte-Seite ist die Einstiegsseite, von der aus Du Kontakte verwalten und Dich mit Freunden in anderen Netzwerken verbinden kannst. Normalerweise gibst Du dazu einfach ihre Adresse oder die URL der Seite im Kasten Neuen Kontakt hinzufügen ein." -#: mod/newmember.php:60 +#: mod/newmember.php:55 msgid "Go to Your Site's Directory" msgstr "Gehe zum Verzeichnis Deiner Friendica Instanz" -#: mod/newmember.php:60 +#: mod/newmember.php:55 msgid "" "The Directory page lets you find other people in this network or other " "federated sites. Look for a Connect or Follow link on " "their profile page. Provide your own Identity Address if requested." msgstr "Über die Verzeichnisseite kannst Du andere Personen auf diesem Server oder anderen verknüpften Seiten finden. Halte nach einem Verbinden oder Folgen Link auf deren Profilseiten Ausschau und gib Deine eigene Profiladresse an, falls Du danach gefragt wirst." -#: mod/newmember.php:62 +#: mod/newmember.php:57 msgid "Finding New People" msgstr "Neue Leute kennenlernen" -#: mod/newmember.php:62 +#: mod/newmember.php:57 msgid "" "On the side panel of the Contacts page are several tools to find new " "friends. We can match people by interest, look up people by name or " @@ -747,41 +731,41 @@ msgid "" "hours." msgstr "Im seitlichen Bedienfeld der Kontakteseite gibt es diverse Werkzeuge, um neue Freunde zu finden. Wir können Menschen mit den gleichen Interessen finden, anhand von Namen oder Interessen suchen oder aber aufgrund vorhandener Kontakte neue Freunde vorschlagen.\nAuf einer brandneuen - soeben erstellten - Seite starten die Kontaktvorschläge innerhalb von 24 Stunden." -#: mod/newmember.php:66 include/group.php:283 +#: mod/newmember.php:61 include/group.php:283 msgid "Groups" msgstr "Gruppen" -#: mod/newmember.php:70 +#: mod/newmember.php:65 msgid "Group Your Contacts" msgstr "Gruppiere deine Kontakte" -#: mod/newmember.php:70 +#: mod/newmember.php:65 msgid "" "Once you have made some friends, organize them into private conversation " "groups from the sidebar of your Contacts page and then you can interact with" " each group privately on your Network page." msgstr "Sobald Du einige Freunde gefunden hast, organisiere sie in Gruppen zur privaten Kommunikation im Seitenmenü der Kontakte-Seite. Du kannst dann mit jeder dieser Gruppen von der Netzwerkseite aus privat interagieren." -#: mod/newmember.php:73 +#: mod/newmember.php:68 msgid "Why Aren't My Posts Public?" msgstr "Warum sind meine Beiträge nicht öffentlich?" -#: mod/newmember.php:73 +#: mod/newmember.php:68 msgid "" "Friendica respects your privacy. By default, your posts will only show up to" " people you've added as friends. For more information, see the help section " "from the link above." msgstr "Friendica respektiert Deine Privatsphäre. Mit der Grundeinstellung werden Deine Beiträge ausschließlich Deinen Kontakten angezeigt. Für weitere Informationen diesbezüglich lies Dir bitte den entsprechenden Abschnitt in der Hilfe unter dem obigen Link durch." -#: mod/newmember.php:78 +#: mod/newmember.php:73 msgid "Getting Help" msgstr "Hilfe bekommen" -#: mod/newmember.php:82 +#: mod/newmember.php:77 msgid "Go to the Help Section" msgstr "Zum Hilfe Abschnitt gehen" -#: mod/newmember.php:82 +#: mod/newmember.php:77 msgid "" "Our help pages may be consulted for detail on other program" " features and resources." @@ -796,7 +780,7 @@ msgid "" "Account not found and OpenID registration is not permitted on this site." msgstr "Nutzerkonto wurde nicht gefunden und OpenID-Registrierung ist auf diesem Server nicht gestattet." -#: mod/openid.php:93 include/auth.php:112 include/auth.php:175 +#: mod/openid.php:93 include/auth.php:118 include/auth.php:181 msgid "Login failed." msgstr "Anmeldung fehlgeschlagen." @@ -882,18 +866,18 @@ msgstr "Bild erfolgreich hochgeladen." msgid "Image upload failed." msgstr "Hochladen des Bildes gescheitert." -#: mod/subthread.php:87 mod/tagger.php:62 mod/like.php:168 +#: mod/subthread.php:87 mod/tagger.php:62 include/like.php:165 #: include/conversation.php:130 include/conversation.php:266 #: include/text.php:1993 include/diaspora.php:2147 #: view/theme/diabook/theme.php:471 msgid "photo" msgstr "Foto" -#: mod/subthread.php:87 mod/tagger.php:62 mod/like.php:168 mod/like.php:346 -#: include/conversation.php:125 include/conversation.php:134 -#: include/conversation.php:261 include/conversation.php:270 -#: include/diaspora.php:2147 view/theme/diabook/theme.php:466 -#: view/theme/diabook/theme.php:475 +#: mod/subthread.php:87 mod/tagger.php:62 include/like.php:165 +#: include/like.php:325 include/conversation.php:125 +#: include/conversation.php:134 include/conversation.php:261 +#: include/conversation.php:270 include/diaspora.php:2147 +#: view/theme/diabook/theme.php:466 view/theme/diabook/theme.php:475 msgid "status" msgstr "Status" @@ -954,8 +938,8 @@ msgstr "Ignoriert" msgid "Keep this window open until done." msgstr "Lasse dieses Fenster offen, bis der Vorgang abgeschlossen ist." -#: mod/filer.php:30 include/conversation.php:1133 -#: include/conversation.php:1151 +#: mod/filer.php:30 include/conversation.php:1132 +#: include/conversation.php:1150 msgid "Save to Folder:" msgstr "In diesem Ordner speichern:" @@ -968,54 +952,54 @@ msgstr "- auswählen -" msgid "Save" msgstr "Speichern" -#: mod/follow.php:18 mod/dfrn_request.php:863 +#: mod/follow.php:19 mod/dfrn_request.php:870 msgid "Submit Request" msgstr "Anfrage abschicken" -#: mod/follow.php:29 +#: mod/follow.php:30 msgid "You already added this contact." msgstr "Du hast den Kontakt bereits hinzugefügt." -#: mod/follow.php:38 +#: mod/follow.php:39 msgid "Diaspora support isn't enabled. Contact can't be added." msgstr "Diaspora Unterstützung ist nicht aktiviert. Der Kontakt kann nicht zugefügt werden." -#: mod/follow.php:45 +#: mod/follow.php:46 msgid "OStatus support is disabled. Contact can't be added." msgstr "OStatus Unterstützung ist nicht aktiviert. Der Kontakt kann nicht zugefügt werden." -#: mod/follow.php:52 +#: mod/follow.php:53 msgid "The network type couldn't be detected. Contact can't be added." msgstr "Der Netzwerktype wurde nicht erkannt. Der Kontakt kann nicht hinzugefügt werden." -#: mod/follow.php:104 mod/dfrn_request.php:849 +#: mod/follow.php:109 mod/dfrn_request.php:856 msgid "Please answer the following:" msgstr "Bitte beantworte folgendes:" -#: mod/follow.php:105 mod/dfrn_request.php:850 +#: mod/follow.php:110 mod/dfrn_request.php:857 #, php-format msgid "Does %s know you?" msgstr "Kennt %s Dich?" -#: mod/follow.php:105 mod/settings.php:1094 mod/settings.php:1100 +#: mod/follow.php:110 mod/settings.php:1094 mod/settings.php:1100 #: mod/settings.php:1108 mod/settings.php:1112 mod/settings.php:1117 #: mod/settings.php:1123 mod/settings.php:1129 mod/settings.php:1135 #: mod/settings.php:1161 mod/settings.php:1162 mod/settings.php:1163 -#: mod/settings.php:1164 mod/settings.php:1165 mod/dfrn_request.php:850 +#: mod/settings.php:1164 mod/settings.php:1165 mod/dfrn_request.php:857 #: mod/register.php:239 mod/profiles.php:658 mod/profiles.php:662 #: mod/profiles.php:687 mod/api.php:106 msgid "No" msgstr "Nein" -#: mod/follow.php:106 mod/dfrn_request.php:854 +#: mod/follow.php:111 mod/dfrn_request.php:861 msgid "Add a personal note:" msgstr "Eine persönliche Notiz beifügen:" -#: mod/follow.php:112 mod/dfrn_request.php:860 +#: mod/follow.php:117 mod/dfrn_request.php:867 msgid "Your Identity Address:" msgstr "Adresse Deines Profils:" -#: mod/follow.php:162 +#: mod/follow.php:180 msgid "Contact added" msgstr "Kontakt hinzugefügt" @@ -1023,39 +1007,39 @@ msgstr "Kontakt hinzugefügt" msgid "Unable to locate original post." msgstr "Konnte den Originalbeitrag nicht finden." -#: mod/item.php:318 +#: mod/item.php:329 msgid "Empty post discarded." msgstr "Leerer Beitrag wurde verworfen." -#: mod/item.php:456 mod/wall_upload.php:213 mod/wall_upload.php:227 +#: mod/item.php:467 mod/wall_upload.php:213 mod/wall_upload.php:227 #: mod/wall_upload.php:234 include/Photo.php:954 include/Photo.php:969 #: include/Photo.php:976 include/Photo.php:998 include/message.php:145 msgid "Wall Photos" msgstr "Pinnwand-Bilder" -#: mod/item.php:830 +#: mod/item.php:842 msgid "System error. Post not saved." msgstr "Systemfehler. Beitrag konnte nicht gespeichert werden." -#: mod/item.php:959 +#: mod/item.php:971 #, php-format msgid "" "This message was sent to you by %s, a member of the Friendica social " "network." msgstr "Diese Nachricht wurde dir von %s geschickt, einem Mitglied des Sozialen Netzwerks Friendica." -#: mod/item.php:961 +#: mod/item.php:973 #, php-format msgid "You may visit them online at %s" msgstr "Du kannst sie online unter %s besuchen" -#: mod/item.php:962 +#: mod/item.php:974 msgid "" "Please contact the sender by replying to this post if you do not wish to " "receive these messages." msgstr "Falls Du diese Beiträge nicht erhalten möchtest, kontaktiere bitte den Autor, indem Du auf diese Nachricht antwortest." -#: mod/item.php:966 +#: mod/item.php:978 #, php-format msgid "%s posted an update." msgstr "%s hat ein Update veröffentlicht." @@ -1104,7 +1088,7 @@ msgstr "Gruppeneditor" msgid "Members" msgstr "Mitglieder" -#: mod/group.php:193 mod/network.php:563 mod/content.php:130 +#: mod/group.php:193 mod/network.php:576 mod/content.php:130 msgid "Group is empty" msgstr "Gruppe ist leer" @@ -1206,7 +1190,7 @@ msgstr "Deine Kontaktreferenzen konnten nicht in unserem System gespeichert werd msgid "Unable to update your contact profile details on our system" msgstr "Die Updates für Dein Profil konnten nicht gespeichert werden" -#: mod/dfrn_confirm.php:753 mod/dfrn_request.php:734 include/items.php:4273 +#: mod/dfrn_confirm.php:753 mod/dfrn_request.php:741 include/items.php:4276 msgid "[Name Withheld]" msgstr "[Name unterdrückt]" @@ -1215,7 +1199,7 @@ msgstr "[Name unterdrückt]" msgid "%1$s has joined %2$s" msgstr "%1$s ist %2$s beigetreten" -#: mod/profile.php:21 include/identity.php:53 +#: mod/profile.php:21 include/identity.php:51 msgid "Requested profile is not available." msgstr "Das angefragte Profil ist nicht vorhanden." @@ -1275,7 +1259,7 @@ msgstr "Schlage %s einen Kontakt vor" #: mod/wall_upload.php:20 mod/wall_upload.php:33 mod/wall_upload.php:86 #: mod/wall_upload.php:122 mod/wall_upload.php:125 mod/wall_attach.php:17 -#: mod/wall_attach.php:25 mod/wall_attach.php:76 include/api.php:1735 +#: mod/wall_attach.php:25 mod/wall_attach.php:76 include/api.php:1781 msgid "Invalid request." msgstr "Ungültige Anfrage" @@ -1331,7 +1315,7 @@ msgid "" "Password reset failed." msgstr "Anfrage konnte nicht verifiziert werden. (Eventuell hast Du bereits eine ähnliche Anfrage gestellt.) Zurücksetzen des Passworts gescheitert." -#: mod/lostpass.php:109 boot.php:1310 +#: mod/lostpass.php:109 boot.php:1418 msgid "Password Reset" msgstr "Passwort zurücksetzen" @@ -1405,37 +1389,6 @@ msgstr "Spitzname oder E-Mail:" msgid "Reset" msgstr "Zurücksetzen" -#: mod/like.php:170 include/conversation.php:122 include/conversation.php:258 -#: include/text.php:1991 view/theme/diabook/theme.php:463 -msgid "event" -msgstr "Event" - -#: mod/like.php:187 include/conversation.php:141 include/diaspora.php:2163 -#: view/theme/diabook/theme.php:480 -#, php-format -msgid "%1$s likes %2$s's %3$s" -msgstr "%1$s mag %2$ss %3$s" - -#: mod/like.php:189 include/conversation.php:144 -#, php-format -msgid "%1$s doesn't like %2$s's %3$s" -msgstr "%1$s mag %2$ss %3$s nicht" - -#: mod/like.php:191 -#, php-format -msgid "%1$s is attending %2$s's %3$s" -msgstr "%1$s nimmt an %2$ss %3$s teil." - -#: mod/like.php:193 -#, php-format -msgid "%1$s is not attending %2$s's %3$s" -msgstr "%1$s nimmt nicht an %2$ss %3$s teil." - -#: mod/like.php:195 -#, php-format -msgid "%1$s may attend %2$s's %3$s" -msgstr "%1$s nimmt eventuell an %2$ss %3$s teil." - #: mod/ping.php:265 msgid "{0} wants to be your friend" msgstr "{0} möchte mit Dir in Kontakt treten" @@ -1465,11 +1418,11 @@ msgstr "Verwerfen" msgid "System" msgstr "System" -#: mod/notifications.php:87 mod/admin.php:228 include/nav.php:154 +#: mod/notifications.php:87 mod/admin.php:361 include/nav.php:154 msgid "Network" msgstr "Netzwerk" -#: mod/notifications.php:93 mod/network.php:381 +#: mod/notifications.php:93 mod/network.php:384 msgid "Personal" msgstr "Persönlich" @@ -1511,7 +1464,7 @@ msgstr "Neue-Kontakt Nachricht senden" msgid "if applicable" msgstr "falls anwendbar" -#: mod/notifications.php:176 mod/notifications.php:257 mod/admin.php:1116 +#: mod/notifications.php:176 mod/notifications.php:257 mod/admin.php:1277 msgid "Approve" msgstr "Genehmigen" @@ -1561,8 +1514,8 @@ msgstr "Kontakt-/Freundschaftsanfrage" msgid "New Follower" msgstr "Neuer Bewunderer" -#: mod/notifications.php:250 mod/directory.php:147 include/identity.php:306 -#: include/identity.php:589 +#: mod/notifications.php:250 mod/directory.php:147 include/identity.php:310 +#: include/identity.php:590 msgid "Gender:" msgstr "Geschlecht:" @@ -1733,7 +1686,7 @@ msgstr "Unterhaltung gelöscht." #: mod/message.php:290 mod/message.php:298 mod/message.php:427 #: mod/message.php:435 mod/wallmessage.php:127 mod/wallmessage.php:135 -#: include/conversation.php:1129 include/conversation.php:1147 +#: include/conversation.php:1128 include/conversation.php:1146 msgid "Please enter a link URL:" msgstr "Bitte gib die URL des Links ein:" @@ -1755,19 +1708,19 @@ msgid "Your message:" msgstr "Deine Nachricht:" #: mod/message.php:339 mod/message.php:523 mod/wallmessage.php:154 -#: mod/editpost.php:110 include/conversation.php:1184 +#: mod/editpost.php:110 include/conversation.php:1183 msgid "Upload photo" msgstr "Foto hochladen" #: mod/message.php:340 mod/message.php:524 mod/wallmessage.php:155 -#: mod/editpost.php:114 include/conversation.php:1188 +#: mod/editpost.php:114 include/conversation.php:1187 msgid "Insert web link" msgstr "Einen Link einfügen" #: mod/message.php:341 mod/message.php:526 mod/content.php:501 #: mod/content.php:885 mod/wallmessage.php:156 mod/editpost.php:124 #: mod/photos.php:1610 object/Item.php:396 include/conversation.php:713 -#: include/conversation.php:1202 +#: include/conversation.php:1201 msgid "Please wait" msgstr "Bitte warten" @@ -1783,7 +1736,7 @@ msgstr "Nachricht nicht verfügbar." msgid "Delete message" msgstr "Nachricht löschen" -#: mod/message.php:507 mod/message.php:582 +#: mod/message.php:507 mod/message.php:584 msgid "Delete conversation" msgstr "Unterhaltung löschen" @@ -1797,26 +1750,26 @@ msgstr "Sichere Kommunikation ist nicht verfügbar. Eventuell k msgid "Send Reply" msgstr "Antwort senden" -#: mod/message.php:555 +#: mod/message.php:557 #, php-format msgid "Unknown sender - %s" msgstr "'Unbekannter Absender - %s" -#: mod/message.php:558 +#: mod/message.php:560 #, php-format msgid "You and %s" msgstr "Du und %s" -#: mod/message.php:561 +#: mod/message.php:563 #, php-format msgid "%s and You" msgstr "%s und Du" -#: mod/message.php:585 +#: mod/message.php:587 msgid "D, d M Y - g:i A" msgstr "D, d. M Y - g:i A" -#: mod/message.php:588 +#: mod/message.php:590 #, php-format msgid "%d message" msgid_plural "%d messages" @@ -1868,8 +1821,8 @@ msgstr "Zurück zum Kontakteditor" msgid "Refetch contact data" msgstr "Kontaktdaten neu laden" -#: mod/crepair.php:170 mod/admin.php:1114 mod/admin.php:1126 -#: mod/admin.php:1127 mod/admin.php:1140 mod/settings.php:652 +#: mod/crepair.php:170 mod/admin.php:1275 mod/admin.php:1287 +#: mod/admin.php:1288 mod/admin.php:1301 mod/settings.php:652 #: mod/settings.php:678 msgid "Name" msgstr "Name" @@ -1920,7 +1873,7 @@ msgid "" "entries from this contact." msgstr "Markiere diesen Kontakt als remote_self (entferntes Konto), dies veranlasst Friendica alle Top-Level Beiträge dieses Kontakts an all Deine Kontakte zu senden." -#: mod/bookmarklet.php:12 boot.php:1296 include/nav.php:91 +#: mod/bookmarklet.php:12 boot.php:1404 include/nav.php:91 msgid "Login" msgstr "Anmeldung" @@ -1932,24 +1885,24 @@ msgstr "Der Beitrag wurde angelegt" msgid "Access denied." msgstr "Zugriff verweigert." -#: mod/dirfind.php:188 mod/allfriends.php:80 mod/match.php:85 -#: mod/suggest.php:98 include/contact_widgets.php:10 include/identity.php:209 +#: mod/dirfind.php:194 mod/allfriends.php:80 mod/match.php:85 +#: mod/suggest.php:98 include/contact_widgets.php:10 include/identity.php:212 msgid "Connect" msgstr "Verbinden" -#: mod/dirfind.php:189 mod/allfriends.php:64 mod/match.php:70 -#: mod/directory.php:162 mod/suggest.php:81 include/Contact.php:296 -#: include/Contact.php:309 include/Contact.php:351 +#: mod/dirfind.php:195 mod/allfriends.php:64 mod/match.php:70 +#: mod/directory.php:162 mod/suggest.php:81 include/Contact.php:283 +#: include/Contact.php:296 include/Contact.php:338 #: include/conversation.php:912 include/conversation.php:926 msgid "View Profile" msgstr "Profil anschauen" -#: mod/dirfind.php:218 +#: mod/dirfind.php:224 #, php-format msgid "People Search - %s" msgstr "Personensuche - %s" -#: mod/dirfind.php:225 mod/match.php:105 +#: mod/dirfind.php:231 mod/match.php:105 msgid "No matches" msgstr "Keine Übereinstimmungen" @@ -1973,548 +1926,573 @@ msgstr "Dateien" msgid "Contacts who are not members of a group" msgstr "Kontakte, die keiner Gruppe zugewiesen sind" -#: mod/admin.php:80 +#: mod/admin.php:88 msgid "Theme settings updated." msgstr "Themeneinstellungen aktualisiert." -#: mod/admin.php:127 mod/admin.php:713 +#: mod/admin.php:137 mod/admin.php:856 msgid "Site" msgstr "Seite" -#: mod/admin.php:128 mod/admin.php:657 mod/admin.php:1109 mod/admin.php:1124 +#: mod/admin.php:138 mod/admin.php:800 mod/admin.php:1270 mod/admin.php:1285 msgid "Users" msgstr "Nutzer" -#: mod/admin.php:129 mod/admin.php:1213 mod/admin.php:1273 mod/settings.php:66 +#: mod/admin.php:139 mod/admin.php:1384 mod/admin.php:1444 mod/settings.php:66 msgid "Plugins" msgstr "Plugins" -#: mod/admin.php:130 mod/admin.php:1458 mod/admin.php:1509 +#: mod/admin.php:140 mod/admin.php:1642 mod/admin.php:1692 msgid "Themes" msgstr "Themen" -#: mod/admin.php:131 +#: mod/admin.php:141 msgid "DB updates" msgstr "DB Updates" -#: mod/admin.php:132 mod/admin.php:223 +#: mod/admin.php:142 mod/admin.php:356 msgid "Inspect Queue" msgstr "Warteschlange Inspizieren" -#: mod/admin.php:147 mod/admin.php:156 mod/admin.php:1597 +#: mod/admin.php:143 mod/admin.php:326 +msgid "Federation Statistics" +msgstr "Federation Statistik" + +#: mod/admin.php:157 mod/admin.php:168 mod/admin.php:1760 msgid "Logs" msgstr "Protokolle" -#: mod/admin.php:148 +#: mod/admin.php:158 mod/admin.php:1828 +msgid "View Logs" +msgstr "Protokolle anzeigen" + +#: mod/admin.php:159 msgid "probe address" msgstr "Adresse untersuchen" -#: mod/admin.php:149 +#: mod/admin.php:160 msgid "check webfinger" msgstr "Webfinger überprüfen" -#: mod/admin.php:154 include/nav.php:194 +#: mod/admin.php:166 include/nav.php:194 msgid "Admin" msgstr "Administration" -#: mod/admin.php:155 +#: mod/admin.php:167 msgid "Plugin Features" msgstr "Plugin Features" -#: mod/admin.php:157 +#: mod/admin.php:169 msgid "diagnostics" msgstr "Diagnose" -#: mod/admin.php:158 +#: mod/admin.php:170 msgid "User registrations waiting for confirmation" msgstr "Nutzeranmeldungen die auf Bestätigung warten" -#: mod/admin.php:222 mod/admin.php:272 mod/admin.php:712 mod/admin.php:1108 -#: mod/admin.php:1212 mod/admin.php:1272 mod/admin.php:1457 mod/admin.php:1508 -#: mod/admin.php:1596 +#: mod/admin.php:320 +msgid "" +"This page offers you some numbers to the known part of the federated social " +"network your Friendica node is part of. These numbers are not complete but " +"only reflect the part of the network your node is aware of." +msgstr "Diese Seite präsentiert einige Zahlen zu dem bekannten Teil des föderalen sozialen Netzwerks, von dem deine Friendica Installation ein Teil ist. Diese Zahlen sind nicht absolut und reflektieren nur den Teil des Netzwerks, den dein Knoten kennt." + +#: mod/admin.php:321 +msgid "" +"The Auto Discovered Contact Directory feature is not enabled, it " +"will improve the data displayed here." +msgstr "Die Funktion um Automatisch ein Kontaktverzeichnis erstellen ist nicht aktiv. Es wird die hier angezeigten Daten verbessern." + +#: mod/admin.php:325 mod/admin.php:355 mod/admin.php:411 mod/admin.php:855 +#: mod/admin.php:1269 mod/admin.php:1383 mod/admin.php:1443 mod/admin.php:1641 +#: mod/admin.php:1691 mod/admin.php:1759 mod/admin.php:1827 msgid "Administration" msgstr "Administration" -#: mod/admin.php:225 +#: mod/admin.php:332 +msgid "Currently this node is aware of nodes from the following platforms:" +msgstr "Momentan kennt dieser Knoten andere Knoten der folgenden Plattformen:" + +#: mod/admin.php:358 msgid "ID" msgstr "ID" -#: mod/admin.php:226 +#: mod/admin.php:359 msgid "Recipient Name" msgstr "Empfänger Name" -#: mod/admin.php:227 +#: mod/admin.php:360 msgid "Recipient Profile" msgstr "Empfänger Profil" -#: mod/admin.php:229 +#: mod/admin.php:362 msgid "Created" msgstr "Erstellt" -#: mod/admin.php:230 +#: mod/admin.php:363 msgid "Last Tried" msgstr "Zuletzt versucht" -#: mod/admin.php:231 +#: mod/admin.php:364 msgid "" "This page lists the content of the queue for outgoing postings. These are " "postings the initial delivery failed for. They will be resend later and " "eventually deleted if the delivery fails permanently." msgstr "Auf dieser Seite werden die in der Warteschlange eingereihten Beiträge aufgelistet. Bei diesen Beiträgen schlug die erste Zustellung fehl. Es wird später wiederholt versucht die Beiträge zuzustellen, bis sie schließlich gelöscht werden." -#: mod/admin.php:243 mod/admin.php:1062 +#: mod/admin.php:382 mod/admin.php:1223 msgid "Normal Account" msgstr "Normales Konto" -#: mod/admin.php:244 mod/admin.php:1063 +#: mod/admin.php:383 mod/admin.php:1224 msgid "Soapbox Account" msgstr "Marktschreier-Konto" -#: mod/admin.php:245 mod/admin.php:1064 +#: mod/admin.php:384 mod/admin.php:1225 msgid "Community/Celebrity Account" msgstr "Forum/Promi-Konto" -#: mod/admin.php:246 mod/admin.php:1065 +#: mod/admin.php:385 mod/admin.php:1226 msgid "Automatic Friend Account" msgstr "Automatisches Freundekonto" -#: mod/admin.php:247 +#: mod/admin.php:386 msgid "Blog Account" msgstr "Blog-Konto" -#: mod/admin.php:248 +#: mod/admin.php:387 msgid "Private Forum" msgstr "Privates Forum" -#: mod/admin.php:267 +#: mod/admin.php:406 msgid "Message queues" msgstr "Nachrichten-Warteschlangen" -#: mod/admin.php:273 +#: mod/admin.php:412 msgid "Summary" msgstr "Zusammenfassung" -#: mod/admin.php:275 +#: mod/admin.php:414 msgid "Registered users" msgstr "Registrierte Nutzer" -#: mod/admin.php:277 +#: mod/admin.php:416 msgid "Pending registrations" msgstr "Anstehende Anmeldungen" -#: mod/admin.php:278 +#: mod/admin.php:417 msgid "Version" msgstr "Version" -#: mod/admin.php:283 +#: mod/admin.php:422 msgid "Active plugins" msgstr "Aktive Plugins" -#: mod/admin.php:306 +#: mod/admin.php:445 msgid "Can not parse base url. Must have at least ://" msgstr "Die Basis-URL konnte nicht analysiert werden. Sie muss mindestens aus :// bestehen" -#: mod/admin.php:589 +#: mod/admin.php:728 msgid "RINO2 needs mcrypt php extension to work." msgstr "RINO2 benötigt die PHP Extension mcrypt." -#: mod/admin.php:597 +#: mod/admin.php:736 msgid "Site settings updated." msgstr "Seiteneinstellungen aktualisiert." -#: mod/admin.php:621 mod/settings.php:903 +#: mod/admin.php:764 mod/settings.php:903 msgid "No special theme for mobile devices" msgstr "Kein spezielles Theme für mobile Geräte verwenden." -#: mod/admin.php:640 +#: mod/admin.php:783 msgid "No community page" msgstr "Keine Gemeinschaftsseite" -#: mod/admin.php:641 +#: mod/admin.php:784 msgid "Public postings from users of this site" msgstr "Öffentliche Beiträge von Nutzer_innen dieser Seite" -#: mod/admin.php:642 +#: mod/admin.php:785 msgid "Global community page" msgstr "Globale Gemeinschaftsseite" -#: mod/admin.php:648 +#: mod/admin.php:791 msgid "At post arrival" msgstr "Beim Empfang von Nachrichten" -#: mod/admin.php:649 include/contact_selectors.php:56 +#: mod/admin.php:792 include/contact_selectors.php:56 msgid "Frequently" msgstr "immer wieder" -#: mod/admin.php:650 include/contact_selectors.php:57 +#: mod/admin.php:793 include/contact_selectors.php:57 msgid "Hourly" msgstr "Stündlich" -#: mod/admin.php:651 include/contact_selectors.php:58 +#: mod/admin.php:794 include/contact_selectors.php:58 msgid "Twice daily" msgstr "Zweimal täglich" -#: mod/admin.php:652 include/contact_selectors.php:59 +#: mod/admin.php:795 include/contact_selectors.php:59 msgid "Daily" msgstr "Täglich" -#: mod/admin.php:658 +#: mod/admin.php:801 msgid "Users, Global Contacts" msgstr "Nutzer, globale Kontakte" -#: mod/admin.php:659 +#: mod/admin.php:802 msgid "Users, Global Contacts/fallback" msgstr "Nutzer, globale Kontakte / Fallback" -#: mod/admin.php:663 +#: mod/admin.php:806 msgid "One month" msgstr "ein Monat" -#: mod/admin.php:664 +#: mod/admin.php:807 msgid "Three months" msgstr "drei Monate" -#: mod/admin.php:665 +#: mod/admin.php:808 msgid "Half a year" msgstr "ein halbes Jahr" -#: mod/admin.php:666 +#: mod/admin.php:809 msgid "One year" msgstr "ein Jahr" -#: mod/admin.php:671 +#: mod/admin.php:814 msgid "Multi user instance" msgstr "Mehrbenutzer Instanz" -#: mod/admin.php:694 +#: mod/admin.php:837 msgid "Closed" msgstr "Geschlossen" -#: mod/admin.php:695 +#: mod/admin.php:838 msgid "Requires approval" msgstr "Bedarf der Zustimmung" -#: mod/admin.php:696 +#: mod/admin.php:839 msgid "Open" msgstr "Offen" -#: mod/admin.php:700 +#: mod/admin.php:843 msgid "No SSL policy, links will track page SSL state" msgstr "Keine SSL Richtlinie, Links werden das verwendete Protokoll beibehalten" -#: mod/admin.php:701 +#: mod/admin.php:844 msgid "Force all links to use SSL" msgstr "SSL für alle Links erzwingen" -#: mod/admin.php:702 +#: mod/admin.php:845 msgid "Self-signed certificate, use SSL for local links only (discouraged)" msgstr "Selbst-unterzeichnetes Zertifikat, SSL nur für lokale Links verwenden (nicht empfohlen)" -#: mod/admin.php:714 mod/admin.php:1274 mod/admin.php:1510 mod/admin.php:1598 +#: mod/admin.php:857 mod/admin.php:1445 mod/admin.php:1693 mod/admin.php:1761 #: mod/settings.php:650 mod/settings.php:760 mod/settings.php:804 #: mod/settings.php:873 mod/settings.php:960 mod/settings.php:1195 msgid "Save Settings" msgstr "Einstellungen speichern" -#: mod/admin.php:715 mod/register.php:263 +#: mod/admin.php:858 mod/register.php:263 msgid "Registration" msgstr "Registrierung" -#: mod/admin.php:716 +#: mod/admin.php:859 msgid "File upload" msgstr "Datei hochladen" -#: mod/admin.php:717 +#: mod/admin.php:860 msgid "Policies" msgstr "Regeln" -#: mod/admin.php:718 +#: mod/admin.php:861 msgid "Advanced" msgstr "Erweitert" -#: mod/admin.php:719 +#: mod/admin.php:862 msgid "Auto Discovered Contact Directory" msgstr "Automatisch ein Kontaktverzeichnis erstellen" -#: mod/admin.php:720 +#: mod/admin.php:863 msgid "Performance" msgstr "Performance" -#: mod/admin.php:721 +#: mod/admin.php:864 msgid "" "Relocate - WARNING: advanced function. Could make this server unreachable." msgstr "Umsiedeln - WARNUNG: Könnte diesen Server unerreichbar machen." -#: mod/admin.php:724 +#: mod/admin.php:867 msgid "Site name" msgstr "Seitenname" -#: mod/admin.php:725 +#: mod/admin.php:868 msgid "Host name" msgstr "Host Name" -#: mod/admin.php:726 +#: mod/admin.php:869 msgid "Sender Email" msgstr "Absender für Emails" -#: mod/admin.php:726 +#: mod/admin.php:869 msgid "" "The email address your server shall use to send notification emails from." msgstr "Die E-Mail Adresse die dein Server zum Versenden von Benachrichtigungen verwenden soll." -#: mod/admin.php:727 +#: mod/admin.php:870 msgid "Banner/Logo" msgstr "Banner/Logo" -#: mod/admin.php:728 +#: mod/admin.php:871 msgid "Shortcut icon" msgstr "Shortcut Icon" -#: mod/admin.php:728 +#: mod/admin.php:871 msgid "Link to an icon that will be used for browsers." msgstr "Link zu einem Icon, das Browser verwenden werden." -#: mod/admin.php:729 +#: mod/admin.php:872 msgid "Touch icon" msgstr "Touch Icon" -#: mod/admin.php:729 +#: mod/admin.php:872 msgid "Link to an icon that will be used for tablets and mobiles." msgstr "Link zu einem Icon das Tablets und Handies verwenden sollen." -#: mod/admin.php:730 +#: mod/admin.php:873 msgid "Additional Info" msgstr "Zusätzliche Informationen" -#: mod/admin.php:730 +#: mod/admin.php:873 #, php-format msgid "" "For public servers: you can add additional information here that will be " "listed at %s/siteinfo." msgstr "Für öffentliche Server kannst Du hier zusätzliche Informationen angeben, die dann auf %s/siteinfo angezeigt werden." -#: mod/admin.php:731 +#: mod/admin.php:874 msgid "System language" msgstr "Systemsprache" -#: mod/admin.php:732 +#: mod/admin.php:875 msgid "System theme" msgstr "Systemweites Theme" -#: mod/admin.php:732 +#: mod/admin.php:875 msgid "" "Default system theme - may be over-ridden by user profiles - change theme settings" msgstr "Vorgabe für das System-Theme - kann von Benutzerprofilen überschrieben werden - Theme-Einstellungen ändern" -#: mod/admin.php:733 +#: mod/admin.php:876 msgid "Mobile system theme" msgstr "Systemweites mobiles Theme" -#: mod/admin.php:733 +#: mod/admin.php:876 msgid "Theme for mobile devices" msgstr "Thema für mobile Geräte" -#: mod/admin.php:734 +#: mod/admin.php:877 msgid "SSL link policy" msgstr "Regeln für SSL Links" -#: mod/admin.php:734 +#: mod/admin.php:877 msgid "Determines whether generated links should be forced to use SSL" msgstr "Bestimmt, ob generierte Links SSL verwenden müssen" -#: mod/admin.php:735 +#: mod/admin.php:878 msgid "Force SSL" msgstr "Erzwinge SSL" -#: mod/admin.php:735 +#: mod/admin.php:878 msgid "" "Force all Non-SSL requests to SSL - Attention: on some systems it could lead" " to endless loops." msgstr "Erzinge alle Nicht-SSL Anfragen auf SSL - Achtung: auf manchen Systemen verursacht dies eine Endlosschleife." -#: mod/admin.php:736 +#: mod/admin.php:879 msgid "Old style 'Share'" msgstr "Altes \"Teilen\" Element" -#: mod/admin.php:736 +#: mod/admin.php:879 msgid "Deactivates the bbcode element 'share' for repeating items." msgstr "Deaktiviert das BBCode Element \"share\" beim Wiederholen von Beiträgen." -#: mod/admin.php:737 +#: mod/admin.php:880 msgid "Hide help entry from navigation menu" msgstr "Verberge den Menüeintrag für die Hilfe im Navigationsmenü" -#: mod/admin.php:737 +#: mod/admin.php:880 msgid "" "Hides the menu entry for the Help pages from the navigation menu. You can " "still access it calling /help directly." msgstr "Verbirgt den Menüeintrag für die Hilfe-Seiten im Navigationsmenü. Die Seiten können weiterhin über /help aufgerufen werden." -#: mod/admin.php:738 +#: mod/admin.php:881 msgid "Single user instance" msgstr "Ein-Nutzer Instanz" -#: mod/admin.php:738 +#: mod/admin.php:881 msgid "Make this instance multi-user or single-user for the named user" msgstr "Regelt ob es sich bei dieser Instanz um eine ein Personen Installation oder eine Installation mit mehr als einem Nutzer handelt." -#: mod/admin.php:739 +#: mod/admin.php:882 msgid "Maximum image size" msgstr "Maximale Bildgröße" -#: mod/admin.php:739 +#: mod/admin.php:882 msgid "" "Maximum size in bytes of uploaded images. Default is 0, which means no " "limits." msgstr "Maximale Uploadgröße von Bildern in Bytes. Standard ist 0, d.h. ohne Limit." -#: mod/admin.php:740 +#: mod/admin.php:883 msgid "Maximum image length" msgstr "Maximale Bildlänge" -#: mod/admin.php:740 +#: mod/admin.php:883 msgid "" "Maximum length in pixels of the longest side of uploaded images. Default is " "-1, which means no limits." msgstr "Maximale Länge in Pixeln der längsten Seite eines hoch geladenen Bildes. Grundeinstellung ist -1 was keine Einschränkung bedeutet." -#: mod/admin.php:741 +#: mod/admin.php:884 msgid "JPEG image quality" msgstr "Qualität des JPEG Bildes" -#: mod/admin.php:741 +#: mod/admin.php:884 msgid "" "Uploaded JPEGS will be saved at this quality setting [0-100]. Default is " "100, which is full quality." msgstr "Hoch geladene JPEG Bilder werden mit dieser Qualität [0-100] gespeichert. Grundeinstellung ist 100, kein Qualitätsverlust." -#: mod/admin.php:743 +#: mod/admin.php:886 msgid "Register policy" msgstr "Registrierungsmethode" -#: mod/admin.php:744 +#: mod/admin.php:887 msgid "Maximum Daily Registrations" msgstr "Maximum täglicher Registrierungen" -#: mod/admin.php:744 +#: mod/admin.php:887 msgid "" "If registration is permitted above, this sets the maximum number of new user" " registrations to accept per day. If register is set to closed, this " "setting has no effect." msgstr "Wenn die Registrierung weiter oben erlaubt ist, regelt dies die maximale Anzahl von Neuanmeldungen pro Tag. Wenn die Registrierung geschlossen ist, hat diese Einstellung keinen Effekt." -#: mod/admin.php:745 +#: mod/admin.php:888 msgid "Register text" msgstr "Registrierungstext" -#: mod/admin.php:745 +#: mod/admin.php:888 msgid "Will be displayed prominently on the registration page." msgstr "Wird gut sichtbar auf der Registrierungsseite angezeigt." -#: mod/admin.php:746 +#: mod/admin.php:889 msgid "Accounts abandoned after x days" msgstr "Nutzerkonten gelten nach x Tagen als unbenutzt" -#: mod/admin.php:746 +#: mod/admin.php:889 msgid "" "Will not waste system resources polling external sites for abandonded " "accounts. Enter 0 for no time limit." msgstr "Verschwende keine System-Ressourcen auf das Pollen externer Seiten, wenn Konten nicht mehr benutzt werden. 0 eingeben für kein Limit." -#: mod/admin.php:747 +#: mod/admin.php:890 msgid "Allowed friend domains" msgstr "Erlaubte Domains für Kontakte" -#: mod/admin.php:747 +#: mod/admin.php:890 msgid "" "Comma separated list of domains which are allowed to establish friendships " "with this site. Wildcards are accepted. Empty to allow any domains" msgstr "Liste der Domains, die für Freundschaften erlaubt sind, durch Kommas getrennt. Platzhalter werden akzeptiert. Leer lassen, um alle Domains zu erlauben." -#: mod/admin.php:748 +#: mod/admin.php:891 msgid "Allowed email domains" msgstr "Erlaubte Domains für E-Mails" -#: mod/admin.php:748 +#: mod/admin.php:891 msgid "" "Comma separated list of domains which are allowed in email addresses for " "registrations to this site. Wildcards are accepted. Empty to allow any " "domains" msgstr "Liste der Domains, die für E-Mail-Adressen bei der Registrierung erlaubt sind, durch Kommas getrennt. Platzhalter werden akzeptiert. Leer lassen, um alle Domains zu erlauben." -#: mod/admin.php:749 +#: mod/admin.php:892 msgid "Block public" msgstr "Öffentlichen Zugriff blockieren" -#: mod/admin.php:749 +#: mod/admin.php:892 msgid "" "Check to block public access to all otherwise public personal pages on this " "site unless you are currently logged in." msgstr "Klicken, um öffentlichen Zugriff auf sonst öffentliche Profile zu blockieren, wenn man nicht eingeloggt ist." -#: mod/admin.php:750 +#: mod/admin.php:893 msgid "Force publish" msgstr "Erzwinge Veröffentlichung" -#: mod/admin.php:750 +#: mod/admin.php:893 msgid "" "Check to force all profiles on this site to be listed in the site directory." msgstr "Klicken, um Anzeige aller Profile dieses Servers im Verzeichnis zu erzwingen." -#: mod/admin.php:751 +#: mod/admin.php:894 msgid "Global directory URL" msgstr "URL des weltweiten Verzeichnisses" -#: mod/admin.php:751 +#: mod/admin.php:894 msgid "" "URL to the global directory. If this is not set, the global directory is " "completely unavailable to the application." msgstr "URL des weltweiten Verzeichnisses. Wenn diese nicht gesetzt ist, ist das Verzeichnis für die Applikation nicht erreichbar." -#: mod/admin.php:752 +#: mod/admin.php:895 msgid "Allow threaded items" msgstr "Erlaube Threads in Diskussionen" -#: mod/admin.php:752 +#: mod/admin.php:895 msgid "Allow infinite level threading for items on this site." msgstr "Erlaube ein unendliches Level für Threads auf dieser Seite." -#: mod/admin.php:753 +#: mod/admin.php:896 msgid "Private posts by default for new users" msgstr "Private Beiträge als Standard für neue Nutzer" -#: mod/admin.php:753 +#: mod/admin.php:896 msgid "" "Set default post permissions for all new members to the default privacy " "group rather than public." msgstr "Die Standard-Zugriffsrechte für neue Nutzer werden so gesetzt, dass als Voreinstellung in die private Gruppe gepostet wird anstelle von öffentlichen Beiträgen." -#: mod/admin.php:754 +#: mod/admin.php:897 msgid "Don't include post content in email notifications" msgstr "Inhalte von Beiträgen nicht in E-Mail-Benachrichtigungen versenden" -#: mod/admin.php:754 +#: mod/admin.php:897 msgid "" "Don't include the content of a post/comment/private message/etc. in the " "email notifications that are sent out from this site, as a privacy measure." msgstr "Inhalte von Beiträgen/Kommentaren/privaten Nachrichten/usw., zum Datenschutz nicht in E-Mail-Benachrichtigungen einbinden." -#: mod/admin.php:755 +#: mod/admin.php:898 msgid "Disallow public access to addons listed in the apps menu." msgstr "Öffentlichen Zugriff auf Addons im Apps Menü verbieten." -#: mod/admin.php:755 +#: mod/admin.php:898 msgid "" "Checking this box will restrict addons listed in the apps menu to members " "only." msgstr "Wenn ausgewählt werden die im Apps Menü aufgeführten Addons nur angemeldeten Nutzern der Seite zur Verfügung gestellt." -#: mod/admin.php:756 +#: mod/admin.php:899 msgid "Don't embed private images in posts" msgstr "Private Bilder nicht in Beiträgen einbetten." -#: mod/admin.php:756 +#: mod/admin.php:899 msgid "" "Don't replace locally-hosted private photos in posts with an embedded copy " "of the image. This means that contacts who receive posts containing private " @@ -2522,228 +2500,228 @@ msgid "" "while." msgstr "Ersetze lokal gehostete private Fotos in Beiträgen nicht mit einer eingebetteten Kopie des Bildes. Dies bedeutet, dass Kontakte, die Beiträge mit privaten Fotos erhalten sich zunächst auf den jeweiligen Servern authentifizieren müssen bevor die Bilder geladen und angezeigt werden, was eine gewisse Zeit dauert." -#: mod/admin.php:757 +#: mod/admin.php:900 msgid "Allow Users to set remote_self" msgstr "Nutzern erlauben das remote_self Flag zu setzen" -#: mod/admin.php:757 +#: mod/admin.php:900 msgid "" "With checking this, every user is allowed to mark every contact as a " "remote_self in the repair contact dialog. Setting this flag on a contact " "causes mirroring every posting of that contact in the users stream." msgstr "Ist dies ausgewählt kann jeder Nutzer jeden seiner Kontakte als remote_self (entferntes Konto) im Kontakt reparieren Dialog markieren. Nach dem setzten dieses Flags werden alle Top-Level Beiträge dieser Kontakte automatisch in den Stream dieses Nutzers gepostet." -#: mod/admin.php:758 +#: mod/admin.php:901 msgid "Block multiple registrations" msgstr "Unterbinde Mehrfachregistrierung" -#: mod/admin.php:758 +#: mod/admin.php:901 msgid "Disallow users to register additional accounts for use as pages." msgstr "Benutzern nicht erlauben, weitere Konten als zusätzliche Profile anzulegen." -#: mod/admin.php:759 +#: mod/admin.php:902 msgid "OpenID support" msgstr "OpenID Unterstützung" -#: mod/admin.php:759 +#: mod/admin.php:902 msgid "OpenID support for registration and logins." msgstr "OpenID-Unterstützung für Registrierung und Login." -#: mod/admin.php:760 +#: mod/admin.php:903 msgid "Fullname check" msgstr "Namen auf Vollständigkeit überprüfen" -#: mod/admin.php:760 +#: mod/admin.php:903 msgid "" "Force users to register with a space between firstname and lastname in Full " "name, as an antispam measure" msgstr "Leerzeichen zwischen Vor- und Nachname im vollständigen Namen erzwingen, um SPAM zu vermeiden." -#: mod/admin.php:761 +#: mod/admin.php:904 msgid "UTF-8 Regular expressions" msgstr "UTF-8 Reguläre Ausdrücke" -#: mod/admin.php:761 +#: mod/admin.php:904 msgid "Use PHP UTF8 regular expressions" msgstr "PHP UTF8 Ausdrücke verwenden" -#: mod/admin.php:762 +#: mod/admin.php:905 msgid "Community Page Style" msgstr "Art der Gemeinschaftsseite" -#: mod/admin.php:762 +#: mod/admin.php:905 msgid "" "Type of community page to show. 'Global community' shows every public " "posting from an open distributed network that arrived on this server." msgstr "Welche Art der Gemeinschaftsseite soll verwendet werden? Globale Gemeinschaftsseite zeigt alle öffentlichen Beiträge eines offenen dezentralen Netzwerks an die auf diesem Server eintreffen." -#: mod/admin.php:763 +#: mod/admin.php:906 msgid "Posts per user on community page" msgstr "Anzahl der Beiträge pro Benutzer auf der Gemeinschaftsseite" -#: mod/admin.php:763 +#: mod/admin.php:906 msgid "" "The maximum number of posts per user on the community page. (Not valid for " "'Global Community')" msgstr "Die Anzahl der Beiträge die von jedem Nutzer maximal auf der Gemeinschaftsseite angezeigt werden sollen. Dieser Parameter wird nicht für die Globale Gemeinschaftsseite genutzt." -#: mod/admin.php:764 +#: mod/admin.php:907 msgid "Enable OStatus support" msgstr "OStatus Unterstützung aktivieren" -#: mod/admin.php:764 +#: mod/admin.php:907 msgid "" "Provide built-in OStatus (StatusNet, GNU Social etc.) compatibility. All " "communications in OStatus are public, so privacy warnings will be " "occasionally displayed." msgstr "Biete die eingebaute OStatus (iStatusNet, GNU Social, etc.) Unterstützung an. Jede Kommunikation in OStatus ist öffentlich, Privatsphäre Warnungen werden nur bei Bedarf angezeigt." -#: mod/admin.php:765 +#: mod/admin.php:908 msgid "OStatus conversation completion interval" msgstr "Intervall zum Vervollständigen von OStatus Unterhaltungen" -#: mod/admin.php:765 +#: mod/admin.php:908 msgid "" "How often shall the poller check for new entries in OStatus conversations? " "This can be a very ressource task." msgstr "Wie oft soll der Poller checken ob es neue Nachrichten in OStatus Unterhaltungen gibt die geladen werden müssen. Je nach Anzahl der OStatus Kontakte könnte dies ein sehr Ressourcen lastiger Job sein." -#: mod/admin.php:766 +#: mod/admin.php:909 msgid "OStatus support can only be enabled if threading is enabled." msgstr "OStatus Unterstützung kann nur aktiviert werden wenn \"Threading\" aktiviert ist. " -#: mod/admin.php:768 +#: mod/admin.php:911 msgid "" "Diaspora support can't be enabled because Friendica was installed into a sub" " directory." msgstr "Diaspora Unterstützung kann nicht aktiviert werden da Friendica in ein Unterverzeichnis installiert ist." -#: mod/admin.php:769 +#: mod/admin.php:912 msgid "Enable Diaspora support" msgstr "Diaspora Unterstützung aktivieren" -#: mod/admin.php:769 +#: mod/admin.php:912 msgid "Provide built-in Diaspora network compatibility." msgstr "Verwende die eingebaute Diaspora-Verknüpfung." -#: mod/admin.php:770 +#: mod/admin.php:913 msgid "Only allow Friendica contacts" msgstr "Nur Friendica-Kontakte erlauben" -#: mod/admin.php:770 +#: mod/admin.php:913 msgid "" "All contacts must use Friendica protocols. All other built-in communication " "protocols disabled." msgstr "Alle Kontakte müssen das Friendica Protokoll nutzen. Alle anderen Kommunikationsprotokolle werden deaktiviert." -#: mod/admin.php:771 +#: mod/admin.php:914 msgid "Verify SSL" msgstr "SSL Überprüfen" -#: mod/admin.php:771 +#: mod/admin.php:914 msgid "" "If you wish, you can turn on strict certificate checking. This will mean you" " cannot connect (at all) to self-signed SSL sites." msgstr "Wenn gewollt, kann man hier eine strenge Zertifikatkontrolle einstellen. Das bedeutet, dass man zu keinen Seiten mit selbst unterzeichnetem SSL eine Verbindung herstellen kann." -#: mod/admin.php:772 +#: mod/admin.php:915 msgid "Proxy user" msgstr "Proxy Nutzer" -#: mod/admin.php:773 +#: mod/admin.php:916 msgid "Proxy URL" msgstr "Proxy URL" -#: mod/admin.php:774 +#: mod/admin.php:917 msgid "Network timeout" msgstr "Netzwerk Wartezeit" -#: mod/admin.php:774 +#: mod/admin.php:917 msgid "Value is in seconds. Set to 0 for unlimited (not recommended)." msgstr "Der Wert ist in Sekunden. Setze 0 für unbegrenzt (nicht empfohlen)." -#: mod/admin.php:775 +#: mod/admin.php:918 msgid "Delivery interval" msgstr "Zustellungsintervall" -#: mod/admin.php:775 +#: mod/admin.php:918 msgid "" "Delay background delivery processes by this many seconds to reduce system " "load. Recommend: 4-5 for shared hosts, 2-3 for virtual private servers. 0-1 " "for large dedicated servers." msgstr "Verzögere im Hintergrund laufende Auslieferungsprozesse um die angegebene Anzahl an Sekunden, um die Systemlast zu verringern. Empfehlungen: 4-5 für Shared-Hosts, 2-3 für VPS, 0-1 für große dedizierte Server." -#: mod/admin.php:776 +#: mod/admin.php:919 msgid "Poll interval" msgstr "Abfrageintervall" -#: mod/admin.php:776 +#: mod/admin.php:919 msgid "" "Delay background polling processes by this many seconds to reduce system " "load. If 0, use delivery interval." msgstr "Verzögere Hintergrundprozesse um diese Anzahl an Sekunden, um die Systemlast zu reduzieren. Bei 0 Sekunden wird das Auslieferungsintervall verwendet." -#: mod/admin.php:777 +#: mod/admin.php:920 msgid "Maximum Load Average" msgstr "Maximum Load Average" -#: mod/admin.php:777 +#: mod/admin.php:920 msgid "" "Maximum system load before delivery and poll processes are deferred - " "default 50." msgstr "Maximale Systemlast bevor Verteil- und Empfangsprozesse verschoben werden - Standard 50" -#: mod/admin.php:778 +#: mod/admin.php:921 msgid "Maximum Load Average (Frontend)" msgstr "Maximum Load Average (Frontend)" -#: mod/admin.php:778 +#: mod/admin.php:921 msgid "Maximum system load before the frontend quits service - default 50." msgstr "Maximale Systemlast bevor Vordergrundprozesse pausiert werden - Standard 50." -#: mod/admin.php:779 +#: mod/admin.php:922 msgid "Maximum table size for optimization" msgstr "Maximale Tabellengröße zur Optimierung" -#: mod/admin.php:779 +#: mod/admin.php:922 msgid "" "Maximum table size (in MB) for the automatic optimization - default 100 MB. " "Enter -1 to disable it." msgstr "Maximale Tabellengröße (in MB) für die automatische Optimierung - Standard 100 MB. Gib -1 für Deaktivierung ein." -#: mod/admin.php:780 +#: mod/admin.php:923 msgid "Minimum level of fragmentation" msgstr "Minimaler Fragmentationsgrad" -#: mod/admin.php:780 +#: mod/admin.php:923 msgid "" "Minimum fragmenation level to start the automatic optimization - default " "value is 30%." msgstr "Minimales Fragmentationsgrad von Datenbanktabellen um die automatische Optimierung einzuleiten - Standardwert ist 30%" -#: mod/admin.php:782 +#: mod/admin.php:925 msgid "Periodical check of global contacts" msgstr "Regelmäßig globale Kontakte überprüfen" -#: mod/admin.php:782 +#: mod/admin.php:925 msgid "" "If enabled, the global contacts are checked periodically for missing or " "outdated data and the vitality of the contacts and servers." msgstr "Wenn diese Option aktiviert ist, werden die globalen Kontakte regelmäßig auf fehlende oder veraltete Daten sowie auf Erreichbarkeit des Kontakts und des Servers überprüft." -#: mod/admin.php:783 +#: mod/admin.php:926 msgid "Days between requery" msgstr "Tage zwischen erneuten Abfragen" -#: mod/admin.php:783 +#: mod/admin.php:926 msgid "Number of days after which a server is requeried for his contacts." msgstr "Legt das Abfrageintervall fest, nachdem ein Server erneut nach Kontakten abgefragt werden soll." -#: mod/admin.php:784 +#: mod/admin.php:927 msgid "Discover contacts from other servers" msgstr "Neue Kontakte auf anderen Servern entdecken" -#: mod/admin.php:784 +#: mod/admin.php:927 msgid "" "Periodically query other servers for contacts. You can choose between " "'users': the users on the remote system, 'Global Contacts': active contacts " @@ -2753,32 +2731,32 @@ msgid "" "Global Contacts'." msgstr "Regelmäßig andere Server nach potentiellen Kontakten absuchen. Du kannst zwischen 'Nutzern', den tatsächlichen Nutzern des anderen Systems und 'globalen Kontakten', aktiven Kontakten die auf dem System bekannt sind, wählen. Der Fallback-Mechanismus ist für ältere Friendica und Redmatrix Server gedacht, bei denen globale Kontakte noch nicht verfügbar sind. Durch den Fallbackmodus entsteht auf deinem Server eine wesentlich höhere Last, empfohlen wird der Modus 'Nutzer, globale Kontakte'." -#: mod/admin.php:785 +#: mod/admin.php:928 msgid "Timeframe for fetching global contacts" msgstr "Zeitfenster für globale Kontakte" -#: mod/admin.php:785 +#: mod/admin.php:928 msgid "" "When the discovery is activated, this value defines the timeframe for the " "activity of the global contacts that are fetched from other servers." msgstr "Wenn die Entdeckung neuer Kontakte aktiv ist, definiert dieses Zeitfenster den Zeitraum in dem globale Kontakte als aktiv gelten und von anderen Servern importiert werden." -#: mod/admin.php:786 +#: mod/admin.php:929 msgid "Search the local directory" msgstr "Lokales Verzeichnis durchsuchen" -#: mod/admin.php:786 +#: mod/admin.php:929 msgid "" "Search the local directory instead of the global directory. When searching " "locally, every search will be executed on the global directory in the " "background. This improves the search results when the search is repeated." msgstr "Suche im lokalen Verzeichnis anstelle des globalen Verzeichnisses durchführen. Jede Suche wird im Hintergrund auch im globalen Verzeichnis durchgeführt umd die Suchresultate zu verbessern, wenn diese Suche wiederholt wird." -#: mod/admin.php:788 +#: mod/admin.php:931 msgid "Publish server information" msgstr "Server Informationen veröffentlichen" -#: mod/admin.php:788 +#: mod/admin.php:931 msgid "" "If enabled, general server and usage data will be published. The data " "contains the name and version of the server, number of users with public " @@ -2786,205 +2764,205 @@ msgid "" " href='http://the-federation.info/'>the-federation.info for details." msgstr "Wenn aktiviert, werden allgemeine Informationen über den Server und Nutzungsdaten veröffentlicht. Die Daten beinhalten den Namen sowie die Version des Servers, die Anzahl der Nutzer_innen mit öffentlichen Profilen, die Anzahl der Beiträge sowie aktivierte Protokolle und Connectoren. Für Details bitte the-federation.info aufrufen." -#: mod/admin.php:790 +#: mod/admin.php:933 msgid "Use MySQL full text engine" msgstr "Nutze MySQL full text engine" -#: mod/admin.php:790 +#: mod/admin.php:933 msgid "" "Activates the full text engine. Speeds up search - but can only search for " "four and more characters." msgstr "Aktiviert die 'full text engine'. Beschleunigt die Suche - aber es kann nur nach vier oder mehr Zeichen gesucht werden." -#: mod/admin.php:791 +#: mod/admin.php:934 msgid "Suppress Language" msgstr "Sprachinformation unterdrücken" -#: mod/admin.php:791 +#: mod/admin.php:934 msgid "Suppress language information in meta information about a posting." msgstr "Verhindert das Erzeugen der Meta-Information zur Spracherkennung eines Beitrags." -#: mod/admin.php:792 +#: mod/admin.php:935 msgid "Suppress Tags" msgstr "Tags Unterdrücken" -#: mod/admin.php:792 +#: mod/admin.php:935 msgid "Suppress showing a list of hashtags at the end of the posting." msgstr "Unterdrückt die Anzeige von Tags am Ende eines Beitrags." -#: mod/admin.php:793 +#: mod/admin.php:936 msgid "Path to item cache" msgstr "Pfad zum Eintrag Cache" -#: mod/admin.php:793 +#: mod/admin.php:936 msgid "The item caches buffers generated bbcode and external images." msgstr "Im Item-Cache werden externe Bilder und geparster BBCode zwischen gespeichert." -#: mod/admin.php:794 +#: mod/admin.php:937 msgid "Cache duration in seconds" msgstr "Cache-Dauer in Sekunden" -#: mod/admin.php:794 +#: mod/admin.php:937 msgid "" "How long should the cache files be hold? Default value is 86400 seconds (One" " day). To disable the item cache, set the value to -1." msgstr "Wie lange sollen die gecachedten Dateien vorgehalten werden? Grundeinstellung sind 86400 Sekunden (ein Tag). Um den Item Cache zu deaktivieren, setze diesen Wert auf -1." -#: mod/admin.php:795 +#: mod/admin.php:938 msgid "Maximum numbers of comments per post" msgstr "Maximale Anzahl von Kommentaren pro Beitrag" -#: mod/admin.php:795 +#: mod/admin.php:938 msgid "How much comments should be shown for each post? Default value is 100." msgstr "Wie viele Kommentare sollen pro Beitrag angezeigt werden? Standardwert sind 100." -#: mod/admin.php:796 +#: mod/admin.php:939 msgid "Path for lock file" msgstr "Pfad für die Sperrdatei" -#: mod/admin.php:796 +#: mod/admin.php:939 msgid "" "The lock file is used to avoid multiple pollers at one time. Only define a " "folder here." msgstr "Die lock-Datei wird benutzt, damit nicht mehrere poller auf einmal laufen. Definiere hier einen Dateiverzeichnis." -#: mod/admin.php:797 +#: mod/admin.php:940 msgid "Temp path" msgstr "Temp Pfad" -#: mod/admin.php:797 +#: mod/admin.php:940 msgid "" "If you have a restricted system where the webserver can't access the system " "temp path, enter another path here." msgstr "Solltest du ein eingeschränktes System haben, auf dem der Webserver nicht auf das temp Verzeichnis des Systems zugreifen kann, setze hier einen anderen Pfad." -#: mod/admin.php:798 +#: mod/admin.php:941 msgid "Base path to installation" msgstr "Basis-Pfad zur Installation" -#: mod/admin.php:798 +#: mod/admin.php:941 msgid "" "If the system cannot detect the correct path to your installation, enter the" " correct path here. This setting should only be set if you are using a " "restricted system and symbolic links to your webroot." msgstr "Falls das System nicht den korrekten Pfad zu deiner Installation gefunden hat, gib den richtigen Pfad bitte hier ein. Du solltest hier den Pfad nur auf einem eingeschränkten System angeben müssen, bei dem du mit symbolischen Links auf dein Webverzeichnis verweist." -#: mod/admin.php:799 +#: mod/admin.php:942 msgid "Disable picture proxy" msgstr "Bilder Proxy deaktivieren" -#: mod/admin.php:799 +#: mod/admin.php:942 msgid "" "The picture proxy increases performance and privacy. It shouldn't be used on" " systems with very low bandwith." msgstr "Der Proxy für Bilder verbessert die Leistung und Privatsphäre der Nutzer. Er sollte nicht auf Systemen verwendet werden, die nur über begrenzte Bandbreite verfügen." -#: mod/admin.php:800 +#: mod/admin.php:943 msgid "Enable old style pager" msgstr "Den Old-Style Pager aktiviren" -#: mod/admin.php:800 +#: mod/admin.php:943 msgid "" "The old style pager has page numbers but slows down massively the page " "speed." msgstr "Der Old-Style Pager zeigt Seitennummern an, verlangsamt aber auch drastisch das Laden einer Seite." -#: mod/admin.php:801 +#: mod/admin.php:944 msgid "Only search in tags" msgstr "Nur in Tags suchen" -#: mod/admin.php:801 +#: mod/admin.php:944 msgid "On large systems the text search can slow down the system extremely." msgstr "Auf großen Knoten kann die Volltext-Suche das System ausbremsen." -#: mod/admin.php:803 +#: mod/admin.php:946 msgid "New base url" msgstr "Neue Basis-URL" -#: mod/admin.php:803 +#: mod/admin.php:946 msgid "" "Change base url for this server. Sends relocate message to all DFRN contacts" " of all users." msgstr "Ändert die Basis-URL dieses Servers und sendet eine Umzugsmitteilung an alle DFRN Kontakte deiner Nutzer_innen." -#: mod/admin.php:805 +#: mod/admin.php:948 msgid "RINO Encryption" msgstr "RINO Verschlüsselung" -#: mod/admin.php:805 +#: mod/admin.php:948 msgid "Encryption layer between nodes." msgstr "Verschlüsselung zwischen Friendica Instanzen" -#: mod/admin.php:806 +#: mod/admin.php:949 msgid "Embedly API key" msgstr "Embedly API Schlüssel" -#: mod/admin.php:806 +#: mod/admin.php:949 msgid "" "Embedly is used to fetch additional data for " "web pages. This is an optional parameter." msgstr "Embedly wird verwendet um zusätzliche Informationen von Webseiten zu laden. Dies ist ein optionaler Parameter." -#: mod/admin.php:824 +#: mod/admin.php:978 msgid "Update has been marked successful" msgstr "Update wurde als erfolgreich markiert" -#: mod/admin.php:832 +#: mod/admin.php:986 #, php-format msgid "Database structure update %s was successfully applied." msgstr "Das Update %s der Struktur der Datenbank wurde erfolgreich angewandt." -#: mod/admin.php:835 +#: mod/admin.php:989 #, php-format msgid "Executing of database structure update %s failed with error: %s" msgstr "Das Update %s der Struktur der Datenbank schlug mit folgender Fehlermeldung fehl: %s" -#: mod/admin.php:847 +#: mod/admin.php:1001 #, php-format msgid "Executing %s failed with error: %s" msgstr "Die Ausführung von %s schlug fehl. Fehlermeldung: %s" -#: mod/admin.php:850 +#: mod/admin.php:1004 #, php-format msgid "Update %s was successfully applied." msgstr "Update %s war erfolgreich." -#: mod/admin.php:854 +#: mod/admin.php:1008 #, php-format msgid "Update %s did not return a status. Unknown if it succeeded." msgstr "Update %s hat keinen Status zurückgegeben. Unbekannter Status." -#: mod/admin.php:856 +#: mod/admin.php:1010 #, php-format msgid "There was no additional update function %s that needed to be called." msgstr "Es gab keine weitere Update-Funktion, die von %s ausgeführt werden musste." -#: mod/admin.php:875 +#: mod/admin.php:1029 msgid "No failed updates." msgstr "Keine fehlgeschlagenen Updates." -#: mod/admin.php:876 +#: mod/admin.php:1030 msgid "Check database structure" msgstr "Datenbank Struktur überprüfen" -#: mod/admin.php:881 +#: mod/admin.php:1035 msgid "Failed Updates" msgstr "Fehlgeschlagene Updates" -#: mod/admin.php:882 +#: mod/admin.php:1036 msgid "" "This does not include updates prior to 1139, which did not return a status." msgstr "Ohne Updates vor 1139, da diese keinen Status zurückgegeben haben." -#: mod/admin.php:883 +#: mod/admin.php:1037 msgid "Mark success (if update was manually applied)" msgstr "Als erfolgreich markieren (falls das Update manuell installiert wurde)" -#: mod/admin.php:884 +#: mod/admin.php:1038 msgid "Attempt to execute this update step automatically" msgstr "Versuchen, diesen Schritt automatisch auszuführen" -#: mod/admin.php:916 +#: mod/admin.php:1069 #, php-format msgid "" "\n" @@ -2992,7 +2970,7 @@ msgid "" "\t\t\t\tthe administrator of %2$s has set up an account for you." msgstr "\nHallo %1$s,\n\nauf %2$s wurde ein Account für Dich angelegt." -#: mod/admin.php:919 +#: mod/admin.php:1072 #, php-format msgid "" "\n" @@ -3022,233 +3000,238 @@ msgid "" "\t\t\tThank you and welcome to %4$s." msgstr "\nNachfolgend die Anmelde-Details:\n\tAdresse der Seite:\t%1$s\n\tBenutzername:\t%2$s\n\tPasswort:\t%3$s\n\nDu kannst Dein Passwort unter \"Einstellungen\" ändern, sobald Du Dich\nangemeldet hast.\n\nBitte nimm Dir ein paar Minuten um die anderen Einstellungen auf dieser\nSeite zu kontrollieren.\n\nEventuell magst Du ja auch einige Informationen über Dich in Deinem\nProfil veröffentlichen, damit andere Leute Dich einfacher finden können.\nBearbeite hierfür einfach Dein Standard-Profil (über die Profil-Seite).\n\nWir empfehlen Dir, Deinen kompletten Namen anzugeben und ein zu Dir\npassendes Profilbild zu wählen, damit Dich alte Bekannte wieder finden.\nAußerdem ist es nützlich, wenn Du auf Deinem Profil Schlüsselwörter\nangibst. Das erleichtert es, Leute zu finden, die Deine Interessen teilen.\n\nWir respektieren Deine Privatsphäre - keine dieser Angaben ist nötig.\nWenn Du neu im Netzwerk bist und noch niemanden kennst, dann können sie\nallerdings dabei helfen, neue und interessante Kontakte zu knüpfen.\n\nNun viel Spaß, gute Begegnungen und willkommen auf %4$s." -#: mod/admin.php:951 include/user.php:423 +#: mod/admin.php:1104 include/user.php:423 #, php-format msgid "Registration details for %s" msgstr "Details der Registration von %s" -#: mod/admin.php:963 +#: mod/admin.php:1116 #, php-format msgid "%s user blocked/unblocked" msgid_plural "%s users blocked/unblocked" msgstr[0] "%s Benutzer geblockt/freigegeben" msgstr[1] "%s Benutzer geblockt/freigegeben" -#: mod/admin.php:970 +#: mod/admin.php:1123 #, php-format msgid "%s user deleted" msgid_plural "%s users deleted" msgstr[0] "%s Nutzer gelöscht" msgstr[1] "%s Nutzer gelöscht" -#: mod/admin.php:1009 +#: mod/admin.php:1170 #, php-format msgid "User '%s' deleted" msgstr "Nutzer '%s' gelöscht" -#: mod/admin.php:1017 +#: mod/admin.php:1178 #, php-format msgid "User '%s' unblocked" msgstr "Nutzer '%s' entsperrt" -#: mod/admin.php:1017 +#: mod/admin.php:1178 #, php-format msgid "User '%s' blocked" msgstr "Nutzer '%s' gesperrt" -#: mod/admin.php:1110 +#: mod/admin.php:1271 msgid "Add User" msgstr "Nutzer hinzufügen" -#: mod/admin.php:1111 +#: mod/admin.php:1272 msgid "select all" msgstr "Alle auswählen" -#: mod/admin.php:1112 +#: mod/admin.php:1273 msgid "User registrations waiting for confirm" msgstr "Neuanmeldungen, die auf Deine Bestätigung warten" -#: mod/admin.php:1113 +#: mod/admin.php:1274 msgid "User waiting for permanent deletion" msgstr "Nutzer wartet auf permanente Löschung" -#: mod/admin.php:1114 +#: mod/admin.php:1275 msgid "Request date" msgstr "Anfragedatum" -#: mod/admin.php:1114 mod/admin.php:1126 mod/admin.php:1127 mod/admin.php:1142 +#: mod/admin.php:1275 mod/admin.php:1287 mod/admin.php:1288 mod/admin.php:1303 #: include/contact_selectors.php:79 include/contact_selectors.php:86 msgid "Email" msgstr "E-Mail" -#: mod/admin.php:1115 +#: mod/admin.php:1276 msgid "No registrations." msgstr "Keine Neuanmeldungen." -#: mod/admin.php:1117 +#: mod/admin.php:1278 msgid "Deny" msgstr "Verwehren" -#: mod/admin.php:1121 +#: mod/admin.php:1282 msgid "Site admin" msgstr "Seitenadministrator" -#: mod/admin.php:1122 +#: mod/admin.php:1283 msgid "Account expired" msgstr "Account ist abgelaufen" -#: mod/admin.php:1125 +#: mod/admin.php:1286 msgid "New User" msgstr "Neuer Nutzer" -#: mod/admin.php:1126 mod/admin.php:1127 +#: mod/admin.php:1287 mod/admin.php:1288 msgid "Register date" msgstr "Anmeldedatum" -#: mod/admin.php:1126 mod/admin.php:1127 +#: mod/admin.php:1287 mod/admin.php:1288 msgid "Last login" msgstr "Letzte Anmeldung" -#: mod/admin.php:1126 mod/admin.php:1127 +#: mod/admin.php:1287 mod/admin.php:1288 msgid "Last item" msgstr "Letzter Beitrag" -#: mod/admin.php:1126 +#: mod/admin.php:1287 msgid "Deleted since" msgstr "Gelöscht seit" -#: mod/admin.php:1127 mod/settings.php:41 +#: mod/admin.php:1288 mod/settings.php:41 msgid "Account" msgstr "Nutzerkonto" -#: mod/admin.php:1129 +#: mod/admin.php:1290 msgid "" "Selected users will be deleted!\\n\\nEverything these users had posted on " "this site will be permanently deleted!\\n\\nAre you sure?" msgstr "Die markierten Nutzer werden gelöscht!\\n\\nAlle Beiträge, die diese Nutzer auf dieser Seite veröffentlicht haben, werden permanent gelöscht!\\n\\nBist Du sicher?" -#: mod/admin.php:1130 +#: mod/admin.php:1291 msgid "" "The user {0} will be deleted!\\n\\nEverything this user has posted on this " "site will be permanently deleted!\\n\\nAre you sure?" msgstr "Der Nutzer {0} wird gelöscht!\\n\\nAlles was dieser Nutzer auf dieser Seite veröffentlicht hat, wird permanent gelöscht!\\n\\nBist Du sicher?" -#: mod/admin.php:1140 +#: mod/admin.php:1301 msgid "Name of the new user." msgstr "Name des neuen Nutzers" -#: mod/admin.php:1141 +#: mod/admin.php:1302 msgid "Nickname" msgstr "Spitzname" -#: mod/admin.php:1141 +#: mod/admin.php:1302 msgid "Nickname of the new user." msgstr "Spitznamen für den neuen Nutzer" -#: mod/admin.php:1142 +#: mod/admin.php:1303 msgid "Email address of the new user." msgstr "Email Adresse des neuen Nutzers" -#: mod/admin.php:1175 +#: mod/admin.php:1346 #, php-format msgid "Plugin %s disabled." msgstr "Plugin %s deaktiviert." -#: mod/admin.php:1179 +#: mod/admin.php:1350 #, php-format msgid "Plugin %s enabled." msgstr "Plugin %s aktiviert." -#: mod/admin.php:1189 mod/admin.php:1413 +#: mod/admin.php:1360 mod/admin.php:1596 msgid "Disable" msgstr "Ausschalten" -#: mod/admin.php:1191 mod/admin.php:1415 +#: mod/admin.php:1362 mod/admin.php:1598 msgid "Enable" msgstr "Einschalten" -#: mod/admin.php:1214 mod/admin.php:1459 +#: mod/admin.php:1385 mod/admin.php:1643 msgid "Toggle" msgstr "Umschalten" -#: mod/admin.php:1222 mod/admin.php:1469 +#: mod/admin.php:1393 mod/admin.php:1652 msgid "Author: " msgstr "Autor:" -#: mod/admin.php:1223 mod/admin.php:1470 +#: mod/admin.php:1394 mod/admin.php:1653 msgid "Maintainer: " msgstr "Betreuer:" -#: mod/admin.php:1275 -#: view/smarty3/compiled/f835364006028b1061f37be121c9bd9db5fa50a9.file.admin_plugins.tpl.php:42 +#: mod/admin.php:1446 msgid "Reload active plugins" msgstr "Aktive Plugins neu laden" -#: mod/admin.php:1373 +#: mod/admin.php:1451 +#, php-format +msgid "" +"There are currently no plugins available on your node. You can find the " +"official plugin repository at %1$s and might find other interesting plugins " +"in the open plugin registry at %2$s" +msgstr "Es sind derzeit keine Plugins auf diesem Knoten verfügbar. Du findest das offizielle Plugin-Repository unter %1$s und weitere eventuell interessante Plugins im offenen Plugins-Verzeichnis auf %2$s." + +#: mod/admin.php:1556 msgid "No themes found." msgstr "Keine Themen gefunden." -#: mod/admin.php:1451 +#: mod/admin.php:1634 msgid "Screenshot" msgstr "Bildschirmfoto" -#: mod/admin.php:1511 +#: mod/admin.php:1694 msgid "Reload active themes" msgstr "Aktives Theme neu laden" -#: mod/admin.php:1515 +#: mod/admin.php:1699 +#, php-format +msgid "No themes found on the system. They should be paced in %1$s" +msgstr "Es wurden keine Themes auf dem System gefunden. Diese sollten in %1$s patziert werden." + +#: mod/admin.php:1700 msgid "[Experimental]" msgstr "[Experimentell]" -#: mod/admin.php:1516 +#: mod/admin.php:1701 msgid "[Unsupported]" msgstr "[Nicht unterstützt]" -#: mod/admin.php:1543 +#: mod/admin.php:1725 msgid "Log settings updated." msgstr "Protokolleinstellungen aktualisiert." -#: mod/admin.php:1599 +#: mod/admin.php:1762 msgid "Clear" msgstr "löschen" -#: mod/admin.php:1605 +#: mod/admin.php:1767 msgid "Enable Debugging" msgstr "Protokoll führen" -#: mod/admin.php:1606 +#: mod/admin.php:1768 msgid "Log file" msgstr "Protokolldatei" -#: mod/admin.php:1606 +#: mod/admin.php:1768 msgid "" "Must be writable by web server. Relative to your Friendica top-level " "directory." msgstr "Webserver muss Schreibrechte besitzen. Abhängig vom Friendica-Installationsverzeichnis." -#: mod/admin.php:1607 +#: mod/admin.php:1769 msgid "Log level" msgstr "Protokoll-Level" -#: mod/admin.php:1657 include/acl_selectors.php:348 -msgid "Close" -msgstr "Schließen" +#: mod/admin.php:1772 +msgid "PHP logging" +msgstr "PHP Protokollieren" -#: mod/admin.php:1663 -msgid "FTP Host" -msgstr "FTP Host" - -#: mod/admin.php:1664 -msgid "FTP Path" -msgstr "FTP Pfad" - -#: mod/admin.php:1665 -msgid "FTP User" -msgstr "FTP Nutzername" - -#: mod/admin.php:1666 -msgid "FTP Password" -msgstr "FTP Passwort" +#: mod/admin.php:1773 +msgid "" +"To enable logging of PHP errors and warnings you can add the following to " +"the .htconfig.php file of your installation. The filename set in the " +"'error_log' line is relative to the friendica top-level directory and must " +"be writeable by the web server. The option '1' for 'log_errors' and " +"'display_errors' is to enable these options, set to '0' to disable them." +msgstr "Um PHP Warnungen und Fehler zu protokollieren, kannst du die folgenden Zeilen zur .htconfig.php Datei deiner Installation hinzufügen. Den Dateinamen der Log-Datei legst du in der Zeile mit dem 'error_log' fest, Er ist relativ zum Friendica-Stammverzeichnis und muss schreibbar durch den Webserver sein. Eine \"1\" als Option für die Punkte 'log_errors' und 'display_errors' aktiviert die Funktionen zum Protokollieren bzw. Anzeigen der Fehler, eine \"0\" deaktiviert sie." #: mod/network.php:146 #, php-format @@ -3267,51 +3250,51 @@ msgstr "Gespeicherte Suchen" msgid "add" msgstr "hinzufügen" -#: mod/network.php:362 +#: mod/network.php:365 msgid "Commented Order" msgstr "Neueste Kommentare" -#: mod/network.php:365 +#: mod/network.php:368 msgid "Sort by Comment Date" msgstr "Nach Kommentardatum sortieren" -#: mod/network.php:370 +#: mod/network.php:373 msgid "Posted Order" msgstr "Neueste Beiträge" -#: mod/network.php:373 +#: mod/network.php:376 msgid "Sort by Post Date" msgstr "Nach Beitragsdatum sortieren" -#: mod/network.php:384 +#: mod/network.php:387 msgid "Posts that mention or involve you" msgstr "Beiträge, in denen es um Dich geht" -#: mod/network.php:392 +#: mod/network.php:395 msgid "New" msgstr "Neue" -#: mod/network.php:395 +#: mod/network.php:398 msgid "Activity Stream - by date" msgstr "Aktivitäten-Stream - nach Datum" -#: mod/network.php:403 +#: mod/network.php:406 msgid "Shared Links" msgstr "Geteilte Links" -#: mod/network.php:406 +#: mod/network.php:409 msgid "Interesting Links" msgstr "Interessante Links" -#: mod/network.php:414 +#: mod/network.php:417 msgid "Starred" msgstr "Markierte" -#: mod/network.php:417 +#: mod/network.php:420 msgid "Favourite Posts" msgstr "Favorisierte Beiträge" -#: mod/network.php:476 +#: mod/network.php:479 #, php-format msgid "Warning: This group contains %s member from an insecure network." msgid_plural "" @@ -3319,24 +3302,24 @@ msgid_plural "" msgstr[0] "Warnung: Diese Gruppe beinhaltet %s Person aus einem unsicheren Netzwerk." msgstr[1] "Warnung: Diese Gruppe beinhaltet %s Personen aus unsicheren Netzwerken." -#: mod/network.php:479 +#: mod/network.php:482 msgid "Private messages to this group are at risk of public disclosure." msgstr "Private Nachrichten an diese Gruppe könnten an die Öffentlichkeit geraten." -#: mod/network.php:546 mod/content.php:119 +#: mod/network.php:549 mod/content.php:119 msgid "No such group" msgstr "Es gibt keine solche Gruppe" -#: mod/network.php:574 mod/content.php:135 +#: mod/network.php:580 mod/content.php:135 #, php-format msgid "Group: %s" msgstr "Gruppe: %s" -#: mod/network.php:606 +#: mod/network.php:608 msgid "Private messages to this person are at risk of public disclosure." msgstr "Private Nachrichten an diese Person könnten an die Öffentlichkeit gelangen." -#: mod/network.php:611 +#: mod/network.php:613 msgid "Invalid contact." msgstr "Ungültiger Kontakt." @@ -3587,7 +3570,7 @@ msgstr "Veranstaltung teilen" #: mod/events.php:572 mod/content.php:721 mod/editpost.php:145 #: mod/photos.php:1631 mod/photos.php:1679 mod/photos.php:1767 -#: object/Item.php:719 include/conversation.php:1217 +#: object/Item.php:719 include/conversation.php:1216 msgid "Preview" msgstr "Vorschau" @@ -3637,9 +3620,9 @@ msgid_plural "comments" msgstr[0] "Kommentar" msgstr[1] "Kommentare" -#: mod/content.php:608 boot.php:788 object/Item.php:422 +#: mod/content.php:608 boot.php:863 object/Item.php:422 #: include/contact_widgets.php:242 include/forums.php:110 -#: include/items.php:5181 view/theme/vier/theme.php:264 +#: include/items.php:5184 view/theme/vier/theme.php:264 msgid "show more" msgstr "mehr anzeigen" @@ -3677,7 +3660,7 @@ msgid "This is you" msgstr "Das bist Du" #: mod/content.php:711 mod/photos.php:1629 mod/photos.php:1677 -#: mod/photos.php:1765 boot.php:787 object/Item.php:393 object/Item.php:709 +#: mod/photos.php:1765 boot.php:862 object/Item.php:393 object/Item.php:709 msgid "Comment" msgstr "Kommentar" @@ -4109,19 +4092,19 @@ msgid "" "your site allow private mail from unknown senders." msgstr "Wenn Du möchtest, dass %s Dir antworten kann, überprüfe Deine Privatsphären-Einstellungen und erlaube private Nachrichten von unbekannten Absendern." -#: mod/help.php:31 +#: mod/help.php:41 msgid "Help:" msgstr "Hilfe:" -#: mod/help.php:36 include/nav.php:113 view/theme/vier/theme.php:302 +#: mod/help.php:47 include/nav.php:113 view/theme/vier/theme.php:302 msgid "Help" msgstr "Hilfe" -#: mod/help.php:42 mod/p.php:16 mod/p.php:25 index.php:270 +#: mod/help.php:53 mod/p.php:16 mod/p.php:25 index.php:270 msgid "Not Found" msgstr "Nicht gefunden" -#: mod/help.php:45 index.php:273 +#: mod/help.php:56 index.php:273 msgid "Page not found." msgstr "Seite nicht gefunden." @@ -4391,7 +4374,7 @@ msgstr "OStatus Abonnements reparieren" msgid "Built-in support for %s connectivity is %s" msgstr "Eingebaute Unterstützung für Verbindungen zu %s ist %s" -#: mod/settings.php:811 mod/dfrn_request.php:858 +#: mod/settings.php:811 mod/dfrn_request.php:865 #: include/contact_selectors.php:80 msgid "Diaspora" msgstr "Diaspora" @@ -4532,8 +4515,8 @@ msgstr "Automatische Updates nur, wenn Du oben auf der Netzwerkseite bist." #: mod/settings.php:976 view/theme/cleanzero/config.php:82 #: view/theme/dispy/config.php:72 view/theme/quattro/config.php:66 -#: view/theme/diabook/config.php:150 view/theme/clean/config.php:85 -#: view/theme/vier/config.php:109 view/theme/duepuntozero/config.php:61 +#: view/theme/diabook/config.php:150 view/theme/vier/config.php:109 +#: view/theme/duepuntozero/config.php:61 msgid "Theme settings" msgstr "Themeneinstellungen" @@ -4713,7 +4696,7 @@ msgstr "Passwort:" msgid "Basic Settings" msgstr "Grundeinstellungen" -#: mod/settings.php:1210 include/identity.php:587 +#: mod/settings.php:1210 include/identity.php:588 msgid "Full Name:" msgstr "Kompletter Name:" @@ -4881,126 +4864,128 @@ msgstr "Wenn Du Dein Profil von einem anderen Server umgezogen hast und einige D msgid "Resend relocate message to contacts" msgstr "Umzugsbenachrichtigung erneut an Kontakte senden" -#: mod/dfrn_request.php:95 +#: mod/dfrn_request.php:96 msgid "This introduction has already been accepted." msgstr "Diese Kontaktanfrage wurde bereits akzeptiert." -#: mod/dfrn_request.php:120 mod/dfrn_request.php:519 +#: mod/dfrn_request.php:119 mod/dfrn_request.php:516 msgid "Profile location is not valid or does not contain profile information." msgstr "Profiladresse ist ungültig oder stellt keine Profildaten zur Verfügung." -#: mod/dfrn_request.php:125 mod/dfrn_request.php:524 +#: mod/dfrn_request.php:124 mod/dfrn_request.php:521 msgid "Warning: profile location has no identifiable owner name." msgstr "Warnung: Es konnte kein Name des Besitzers von der angegebenen Profiladresse gefunden werden." -#: mod/dfrn_request.php:127 mod/dfrn_request.php:526 +#: mod/dfrn_request.php:126 mod/dfrn_request.php:523 msgid "Warning: profile location has no profile photo." msgstr "Warnung: Es gibt kein Profilbild bei der angegebenen Profiladresse." -#: mod/dfrn_request.php:130 mod/dfrn_request.php:529 +#: mod/dfrn_request.php:129 mod/dfrn_request.php:526 #, php-format msgid "%d required parameter was not found at the given location" msgid_plural "%d required parameters were not found at the given location" msgstr[0] "%d benötigter Parameter wurde an der angegebenen Stelle nicht gefunden" msgstr[1] "%d benötigte Parameter wurden an der angegebenen Stelle nicht gefunden" -#: mod/dfrn_request.php:173 +#: mod/dfrn_request.php:172 msgid "Introduction complete." msgstr "Kontaktanfrage abgeschlossen." -#: mod/dfrn_request.php:215 +#: mod/dfrn_request.php:214 msgid "Unrecoverable protocol error." msgstr "Nicht behebbarer Protokollfehler." -#: mod/dfrn_request.php:243 +#: mod/dfrn_request.php:242 msgid "Profile unavailable." msgstr "Profil nicht verfügbar." -#: mod/dfrn_request.php:268 +#: mod/dfrn_request.php:267 #, php-format msgid "%s has received too many connection requests today." msgstr "%s hat heute zu viele Freundschaftsanfragen erhalten." -#: mod/dfrn_request.php:269 +#: mod/dfrn_request.php:268 msgid "Spam protection measures have been invoked." msgstr "Maßnahmen zum Spamschutz wurden ergriffen." -#: mod/dfrn_request.php:270 +#: mod/dfrn_request.php:269 msgid "Friends are advised to please try again in 24 hours." msgstr "Freunde sind angehalten, es in 24 Stunden erneut zu versuchen." -#: mod/dfrn_request.php:332 +#: mod/dfrn_request.php:331 msgid "Invalid locator" msgstr "Ungültiger Locator" -#: mod/dfrn_request.php:341 +#: mod/dfrn_request.php:340 msgid "Invalid email address." msgstr "Ungültige E-Mail-Adresse." -#: mod/dfrn_request.php:368 +#: mod/dfrn_request.php:367 msgid "This account has not been configured for email. Request failed." msgstr "Dieses Konto ist nicht für E-Mail konfiguriert. Anfrage fehlgeschlagen." -#: mod/dfrn_request.php:464 -msgid "Unable to resolve your name at the provided location." -msgstr "Konnte Deinen Namen an der angegebenen Stelle nicht finden." - -#: mod/dfrn_request.php:477 +#: mod/dfrn_request.php:474 msgid "You have already introduced yourself here." msgstr "Du hast Dich hier bereits vorgestellt." -#: mod/dfrn_request.php:481 +#: mod/dfrn_request.php:478 #, php-format msgid "Apparently you are already friends with %s." msgstr "Es scheint so, als ob Du bereits mit %s befreundet bist." -#: mod/dfrn_request.php:502 +#: mod/dfrn_request.php:499 msgid "Invalid profile URL." msgstr "Ungültige Profil-URL." -#: mod/dfrn_request.php:508 include/follow.php:72 +#: mod/dfrn_request.php:505 include/follow.php:72 msgid "Disallowed profile URL." msgstr "Nicht erlaubte Profil-URL." -#: mod/dfrn_request.php:599 +#: mod/dfrn_request.php:596 msgid "Your introduction has been sent." msgstr "Deine Kontaktanfrage wurde gesendet." -#: mod/dfrn_request.php:652 +#: mod/dfrn_request.php:636 +msgid "" +"Remote subscription can't be done for your network. Please subscribe " +"directly on your system." +msgstr "Entferntes abon­nie­ren kann für dein Netzwerk nicht durchgeführt werden. Bitte nutze direkt die Abonnieren-Funktion deines Systems. " + +#: mod/dfrn_request.php:659 msgid "Please login to confirm introduction." msgstr "Bitte melde Dich an, um die Kontaktanfrage zu bestätigen." -#: mod/dfrn_request.php:662 +#: mod/dfrn_request.php:669 msgid "" "Incorrect identity currently logged in. Please login to " "this profile." msgstr "Momentan bist Du mit einer anderen Identität angemeldet. Bitte melde Dich mit diesem Profil an." -#: mod/dfrn_request.php:676 mod/dfrn_request.php:693 +#: mod/dfrn_request.php:683 mod/dfrn_request.php:700 msgid "Confirm" msgstr "Bestätigen" -#: mod/dfrn_request.php:688 +#: mod/dfrn_request.php:695 msgid "Hide this contact" msgstr "Verberge diesen Kontakt" -#: mod/dfrn_request.php:691 +#: mod/dfrn_request.php:698 #, php-format msgid "Welcome home %s." msgstr "Willkommen zurück %s." -#: mod/dfrn_request.php:692 +#: mod/dfrn_request.php:699 #, php-format msgid "Please confirm your introduction/connection request to %s." msgstr "Bitte bestätige Deine Kontaktanfrage bei %s." -#: mod/dfrn_request.php:821 +#: mod/dfrn_request.php:828 msgid "" "Please enter your 'Identity Address' from one of the following supported " "communications networks:" msgstr "Bitte gib die Adresse Deines Profils in einem der unterstützten sozialen Netzwerke an:" -#: mod/dfrn_request.php:842 +#: mod/dfrn_request.php:849 #, php-format msgid "" "If you are not yet a member of the free social web, ." msgstr "Wenn du noch kein Mitglied dieses freien sozialen Netzwerks bist, folge diesem Link um einen öffentlichen Friendica-Server zu finden und beizutreten." -#: mod/dfrn_request.php:847 +#: mod/dfrn_request.php:854 msgid "Friend/Connection Request" msgstr "Freundschafts-/Kontaktanfrage" -#: mod/dfrn_request.php:848 +#: mod/dfrn_request.php:855 msgid "" "Examples: jojo@demo.friendica.com, http://demo.friendica.com/profile/jojo, " "testuser@identi.ca" msgstr "Beispiele: jojo@demo.friendica.com, http://demo.friendica.com/profile/jojo, testuser@identi.ca" -#: mod/dfrn_request.php:856 include/contact_selectors.php:76 +#: mod/dfrn_request.php:863 include/contact_selectors.php:76 msgid "Friendica" msgstr "Friendica" -#: mod/dfrn_request.php:857 +#: mod/dfrn_request.php:864 msgid "StatusNet/Federated Social Web" msgstr "StatusNet/Federated Social Web" -#: mod/dfrn_request.php:859 +#: mod/dfrn_request.php:866 #, php-format msgid "" " - please do not use this form. Instead, enter %s into your Diaspora search" @@ -5114,7 +5099,7 @@ msgstr "Wähle einen Spitznamen für Dein Profil. Dieser muss mit einem Buchstab msgid "Choose a nickname: " msgstr "Spitznamen wählen: " -#: mod/register.php:280 boot.php:1271 include/nav.php:108 +#: mod/register.php:280 boot.php:1379 include/nav.php:108 msgid "Register" msgstr "Registrieren" @@ -5156,11 +5141,11 @@ msgstr "Beiträge markiert mit: %s" msgid "Search results for: %s" msgstr "Suchergebnisse für: %s" -#: mod/directory.php:149 include/identity.php:309 include/identity.php:609 +#: mod/directory.php:149 include/identity.php:313 include/identity.php:610 msgid "Status:" msgstr "Status:" -#: mod/directory.php:151 include/identity.php:311 include/identity.php:620 +#: mod/directory.php:151 include/identity.php:315 include/identity.php:621 msgid "Homepage:" msgstr "Homepage:" @@ -5488,7 +5473,7 @@ msgstr "Beispiele: cathy123, Cathy Williams, cathy@example.com" msgid "Since [date]:" msgstr "Seit [Datum]:" -#: mod/profiles.php:724 include/identity.php:618 +#: mod/profiles.php:724 include/identity.php:619 msgid "Sexual Preference:" msgstr "Sexuelle Vorlieben:" @@ -5496,11 +5481,11 @@ msgstr "Sexuelle Vorlieben:" msgid "Homepage URL:" msgstr "Adresse der Homepage:" -#: mod/profiles.php:726 include/identity.php:622 +#: mod/profiles.php:726 include/identity.php:623 msgid "Hometown:" msgstr "Heimatort:" -#: mod/profiles.php:727 include/identity.php:626 +#: mod/profiles.php:727 include/identity.php:627 msgid "Political Views:" msgstr "Politische Ansichten:" @@ -5516,11 +5501,11 @@ msgstr "Öffentliche Schlüsselwörter:" msgid "Private Keywords:" msgstr "Private Schlüsselwörter:" -#: mod/profiles.php:731 include/identity.php:634 +#: mod/profiles.php:731 include/identity.php:635 msgid "Likes:" msgstr "Likes:" -#: mod/profiles.php:732 include/identity.php:636 +#: mod/profiles.php:732 include/identity.php:637 msgid "Dislikes:" msgstr "Dislikes:" @@ -5590,23 +5575,23 @@ msgstr "Alter: " msgid "Edit/Manage Profiles" msgstr "Bearbeite/Verwalte Profile" -#: mod/profiles.php:814 include/identity.php:257 include/identity.php:283 +#: mod/profiles.php:814 include/identity.php:260 include/identity.php:286 msgid "Change profile photo" msgstr "Profilbild ändern" -#: mod/profiles.php:815 include/identity.php:258 +#: mod/profiles.php:815 include/identity.php:261 msgid "Create New Profile" msgstr "Neues Profil anlegen" -#: mod/profiles.php:826 include/identity.php:268 +#: mod/profiles.php:826 include/identity.php:271 msgid "Profile Image" msgstr "Profilbild" -#: mod/profiles.php:828 include/identity.php:271 +#: mod/profiles.php:828 include/identity.php:274 msgid "visible to everybody" msgstr "sichtbar für jeden" -#: mod/profiles.php:829 include/identity.php:272 +#: mod/profiles.php:829 include/identity.php:275 msgid "Edit visibility" msgstr "Sichtbarkeit bearbeiten" @@ -5618,55 +5603,55 @@ msgstr "Beitrag nicht gefunden" msgid "Edit post" msgstr "Beitrag bearbeiten" -#: mod/editpost.php:111 include/conversation.php:1185 +#: mod/editpost.php:111 include/conversation.php:1184 msgid "upload photo" msgstr "Bild hochladen" -#: mod/editpost.php:112 include/conversation.php:1186 +#: mod/editpost.php:112 include/conversation.php:1185 msgid "Attach file" msgstr "Datei anhängen" -#: mod/editpost.php:113 include/conversation.php:1187 +#: mod/editpost.php:113 include/conversation.php:1186 msgid "attach file" msgstr "Datei anhängen" -#: mod/editpost.php:115 include/conversation.php:1189 +#: mod/editpost.php:115 include/conversation.php:1188 msgid "web link" msgstr "Weblink" -#: mod/editpost.php:116 include/conversation.php:1190 +#: mod/editpost.php:116 include/conversation.php:1189 msgid "Insert video link" msgstr "Video-Adresse einfügen" -#: mod/editpost.php:117 include/conversation.php:1191 +#: mod/editpost.php:117 include/conversation.php:1190 msgid "video link" msgstr "Video-Link" -#: mod/editpost.php:118 include/conversation.php:1192 +#: mod/editpost.php:118 include/conversation.php:1191 msgid "Insert audio link" msgstr "Audio-Adresse einfügen" -#: mod/editpost.php:119 include/conversation.php:1193 +#: mod/editpost.php:119 include/conversation.php:1192 msgid "audio link" msgstr "Audio-Link" -#: mod/editpost.php:120 include/conversation.php:1194 +#: mod/editpost.php:120 include/conversation.php:1193 msgid "Set your location" msgstr "Deinen Standort festlegen" -#: mod/editpost.php:121 include/conversation.php:1195 +#: mod/editpost.php:121 include/conversation.php:1194 msgid "set location" msgstr "Ort setzen" -#: mod/editpost.php:122 include/conversation.php:1196 +#: mod/editpost.php:122 include/conversation.php:1195 msgid "Clear browser location" msgstr "Browser-Standort leeren" -#: mod/editpost.php:123 include/conversation.php:1197 +#: mod/editpost.php:123 include/conversation.php:1196 msgid "clear location" msgstr "Ort löschen" -#: mod/editpost.php:125 include/conversation.php:1203 +#: mod/editpost.php:125 include/conversation.php:1202 msgid "Permission settings" msgstr "Berechtigungseinstellungen" @@ -5674,15 +5659,15 @@ msgstr "Berechtigungseinstellungen" msgid "CC: email addresses" msgstr "Cc: E-Mail-Addressen" -#: mod/editpost.php:134 include/conversation.php:1212 +#: mod/editpost.php:134 include/conversation.php:1211 msgid "Public post" msgstr "Öffentlicher Beitrag" -#: mod/editpost.php:137 include/conversation.php:1199 +#: mod/editpost.php:137 include/conversation.php:1198 msgid "Set title" msgstr "Titel setzen" -#: mod/editpost.php:139 include/conversation.php:1201 +#: mod/editpost.php:139 include/conversation.php:1200 msgid "Categories (comma-separated list)" msgstr "Kategorien (kommasepariert)" @@ -6080,12 +6065,12 @@ msgstr "Privates Foto" msgid "Public photo" msgstr "Öffentliches Foto" -#: mod/photos.php:1609 include/conversation.php:1183 +#: mod/photos.php:1609 include/conversation.php:1182 msgid "Share" msgstr "Teilen" #: mod/photos.php:1648 include/conversation.php:509 -#: include/conversation.php:1414 +#: include/conversation.php:1413 msgid "Attending" msgid_plural "Attending" msgstr[0] "Teilnehmend" @@ -6159,60 +6144,60 @@ msgstr "Beitrag nicht verfügbar." msgid "Item was not found." msgstr "Beitrag konnte nicht gefunden werden." -#: boot.php:786 +#: boot.php:861 msgid "Delete this item?" msgstr "Diesen Beitrag löschen?" -#: boot.php:789 +#: boot.php:864 msgid "show fewer" msgstr "weniger anzeigen" -#: boot.php:1163 +#: boot.php:1266 #, php-format msgid "Update %s failed. See error logs." msgstr "Update %s fehlgeschlagen. Bitte Fehlerprotokoll überprüfen." -#: boot.php:1270 +#: boot.php:1378 msgid "Create a New Account" msgstr "Neues Konto erstellen" -#: boot.php:1295 include/nav.php:72 +#: boot.php:1403 include/nav.php:72 msgid "Logout" msgstr "Abmelden" -#: boot.php:1298 +#: boot.php:1406 msgid "Nickname or Email address: " msgstr "Spitzname oder E-Mail-Adresse: " -#: boot.php:1299 +#: boot.php:1407 msgid "Password: " msgstr "Passwort: " -#: boot.php:1300 +#: boot.php:1408 msgid "Remember me" msgstr "Anmeldedaten merken" -#: boot.php:1303 +#: boot.php:1411 msgid "Or login using OpenID: " msgstr "Oder melde Dich mit Deiner OpenID an: " -#: boot.php:1309 +#: boot.php:1417 msgid "Forgot your password?" msgstr "Passwort vergessen?" -#: boot.php:1312 +#: boot.php:1420 msgid "Website Terms of Service" msgstr "Website Nutzungsbedingungen" -#: boot.php:1313 +#: boot.php:1421 msgid "terms of service" msgstr "Nutzungsbedingungen" -#: boot.php:1315 +#: boot.php:1423 msgid "Website Privacy Policy" msgstr "Website Datenschutzerklärung" -#: boot.php:1316 +#: boot.php:1424 msgid "privacy policy" msgstr "Datenschutzerklärung" @@ -6273,25 +6258,25 @@ msgid "" "[pre]%s[/pre]" msgstr "Die Fehlermeldung lautet\n[pre]%s[/pre]" -#: include/dbstructure.php:151 +#: include/dbstructure.php:153 msgid "Errors encountered creating database tables." msgstr "Fehler aufgetreten während der Erzeugung der Datenbanktabellen." -#: include/dbstructure.php:209 +#: include/dbstructure.php:230 msgid "Errors encountered performing database changes." msgstr "Es sind Fehler beim Bearbeiten der Datenbank aufgetreten." -#: include/auth.php:38 +#: include/auth.php:44 msgid "Logged out." msgstr "Abgemeldet." -#: include/auth.php:128 include/user.php:75 +#: include/auth.php:134 include/user.php:75 msgid "" "We encountered a problem while logging in with the OpenID you provided. " "Please check the correct spelling of the ID." msgstr "Beim Versuch Dich mit der von Dir angegebenen OpenID anzumelden trat ein Problem auf. Bitte überprüfe, dass Du die OpenID richtig geschrieben hast." -#: include/auth.php:128 include/user.php:75 +#: include/auth.php:134 include/user.php:75 msgid "The error message was:" msgstr "Die Fehlermeldung lautete:" @@ -6713,134 +6698,134 @@ msgstr "Sekunden" msgid "%1$d %2$s ago" msgstr "%1$d %2$s her" -#: include/datetime.php:474 include/items.php:2473 +#: include/datetime.php:474 include/items.php:2477 #, php-format msgid "%s's birthday" msgstr "%ss Geburtstag" -#: include/datetime.php:475 include/items.php:2474 +#: include/datetime.php:475 include/items.php:2478 #, php-format msgid "Happy Birthday %s" msgstr "Herzlichen Glückwunsch %s" -#: include/identity.php:44 +#: include/identity.php:42 msgid "Requested account is not available." msgstr "Das angefragte Profil ist nicht vorhanden." -#: include/identity.php:97 include/identity.php:281 include/identity.php:661 +#: include/identity.php:95 include/identity.php:284 include/identity.php:662 msgid "Edit profile" msgstr "Profil bearbeiten" -#: include/identity.php:241 +#: include/identity.php:244 msgid "Atom feed" msgstr "Atom-Feed" -#: include/identity.php:246 +#: include/identity.php:249 msgid "Message" msgstr "Nachricht" -#: include/identity.php:252 include/nav.php:185 +#: include/identity.php:255 include/nav.php:185 msgid "Profiles" msgstr "Profile" -#: include/identity.php:252 +#: include/identity.php:255 msgid "Manage/edit profiles" msgstr "Profile verwalten/editieren" -#: include/identity.php:421 include/identity.php:507 +#: include/identity.php:425 include/identity.php:509 msgid "g A l F d" msgstr "l, d. F G \\U\\h\\r" -#: include/identity.php:422 include/identity.php:508 +#: include/identity.php:426 include/identity.php:510 msgid "F d" msgstr "d. F" -#: include/identity.php:467 include/identity.php:554 +#: include/identity.php:471 include/identity.php:556 msgid "[today]" msgstr "[heute]" -#: include/identity.php:479 +#: include/identity.php:483 msgid "Birthday Reminders" msgstr "Geburtstagserinnerungen" -#: include/identity.php:480 +#: include/identity.php:484 msgid "Birthdays this week:" msgstr "Geburtstage diese Woche:" -#: include/identity.php:541 +#: include/identity.php:543 msgid "[No description]" msgstr "[keine Beschreibung]" -#: include/identity.php:565 +#: include/identity.php:567 msgid "Event Reminders" msgstr "Veranstaltungserinnerungen" -#: include/identity.php:566 +#: include/identity.php:568 msgid "Events this week:" msgstr "Veranstaltungen diese Woche" -#: include/identity.php:594 +#: include/identity.php:595 msgid "j F, Y" msgstr "j F, Y" -#: include/identity.php:595 +#: include/identity.php:596 msgid "j F" msgstr "j F" -#: include/identity.php:602 +#: include/identity.php:603 msgid "Birthday:" msgstr "Geburtstag:" -#: include/identity.php:606 +#: include/identity.php:607 msgid "Age:" msgstr "Alter:" -#: include/identity.php:615 +#: include/identity.php:616 #, php-format msgid "for %1$d %2$s" msgstr "für %1$d %2$s" -#: include/identity.php:628 +#: include/identity.php:629 msgid "Religion:" msgstr "Religion:" -#: include/identity.php:632 +#: include/identity.php:633 msgid "Hobbies/Interests:" msgstr "Hobbies/Interessen:" -#: include/identity.php:639 +#: include/identity.php:640 msgid "Contact information and Social Networks:" msgstr "Kontaktinformationen und Soziale Netzwerke:" -#: include/identity.php:641 +#: include/identity.php:642 msgid "Musical interests:" msgstr "Musikalische Interessen:" -#: include/identity.php:643 +#: include/identity.php:644 msgid "Books, literature:" msgstr "Literatur/Bücher:" -#: include/identity.php:645 +#: include/identity.php:646 msgid "Television:" msgstr "Fernsehen:" -#: include/identity.php:647 +#: include/identity.php:648 msgid "Film/dance/culture/entertainment:" msgstr "Filme/Tänze/Kultur/Unterhaltung:" -#: include/identity.php:649 +#: include/identity.php:650 msgid "Love/Romance:" msgstr "Liebesleben:" -#: include/identity.php:651 +#: include/identity.php:652 msgid "Work/employment:" msgstr "Arbeit/Beschäftigung:" -#: include/identity.php:653 +#: include/identity.php:654 msgid "School/education:" msgstr "Schule/Ausbildung:" -#: include/identity.php:657 +#: include/identity.php:658 msgid "Forums:" msgstr "Foren:" @@ -6856,6 +6841,38 @@ msgstr "Ereignisse und Kalender" msgid "Only You Can See This" msgstr "Nur Du kannst das sehen" +#: include/like.php:167 include/conversation.php:122 +#: include/conversation.php:258 include/text.php:1991 +#: view/theme/diabook/theme.php:463 +msgid "event" +msgstr "Event" + +#: include/like.php:184 include/conversation.php:141 include/diaspora.php:2163 +#: view/theme/diabook/theme.php:480 +#, php-format +msgid "%1$s likes %2$s's %3$s" +msgstr "%1$s mag %2$ss %3$s" + +#: include/like.php:186 include/conversation.php:144 +#, php-format +msgid "%1$s doesn't like %2$s's %3$s" +msgstr "%1$s mag %2$ss %3$s nicht" + +#: include/like.php:188 +#, php-format +msgid "%1$s is attending %2$s's %3$s" +msgstr "%1$s nimmt an %2$ss %3$s teil." + +#: include/like.php:190 +#, php-format +msgid "%1$s is not attending %2$s's %3$s" +msgstr "%1$s nimmt nicht an %2$ss %3$s teil." + +#: include/like.php:192 +#, php-format +msgid "%1$s may attend %2$s's %3$s" +msgstr "%1$s nimmt eventuell an %2$ss %3$s teil." + #: include/acl_selectors.php:325 msgid "Post to Email" msgstr "An E-Mail senden" @@ -6879,6 +6896,10 @@ msgstr "zeigen" msgid "don't show" msgstr "nicht zeigen" +#: include/acl_selectors.php:348 +msgid "Close" +msgstr "Schließen" + #: include/message.php:15 include/message.php:173 msgid "[no subject]" msgstr "[kein Betreff]" @@ -6887,31 +6908,31 @@ msgstr "[kein Betreff]" msgid "stopped following" msgstr "wird nicht mehr gefolgt" -#: include/Contact.php:350 include/conversation.php:911 +#: include/Contact.php:337 include/conversation.php:911 msgid "View Status" msgstr "Pinnwand anschauen" -#: include/Contact.php:352 include/conversation.php:913 +#: include/Contact.php:339 include/conversation.php:913 msgid "View Photos" msgstr "Bilder anschauen" -#: include/Contact.php:353 include/conversation.php:914 +#: include/Contact.php:340 include/conversation.php:914 msgid "Network Posts" msgstr "Netzwerkbeiträge" -#: include/Contact.php:354 include/conversation.php:915 +#: include/Contact.php:341 include/conversation.php:915 msgid "Edit Contact" msgstr "Kontakt bearbeiten" -#: include/Contact.php:355 +#: include/Contact.php:342 msgid "Drop Contact" msgstr "Kontakt löschen" -#: include/Contact.php:356 include/conversation.php:916 +#: include/Contact.php:343 include/conversation.php:916 msgid "Send PM" msgstr "Private Nachricht senden" -#: include/Contact.php:357 include/conversation.php:920 +#: include/Contact.php:344 include/conversation.php:920 msgid "Poke" msgstr "Anstupsen" @@ -6974,153 +6995,153 @@ msgstr "Lösche die markierten Beiträge" msgid "Follow Thread" msgstr "Folge der Unterhaltung" -#: include/conversation.php:1035 +#: include/conversation.php:1034 #, php-format msgid "%s likes this." msgstr "%s mag das." -#: include/conversation.php:1038 +#: include/conversation.php:1037 #, php-format msgid "%s doesn't like this." msgstr "%s mag das nicht." -#: include/conversation.php:1041 +#: include/conversation.php:1040 #, php-format msgid "%s attends." msgstr "%s nimmt teil." -#: include/conversation.php:1044 +#: include/conversation.php:1043 #, php-format msgid "%s doesn't attend." msgstr "%s nimmt nicht teil." -#: include/conversation.php:1047 +#: include/conversation.php:1046 #, php-format msgid "%s attends maybe." msgstr "%s nimmt eventuell teil." -#: include/conversation.php:1057 +#: include/conversation.php:1056 msgid "and" msgstr "und" -#: include/conversation.php:1063 +#: include/conversation.php:1062 #, php-format msgid ", and %d other people" msgstr " und %d andere" -#: include/conversation.php:1072 +#: include/conversation.php:1071 #, php-format msgid "%2$d people like this" msgstr "%2$d Personen mögen das" -#: include/conversation.php:1073 +#: include/conversation.php:1072 #, php-format msgid "%s like this." msgstr "%s mögen das." -#: include/conversation.php:1076 +#: include/conversation.php:1075 #, php-format msgid "%2$d people don't like this" msgstr "%2$d Personen mögen das nicht" -#: include/conversation.php:1077 +#: include/conversation.php:1076 #, php-format msgid "%s don't like this." msgstr "%s mögen dies nicht." -#: include/conversation.php:1080 +#: include/conversation.php:1079 #, php-format msgid "%2$d people attend" msgstr "%2$d Personen nehmen teil" -#: include/conversation.php:1081 +#: include/conversation.php:1080 #, php-format msgid "%s attend." msgstr "%s nehmen teil." -#: include/conversation.php:1084 +#: include/conversation.php:1083 #, php-format msgid "%2$d people don't attend" msgstr "%2$d Personen nehmen nicht teil" -#: include/conversation.php:1085 +#: include/conversation.php:1084 #, php-format msgid "%s don't attend." msgstr "%s nehmen nicht teil." -#: include/conversation.php:1088 +#: include/conversation.php:1087 #, php-format msgid "%2$d people anttend maybe" msgstr "%2$d Personen nehmen eventuell teil" -#: include/conversation.php:1089 +#: include/conversation.php:1088 #, php-format msgid "%s anttend maybe." msgstr "%s nehmen vielleicht teil." -#: include/conversation.php:1128 include/conversation.php:1146 +#: include/conversation.php:1127 include/conversation.php:1145 msgid "Visible to everybody" msgstr "Für jedermann sichtbar" -#: include/conversation.php:1130 include/conversation.php:1148 +#: include/conversation.php:1129 include/conversation.php:1147 msgid "Please enter a video link/URL:" msgstr "Bitte Link/URL zum Video einfügen:" -#: include/conversation.php:1131 include/conversation.php:1149 +#: include/conversation.php:1130 include/conversation.php:1148 msgid "Please enter an audio link/URL:" msgstr "Bitte Link/URL zum Audio einfügen:" -#: include/conversation.php:1132 include/conversation.php:1150 +#: include/conversation.php:1131 include/conversation.php:1149 msgid "Tag term:" msgstr "Tag:" -#: include/conversation.php:1134 include/conversation.php:1152 +#: include/conversation.php:1133 include/conversation.php:1151 msgid "Where are you right now?" msgstr "Wo hältst Du Dich jetzt gerade auf?" -#: include/conversation.php:1135 +#: include/conversation.php:1134 msgid "Delete item(s)?" msgstr "Einträge löschen?" -#: include/conversation.php:1204 +#: include/conversation.php:1203 msgid "permissions" msgstr "Zugriffsrechte" -#: include/conversation.php:1227 +#: include/conversation.php:1226 msgid "Post to Groups" msgstr "Poste an Gruppe" -#: include/conversation.php:1228 +#: include/conversation.php:1227 msgid "Post to Contacts" msgstr "Poste an Kontakte" -#: include/conversation.php:1229 +#: include/conversation.php:1228 msgid "Private post" msgstr "Privater Beitrag" -#: include/conversation.php:1386 +#: include/conversation.php:1385 msgid "View all" msgstr "Zeige alle" -#: include/conversation.php:1408 +#: include/conversation.php:1407 msgid "Like" msgid_plural "Likes" msgstr[0] "mag ich" msgstr[1] "Mag ich" -#: include/conversation.php:1411 +#: include/conversation.php:1410 msgid "Dislike" msgid_plural "Dislikes" msgstr[0] "mag ich nicht" msgstr[1] "Mag ich nicht" -#: include/conversation.php:1417 +#: include/conversation.php:1416 msgid "Not Attending" msgid_plural "Not Attending" msgstr[0] "Nicht teilnehmend " msgstr[1] "Nicht teilnehmend" -#: include/conversation.php:1420 include/profile_selectors.php:6 +#: include/conversation.php:1419 include/profile_selectors.php:6 msgid "Undecided" msgid_plural "Undecided" msgstr[0] "Unentschieden" @@ -7350,38 +7371,30 @@ msgstr "Beitrag" msgid "Item filed" msgstr "Beitrag abgelegt" -#: include/bbcode.php:483 include/bbcode.php:1143 include/bbcode.php:1144 +#: include/bbcode.php:482 include/bbcode.php:1157 include/bbcode.php:1158 msgid "Image/photo" msgstr "Bild/Foto" -#: include/bbcode.php:581 +#: include/bbcode.php:595 #, php-format msgid "%2$s %3$s" msgstr "%2$s %3$s" -#: include/bbcode.php:615 +#: include/bbcode.php:629 #, php-format msgid "" "%s wrote the following post" msgstr "%s schrieb den folgenden Beitrag" -#: include/bbcode.php:1103 include/bbcode.php:1123 +#: include/bbcode.php:1117 include/bbcode.php:1137 msgid "$1 wrote:" msgstr "$1 hat geschrieben:" -#: include/bbcode.php:1152 include/bbcode.php:1153 +#: include/bbcode.php:1166 include/bbcode.php:1167 msgid "Encrypted content" msgstr "Verschlüsselter Inhalt" -#: include/notifier.php:843 include/delivery.php:459 -msgid "(no subject)" -msgstr "(kein Betreff)" - -#: include/notifier.php:853 include/delivery.php:470 include/enotify.php:37 -msgid "noreply" -msgstr "noreply" - #: include/dba_pdo.php:72 include/dba.php:55 #, php-format msgid "Cannot locate DNS info for database server '%s'" @@ -7427,6 +7440,10 @@ msgstr "OStatus" msgid "RSS/Atom" msgstr "RSS/Atom" +#: include/contact_selectors.php:81 +msgid "Facebook" +msgstr "Facebook" + #: include/contact_selectors.php:82 msgid "Zot!" msgstr "Zott" @@ -7471,7 +7488,7 @@ msgstr "App.net" msgid "Redmatrix" msgstr "Redmatrix" -#: include/Scrape.php:610 +#: include/Scrape.php:624 msgid " on Last.fm" msgstr " bei Last.fm" @@ -7647,46 +7664,21 @@ msgstr "Navigation" msgid "Site map" msgstr "Sitemap" -#: include/api.php:345 include/api.php:356 include/api.php:465 -#: include/api.php:1184 include/api.php:1186 -msgid "User not found." -msgstr "Nutzer nicht gefunden." - -#: include/api.php:832 +#: include/api.php:878 #, php-format msgid "Daily posting limit of %d posts reached. The post was rejected." msgstr "Das tägliche Nachrichtenlimit von %d Nachrichten wurde erreicht. Die Nachtricht wurde verworfen." -#: include/api.php:851 +#: include/api.php:897 #, php-format msgid "Weekly posting limit of %d posts reached. The post was rejected." msgstr "Das wöchentliche Nachrichtenlimit von %d Nachrichten wurde erreicht. Die Nachtricht wurde verworfen." -#: include/api.php:870 +#: include/api.php:916 #, php-format msgid "Monthly posting limit of %d posts reached. The post was rejected." msgstr "Das monatliche Nachrichtenlimit von %d Nachrichten wurde erreicht. Die Nachtricht wurde verworfen." -#: include/api.php:1393 -msgid "There is no status with this id." -msgstr "Es gibt keinen Status mit dieser ID." - -#: include/api.php:1467 -msgid "There is no conversation with this id." -msgstr "Es existiert keine Unterhaltung mit dieser ID." - -#: include/api.php:1746 -msgid "Invalid item." -msgstr "Ungültiges Objekt" - -#: include/api.php:1756 -msgid "Invalid action. " -msgstr "Ungültige Aktion" - -#: include/api.php:1764 -msgid "DB error" -msgstr "DB Error" - #: include/user.php:48 msgid "An invitation is required." msgstr "Du benötigst eine Einladung." @@ -7749,8 +7741,7 @@ msgstr "FATALER FEHLER: Sicherheitsschlüssel konnten nicht erzeugt werden." msgid "An error occurred during registration. Please try again." msgstr "Während der Anmeldung ist ein Fehler aufgetreten. Bitte versuche es noch einmal." -#: include/user.php:256 view/theme/clean/config.php:56 -#: view/theme/duepuntozero/config.php:44 +#: include/user.php:256 view/theme/duepuntozero/config.php:44 msgid "default" msgstr "Standard" @@ -7805,15 +7796,23 @@ msgstr "\nDie Anmelde-Details sind die folgenden:\n\tAdresse der Seite:\t%3$s\n\ msgid "Sharing notification from Diaspora network" msgstr "Freigabe-Benachrichtigung von Diaspora" -#: include/diaspora.php:2607 +#: include/diaspora.php:2604 msgid "Attachments:" msgstr "Anhänge:" -#: include/items.php:4900 +#: include/delivery.php:533 +msgid "(no subject)" +msgstr "(kein Betreff)" + +#: include/delivery.php:544 include/enotify.php:37 +msgid "noreply" +msgstr "noreply" + +#: include/items.php:4903 msgid "Do you really want to delete this item?" msgstr "Möchtest Du wirklich dieses Item löschen?" -#: include/items.php:5175 +#: include/items.php:5178 msgid "Archives" msgstr "Archiv" @@ -8329,11 +8328,11 @@ msgstr "Kompletter Name:\t%1$s\\nURL der Seite:\t%2$s\\nLogin Name:\t%3$s (%4$s) msgid "Please visit %s to approve or reject the request." msgstr "Bitte besuche %s um die Anfrage zu bearbeiten." -#: include/oembed.php:220 +#: include/oembed.php:214 msgid "Embedded content" msgstr "Eingebetteter Inhalt" -#: include/oembed.php:229 +#: include/oembed.php:223 msgid "Embedding disabled" msgstr "Einbettungen deaktiviert" @@ -8391,7 +8390,6 @@ msgid "Set theme width" msgstr "Theme Breite festlegen" #: view/theme/cleanzero/config.php:86 view/theme/quattro/config.php:68 -#: view/theme/clean/config.php:88 msgid "Color scheme" msgstr "Farbschema" @@ -8513,56 +8511,6 @@ msgstr "Zoomfaktor der Earth Layer" msgid "Show/hide boxes at right-hand column:" msgstr "Rahmen auf der rechten Seite anzeigen/verbergen" -#: view/theme/clean/config.php:57 -msgid "Midnight" -msgstr "Mitternacht" - -#: view/theme/clean/config.php:58 -msgid "Zenburn" -msgstr "Zenburn" - -#: view/theme/clean/config.php:59 -msgid "Bootstrap" -msgstr "Bootstrap" - -#: view/theme/clean/config.php:60 -msgid "Shades of Pink" -msgstr "Shades of Pink" - -#: view/theme/clean/config.php:61 -msgid "Lime and Orange" -msgstr "Lime and Orange" - -#: view/theme/clean/config.php:62 -msgid "GeoCities Retro" -msgstr "GeoCities Retro" - -#: view/theme/clean/config.php:86 -msgid "Background Image" -msgstr "Hintergrundbild" - -#: view/theme/clean/config.php:86 -msgid "" -"The URL to a picture (e.g. from your photo album) that should be used as " -"background image." -msgstr "Die URL eines Bildes (z.B. aus deinem Fotoalbum), das als Hintergrundbild verwendet werden soll." - -#: view/theme/clean/config.php:87 -msgid "Background Color" -msgstr "Hintergrundfarbe" - -#: view/theme/clean/config.php:87 -msgid "HEX value for the background color. Don't include the #" -msgstr "HEX Wert der Hintergrundfarbe. Gib die # nicht mit an." - -#: view/theme/clean/config.php:89 -msgid "font size" -msgstr "Schriftgröße" - -#: view/theme/clean/config.php:89 -msgid "base font size for your interface" -msgstr "Basis-Schriftgröße für dein Interface." - #: view/theme/vier/config.php:64 msgid "Comma separated list of helper forums" msgstr "Komma-Separierte Liste der Helfer-Foren" diff --git a/view/de/strings.php b/view/de/strings.php index 2a9a4afb8d..ca06284c41 100644 --- a/view/de/strings.php +++ b/view/de/strings.php @@ -142,9 +142,6 @@ $a->strings["Edit your default profile to your liking. Review t $a->strings["Profile Keywords"] = "Profil Schlüsselbegriffe"; $a->strings["Set some public keywords for your default profile which describe your interests. We may be able to find other people with similar interests and suggest friendships."] = "Trage ein paar öffentliche Stichwörter in Dein Standardprofil ein, die Deine Interessen beschreiben. Eventuell sind wir in der Lage Leute zu finden, die Deine Interessen teilen und können Dir dann Kontakte vorschlagen."; $a->strings["Connecting"] = "Verbindungen knüpfen"; -$a->strings["Facebook"] = "Facebook"; -$a->strings["Authorise the Facebook Connector if you currently have a Facebook account and we will (optionally) import all your Facebook friends and conversations."] = "Richte die Verbindung zu Facebook ein, wenn Du im Augenblick ein Facebook-Konto hast und (optional) Deine Facebook-Freunde und -Unterhaltungen importieren willst."; -$a->strings["If this is your own personal server, installing the Facebook addon may ease your transition to the free social web."] = "Wenn dies Dein privater Server ist, könnte die Installation des Facebook Connectors Deinen Umzug ins freie soziale Netz angenehmer gestalten."; $a->strings["Importing Emails"] = "Emails Importieren"; $a->strings["Enter your email access information on your Connector Settings page if you wish to import and interact with friends or mailing lists from your email INBOX"] = "Gib Deine E-Mail-Zugangsinformationen auf der Connector-Einstellungsseite ein, falls Du E-Mails aus Deinem Posteingang importieren und mit Freunden und Mailinglisten interagieren willst."; $a->strings["Go to Your Contacts Page"] = "Gehe zu deiner Kontakt-Seite"; @@ -290,12 +287,6 @@ $a->strings["Forgot your Password?"] = "Hast Du Dein Passwort vergessen?"; $a->strings["Enter your email address and submit to have your password reset. Then check your email for further instructions."] = "Gib Deine E-Mail-Adresse an und fordere ein neues Passwort an. Es werden Dir dann weitere Informationen per Mail zugesendet."; $a->strings["Nickname or Email: "] = "Spitzname oder E-Mail:"; $a->strings["Reset"] = "Zurücksetzen"; -$a->strings["event"] = "Event"; -$a->strings["%1\$s likes %2\$s's %3\$s"] = "%1\$s mag %2\$ss %3\$s"; -$a->strings["%1\$s doesn't like %2\$s's %3\$s"] = "%1\$s mag %2\$ss %3\$s nicht"; -$a->strings["%1\$s is attending %2\$s's %3\$s"] = "%1\$s nimmt an %2\$ss %3\$s teil."; -$a->strings["%1\$s is not attending %2\$s's %3\$s"] = "%1\$s nimmt nicht an %2\$ss %3\$s teil."; -$a->strings["%1\$s may attend %2\$s's %3\$s"] = "%1\$s nimmt eventuell an %2\$ss %3\$s teil."; $a->strings["{0} wants to be your friend"] = "{0} möchte mit Dir in Kontakt treten"; $a->strings["{0} sent you a message"] = "{0} schickte Dir eine Nachricht"; $a->strings["{0} requested registration"] = "{0} möchte sich registrieren"; @@ -427,14 +418,19 @@ $a->strings["Plugins"] = "Plugins"; $a->strings["Themes"] = "Themen"; $a->strings["DB updates"] = "DB Updates"; $a->strings["Inspect Queue"] = "Warteschlange Inspizieren"; +$a->strings["Federation Statistics"] = "Federation Statistik"; $a->strings["Logs"] = "Protokolle"; +$a->strings["View Logs"] = "Protokolle anzeigen"; $a->strings["probe address"] = "Adresse untersuchen"; $a->strings["check webfinger"] = "Webfinger überprüfen"; $a->strings["Admin"] = "Administration"; $a->strings["Plugin Features"] = "Plugin Features"; $a->strings["diagnostics"] = "Diagnose"; $a->strings["User registrations waiting for confirmation"] = "Nutzeranmeldungen die auf Bestätigung warten"; +$a->strings["This page offers you some numbers to the known part of the federated social network your Friendica node is part of. These numbers are not complete but only reflect the part of the network your node is aware of."] = "Diese Seite präsentiert einige Zahlen zu dem bekannten Teil des föderalen sozialen Netzwerks, von dem deine Friendica Installation ein Teil ist. Diese Zahlen sind nicht absolut und reflektieren nur den Teil des Netzwerks, den dein Knoten kennt."; +$a->strings["The Auto Discovered Contact Directory feature is not enabled, it will improve the data displayed here."] = "Die Funktion um Automatisch ein Kontaktverzeichnis erstellen ist nicht aktiv. Es wird die hier angezeigten Daten verbessern."; $a->strings["Administration"] = "Administration"; +$a->strings["Currently this node is aware of nodes from the following platforms:"] = "Momentan kennt dieser Knoten andere Knoten der folgenden Plattformen:"; $a->strings["ID"] = "ID"; $a->strings["Recipient Name"] = "Empfänger Name"; $a->strings["Recipient Profile"] = "Empfänger Profil"; @@ -686,9 +682,11 @@ $a->strings["Toggle"] = "Umschalten"; $a->strings["Author: "] = "Autor:"; $a->strings["Maintainer: "] = "Betreuer:"; $a->strings["Reload active plugins"] = "Aktive Plugins neu laden"; +$a->strings["There are currently no plugins available on your node. You can find the official plugin repository at %1\$s and might find other interesting plugins in the open plugin registry at %2\$s"] = "Es sind derzeit keine Plugins auf diesem Knoten verfügbar. Du findest das offizielle Plugin-Repository unter %1\$s und weitere eventuell interessante Plugins im offenen Plugins-Verzeichnis auf %2\$s."; $a->strings["No themes found."] = "Keine Themen gefunden."; $a->strings["Screenshot"] = "Bildschirmfoto"; $a->strings["Reload active themes"] = "Aktives Theme neu laden"; +$a->strings["No themes found on the system. They should be paced in %1\$s"] = "Es wurden keine Themes auf dem System gefunden. Diese sollten in %1\$s patziert werden."; $a->strings["[Experimental]"] = "[Experimentell]"; $a->strings["[Unsupported]"] = "[Nicht unterstützt]"; $a->strings["Log settings updated."] = "Protokolleinstellungen aktualisiert."; @@ -697,11 +695,8 @@ $a->strings["Enable Debugging"] = "Protokoll führen"; $a->strings["Log file"] = "Protokolldatei"; $a->strings["Must be writable by web server. Relative to your Friendica top-level directory."] = "Webserver muss Schreibrechte besitzen. Abhängig vom Friendica-Installationsverzeichnis."; $a->strings["Log level"] = "Protokoll-Level"; -$a->strings["Close"] = "Schließen"; -$a->strings["FTP Host"] = "FTP Host"; -$a->strings["FTP Path"] = "FTP Pfad"; -$a->strings["FTP User"] = "FTP Nutzername"; -$a->strings["FTP Password"] = "FTP Passwort"; +$a->strings["PHP logging"] = "PHP Protokollieren"; +$a->strings["To enable logging of PHP errors and warnings you can add the following to the .htconfig.php file of your installation. The filename set in the 'error_log' line is relative to the friendica top-level directory and must be writeable by the web server. The option '1' for 'log_errors' and 'display_errors' is to enable these options, set to '0' to disable them."] = "Um PHP Warnungen und Fehler zu protokollieren, kannst du die folgenden Zeilen zur .htconfig.php Datei deiner Installation hinzufügen. Den Dateinamen der Log-Datei legst du in der Zeile mit dem 'error_log' fest, Er ist relativ zum Friendica-Stammverzeichnis und muss schreibbar durch den Webserver sein. Eine \"1\" als Option für die Punkte 'log_errors' und 'display_errors' aktiviert die Funktionen zum Protokollieren bzw. Anzeigen der Fehler, eine \"0\" deaktiviert sie."; $a->strings["Search Results For: %s"] = "Suchergebnisse für: %s"; $a->strings["Remove term"] = "Begriff entfernen"; $a->strings["Saved Searches"] = "Gespeicherte Suchen"; @@ -1108,12 +1103,12 @@ $a->strings["Friends are advised to please try again in 24 hours."] = "Freunde s $a->strings["Invalid locator"] = "Ungültiger Locator"; $a->strings["Invalid email address."] = "Ungültige E-Mail-Adresse."; $a->strings["This account has not been configured for email. Request failed."] = "Dieses Konto ist nicht für E-Mail konfiguriert. Anfrage fehlgeschlagen."; -$a->strings["Unable to resolve your name at the provided location."] = "Konnte Deinen Namen an der angegebenen Stelle nicht finden."; $a->strings["You have already introduced yourself here."] = "Du hast Dich hier bereits vorgestellt."; $a->strings["Apparently you are already friends with %s."] = "Es scheint so, als ob Du bereits mit %s befreundet bist."; $a->strings["Invalid profile URL."] = "Ungültige Profil-URL."; $a->strings["Disallowed profile URL."] = "Nicht erlaubte Profil-URL."; $a->strings["Your introduction has been sent."] = "Deine Kontaktanfrage wurde gesendet."; +$a->strings["Remote subscription can't be done for your network. Please subscribe directly on your system."] = "Entferntes abon­nie­ren kann für dein Netzwerk nicht durchgeführt werden. Bitte nutze direkt die Abonnieren-Funktion deines Systems. "; $a->strings["Please login to confirm introduction."] = "Bitte melde Dich an, um die Kontaktanfrage zu bestätigen."; $a->strings["Incorrect identity currently logged in. Please login to this profile."] = "Momentan bist Du mit einer anderen Identität angemeldet. Bitte melde Dich mit diesem Profil an."; $a->strings["Confirm"] = "Bestätigen"; @@ -1565,11 +1560,18 @@ $a->strings["Forums:"] = "Foren:"; $a->strings["Videos"] = "Videos"; $a->strings["Events and Calendar"] = "Ereignisse und Kalender"; $a->strings["Only You Can See This"] = "Nur Du kannst das sehen"; +$a->strings["event"] = "Event"; +$a->strings["%1\$s likes %2\$s's %3\$s"] = "%1\$s mag %2\$ss %3\$s"; +$a->strings["%1\$s doesn't like %2\$s's %3\$s"] = "%1\$s mag %2\$ss %3\$s nicht"; +$a->strings["%1\$s is attending %2\$s's %3\$s"] = "%1\$s nimmt an %2\$ss %3\$s teil."; +$a->strings["%1\$s is not attending %2\$s's %3\$s"] = "%1\$s nimmt nicht an %2\$ss %3\$s teil."; +$a->strings["%1\$s may attend %2\$s's %3\$s"] = "%1\$s nimmt eventuell an %2\$ss %3\$s teil."; $a->strings["Post to Email"] = "An E-Mail senden"; $a->strings["Connectors disabled, since \"%s\" is enabled."] = "Konnektoren sind nicht verfügbar, da \"%s\" aktiv ist."; $a->strings["Visible to everybody"] = "Für jeden sichtbar"; $a->strings["show"] = "zeigen"; $a->strings["don't show"] = "nicht zeigen"; +$a->strings["Close"] = "Schließen"; $a->strings["[no subject]"] = "[kein Betreff]"; $a->strings["stopped following"] = "wird nicht mehr gefolgt"; $a->strings["View Status"] = "Pinnwand anschauen"; @@ -1699,8 +1701,6 @@ $a->strings["%2\$s %3\$s"] = "strings["%s wrote the following post"] = "%s schrieb den folgenden Beitrag"; $a->strings["$1 wrote:"] = "$1 hat geschrieben:"; $a->strings["Encrypted content"] = "Verschlüsselter Inhalt"; -$a->strings["(no subject)"] = "(kein Betreff)"; -$a->strings["noreply"] = "noreply"; $a->strings["Cannot locate DNS info for database server '%s'"] = "Kann die DNS Informationen für den Datenbankserver '%s' nicht ermitteln."; $a->strings["Unknown | Not categorised"] = "Unbekannt | Nicht kategorisiert"; $a->strings["Block immediately"] = "Sofort blockieren"; @@ -1712,6 +1712,7 @@ $a->strings["Weekly"] = "Wöchentlich"; $a->strings["Monthly"] = "Monatlich"; $a->strings["OStatus"] = "OStatus"; $a->strings["RSS/Atom"] = "RSS/Atom"; +$a->strings["Facebook"] = "Facebook"; $a->strings["Zot!"] = "Zott"; $a->strings["LinkedIn"] = "LinkedIn"; $a->strings["XMPP/IM"] = "XMPP/Chat"; @@ -1767,15 +1768,9 @@ $a->strings["Manage/edit friends and contacts"] = "Freunde und Kontakte verwalte $a->strings["Site setup and configuration"] = "Einstellungen der Seite und Konfiguration"; $a->strings["Navigation"] = "Navigation"; $a->strings["Site map"] = "Sitemap"; -$a->strings["User not found."] = "Nutzer nicht gefunden."; $a->strings["Daily posting limit of %d posts reached. The post was rejected."] = "Das tägliche Nachrichtenlimit von %d Nachrichten wurde erreicht. Die Nachtricht wurde verworfen."; $a->strings["Weekly posting limit of %d posts reached. The post was rejected."] = "Das wöchentliche Nachrichtenlimit von %d Nachrichten wurde erreicht. Die Nachtricht wurde verworfen."; $a->strings["Monthly posting limit of %d posts reached. The post was rejected."] = "Das monatliche Nachrichtenlimit von %d Nachrichten wurde erreicht. Die Nachtricht wurde verworfen."; -$a->strings["There is no status with this id."] = "Es gibt keinen Status mit dieser ID."; -$a->strings["There is no conversation with this id."] = "Es existiert keine Unterhaltung mit dieser ID."; -$a->strings["Invalid item."] = "Ungültiges Objekt"; -$a->strings["Invalid action. "] = "Ungültige Aktion"; -$a->strings["DB error"] = "DB Error"; $a->strings["An invitation is required."] = "Du benötigst eine Einladung."; $a->strings["Invitation could not be verified."] = "Die Einladung konnte nicht überprüft werden."; $a->strings["Invalid OpenID url"] = "Ungültige OpenID URL"; @@ -1798,6 +1793,8 @@ $a->strings["\n\t\tDear %1\$s,\n\t\t\tThank you for registering at %2\$s. Your a $a->strings["\n\t\tThe login details are as follows:\n\t\t\tSite Location:\t%3\$s\n\t\t\tLogin Name:\t%1\$s\n\t\t\tPassword:\t%5\$s\n\n\t\tYou may change your password from your account \"Settings\" page after logging\n\t\tin.\n\n\t\tPlease take a few moments to review the other account settings on that page.\n\n\t\tYou may also wish to add some basic information to your default profile\n\t\t(on the \"Profiles\" page) so that other people can easily find you.\n\n\t\tWe recommend setting your full name, adding a profile photo,\n\t\tadding some profile \"keywords\" (very useful in making new friends) - and\n\t\tperhaps what country you live in; if you do not wish to be more specific\n\t\tthan that.\n\n\t\tWe fully respect your right to privacy, and none of these items are necessary.\n\t\tIf you are new and do not know anybody here, they may help\n\t\tyou to make some new and interesting friends.\n\n\n\t\tThank you and welcome to %2\$s."] = "\nDie Anmelde-Details sind die folgenden:\n\tAdresse der Seite:\t%3\$s\n\tBenutzernamename:\t%1\$s\n\tPasswort:\t%5\$s\n\nDu kannst Dein Passwort unter \"Einstellungen\" ändern, sobald Du Dich\nangemeldet hast.\n\nBitte nimm Dir ein paar Minuten um die anderen Einstellungen auf dieser\nSeite zu kontrollieren.\n\nEventuell magst Du ja auch einige Informationen über Dich in Deinem\nProfil veröffentlichen, damit andere Leute Dich einfacher finden können.\nBearbeite hierfür einfach Dein Standard-Profil (über die Profil-Seite).\n\nWir empfehlen Dir, Deinen kompletten Namen anzugeben und ein zu Dir\npassendes Profilbild zu wählen, damit Dich alte Bekannte wieder finden.\nAußerdem ist es nützlich, wenn Du auf Deinem Profil Schlüsselwörter\nangibst. Das erleichtert es, Leute zu finden, die Deine Interessen teilen.\n\nWir respektieren Deine Privatsphäre - keine dieser Angaben ist nötig.\nWenn Du neu im Netzwerk bist und noch niemanden kennst, dann können sie\nallerdings dabei helfen, neue und interessante Kontakte zu knüpfen.\n\nDanke für Deine Aufmerksamkeit und willkommen auf %2\$s."; $a->strings["Sharing notification from Diaspora network"] = "Freigabe-Benachrichtigung von Diaspora"; $a->strings["Attachments:"] = "Anhänge:"; +$a->strings["(no subject)"] = "(kein Betreff)"; +$a->strings["noreply"] = "noreply"; $a->strings["Do you really want to delete this item?"] = "Möchtest Du wirklich dieses Item löschen?"; $a->strings["Archives"] = "Archiv"; $a->strings["Male"] = "Männlich"; @@ -1958,18 +1955,6 @@ $a->strings["Your personal photos"] = "Deine privaten Fotos"; $a->strings["Local Directory"] = "Lokales Verzeichnis"; $a->strings["Set zoomfactor for Earth Layers"] = "Zoomfaktor der Earth Layer"; $a->strings["Show/hide boxes at right-hand column:"] = "Rahmen auf der rechten Seite anzeigen/verbergen"; -$a->strings["Midnight"] = "Mitternacht"; -$a->strings["Zenburn"] = "Zenburn"; -$a->strings["Bootstrap"] = "Bootstrap"; -$a->strings["Shades of Pink"] = "Shades of Pink"; -$a->strings["Lime and Orange"] = "Lime and Orange"; -$a->strings["GeoCities Retro"] = "GeoCities Retro"; -$a->strings["Background Image"] = "Hintergrundbild"; -$a->strings["The URL to a picture (e.g. from your photo album) that should be used as background image."] = "Die URL eines Bildes (z.B. aus deinem Fotoalbum), das als Hintergrundbild verwendet werden soll."; -$a->strings["Background Color"] = "Hintergrundfarbe"; -$a->strings["HEX value for the background color. Don't include the #"] = "HEX Wert der Hintergrundfarbe. Gib die # nicht mit an."; -$a->strings["font size"] = "Schriftgröße"; -$a->strings["base font size for your interface"] = "Basis-Schriftgröße für dein Interface."; $a->strings["Comma separated list of helper forums"] = "Komma-Separierte Liste der Helfer-Foren"; $a->strings["Set style"] = "Stil auswählen"; $a->strings["Quick Start"] = "Schnell-Start"; From c243087b89a09a4ef84f31bebe00ae1bed04419d Mon Sep 17 00:00:00 2001 From: Tobias Diekershoff Date: Mon, 18 Jan 2016 13:04:25 +0100 Subject: [PATCH 073/242] readd plugin features to admin aside --- mod/admin.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/mod/admin.php b/mod/admin.php index 95ab2b0c5a..70ef5f7511 100644 --- a/mod/admin.php +++ b/mod/admin.php @@ -160,7 +160,7 @@ function admin_content(&$a) { $aside_tools['plugins_admin']=array(); foreach ($r as $h){ $plugin =$h['name']; - $aside['plugins_admin'][] = array($a->get_baseurl(true)."/admin/plugins/".$plugin, $plugin, "plugin"); + $aside_tools['plugins_admin'][] = array($a->get_baseurl(true)."/admin/plugins/".$plugin, $plugin, "plugin"); // temp plugins with admin $a->plugins_admin[] = $plugin; } From c6f0333026ef2657488379c2d92e4ebb048dcf6b Mon Sep 17 00:00:00 2001 From: Tobias Diekershoff Date: Mon, 18 Jan 2016 13:22:07 +0100 Subject: [PATCH 074/242] moved some CSS stuff from the template to global.css --- view/global.css | 18 ++++++++++++++++++ view/templates/admin_federation.tpl | 12 +++++------- 2 files changed, 23 insertions(+), 7 deletions(-) diff --git a/view/global.css b/view/global.css index ce69e2e27d..8646bf8e44 100644 --- a/view/global.css +++ b/view/global.css @@ -280,6 +280,18 @@ a { font-weight: bold; color: #00a700; } +.federation-graph { + width: 400px; + height: 400px; + float: right; + margin: 20px; +} +.federation-network-graph { + width: 240px; + height: 240px; + float: left; + margin: 20px; +} ul.federation-stats, ul.credits { list-style: none; @@ -289,6 +301,12 @@ ul.credits li { float: left; width: 240px; } +table#federation-stats { + width: 100%; +} +td.federation-data { + border-bottom: 1px solid #000; +} .contact-entry-photo img { max-width: 80px; diff --git a/view/templates/admin_federation.tpl b/view/templates/admin_federation.tpl index b1c56cd075..fb75157585 100644 --- a/view/templates/admin_federation.tpl +++ b/view/templates/admin_federation.tpl @@ -1,5 +1,5 @@ - +

    {{$title}} - {{$page}}

    {{$intro}}

    @@ -30,7 +30,7 @@ var myDoughnutChart = new Chart(ctx).Doughnut(FedData, document.getElementById('FederationLegend').innerHTML = myDoughnutChart.generateLegend(); - +
    {{foreach $counts as $c}} {{if $c[0]['total'] > 0}} @@ -39,9 +39,8 @@ document.getElementById('FederationLegend').innerHTML = myDoughnutChart.generate -'; - return $o; -}} + while($d <= $l) { + if(($dow == $f) && (! $started)) + $started = true; + $today = (((isset($tddate)) && ($tddate == $d)) ? "class=\"today\" " : ''); + $o .= "'; + $dow ++; + if(($dow == 7) && ($d <= $l)) { + $dow = 0; + $o .= ''; + } + } + if($dow) + for($a = $dow; $a < 7; $a ++) + $o .= ''; + + $o .= '
    {{$c[0]['network']}}
    - + +
      {{foreach $c[1] as $v}} From 5ec2c7e96520fade7b5e157e1105079011d68d42 Mon Sep 17 00:00:00 2001 From: Michael Vogel Date: Mon, 18 Jan 2016 15:38:38 +0100 Subject: [PATCH 075/242] When a server isn't reachable there were timeout problems with fetching image data --- include/Photo.php | 18 +++++++++++------- include/network.php | 3 +++ mod/parse_url.php | 7 ++++--- 3 files changed, 18 insertions(+), 10 deletions(-) diff --git a/include/Photo.php b/include/Photo.php index 30424747da..5fdd682e74 100644 --- a/include/Photo.php +++ b/include/Photo.php @@ -792,15 +792,19 @@ function get_photo_info($url) { $filesize = strlen($img_str); - $tempfile = tempnam(get_temppath(), "cache"); + if (function_exists("getimagesizefromstring")) + $data = getimagesizefromstring($img_str); + else { + $tempfile = tempnam(get_temppath(), "cache"); - $a = get_app(); - $stamp1 = microtime(true); - file_put_contents($tempfile, $img_str); - $a->save_timestamp($stamp1, "file"); + $a = get_app(); + $stamp1 = microtime(true); + file_put_contents($tempfile, $img_str); + $a->save_timestamp($stamp1, "file"); - $data = getimagesize($tempfile); - unlink($tempfile); + $data = getimagesize($tempfile); + unlink($tempfile); + } if ($data) $data["size"] = $filesize; diff --git a/include/network.php b/include/network.php index ac5191b259..611f00632f 100644 --- a/include/network.php +++ b/include/network.php @@ -1246,6 +1246,9 @@ function original_url($url, $depth=1, $fetchbody = false) { $a->save_timestamp($stamp1, "network"); + if ($http_code == 0) + return($url); + if ((($curl_info['http_code'] == "301") OR ($curl_info['http_code'] == "302")) AND (($curl_info['redirect_url'] != "") OR ($curl_info['location'] != ""))) { if ($curl_info['redirect_url'] != "") diff --git a/mod/parse_url.php b/mod/parse_url.php index 28869b4c12..2eff09d252 100644 --- a/mod/parse_url.php +++ b/mod/parse_url.php @@ -71,6 +71,7 @@ function parseurl_getsiteinfo_cached($url, $no_guessing = false, $do_oembed = tr function parseurl_getsiteinfo($url, $no_guessing = false, $do_oembed = true, $count = 1) { require_once("include/network.php"); + require_once("include/Photo.php"); $a = get_app(); @@ -321,7 +322,7 @@ function parseurl_getsiteinfo($url, $no_guessing = false, $do_oembed = true, $co $attr[$attribute->name] = $attribute->value; $src = completeurl($attr["src"], $url); - $photodata = @getimagesize($src); + $photodata = get_photo_info($src); if (($photodata) && ($photodata[0] > 150) and ($photodata[1] > 150)) { if ($photodata[0] > 300) { @@ -338,12 +339,12 @@ function parseurl_getsiteinfo($url, $no_guessing = false, $do_oembed = true, $co } } - } else { + } elseif ($siteinfo["image"] != "") { $src = completeurl($siteinfo["image"], $url); unset($siteinfo["image"]); - $photodata = @getimagesize($src); + $photodata = get_photo_info($src); if (($photodata) && ($photodata[0] > 10) and ($photodata[1] > 10)) $siteinfo["images"][] = array("src"=>$src, From 9b4f8b58c1c08ba2f1b49d3fb3e8243da3f6da09 Mon Sep 17 00:00:00 2001 From: Tobias Diekershoff Date: Mon, 18 Jan 2016 18:52:17 +0100 Subject: [PATCH 076/242] regenerated messages.po --- util/messages.po | 1110 +++++++++++++++++++++++----------------------- 1 file changed, 560 insertions(+), 550 deletions(-) diff --git a/util/messages.po b/util/messages.po index 074055683c..bb2c041e1b 100644 --- a/util/messages.po +++ b/util/messages.po @@ -8,7 +8,7 @@ msgid "" msgstr "" "Project-Id-Version: \n" "Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2016-01-16 16:21+0100\n" +"POT-Creation-Date: 2016-01-18 18:49+0100\n" "PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n" "Last-Translator: FULL NAME \n" "Language-Team: LANGUAGE \n" @@ -64,7 +64,7 @@ msgstr "" #: mod/allfriends.php:12 mod/events.php:165 mod/wallmessage.php:9 #: mod/wallmessage.php:33 mod/wallmessage.php:79 mod/wallmessage.php:103 #: mod/wall_attach.php:67 mod/wall_attach.php:70 mod/settings.php:20 -#: mod/settings.php:116 mod/settings.php:637 mod/register.php:42 +#: mod/settings.php:126 mod/settings.php:646 mod/register.php:42 #: mod/delegate.php:12 mod/common.php:18 mod/mood.php:114 mod/suggest.php:58 #: mod/profiles.php:165 mod/profiles.php:615 mod/editpost.php:10 mod/api.php:26 #: mod/api.php:31 mod/notes.php:22 mod/poke.php:149 mod/repair_ostatus.php:9 @@ -103,11 +103,11 @@ msgid "Do you really want to delete this contact?" msgstr "" #: mod/contacts.php:456 mod/follow.php:110 mod/message.php:216 -#: mod/settings.php:1094 mod/settings.php:1100 mod/settings.php:1108 -#: mod/settings.php:1112 mod/settings.php:1117 mod/settings.php:1123 -#: mod/settings.php:1129 mod/settings.php:1135 mod/settings.php:1161 -#: mod/settings.php:1162 mod/settings.php:1163 mod/settings.php:1164 -#: mod/settings.php:1165 mod/dfrn_request.php:857 mod/register.php:238 +#: mod/settings.php:1103 mod/settings.php:1109 mod/settings.php:1117 +#: mod/settings.php:1121 mod/settings.php:1126 mod/settings.php:1132 +#: mod/settings.php:1138 mod/settings.php:1144 mod/settings.php:1170 +#: mod/settings.php:1171 mod/settings.php:1172 mod/settings.php:1173 +#: mod/settings.php:1174 mod/dfrn_request.php:857 mod/register.php:238 #: mod/suggest.php:29 mod/profiles.php:658 mod/profiles.php:661 #: mod/profiles.php:687 mod/api.php:105 include/items.php:4905 msgid "Yes" @@ -115,7 +115,7 @@ msgstr "" #: mod/contacts.php:459 mod/tagrm.php:11 mod/tagrm.php:94 mod/follow.php:121 #: mod/videos.php:131 mod/message.php:219 mod/fbrowser.php:93 -#: mod/fbrowser.php:128 mod/settings.php:651 mod/settings.php:677 +#: mod/fbrowser.php:128 mod/settings.php:660 mod/settings.php:686 #: mod/dfrn_request.php:871 mod/suggest.php:32 mod/editpost.php:148 #: mod/photos.php:247 mod/photos.php:336 include/conversation.php:1220 #: include/items.php:4908 @@ -145,7 +145,7 @@ msgstr "" msgid "Private communications are not available for this contact." msgstr "" -#: mod/contacts.php:544 mod/admin.php:790 +#: mod/contacts.php:544 mod/admin.php:811 msgid "Never" msgstr "" @@ -174,7 +174,7 @@ msgstr "" msgid "Fetch further information for feeds" msgstr "" -#: mod/contacts.php:571 mod/admin.php:799 +#: mod/contacts.php:571 mod/admin.php:820 msgid "Disabled" msgstr "" @@ -265,12 +265,12 @@ msgid "Connect/Follow" msgstr "" #: mod/contacts.php:615 mod/contacts.php:806 mod/contacts.php:865 -#: mod/admin.php:1281 +#: mod/admin.php:1301 msgid "Unblock" msgstr "" #: mod/contacts.php:615 mod/contacts.php:806 mod/contacts.php:865 -#: mod/admin.php:1280 +#: mod/admin.php:1300 msgid "Block" msgstr "" @@ -416,7 +416,7 @@ msgstr "" msgid "Find" msgstr "" -#: mod/contacts.php:805 mod/settings.php:146 mod/settings.php:676 +#: mod/contacts.php:805 mod/settings.php:156 mod/settings.php:685 msgid "Update" msgstr "" @@ -428,8 +428,8 @@ msgstr "" msgid "Unarchive" msgstr "" -#: mod/contacts.php:809 mod/group.php:171 mod/admin.php:1279 -#: mod/content.php:440 mod/content.php:743 mod/settings.php:713 +#: mod/contacts.php:809 mod/group.php:171 mod/admin.php:1299 +#: mod/content.php:440 mod/content.php:743 mod/settings.php:722 #: mod/photos.php:1723 object/Item.php:134 include/conversation.php:635 msgid "Delete" msgstr "" @@ -547,7 +547,7 @@ msgid "All Contacts (with secure profile access)" msgstr "" #: mod/display.php:82 mod/display.php:291 mod/display.php:508 -#: mod/viewsrc.php:15 mod/admin.php:211 mod/admin.php:1334 mod/admin.php:1567 +#: mod/viewsrc.php:15 mod/admin.php:225 mod/admin.php:1354 mod/admin.php:1588 #: mod/notice.php:15 include/items.php:4864 msgid "Item not found." msgstr "" @@ -597,8 +597,8 @@ msgid "" "join." msgstr "" -#: mod/newmember.php:22 mod/admin.php:1386 mod/admin.php:1644 -#: mod/settings.php:99 include/nav.php:182 view/theme/diabook/theme.php:544 +#: mod/newmember.php:22 mod/admin.php:1407 mod/admin.php:1665 +#: mod/settings.php:109 include/nav.php:182 view/theme/diabook/theme.php:544 #: view/theme/diabook/theme.php:648 msgid "Settings" msgstr "" @@ -953,11 +953,11 @@ msgstr "" msgid "Does %s know you?" msgstr "" -#: mod/follow.php:110 mod/settings.php:1094 mod/settings.php:1100 -#: mod/settings.php:1108 mod/settings.php:1112 mod/settings.php:1117 -#: mod/settings.php:1123 mod/settings.php:1129 mod/settings.php:1135 -#: mod/settings.php:1161 mod/settings.php:1162 mod/settings.php:1163 -#: mod/settings.php:1164 mod/settings.php:1165 mod/dfrn_request.php:857 +#: mod/follow.php:110 mod/settings.php:1103 mod/settings.php:1109 +#: mod/settings.php:1117 mod/settings.php:1121 mod/settings.php:1126 +#: mod/settings.php:1132 mod/settings.php:1138 mod/settings.php:1144 +#: mod/settings.php:1170 mod/settings.php:1171 mod/settings.php:1172 +#: mod/settings.php:1173 mod/settings.php:1174 mod/dfrn_request.php:857 #: mod/register.php:239 mod/profiles.php:658 mod/profiles.php:662 #: mod/profiles.php:687 mod/api.php:106 msgid "No" @@ -984,8 +984,8 @@ msgid "Empty post discarded." msgstr "" #: mod/item.php:467 mod/wall_upload.php:213 mod/wall_upload.php:227 -#: mod/wall_upload.php:234 include/Photo.php:954 include/Photo.php:969 -#: include/Photo.php:976 include/Photo.php:998 include/message.php:145 +#: mod/wall_upload.php:234 include/Photo.php:958 include/Photo.php:973 +#: include/Photo.php:980 include/Photo.php:1002 include/message.php:145 msgid "Wall Photos" msgstr "" @@ -1392,7 +1392,7 @@ msgstr "" msgid "System" msgstr "" -#: mod/notifications.php:87 mod/admin.php:361 include/nav.php:154 +#: mod/notifications.php:87 mod/admin.php:379 include/nav.php:154 msgid "Network" msgstr "" @@ -1438,7 +1438,7 @@ msgstr "" msgid "if applicable" msgstr "" -#: mod/notifications.php:176 mod/notifications.php:257 mod/admin.php:1277 +#: mod/notifications.php:176 mod/notifications.php:257 mod/admin.php:1297 msgid "Approve" msgstr "" @@ -1795,8 +1795,8 @@ msgstr "" msgid "Refetch contact data" msgstr "" -#: mod/crepair.php:170 mod/admin.php:1275 mod/admin.php:1287 mod/admin.php:1288 -#: mod/admin.php:1301 mod/settings.php:652 mod/settings.php:678 +#: mod/crepair.php:170 mod/admin.php:1295 mod/admin.php:1307 mod/admin.php:1308 +#: mod/admin.php:1321 mod/settings.php:661 mod/settings.php:687 msgid "Name" msgstr "" @@ -1898,801 +1898,806 @@ msgstr "" msgid "Contacts who are not members of a group" msgstr "" -#: mod/admin.php:88 +#: mod/admin.php:92 msgid "Theme settings updated." msgstr "" -#: mod/admin.php:137 mod/admin.php:856 +#: mod/admin.php:147 mod/admin.php:877 msgid "Site" msgstr "" -#: mod/admin.php:138 mod/admin.php:800 mod/admin.php:1270 mod/admin.php:1285 +#: mod/admin.php:148 mod/admin.php:821 mod/admin.php:1290 mod/admin.php:1305 msgid "Users" msgstr "" -#: mod/admin.php:139 mod/admin.php:1384 mod/admin.php:1444 mod/settings.php:66 +#: mod/admin.php:149 mod/admin.php:1405 mod/admin.php:1465 mod/settings.php:72 msgid "Plugins" msgstr "" -#: mod/admin.php:140 mod/admin.php:1642 mod/admin.php:1692 +#: mod/admin.php:150 mod/admin.php:1663 mod/admin.php:1713 msgid "Themes" msgstr "" -#: mod/admin.php:141 +#: mod/admin.php:151 mod/settings.php:50 +msgid "Additional features" +msgstr "" + +#: mod/admin.php:152 msgid "DB updates" msgstr "" -#: mod/admin.php:142 mod/admin.php:356 +#: mod/admin.php:153 mod/admin.php:374 msgid "Inspect Queue" msgstr "" -#: mod/admin.php:143 mod/admin.php:326 +#: mod/admin.php:154 mod/admin.php:343 msgid "Federation Statistics" msgstr "" -#: mod/admin.php:157 mod/admin.php:168 mod/admin.php:1760 +#: mod/admin.php:168 mod/admin.php:179 mod/admin.php:1781 msgid "Logs" msgstr "" -#: mod/admin.php:158 mod/admin.php:1828 +#: mod/admin.php:169 mod/admin.php:1848 msgid "View Logs" msgstr "" -#: mod/admin.php:159 +#: mod/admin.php:170 msgid "probe address" msgstr "" -#: mod/admin.php:160 +#: mod/admin.php:171 msgid "check webfinger" msgstr "" -#: mod/admin.php:166 include/nav.php:194 +#: mod/admin.php:177 include/nav.php:194 msgid "Admin" msgstr "" -#: mod/admin.php:167 +#: mod/admin.php:178 msgid "Plugin Features" msgstr "" -#: mod/admin.php:169 +#: mod/admin.php:180 msgid "diagnostics" msgstr "" -#: mod/admin.php:170 +#: mod/admin.php:181 msgid "User registrations waiting for confirmation" msgstr "" -#: mod/admin.php:320 +#: mod/admin.php:336 msgid "" "This page offers you some numbers to the known part of the federated social " "network your Friendica node is part of. These numbers are not complete but " "only reflect the part of the network your node is aware of." msgstr "" -#: mod/admin.php:321 +#: mod/admin.php:337 msgid "" "The Auto Discovered Contact Directory feature is not enabled, it " "will improve the data displayed here." msgstr "" -#: mod/admin.php:325 mod/admin.php:355 mod/admin.php:411 mod/admin.php:855 -#: mod/admin.php:1269 mod/admin.php:1383 mod/admin.php:1443 mod/admin.php:1641 -#: mod/admin.php:1691 mod/admin.php:1759 mod/admin.php:1827 +#: mod/admin.php:342 mod/admin.php:373 mod/admin.php:430 mod/admin.php:876 +#: mod/admin.php:1289 mod/admin.php:1404 mod/admin.php:1464 mod/admin.php:1662 +#: mod/admin.php:1712 mod/admin.php:1780 mod/admin.php:1847 msgid "Administration" msgstr "" -#: mod/admin.php:332 +#: mod/admin.php:349 msgid "Currently this node is aware of nodes from the following platforms:" msgstr "" -#: mod/admin.php:358 +#: mod/admin.php:376 msgid "ID" msgstr "" -#: mod/admin.php:359 +#: mod/admin.php:377 msgid "Recipient Name" msgstr "" -#: mod/admin.php:360 +#: mod/admin.php:378 msgid "Recipient Profile" msgstr "" -#: mod/admin.php:362 +#: mod/admin.php:380 msgid "Created" msgstr "" -#: mod/admin.php:363 +#: mod/admin.php:381 msgid "Last Tried" msgstr "" -#: mod/admin.php:364 +#: mod/admin.php:382 msgid "" "This page lists the content of the queue for outgoing postings. These are " "postings the initial delivery failed for. They will be resend later and " "eventually deleted if the delivery fails permanently." msgstr "" -#: mod/admin.php:382 mod/admin.php:1223 +#: mod/admin.php:401 mod/admin.php:1243 msgid "Normal Account" msgstr "" -#: mod/admin.php:383 mod/admin.php:1224 +#: mod/admin.php:402 mod/admin.php:1244 msgid "Soapbox Account" msgstr "" -#: mod/admin.php:384 mod/admin.php:1225 +#: mod/admin.php:403 mod/admin.php:1245 msgid "Community/Celebrity Account" msgstr "" -#: mod/admin.php:385 mod/admin.php:1226 +#: mod/admin.php:404 mod/admin.php:1246 msgid "Automatic Friend Account" msgstr "" -#: mod/admin.php:386 +#: mod/admin.php:405 msgid "Blog Account" msgstr "" -#: mod/admin.php:387 +#: mod/admin.php:406 msgid "Private Forum" msgstr "" -#: mod/admin.php:406 +#: mod/admin.php:425 msgid "Message queues" msgstr "" -#: mod/admin.php:412 +#: mod/admin.php:431 msgid "Summary" msgstr "" -#: mod/admin.php:414 +#: mod/admin.php:433 msgid "Registered users" msgstr "" -#: mod/admin.php:416 +#: mod/admin.php:435 msgid "Pending registrations" msgstr "" -#: mod/admin.php:417 +#: mod/admin.php:436 msgid "Version" msgstr "" -#: mod/admin.php:422 +#: mod/admin.php:441 msgid "Active plugins" msgstr "" -#: mod/admin.php:445 +#: mod/admin.php:464 msgid "Can not parse base url. Must have at least ://" msgstr "" -#: mod/admin.php:728 +#: mod/admin.php:749 msgid "RINO2 needs mcrypt php extension to work." msgstr "" -#: mod/admin.php:736 +#: mod/admin.php:757 msgid "Site settings updated." msgstr "" -#: mod/admin.php:764 mod/settings.php:903 +#: mod/admin.php:785 mod/settings.php:912 msgid "No special theme for mobile devices" msgstr "" -#: mod/admin.php:783 +#: mod/admin.php:804 msgid "No community page" msgstr "" -#: mod/admin.php:784 +#: mod/admin.php:805 msgid "Public postings from users of this site" msgstr "" -#: mod/admin.php:785 +#: mod/admin.php:806 msgid "Global community page" msgstr "" -#: mod/admin.php:791 +#: mod/admin.php:812 msgid "At post arrival" msgstr "" -#: mod/admin.php:792 include/contact_selectors.php:56 +#: mod/admin.php:813 include/contact_selectors.php:56 msgid "Frequently" msgstr "" -#: mod/admin.php:793 include/contact_selectors.php:57 +#: mod/admin.php:814 include/contact_selectors.php:57 msgid "Hourly" msgstr "" -#: mod/admin.php:794 include/contact_selectors.php:58 +#: mod/admin.php:815 include/contact_selectors.php:58 msgid "Twice daily" msgstr "" -#: mod/admin.php:795 include/contact_selectors.php:59 +#: mod/admin.php:816 include/contact_selectors.php:59 msgid "Daily" msgstr "" -#: mod/admin.php:801 +#: mod/admin.php:822 msgid "Users, Global Contacts" msgstr "" -#: mod/admin.php:802 +#: mod/admin.php:823 msgid "Users, Global Contacts/fallback" msgstr "" -#: mod/admin.php:806 +#: mod/admin.php:827 msgid "One month" msgstr "" -#: mod/admin.php:807 +#: mod/admin.php:828 msgid "Three months" msgstr "" -#: mod/admin.php:808 +#: mod/admin.php:829 msgid "Half a year" msgstr "" -#: mod/admin.php:809 +#: mod/admin.php:830 msgid "One year" msgstr "" -#: mod/admin.php:814 +#: mod/admin.php:835 msgid "Multi user instance" msgstr "" -#: mod/admin.php:837 +#: mod/admin.php:858 msgid "Closed" msgstr "" -#: mod/admin.php:838 +#: mod/admin.php:859 msgid "Requires approval" msgstr "" -#: mod/admin.php:839 +#: mod/admin.php:860 msgid "Open" msgstr "" -#: mod/admin.php:843 +#: mod/admin.php:864 msgid "No SSL policy, links will track page SSL state" msgstr "" -#: mod/admin.php:844 +#: mod/admin.php:865 msgid "Force all links to use SSL" msgstr "" -#: mod/admin.php:845 +#: mod/admin.php:866 msgid "Self-signed certificate, use SSL for local links only (discouraged)" msgstr "" -#: mod/admin.php:857 mod/admin.php:1445 mod/admin.php:1693 mod/admin.php:1761 -#: mod/settings.php:650 mod/settings.php:760 mod/settings.php:804 -#: mod/settings.php:873 mod/settings.php:960 mod/settings.php:1195 +#: mod/admin.php:878 mod/admin.php:1466 mod/admin.php:1714 mod/admin.php:1782 +#: mod/admin.php:1931 mod/settings.php:659 mod/settings.php:769 +#: mod/settings.php:813 mod/settings.php:882 mod/settings.php:969 +#: mod/settings.php:1204 msgid "Save Settings" msgstr "" -#: mod/admin.php:858 mod/register.php:263 +#: mod/admin.php:879 mod/register.php:263 msgid "Registration" msgstr "" -#: mod/admin.php:859 +#: mod/admin.php:880 msgid "File upload" msgstr "" -#: mod/admin.php:860 +#: mod/admin.php:881 msgid "Policies" msgstr "" -#: mod/admin.php:861 +#: mod/admin.php:882 msgid "Advanced" msgstr "" -#: mod/admin.php:862 +#: mod/admin.php:883 msgid "Auto Discovered Contact Directory" msgstr "" -#: mod/admin.php:863 +#: mod/admin.php:884 msgid "Performance" msgstr "" -#: mod/admin.php:864 +#: mod/admin.php:885 msgid "" "Relocate - WARNING: advanced function. Could make this server unreachable." msgstr "" -#: mod/admin.php:867 +#: mod/admin.php:888 msgid "Site name" msgstr "" -#: mod/admin.php:868 +#: mod/admin.php:889 msgid "Host name" msgstr "" -#: mod/admin.php:869 +#: mod/admin.php:890 msgid "Sender Email" msgstr "" -#: mod/admin.php:869 +#: mod/admin.php:890 msgid "" "The email address your server shall use to send notification emails from." msgstr "" -#: mod/admin.php:870 +#: mod/admin.php:891 msgid "Banner/Logo" msgstr "" -#: mod/admin.php:871 +#: mod/admin.php:892 msgid "Shortcut icon" msgstr "" -#: mod/admin.php:871 +#: mod/admin.php:892 msgid "Link to an icon that will be used for browsers." msgstr "" -#: mod/admin.php:872 +#: mod/admin.php:893 msgid "Touch icon" msgstr "" -#: mod/admin.php:872 +#: mod/admin.php:893 msgid "Link to an icon that will be used for tablets and mobiles." msgstr "" -#: mod/admin.php:873 +#: mod/admin.php:894 msgid "Additional Info" msgstr "" -#: mod/admin.php:873 +#: mod/admin.php:894 #, php-format msgid "" "For public servers: you can add additional information here that will be " "listed at %s/siteinfo." msgstr "" -#: mod/admin.php:874 +#: mod/admin.php:895 msgid "System language" msgstr "" -#: mod/admin.php:875 +#: mod/admin.php:896 msgid "System theme" msgstr "" -#: mod/admin.php:875 +#: mod/admin.php:896 msgid "" "Default system theme - may be over-ridden by user profiles - change theme settings" msgstr "" -#: mod/admin.php:876 +#: mod/admin.php:897 msgid "Mobile system theme" msgstr "" -#: mod/admin.php:876 +#: mod/admin.php:897 msgid "Theme for mobile devices" msgstr "" -#: mod/admin.php:877 +#: mod/admin.php:898 msgid "SSL link policy" msgstr "" -#: mod/admin.php:877 +#: mod/admin.php:898 msgid "Determines whether generated links should be forced to use SSL" msgstr "" -#: mod/admin.php:878 +#: mod/admin.php:899 msgid "Force SSL" msgstr "" -#: mod/admin.php:878 +#: mod/admin.php:899 msgid "" "Force all Non-SSL requests to SSL - Attention: on some systems it could lead " "to endless loops." msgstr "" -#: mod/admin.php:879 +#: mod/admin.php:900 msgid "Old style 'Share'" msgstr "" -#: mod/admin.php:879 +#: mod/admin.php:900 msgid "Deactivates the bbcode element 'share' for repeating items." msgstr "" -#: mod/admin.php:880 +#: mod/admin.php:901 msgid "Hide help entry from navigation menu" msgstr "" -#: mod/admin.php:880 +#: mod/admin.php:901 msgid "" "Hides the menu entry for the Help pages from the navigation menu. You can " "still access it calling /help directly." msgstr "" -#: mod/admin.php:881 +#: mod/admin.php:902 msgid "Single user instance" msgstr "" -#: mod/admin.php:881 +#: mod/admin.php:902 msgid "Make this instance multi-user or single-user for the named user" msgstr "" -#: mod/admin.php:882 +#: mod/admin.php:903 msgid "Maximum image size" msgstr "" -#: mod/admin.php:882 +#: mod/admin.php:903 msgid "" "Maximum size in bytes of uploaded images. Default is 0, which means no " "limits." msgstr "" -#: mod/admin.php:883 +#: mod/admin.php:904 msgid "Maximum image length" msgstr "" -#: mod/admin.php:883 +#: mod/admin.php:904 msgid "" "Maximum length in pixels of the longest side of uploaded images. Default is " "-1, which means no limits." msgstr "" -#: mod/admin.php:884 +#: mod/admin.php:905 msgid "JPEG image quality" msgstr "" -#: mod/admin.php:884 +#: mod/admin.php:905 msgid "" "Uploaded JPEGS will be saved at this quality setting [0-100]. Default is " "100, which is full quality." msgstr "" -#: mod/admin.php:886 +#: mod/admin.php:907 msgid "Register policy" msgstr "" -#: mod/admin.php:887 +#: mod/admin.php:908 msgid "Maximum Daily Registrations" msgstr "" -#: mod/admin.php:887 +#: mod/admin.php:908 msgid "" "If registration is permitted above, this sets the maximum number of new user " "registrations to accept per day. If register is set to closed, this setting " "has no effect." msgstr "" -#: mod/admin.php:888 +#: mod/admin.php:909 msgid "Register text" msgstr "" -#: mod/admin.php:888 +#: mod/admin.php:909 msgid "Will be displayed prominently on the registration page." msgstr "" -#: mod/admin.php:889 +#: mod/admin.php:910 msgid "Accounts abandoned after x days" msgstr "" -#: mod/admin.php:889 +#: mod/admin.php:910 msgid "" "Will not waste system resources polling external sites for abandonded " "accounts. Enter 0 for no time limit." msgstr "" -#: mod/admin.php:890 +#: mod/admin.php:911 msgid "Allowed friend domains" msgstr "" -#: mod/admin.php:890 +#: mod/admin.php:911 msgid "" "Comma separated list of domains which are allowed to establish friendships " "with this site. Wildcards are accepted. Empty to allow any domains" msgstr "" -#: mod/admin.php:891 +#: mod/admin.php:912 msgid "Allowed email domains" msgstr "" -#: mod/admin.php:891 +#: mod/admin.php:912 msgid "" "Comma separated list of domains which are allowed in email addresses for " "registrations to this site. Wildcards are accepted. Empty to allow any " "domains" msgstr "" -#: mod/admin.php:892 +#: mod/admin.php:913 msgid "Block public" msgstr "" -#: mod/admin.php:892 +#: mod/admin.php:913 msgid "" "Check to block public access to all otherwise public personal pages on this " "site unless you are currently logged in." msgstr "" -#: mod/admin.php:893 +#: mod/admin.php:914 msgid "Force publish" msgstr "" -#: mod/admin.php:893 +#: mod/admin.php:914 msgid "" "Check to force all profiles on this site to be listed in the site directory." msgstr "" -#: mod/admin.php:894 +#: mod/admin.php:915 msgid "Global directory URL" msgstr "" -#: mod/admin.php:894 +#: mod/admin.php:915 msgid "" "URL to the global directory. If this is not set, the global directory is " "completely unavailable to the application." msgstr "" -#: mod/admin.php:895 +#: mod/admin.php:916 msgid "Allow threaded items" msgstr "" -#: mod/admin.php:895 +#: mod/admin.php:916 msgid "Allow infinite level threading for items on this site." msgstr "" -#: mod/admin.php:896 +#: mod/admin.php:917 msgid "Private posts by default for new users" msgstr "" -#: mod/admin.php:896 +#: mod/admin.php:917 msgid "" "Set default post permissions for all new members to the default privacy " "group rather than public." msgstr "" -#: mod/admin.php:897 +#: mod/admin.php:918 msgid "Don't include post content in email notifications" msgstr "" -#: mod/admin.php:897 +#: mod/admin.php:918 msgid "" "Don't include the content of a post/comment/private message/etc. in the " "email notifications that are sent out from this site, as a privacy measure." msgstr "" -#: mod/admin.php:898 +#: mod/admin.php:919 msgid "Disallow public access to addons listed in the apps menu." msgstr "" -#: mod/admin.php:898 +#: mod/admin.php:919 msgid "" "Checking this box will restrict addons listed in the apps menu to members " "only." msgstr "" -#: mod/admin.php:899 +#: mod/admin.php:920 msgid "Don't embed private images in posts" msgstr "" -#: mod/admin.php:899 +#: mod/admin.php:920 msgid "" "Don't replace locally-hosted private photos in posts with an embedded copy " "of the image. This means that contacts who receive posts containing private " "photos will have to authenticate and load each image, which may take a while." msgstr "" -#: mod/admin.php:900 +#: mod/admin.php:921 msgid "Allow Users to set remote_self" msgstr "" -#: mod/admin.php:900 +#: mod/admin.php:921 msgid "" "With checking this, every user is allowed to mark every contact as a " "remote_self in the repair contact dialog. Setting this flag on a contact " "causes mirroring every posting of that contact in the users stream." msgstr "" -#: mod/admin.php:901 +#: mod/admin.php:922 msgid "Block multiple registrations" msgstr "" -#: mod/admin.php:901 +#: mod/admin.php:922 msgid "Disallow users to register additional accounts for use as pages." msgstr "" -#: mod/admin.php:902 +#: mod/admin.php:923 msgid "OpenID support" msgstr "" -#: mod/admin.php:902 +#: mod/admin.php:923 msgid "OpenID support for registration and logins." msgstr "" -#: mod/admin.php:903 +#: mod/admin.php:924 msgid "Fullname check" msgstr "" -#: mod/admin.php:903 +#: mod/admin.php:924 msgid "" "Force users to register with a space between firstname and lastname in Full " "name, as an antispam measure" msgstr "" -#: mod/admin.php:904 +#: mod/admin.php:925 msgid "UTF-8 Regular expressions" msgstr "" -#: mod/admin.php:904 +#: mod/admin.php:925 msgid "Use PHP UTF8 regular expressions" msgstr "" -#: mod/admin.php:905 +#: mod/admin.php:926 msgid "Community Page Style" msgstr "" -#: mod/admin.php:905 +#: mod/admin.php:926 msgid "" "Type of community page to show. 'Global community' shows every public " "posting from an open distributed network that arrived on this server." msgstr "" -#: mod/admin.php:906 +#: mod/admin.php:927 msgid "Posts per user on community page" msgstr "" -#: mod/admin.php:906 +#: mod/admin.php:927 msgid "" "The maximum number of posts per user on the community page. (Not valid for " "'Global Community')" msgstr "" -#: mod/admin.php:907 +#: mod/admin.php:928 msgid "Enable OStatus support" msgstr "" -#: mod/admin.php:907 +#: mod/admin.php:928 msgid "" "Provide built-in OStatus (StatusNet, GNU Social etc.) compatibility. All " "communications in OStatus are public, so privacy warnings will be " "occasionally displayed." msgstr "" -#: mod/admin.php:908 +#: mod/admin.php:929 msgid "OStatus conversation completion interval" msgstr "" -#: mod/admin.php:908 +#: mod/admin.php:929 msgid "" "How often shall the poller check for new entries in OStatus conversations? " "This can be a very ressource task." msgstr "" -#: mod/admin.php:909 +#: mod/admin.php:930 msgid "OStatus support can only be enabled if threading is enabled." msgstr "" -#: mod/admin.php:911 +#: mod/admin.php:932 msgid "" "Diaspora support can't be enabled because Friendica was installed into a sub " "directory." msgstr "" -#: mod/admin.php:912 +#: mod/admin.php:933 msgid "Enable Diaspora support" msgstr "" -#: mod/admin.php:912 +#: mod/admin.php:933 msgid "Provide built-in Diaspora network compatibility." msgstr "" -#: mod/admin.php:913 +#: mod/admin.php:934 msgid "Only allow Friendica contacts" msgstr "" -#: mod/admin.php:913 +#: mod/admin.php:934 msgid "" "All contacts must use Friendica protocols. All other built-in communication " "protocols disabled." msgstr "" -#: mod/admin.php:914 +#: mod/admin.php:935 msgid "Verify SSL" msgstr "" -#: mod/admin.php:914 +#: mod/admin.php:935 msgid "" "If you wish, you can turn on strict certificate checking. This will mean you " "cannot connect (at all) to self-signed SSL sites." msgstr "" -#: mod/admin.php:915 +#: mod/admin.php:936 msgid "Proxy user" msgstr "" -#: mod/admin.php:916 +#: mod/admin.php:937 msgid "Proxy URL" msgstr "" -#: mod/admin.php:917 +#: mod/admin.php:938 msgid "Network timeout" msgstr "" -#: mod/admin.php:917 +#: mod/admin.php:938 msgid "Value is in seconds. Set to 0 for unlimited (not recommended)." msgstr "" -#: mod/admin.php:918 +#: mod/admin.php:939 msgid "Delivery interval" msgstr "" -#: mod/admin.php:918 +#: mod/admin.php:939 msgid "" "Delay background delivery processes by this many seconds to reduce system " "load. Recommend: 4-5 for shared hosts, 2-3 for virtual private servers. 0-1 " "for large dedicated servers." msgstr "" -#: mod/admin.php:919 +#: mod/admin.php:940 msgid "Poll interval" msgstr "" -#: mod/admin.php:919 +#: mod/admin.php:940 msgid "" "Delay background polling processes by this many seconds to reduce system " "load. If 0, use delivery interval." msgstr "" -#: mod/admin.php:920 +#: mod/admin.php:941 msgid "Maximum Load Average" msgstr "" -#: mod/admin.php:920 +#: mod/admin.php:941 msgid "" "Maximum system load before delivery and poll processes are deferred - " "default 50." msgstr "" -#: mod/admin.php:921 +#: mod/admin.php:942 msgid "Maximum Load Average (Frontend)" msgstr "" -#: mod/admin.php:921 +#: mod/admin.php:942 msgid "Maximum system load before the frontend quits service - default 50." msgstr "" -#: mod/admin.php:922 +#: mod/admin.php:943 msgid "Maximum table size for optimization" msgstr "" -#: mod/admin.php:922 +#: mod/admin.php:943 msgid "" "Maximum table size (in MB) for the automatic optimization - default 100 MB. " "Enter -1 to disable it." msgstr "" -#: mod/admin.php:923 +#: mod/admin.php:944 msgid "Minimum level of fragmentation" msgstr "" -#: mod/admin.php:923 +#: mod/admin.php:944 msgid "" "Minimum fragmenation level to start the automatic optimization - default " "value is 30%." msgstr "" -#: mod/admin.php:925 +#: mod/admin.php:946 msgid "Periodical check of global contacts" msgstr "" -#: mod/admin.php:925 +#: mod/admin.php:946 msgid "" "If enabled, the global contacts are checked periodically for missing or " "outdated data and the vitality of the contacts and servers." msgstr "" -#: mod/admin.php:926 +#: mod/admin.php:947 msgid "Days between requery" msgstr "" -#: mod/admin.php:926 +#: mod/admin.php:947 msgid "Number of days after which a server is requeried for his contacts." msgstr "" -#: mod/admin.php:927 +#: mod/admin.php:948 msgid "Discover contacts from other servers" msgstr "" -#: mod/admin.php:927 +#: mod/admin.php:948 msgid "" "Periodically query other servers for contacts. You can choose between " "'users': the users on the remote system, 'Global Contacts': active contacts " @@ -2702,32 +2707,32 @@ msgid "" "Global Contacts'." msgstr "" -#: mod/admin.php:928 +#: mod/admin.php:949 msgid "Timeframe for fetching global contacts" msgstr "" -#: mod/admin.php:928 +#: mod/admin.php:949 msgid "" "When the discovery is activated, this value defines the timeframe for the " "activity of the global contacts that are fetched from other servers." msgstr "" -#: mod/admin.php:929 +#: mod/admin.php:950 msgid "Search the local directory" msgstr "" -#: mod/admin.php:929 +#: mod/admin.php:950 msgid "" "Search the local directory instead of the global directory. When searching " "locally, every search will be executed on the global directory in the " "background. This improves the search results when the search is repeated." msgstr "" -#: mod/admin.php:931 +#: mod/admin.php:952 msgid "Publish server information" msgstr "" -#: mod/admin.php:931 +#: mod/admin.php:952 msgid "" "If enabled, general server and usage data will be published. The data " "contains the name and version of the server, number of users with public " @@ -2735,204 +2740,204 @@ msgid "" "href='http://the-federation.info/'>the-federation.info for details." msgstr "" -#: mod/admin.php:933 +#: mod/admin.php:954 msgid "Use MySQL full text engine" msgstr "" -#: mod/admin.php:933 +#: mod/admin.php:954 msgid "" "Activates the full text engine. Speeds up search - but can only search for " "four and more characters." msgstr "" -#: mod/admin.php:934 +#: mod/admin.php:955 msgid "Suppress Language" msgstr "" -#: mod/admin.php:934 +#: mod/admin.php:955 msgid "Suppress language information in meta information about a posting." msgstr "" -#: mod/admin.php:935 +#: mod/admin.php:956 msgid "Suppress Tags" msgstr "" -#: mod/admin.php:935 +#: mod/admin.php:956 msgid "Suppress showing a list of hashtags at the end of the posting." msgstr "" -#: mod/admin.php:936 +#: mod/admin.php:957 msgid "Path to item cache" msgstr "" -#: mod/admin.php:936 +#: mod/admin.php:957 msgid "The item caches buffers generated bbcode and external images." msgstr "" -#: mod/admin.php:937 +#: mod/admin.php:958 msgid "Cache duration in seconds" msgstr "" -#: mod/admin.php:937 +#: mod/admin.php:958 msgid "" "How long should the cache files be hold? Default value is 86400 seconds (One " "day). To disable the item cache, set the value to -1." msgstr "" -#: mod/admin.php:938 +#: mod/admin.php:959 msgid "Maximum numbers of comments per post" msgstr "" -#: mod/admin.php:938 +#: mod/admin.php:959 msgid "How much comments should be shown for each post? Default value is 100." msgstr "" -#: mod/admin.php:939 +#: mod/admin.php:960 msgid "Path for lock file" msgstr "" -#: mod/admin.php:939 +#: mod/admin.php:960 msgid "" "The lock file is used to avoid multiple pollers at one time. Only define a " "folder here." msgstr "" -#: mod/admin.php:940 +#: mod/admin.php:961 msgid "Temp path" msgstr "" -#: mod/admin.php:940 +#: mod/admin.php:961 msgid "" "If you have a restricted system where the webserver can't access the system " "temp path, enter another path here." msgstr "" -#: mod/admin.php:941 +#: mod/admin.php:962 msgid "Base path to installation" msgstr "" -#: mod/admin.php:941 +#: mod/admin.php:962 msgid "" "If the system cannot detect the correct path to your installation, enter the " "correct path here. This setting should only be set if you are using a " "restricted system and symbolic links to your webroot." msgstr "" -#: mod/admin.php:942 +#: mod/admin.php:963 msgid "Disable picture proxy" msgstr "" -#: mod/admin.php:942 +#: mod/admin.php:963 msgid "" "The picture proxy increases performance and privacy. It shouldn't be used on " "systems with very low bandwith." msgstr "" -#: mod/admin.php:943 +#: mod/admin.php:964 msgid "Enable old style pager" msgstr "" -#: mod/admin.php:943 +#: mod/admin.php:964 msgid "" "The old style pager has page numbers but slows down massively the page speed." msgstr "" -#: mod/admin.php:944 +#: mod/admin.php:965 msgid "Only search in tags" msgstr "" -#: mod/admin.php:944 +#: mod/admin.php:965 msgid "On large systems the text search can slow down the system extremely." msgstr "" -#: mod/admin.php:946 +#: mod/admin.php:967 msgid "New base url" msgstr "" -#: mod/admin.php:946 +#: mod/admin.php:967 msgid "" "Change base url for this server. Sends relocate message to all DFRN contacts " "of all users." msgstr "" -#: mod/admin.php:948 +#: mod/admin.php:969 msgid "RINO Encryption" msgstr "" -#: mod/admin.php:948 +#: mod/admin.php:969 msgid "Encryption layer between nodes." msgstr "" -#: mod/admin.php:949 +#: mod/admin.php:970 msgid "Embedly API key" msgstr "" -#: mod/admin.php:949 +#: mod/admin.php:970 msgid "" "Embedly is used to fetch additional data for " "web pages. This is an optional parameter." msgstr "" -#: mod/admin.php:978 +#: mod/admin.php:999 msgid "Update has been marked successful" msgstr "" -#: mod/admin.php:986 +#: mod/admin.php:1007 #, php-format msgid "Database structure update %s was successfully applied." msgstr "" -#: mod/admin.php:989 +#: mod/admin.php:1010 #, php-format msgid "Executing of database structure update %s failed with error: %s" msgstr "" -#: mod/admin.php:1001 +#: mod/admin.php:1022 #, php-format msgid "Executing %s failed with error: %s" msgstr "" -#: mod/admin.php:1004 +#: mod/admin.php:1025 #, php-format msgid "Update %s was successfully applied." msgstr "" -#: mod/admin.php:1008 +#: mod/admin.php:1029 #, php-format msgid "Update %s did not return a status. Unknown if it succeeded." msgstr "" -#: mod/admin.php:1010 +#: mod/admin.php:1031 #, php-format msgid "There was no additional update function %s that needed to be called." msgstr "" -#: mod/admin.php:1029 +#: mod/admin.php:1050 msgid "No failed updates." msgstr "" -#: mod/admin.php:1030 +#: mod/admin.php:1051 msgid "Check database structure" msgstr "" -#: mod/admin.php:1035 +#: mod/admin.php:1056 msgid "Failed Updates" msgstr "" -#: mod/admin.php:1036 +#: mod/admin.php:1057 msgid "" "This does not include updates prior to 1139, which did not return a status." msgstr "" -#: mod/admin.php:1037 +#: mod/admin.php:1058 msgid "Mark success (if update was manually applied)" msgstr "" -#: mod/admin.php:1038 +#: mod/admin.php:1059 msgid "Attempt to execute this update step automatically" msgstr "" -#: mod/admin.php:1069 +#: mod/admin.php:1091 #, php-format msgid "" "\n" @@ -2940,7 +2945,7 @@ msgid "" "\t\t\t\tthe administrator of %2$s has set up an account for you." msgstr "" -#: mod/admin.php:1072 +#: mod/admin.php:1094 #, php-format msgid "" "\n" @@ -2976,168 +2981,168 @@ msgid "" "\t\t\tThank you and welcome to %4$s." msgstr "" -#: mod/admin.php:1104 include/user.php:423 +#: mod/admin.php:1126 include/user.php:423 #, php-format msgid "Registration details for %s" msgstr "" -#: mod/admin.php:1116 +#: mod/admin.php:1138 #, php-format msgid "%s user blocked/unblocked" msgid_plural "%s users blocked/unblocked" msgstr[0] "" msgstr[1] "" -#: mod/admin.php:1123 +#: mod/admin.php:1145 #, php-format msgid "%s user deleted" msgid_plural "%s users deleted" msgstr[0] "" msgstr[1] "" -#: mod/admin.php:1170 +#: mod/admin.php:1192 #, php-format msgid "User '%s' deleted" msgstr "" -#: mod/admin.php:1178 +#: mod/admin.php:1200 #, php-format msgid "User '%s' unblocked" msgstr "" -#: mod/admin.php:1178 +#: mod/admin.php:1200 #, php-format msgid "User '%s' blocked" msgstr "" -#: mod/admin.php:1271 +#: mod/admin.php:1291 msgid "Add User" msgstr "" -#: mod/admin.php:1272 +#: mod/admin.php:1292 msgid "select all" msgstr "" -#: mod/admin.php:1273 +#: mod/admin.php:1293 msgid "User registrations waiting for confirm" msgstr "" -#: mod/admin.php:1274 +#: mod/admin.php:1294 msgid "User waiting for permanent deletion" msgstr "" -#: mod/admin.php:1275 +#: mod/admin.php:1295 msgid "Request date" msgstr "" -#: mod/admin.php:1275 mod/admin.php:1287 mod/admin.php:1288 mod/admin.php:1303 +#: mod/admin.php:1295 mod/admin.php:1307 mod/admin.php:1308 mod/admin.php:1323 #: include/contact_selectors.php:79 include/contact_selectors.php:86 msgid "Email" msgstr "" -#: mod/admin.php:1276 +#: mod/admin.php:1296 msgid "No registrations." msgstr "" -#: mod/admin.php:1278 +#: mod/admin.php:1298 msgid "Deny" msgstr "" -#: mod/admin.php:1282 +#: mod/admin.php:1302 msgid "Site admin" msgstr "" -#: mod/admin.php:1283 +#: mod/admin.php:1303 msgid "Account expired" msgstr "" -#: mod/admin.php:1286 +#: mod/admin.php:1306 msgid "New User" msgstr "" -#: mod/admin.php:1287 mod/admin.php:1288 +#: mod/admin.php:1307 mod/admin.php:1308 msgid "Register date" msgstr "" -#: mod/admin.php:1287 mod/admin.php:1288 +#: mod/admin.php:1307 mod/admin.php:1308 msgid "Last login" msgstr "" -#: mod/admin.php:1287 mod/admin.php:1288 +#: mod/admin.php:1307 mod/admin.php:1308 msgid "Last item" msgstr "" -#: mod/admin.php:1287 +#: mod/admin.php:1307 msgid "Deleted since" msgstr "" -#: mod/admin.php:1288 mod/settings.php:41 +#: mod/admin.php:1308 mod/settings.php:41 msgid "Account" msgstr "" -#: mod/admin.php:1290 +#: mod/admin.php:1310 msgid "" "Selected users will be deleted!\\n\\nEverything these users had posted on " "this site will be permanently deleted!\\n\\nAre you sure?" msgstr "" -#: mod/admin.php:1291 +#: mod/admin.php:1311 msgid "" "The user {0} will be deleted!\\n\\nEverything this user has posted on this " "site will be permanently deleted!\\n\\nAre you sure?" msgstr "" -#: mod/admin.php:1301 +#: mod/admin.php:1321 msgid "Name of the new user." msgstr "" -#: mod/admin.php:1302 +#: mod/admin.php:1322 msgid "Nickname" msgstr "" -#: mod/admin.php:1302 +#: mod/admin.php:1322 msgid "Nickname of the new user." msgstr "" -#: mod/admin.php:1303 +#: mod/admin.php:1323 msgid "Email address of the new user." msgstr "" -#: mod/admin.php:1346 +#: mod/admin.php:1366 #, php-format msgid "Plugin %s disabled." msgstr "" -#: mod/admin.php:1350 +#: mod/admin.php:1370 #, php-format msgid "Plugin %s enabled." msgstr "" -#: mod/admin.php:1360 mod/admin.php:1596 +#: mod/admin.php:1381 mod/admin.php:1617 msgid "Disable" msgstr "" -#: mod/admin.php:1362 mod/admin.php:1598 +#: mod/admin.php:1383 mod/admin.php:1619 msgid "Enable" msgstr "" -#: mod/admin.php:1385 mod/admin.php:1643 +#: mod/admin.php:1406 mod/admin.php:1664 msgid "Toggle" msgstr "" -#: mod/admin.php:1393 mod/admin.php:1652 +#: mod/admin.php:1414 mod/admin.php:1673 msgid "Author: " msgstr "" -#: mod/admin.php:1394 mod/admin.php:1653 +#: mod/admin.php:1415 mod/admin.php:1674 msgid "Maintainer: " msgstr "" -#: mod/admin.php:1446 +#: mod/admin.php:1467 msgid "Reload active plugins" msgstr "" -#: mod/admin.php:1451 +#: mod/admin.php:1472 #, php-format msgid "" "There are currently no plugins available on your node. You can find the " @@ -3145,62 +3150,62 @@ msgid "" "in the open plugin registry at %2$s" msgstr "" -#: mod/admin.php:1556 +#: mod/admin.php:1577 msgid "No themes found." msgstr "" -#: mod/admin.php:1634 +#: mod/admin.php:1655 msgid "Screenshot" msgstr "" -#: mod/admin.php:1694 +#: mod/admin.php:1715 msgid "Reload active themes" msgstr "" -#: mod/admin.php:1699 +#: mod/admin.php:1720 #, php-format msgid "No themes found on the system. They should be paced in %1$s" msgstr "" -#: mod/admin.php:1700 +#: mod/admin.php:1721 msgid "[Experimental]" msgstr "" -#: mod/admin.php:1701 +#: mod/admin.php:1722 msgid "[Unsupported]" msgstr "" -#: mod/admin.php:1725 +#: mod/admin.php:1746 msgid "Log settings updated." msgstr "" -#: mod/admin.php:1762 +#: mod/admin.php:1783 msgid "Clear" msgstr "" -#: mod/admin.php:1767 +#: mod/admin.php:1788 msgid "Enable Debugging" msgstr "" -#: mod/admin.php:1768 +#: mod/admin.php:1789 msgid "Log file" msgstr "" -#: mod/admin.php:1768 +#: mod/admin.php:1789 msgid "" "Must be writable by web server. Relative to your Friendica top-level " "directory." msgstr "" -#: mod/admin.php:1769 +#: mod/admin.php:1790 msgid "Log level" msgstr "" -#: mod/admin.php:1772 +#: mod/admin.php:1793 msgid "PHP logging" msgstr "" -#: mod/admin.php:1773 +#: mod/admin.php:1794 msgid "" "To enable logging of PHP errors and warnings you can add the following to " "the .htconfig.php file of your installation. The filename set in the " @@ -3209,6 +3214,23 @@ msgid "" "'display_errors' is to enable these options, set to '0' to disable them." msgstr "" +#: mod/admin.php:1920 mod/admin.php:1921 mod/settings.php:759 +msgid "Off" +msgstr "" + +#: mod/admin.php:1920 mod/admin.php:1921 mod/settings.php:759 +msgid "On" +msgstr "" + +#: mod/admin.php:1921 +#, php-format +msgid "Lock feature %s" +msgstr "" + +#: mod/admin.php:1929 +msgid "Manage Additional Features" +msgstr "" + #: mod/network.php:146 #, php-format msgid "Search Results For: %s" @@ -3218,7 +3240,7 @@ msgstr "" msgid "Remove term" msgstr "" -#: mod/network.php:200 mod/search.php:34 include/features.php:79 +#: mod/network.php:200 mod/search.php:34 include/features.php:84 msgid "Saved Searches" msgstr "" @@ -3339,11 +3361,11 @@ msgstr "" msgid "Sat" msgstr "" -#: mod/events.php:208 mod/settings.php:939 include/text.php:1274 +#: mod/events.php:208 mod/settings.php:948 include/text.php:1274 msgid "Sunday" msgstr "" -#: mod/events.php:209 mod/settings.php:939 include/text.php:1274 +#: mod/events.php:209 mod/settings.php:948 include/text.php:1274 msgid "Monday" msgstr "" @@ -3672,7 +3694,7 @@ msgstr "" msgid "Video" msgstr "" -#: mod/content.php:730 mod/settings.php:712 object/Item.php:122 +#: mod/content.php:730 mod/settings.php:721 object/Item.php:122 #: object/Item.php:124 msgid "Edit" msgstr "" @@ -4143,698 +4165,686 @@ msgstr "" msgid "everybody" msgstr "" -#: mod/settings.php:47 -msgid "Additional features" -msgstr "" - -#: mod/settings.php:53 +#: mod/settings.php:58 msgid "Display" msgstr "" -#: mod/settings.php:60 mod/settings.php:855 +#: mod/settings.php:65 mod/settings.php:864 msgid "Social Networks" msgstr "" -#: mod/settings.php:72 include/nav.php:180 +#: mod/settings.php:79 include/nav.php:180 msgid "Delegations" msgstr "" -#: mod/settings.php:78 +#: mod/settings.php:86 msgid "Connected apps" msgstr "" -#: mod/settings.php:84 mod/uexport.php:85 +#: mod/settings.php:93 mod/uexport.php:85 msgid "Export personal data" msgstr "" -#: mod/settings.php:90 +#: mod/settings.php:100 msgid "Remove account" msgstr "" -#: mod/settings.php:143 +#: mod/settings.php:153 msgid "Missing some important data!" msgstr "" -#: mod/settings.php:256 +#: mod/settings.php:266 msgid "Failed to connect with email account using the settings provided." msgstr "" -#: mod/settings.php:261 +#: mod/settings.php:271 msgid "Email settings updated." msgstr "" -#: mod/settings.php:276 +#: mod/settings.php:286 msgid "Features updated" msgstr "" -#: mod/settings.php:343 +#: mod/settings.php:353 msgid "Relocate message has been send to your contacts" msgstr "" -#: mod/settings.php:357 include/user.php:39 +#: mod/settings.php:367 include/user.php:39 msgid "Passwords do not match. Password unchanged." msgstr "" -#: mod/settings.php:362 +#: mod/settings.php:372 msgid "Empty passwords are not allowed. Password unchanged." msgstr "" -#: mod/settings.php:370 +#: mod/settings.php:380 msgid "Wrong password." msgstr "" -#: mod/settings.php:381 +#: mod/settings.php:391 msgid "Password changed." msgstr "" -#: mod/settings.php:383 +#: mod/settings.php:393 msgid "Password update failed. Please try again." msgstr "" -#: mod/settings.php:452 +#: mod/settings.php:462 msgid " Please use a shorter name." msgstr "" -#: mod/settings.php:454 +#: mod/settings.php:464 msgid " Name too short." msgstr "" -#: mod/settings.php:463 +#: mod/settings.php:473 msgid "Wrong Password" msgstr "" -#: mod/settings.php:468 +#: mod/settings.php:478 msgid " Not valid email." msgstr "" -#: mod/settings.php:474 +#: mod/settings.php:484 msgid " Cannot change to that email." msgstr "" -#: mod/settings.php:530 +#: mod/settings.php:540 msgid "Private forum has no privacy permissions. Using default privacy group." msgstr "" -#: mod/settings.php:534 +#: mod/settings.php:544 msgid "Private forum has no privacy permissions and no default privacy group." msgstr "" -#: mod/settings.php:573 +#: mod/settings.php:583 msgid "Settings updated." msgstr "" -#: mod/settings.php:649 mod/settings.php:675 mod/settings.php:711 +#: mod/settings.php:658 mod/settings.php:684 mod/settings.php:720 msgid "Add application" msgstr "" -#: mod/settings.php:653 mod/settings.php:679 +#: mod/settings.php:662 mod/settings.php:688 msgid "Consumer Key" msgstr "" -#: mod/settings.php:654 mod/settings.php:680 +#: mod/settings.php:663 mod/settings.php:689 msgid "Consumer Secret" msgstr "" -#: mod/settings.php:655 mod/settings.php:681 +#: mod/settings.php:664 mod/settings.php:690 msgid "Redirect" msgstr "" -#: mod/settings.php:656 mod/settings.php:682 +#: mod/settings.php:665 mod/settings.php:691 msgid "Icon url" msgstr "" -#: mod/settings.php:667 +#: mod/settings.php:676 msgid "You can't edit this application." msgstr "" -#: mod/settings.php:710 +#: mod/settings.php:719 msgid "Connected Apps" msgstr "" -#: mod/settings.php:714 +#: mod/settings.php:723 msgid "Client key starts with" msgstr "" -#: mod/settings.php:715 +#: mod/settings.php:724 msgid "No name" msgstr "" -#: mod/settings.php:716 +#: mod/settings.php:725 msgid "Remove authorization" msgstr "" -#: mod/settings.php:728 +#: mod/settings.php:737 msgid "No Plugin settings configured" msgstr "" -#: mod/settings.php:736 +#: mod/settings.php:745 msgid "Plugin Settings" msgstr "" -#: mod/settings.php:750 -msgid "Off" -msgstr "" - -#: mod/settings.php:750 -msgid "On" -msgstr "" - -#: mod/settings.php:758 +#: mod/settings.php:767 msgid "Additional Features" msgstr "" -#: mod/settings.php:768 mod/settings.php:772 +#: mod/settings.php:777 mod/settings.php:781 msgid "General Social Media Settings" msgstr "" -#: mod/settings.php:778 +#: mod/settings.php:787 msgid "Disable intelligent shortening" msgstr "" -#: mod/settings.php:780 +#: mod/settings.php:789 msgid "" "Normally the system tries to find the best link to add to shortened posts. " "If this option is enabled then every shortened post will always point to the " "original friendica post." msgstr "" -#: mod/settings.php:786 +#: mod/settings.php:795 msgid "Automatically follow any GNU Social (OStatus) followers/mentioners" msgstr "" -#: mod/settings.php:788 +#: mod/settings.php:797 msgid "" "If you receive a message from an unknown OStatus user, this option decides " "what to do. If it is checked, a new contact will be created for every " "unknown user." msgstr "" -#: mod/settings.php:797 +#: mod/settings.php:806 msgid "Your legacy GNU Social account" msgstr "" -#: mod/settings.php:799 +#: mod/settings.php:808 msgid "" "If you enter your old GNU Social/Statusnet account name here (in the format " "user@domain.tld), your contacts will be added automatically. The field will " "be emptied when done." msgstr "" -#: mod/settings.php:802 +#: mod/settings.php:811 msgid "Repair OStatus subscriptions" msgstr "" -#: mod/settings.php:811 mod/settings.php:812 +#: mod/settings.php:820 mod/settings.php:821 #, php-format msgid "Built-in support for %s connectivity is %s" msgstr "" -#: mod/settings.php:811 mod/dfrn_request.php:865 +#: mod/settings.php:820 mod/dfrn_request.php:865 #: include/contact_selectors.php:80 msgid "Diaspora" msgstr "" -#: mod/settings.php:811 mod/settings.php:812 +#: mod/settings.php:820 mod/settings.php:821 msgid "enabled" msgstr "" -#: mod/settings.php:811 mod/settings.php:812 +#: mod/settings.php:820 mod/settings.php:821 msgid "disabled" msgstr "" -#: mod/settings.php:812 +#: mod/settings.php:821 msgid "GNU Social (OStatus)" msgstr "" -#: mod/settings.php:848 +#: mod/settings.php:857 msgid "Email access is disabled on this site." msgstr "" -#: mod/settings.php:860 +#: mod/settings.php:869 msgid "Email/Mailbox Setup" msgstr "" -#: mod/settings.php:861 +#: mod/settings.php:870 msgid "" "If you wish to communicate with email contacts using this service " "(optional), please specify how to connect to your mailbox." msgstr "" -#: mod/settings.php:862 +#: mod/settings.php:871 msgid "Last successful email check:" msgstr "" -#: mod/settings.php:864 +#: mod/settings.php:873 msgid "IMAP server name:" msgstr "" -#: mod/settings.php:865 +#: mod/settings.php:874 msgid "IMAP port:" msgstr "" -#: mod/settings.php:866 +#: mod/settings.php:875 msgid "Security:" msgstr "" -#: mod/settings.php:866 mod/settings.php:871 +#: mod/settings.php:875 mod/settings.php:880 msgid "None" msgstr "" -#: mod/settings.php:867 +#: mod/settings.php:876 msgid "Email login name:" msgstr "" -#: mod/settings.php:868 +#: mod/settings.php:877 msgid "Email password:" msgstr "" -#: mod/settings.php:869 +#: mod/settings.php:878 msgid "Reply-to address:" msgstr "" -#: mod/settings.php:870 +#: mod/settings.php:879 msgid "Send public posts to all email contacts:" msgstr "" -#: mod/settings.php:871 +#: mod/settings.php:880 msgid "Action after import:" msgstr "" -#: mod/settings.php:871 +#: mod/settings.php:880 msgid "Mark as seen" msgstr "" -#: mod/settings.php:871 +#: mod/settings.php:880 msgid "Move to folder" msgstr "" -#: mod/settings.php:872 +#: mod/settings.php:881 msgid "Move to folder:" msgstr "" -#: mod/settings.php:958 +#: mod/settings.php:967 msgid "Display Settings" msgstr "" -#: mod/settings.php:964 mod/settings.php:982 +#: mod/settings.php:973 mod/settings.php:991 msgid "Display Theme:" msgstr "" -#: mod/settings.php:965 +#: mod/settings.php:974 msgid "Mobile Theme:" msgstr "" -#: mod/settings.php:966 +#: mod/settings.php:975 msgid "Update browser every xx seconds" msgstr "" -#: mod/settings.php:966 +#: mod/settings.php:975 msgid "Minimum of 10 seconds. Enter -1 to disable it." msgstr "" -#: mod/settings.php:967 +#: mod/settings.php:976 msgid "Number of items to display per page:" msgstr "" -#: mod/settings.php:967 mod/settings.php:968 +#: mod/settings.php:976 mod/settings.php:977 msgid "Maximum of 100 items" msgstr "" -#: mod/settings.php:968 +#: mod/settings.php:977 msgid "Number of items to display per page when viewed from mobile device:" msgstr "" -#: mod/settings.php:969 +#: mod/settings.php:978 msgid "Don't show emoticons" msgstr "" -#: mod/settings.php:970 +#: mod/settings.php:979 msgid "Calendar" msgstr "" -#: mod/settings.php:971 +#: mod/settings.php:980 msgid "Beginning of week:" msgstr "" -#: mod/settings.php:972 +#: mod/settings.php:981 msgid "Don't show notices" msgstr "" -#: mod/settings.php:973 +#: mod/settings.php:982 msgid "Infinite scroll" msgstr "" -#: mod/settings.php:974 +#: mod/settings.php:983 msgid "Automatic updates only at the top of the network page" msgstr "" -#: mod/settings.php:976 view/theme/cleanzero/config.php:82 +#: mod/settings.php:985 view/theme/cleanzero/config.php:82 #: view/theme/dispy/config.php:72 view/theme/quattro/config.php:66 #: view/theme/diabook/config.php:150 view/theme/vier/config.php:109 #: view/theme/duepuntozero/config.php:61 msgid "Theme settings" msgstr "" -#: mod/settings.php:1053 +#: mod/settings.php:1062 msgid "User Types" msgstr "" -#: mod/settings.php:1054 +#: mod/settings.php:1063 msgid "Community Types" msgstr "" -#: mod/settings.php:1055 +#: mod/settings.php:1064 msgid "Normal Account Page" msgstr "" -#: mod/settings.php:1056 +#: mod/settings.php:1065 msgid "This account is a normal personal profile" msgstr "" -#: mod/settings.php:1059 +#: mod/settings.php:1068 msgid "Soapbox Page" msgstr "" -#: mod/settings.php:1060 +#: mod/settings.php:1069 msgid "Automatically approve all connection/friend requests as read-only fans" msgstr "" -#: mod/settings.php:1063 +#: mod/settings.php:1072 msgid "Community Forum/Celebrity Account" msgstr "" -#: mod/settings.php:1064 +#: mod/settings.php:1073 msgid "Automatically approve all connection/friend requests as read-write fans" msgstr "" -#: mod/settings.php:1067 +#: mod/settings.php:1076 msgid "Automatic Friend Page" msgstr "" -#: mod/settings.php:1068 +#: mod/settings.php:1077 msgid "Automatically approve all connection/friend requests as friends" msgstr "" -#: mod/settings.php:1071 +#: mod/settings.php:1080 msgid "Private Forum [Experimental]" msgstr "" -#: mod/settings.php:1072 +#: mod/settings.php:1081 msgid "Private forum - approved members only" msgstr "" -#: mod/settings.php:1084 +#: mod/settings.php:1093 msgid "OpenID:" msgstr "" -#: mod/settings.php:1084 +#: mod/settings.php:1093 msgid "(Optional) Allow this OpenID to login to this account." msgstr "" -#: mod/settings.php:1094 +#: mod/settings.php:1103 msgid "Publish your default profile in your local site directory?" msgstr "" -#: mod/settings.php:1100 +#: mod/settings.php:1109 msgid "Publish your default profile in the global social directory?" msgstr "" -#: mod/settings.php:1108 +#: mod/settings.php:1117 msgid "Hide your contact/friend list from viewers of your default profile?" msgstr "" -#: mod/settings.php:1112 include/acl_selectors.php:331 +#: mod/settings.php:1121 include/acl_selectors.php:331 msgid "Hide your profile details from unknown viewers?" msgstr "" -#: mod/settings.php:1112 +#: mod/settings.php:1121 msgid "" "If enabled, posting public messages to Diaspora and other networks isn't " "possible." msgstr "" -#: mod/settings.php:1117 +#: mod/settings.php:1126 msgid "Allow friends to post to your profile page?" msgstr "" -#: mod/settings.php:1123 +#: mod/settings.php:1132 msgid "Allow friends to tag your posts?" msgstr "" -#: mod/settings.php:1129 +#: mod/settings.php:1138 msgid "Allow us to suggest you as a potential friend to new members?" msgstr "" -#: mod/settings.php:1135 +#: mod/settings.php:1144 msgid "Permit unknown people to send you private mail?" msgstr "" -#: mod/settings.php:1143 +#: mod/settings.php:1152 msgid "Profile is not published." msgstr "" -#: mod/settings.php:1151 +#: mod/settings.php:1160 #, php-format msgid "Your Identity Address is '%s' or '%s'." msgstr "" -#: mod/settings.php:1158 +#: mod/settings.php:1167 msgid "Automatically expire posts after this many days:" msgstr "" -#: mod/settings.php:1158 +#: mod/settings.php:1167 msgid "If empty, posts will not expire. Expired posts will be deleted" msgstr "" -#: mod/settings.php:1159 +#: mod/settings.php:1168 msgid "Advanced expiration settings" msgstr "" -#: mod/settings.php:1160 +#: mod/settings.php:1169 msgid "Advanced Expiration" msgstr "" -#: mod/settings.php:1161 +#: mod/settings.php:1170 msgid "Expire posts:" msgstr "" -#: mod/settings.php:1162 +#: mod/settings.php:1171 msgid "Expire personal notes:" msgstr "" -#: mod/settings.php:1163 +#: mod/settings.php:1172 msgid "Expire starred posts:" msgstr "" -#: mod/settings.php:1164 +#: mod/settings.php:1173 msgid "Expire photos:" msgstr "" -#: mod/settings.php:1165 +#: mod/settings.php:1174 msgid "Only expire posts by others:" msgstr "" -#: mod/settings.php:1193 +#: mod/settings.php:1202 msgid "Account Settings" msgstr "" -#: mod/settings.php:1201 +#: mod/settings.php:1210 msgid "Password Settings" msgstr "" -#: mod/settings.php:1202 mod/register.php:274 +#: mod/settings.php:1211 mod/register.php:274 msgid "New Password:" msgstr "" -#: mod/settings.php:1203 mod/register.php:275 +#: mod/settings.php:1212 mod/register.php:275 msgid "Confirm:" msgstr "" -#: mod/settings.php:1203 +#: mod/settings.php:1212 msgid "Leave password fields blank unless changing" msgstr "" -#: mod/settings.php:1204 +#: mod/settings.php:1213 msgid "Current Password:" msgstr "" -#: mod/settings.php:1204 mod/settings.php:1205 +#: mod/settings.php:1213 mod/settings.php:1214 msgid "Your current password to confirm the changes" msgstr "" -#: mod/settings.php:1205 +#: mod/settings.php:1214 msgid "Password:" msgstr "" -#: mod/settings.php:1209 +#: mod/settings.php:1218 msgid "Basic Settings" msgstr "" -#: mod/settings.php:1210 include/identity.php:588 +#: mod/settings.php:1219 include/identity.php:588 msgid "Full Name:" msgstr "" -#: mod/settings.php:1211 +#: mod/settings.php:1220 msgid "Email Address:" msgstr "" -#: mod/settings.php:1212 +#: mod/settings.php:1221 msgid "Your Timezone:" msgstr "" -#: mod/settings.php:1213 +#: mod/settings.php:1222 msgid "Your Language:" msgstr "" -#: mod/settings.php:1213 +#: mod/settings.php:1222 msgid "" "Set the language we use to show you friendica interface and to send you " "emails" msgstr "" -#: mod/settings.php:1214 +#: mod/settings.php:1223 msgid "Default Post Location:" msgstr "" -#: mod/settings.php:1215 +#: mod/settings.php:1224 msgid "Use Browser Location:" msgstr "" -#: mod/settings.php:1218 +#: mod/settings.php:1227 msgid "Security and Privacy Settings" msgstr "" -#: mod/settings.php:1220 +#: mod/settings.php:1229 msgid "Maximum Friend Requests/Day:" msgstr "" -#: mod/settings.php:1220 mod/settings.php:1250 +#: mod/settings.php:1229 mod/settings.php:1259 msgid "(to prevent spam abuse)" msgstr "" -#: mod/settings.php:1221 +#: mod/settings.php:1230 msgid "Default Post Permissions" msgstr "" -#: mod/settings.php:1222 +#: mod/settings.php:1231 msgid "(click to open/close)" msgstr "" -#: mod/settings.php:1231 mod/photos.php:1199 mod/photos.php:1584 +#: mod/settings.php:1240 mod/photos.php:1199 mod/photos.php:1584 msgid "Show to Groups" msgstr "" -#: mod/settings.php:1232 mod/photos.php:1200 mod/photos.php:1585 +#: mod/settings.php:1241 mod/photos.php:1200 mod/photos.php:1585 msgid "Show to Contacts" msgstr "" -#: mod/settings.php:1233 +#: mod/settings.php:1242 msgid "Default Private Post" msgstr "" -#: mod/settings.php:1234 +#: mod/settings.php:1243 msgid "Default Public Post" msgstr "" -#: mod/settings.php:1238 +#: mod/settings.php:1247 msgid "Default Permissions for New Posts" msgstr "" -#: mod/settings.php:1250 +#: mod/settings.php:1259 msgid "Maximum private messages per day from unknown people:" msgstr "" -#: mod/settings.php:1253 +#: mod/settings.php:1262 msgid "Notification Settings" msgstr "" -#: mod/settings.php:1254 +#: mod/settings.php:1263 msgid "By default post a status message when:" msgstr "" -#: mod/settings.php:1255 +#: mod/settings.php:1264 msgid "accepting a friend request" msgstr "" -#: mod/settings.php:1256 +#: mod/settings.php:1265 msgid "joining a forum/community" msgstr "" -#: mod/settings.php:1257 +#: mod/settings.php:1266 msgid "making an interesting profile change" msgstr "" -#: mod/settings.php:1258 +#: mod/settings.php:1267 msgid "Send a notification email when:" msgstr "" -#: mod/settings.php:1259 +#: mod/settings.php:1268 msgid "You receive an introduction" msgstr "" -#: mod/settings.php:1260 +#: mod/settings.php:1269 msgid "Your introductions are confirmed" msgstr "" -#: mod/settings.php:1261 +#: mod/settings.php:1270 msgid "Someone writes on your profile wall" msgstr "" -#: mod/settings.php:1262 +#: mod/settings.php:1271 msgid "Someone writes a followup comment" msgstr "" -#: mod/settings.php:1263 +#: mod/settings.php:1272 msgid "You receive a private message" msgstr "" -#: mod/settings.php:1264 +#: mod/settings.php:1273 msgid "You receive a friend suggestion" msgstr "" -#: mod/settings.php:1265 +#: mod/settings.php:1274 msgid "You are tagged in a post" msgstr "" -#: mod/settings.php:1266 +#: mod/settings.php:1275 msgid "You are poked/prodded/etc. in a post" msgstr "" -#: mod/settings.php:1268 +#: mod/settings.php:1277 msgid "Activate desktop notifications" msgstr "" -#: mod/settings.php:1268 +#: mod/settings.php:1277 msgid "Show desktop popup on new notifications" msgstr "" -#: mod/settings.php:1270 +#: mod/settings.php:1279 msgid "Text-only notification emails" msgstr "" -#: mod/settings.php:1272 +#: mod/settings.php:1281 msgid "Send text only notification emails, without the html part" msgstr "" -#: mod/settings.php:1274 +#: mod/settings.php:1283 msgid "Advanced Account/Page Type Settings" msgstr "" -#: mod/settings.php:1275 +#: mod/settings.php:1284 msgid "Change the behaviour of this account for special situations" msgstr "" -#: mod/settings.php:1278 +#: mod/settings.php:1287 msgid "Relocate" msgstr "" -#: mod/settings.php:1279 +#: mod/settings.php:1288 msgid "" "If you have moved this profile from another server, and some of your " "contacts don't receive your updates, try pushing this button." msgstr "" -#: mod/settings.php:1280 +#: mod/settings.php:1289 msgid "Resend relocate message to contacts" msgstr "" @@ -5648,39 +5658,39 @@ msgstr "" msgid "Example: bob@example.com, mary@example.com" msgstr "" -#: mod/friendica.php:59 +#: mod/friendica.php:70 msgid "This is Friendica, version" msgstr "" -#: mod/friendica.php:60 +#: mod/friendica.php:71 msgid "running at web location" msgstr "" -#: mod/friendica.php:62 +#: mod/friendica.php:73 msgid "" "Please visit Friendica.com to learn " "more about the Friendica project." msgstr "" -#: mod/friendica.php:64 +#: mod/friendica.php:75 msgid "Bug reports and issues: please visit" msgstr "" -#: mod/friendica.php:64 +#: mod/friendica.php:75 msgid "the bugtracker at github" msgstr "" -#: mod/friendica.php:65 +#: mod/friendica.php:76 msgid "" "Suggestions, praise, donations, etc. - please email \"Info\" at Friendica - " "dot com" msgstr "" -#: mod/friendica.php:79 +#: mod/friendica.php:90 msgid "Installed plugins/addons/apps:" msgstr "" -#: mod/friendica.php:92 +#: mod/friendica.php:103 msgid "No installed plugins/addons/apps" msgstr "" @@ -6306,7 +6316,7 @@ msgstr "" msgid "All Networks" msgstr "" -#: include/contact_widgets.php:141 include/features.php:97 +#: include/contact_widgets.php:141 include/features.php:102 msgid "Saved Folders" msgstr "" @@ -6325,194 +6335,194 @@ msgid_plural "%d contacts in common" msgstr[0] "" msgstr[1] "" -#: include/features.php:58 +#: include/features.php:63 msgid "General Features" msgstr "" -#: include/features.php:60 +#: include/features.php:65 msgid "Multiple Profiles" msgstr "" -#: include/features.php:60 +#: include/features.php:65 msgid "Ability to create multiple profiles" msgstr "" -#: include/features.php:61 +#: include/features.php:66 msgid "Photo Location" msgstr "" -#: include/features.php:61 +#: include/features.php:66 msgid "" "Photo metadata is normally stripped. This extracts the location (if present) " "prior to stripping metadata and links it to a map." msgstr "" -#: include/features.php:66 +#: include/features.php:71 msgid "Post Composition Features" msgstr "" -#: include/features.php:67 +#: include/features.php:72 msgid "Richtext Editor" msgstr "" -#: include/features.php:67 +#: include/features.php:72 msgid "Enable richtext editor" msgstr "" -#: include/features.php:68 +#: include/features.php:73 msgid "Post Preview" msgstr "" -#: include/features.php:68 +#: include/features.php:73 msgid "Allow previewing posts and comments before publishing them" msgstr "" -#: include/features.php:69 +#: include/features.php:74 msgid "Auto-mention Forums" msgstr "" -#: include/features.php:69 +#: include/features.php:74 msgid "" "Add/remove mention when a fourm page is selected/deselected in ACL window." msgstr "" -#: include/features.php:74 +#: include/features.php:79 msgid "Network Sidebar Widgets" msgstr "" -#: include/features.php:75 +#: include/features.php:80 msgid "Search by Date" msgstr "" -#: include/features.php:75 +#: include/features.php:80 msgid "Ability to select posts by date ranges" msgstr "" -#: include/features.php:76 include/features.php:106 +#: include/features.php:81 include/features.php:111 msgid "List Forums" msgstr "" -#: include/features.php:76 +#: include/features.php:81 msgid "Enable widget to display the forums your are connected with" msgstr "" -#: include/features.php:77 +#: include/features.php:82 msgid "Group Filter" msgstr "" -#: include/features.php:77 +#: include/features.php:82 msgid "Enable widget to display Network posts only from selected group" msgstr "" -#: include/features.php:78 +#: include/features.php:83 msgid "Network Filter" msgstr "" -#: include/features.php:78 +#: include/features.php:83 msgid "Enable widget to display Network posts only from selected network" msgstr "" -#: include/features.php:79 +#: include/features.php:84 msgid "Save search terms for re-use" msgstr "" -#: include/features.php:84 +#: include/features.php:89 msgid "Network Tabs" msgstr "" -#: include/features.php:85 +#: include/features.php:90 msgid "Network Personal Tab" msgstr "" -#: include/features.php:85 +#: include/features.php:90 msgid "Enable tab to display only Network posts that you've interacted on" msgstr "" -#: include/features.php:86 +#: include/features.php:91 msgid "Network New Tab" msgstr "" -#: include/features.php:86 +#: include/features.php:91 msgid "Enable tab to display only new Network posts (from the last 12 hours)" msgstr "" -#: include/features.php:87 +#: include/features.php:92 msgid "Network Shared Links Tab" msgstr "" -#: include/features.php:87 +#: include/features.php:92 msgid "Enable tab to display only Network posts with links in them" msgstr "" -#: include/features.php:92 +#: include/features.php:97 msgid "Post/Comment Tools" msgstr "" -#: include/features.php:93 +#: include/features.php:98 msgid "Multiple Deletion" msgstr "" -#: include/features.php:93 +#: include/features.php:98 msgid "Select and delete multiple posts/comments at once" msgstr "" -#: include/features.php:94 +#: include/features.php:99 msgid "Edit Sent Posts" msgstr "" -#: include/features.php:94 +#: include/features.php:99 msgid "Edit and correct posts and comments after sending" msgstr "" -#: include/features.php:95 +#: include/features.php:100 msgid "Tagging" msgstr "" -#: include/features.php:95 +#: include/features.php:100 msgid "Ability to tag existing posts" msgstr "" -#: include/features.php:96 +#: include/features.php:101 msgid "Post Categories" msgstr "" -#: include/features.php:96 +#: include/features.php:101 msgid "Add categories to your posts" msgstr "" -#: include/features.php:97 +#: include/features.php:102 msgid "Ability to file posts under folders" msgstr "" -#: include/features.php:98 +#: include/features.php:103 msgid "Dislike Posts" msgstr "" -#: include/features.php:98 +#: include/features.php:103 msgid "Ability to dislike posts/comments" msgstr "" -#: include/features.php:99 +#: include/features.php:104 msgid "Star Posts" msgstr "" -#: include/features.php:99 +#: include/features.php:104 msgid "Ability to mark special posts with a star indicator" msgstr "" -#: include/features.php:100 +#: include/features.php:105 msgid "Mute Post Notifications" msgstr "" -#: include/features.php:100 +#: include/features.php:105 msgid "Ability to mute notifications for a thread" msgstr "" -#: include/features.php:105 +#: include/features.php:110 msgid "Advanced Profile Settings" msgstr "" -#: include/features.php:106 +#: include/features.php:111 msgid "Show visitors public community forums at the Advanced Profile Page" msgstr "" From 846153d3886a5506c403ef7e18d96fd01a6a3d01 Mon Sep 17 00:00:00 2001 From: Tobias Diekershoff Date: Mon, 18 Jan 2016 17:29:46 +0100 Subject: [PATCH 077/242] some beautification to the template code --- view/templates/admin_federation.tpl | 64 ++++++++++++++--------------- 1 file changed, 30 insertions(+), 34 deletions(-) diff --git a/view/templates/admin_federation.tpl b/view/templates/admin_federation.tpl index fb75157585..fad87da5b5 100644 --- a/view/templates/admin_federation.tpl +++ b/view/templates/admin_federation.tpl @@ -9,9 +9,9 @@

      {{$legendtext}}

        {{foreach $counts as $c}} - {{if $c[0]['total'] > 0}} -
      • {{$c[0]['platform']}} ({{$c[0]['total']}})
      • - {{/if}} + {{if $c[0]['total'] > 0}} +
      • {{$c[0]['platform']}} ({{$c[0]['total']}})
      • + {{/if}} {{/foreach}}

      @@ -23,40 +23,36 @@ var FedData = [ {{/foreach}} ]; var ctx = document.getElementById("FederationChart").getContext("2d"); -var myDoughnutChart = new Chart(ctx).Doughnut(FedData, - { - animateRotate : false, - }); -document.getElementById('FederationLegend').innerHTML = myDoughnutChart.generateLegend(); +var myDoughnutChart = new Chart(ctx).Doughnut(FedData, { animateRotate : false, }); {{foreach $counts as $c}} -{{if $c[0]['total'] > 0}} - - - - - - - -{{/if}} + {{if $c[0]['total'] > 0}} + + + + + + + + {{/if}} {{/foreach}}
      {{$c[0]['platform']}}{{$c[0]['total']}} - {{$c[0]['network']}}
      - - -
        -{{foreach $c[1] as $v}} -
      • {{if ($c[0]['platform']==='Friendica' and $version===$v['version']) }}{{$v['version']}}{{else}}{{$v['version']}}{{/if}} ({{$v['total']}})
      • -{{/foreach}} -
      -
      {{$c[0]['platform']}}{{$c[0]['total']}} + {{$c[0]['network']}}
      + + +
        + {{foreach $c[1] as $v}} +
      • {{if ($c[0]['platform']==='Friendica' and $version===$v['version']) }}{{$v['version']}}{{else}}{{$v['version']}}{{/if}} ({{$v['total']}})
      • + {{/foreach}} +
      +
      From f4a65cf6ca3d4ea69ac5e9d3a11c75f484b0dda1 Mon Sep 17 00:00:00 2001 From: Tobias Diekershoff Date: Tue, 19 Jan 2016 09:15:32 +0100 Subject: [PATCH 078/242] some more doc strings --- mod/admin.php | 11 ++++++++++- 1 file changed, 10 insertions(+), 1 deletion(-) diff --git a/mod/admin.php b/mod/admin.php index 70ef5f7511..e9e6323680 100644 --- a/mod/admin.php +++ b/mod/admin.php @@ -114,7 +114,16 @@ function admin_post(&$a){ /** * @brief Generates content of the admin panel pages * - * This function generates the content for the admin panel. + * This function generates the content for the admin panel. It consists of the + * aside menu (same for the entire admin panel) and the code for the soecified + * subpage of the panel. + * + * The structure of the adress is: /admin/subpage/details though "details" is + * only necessary for some subpages, like themes or addons where it is the name + * of one theme resp. addon from which the details should be shown. Content for + * the subpages is generated in separate functions for each of the subpages. + * + * The returned string hold the generated HTML code of the page. * * @param App $a * @return string From 3eef0cea3ddeebf9047607e9473c30cb122994ce Mon Sep 17 00:00:00 2001 From: Tobias Diekershoff Date: Tue, 19 Jan 2016 10:02:05 +0100 Subject: [PATCH 079/242] small additions to the docs, part of #2194 --- doc/Settings.md | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) diff --git a/doc/Settings.md b/doc/Settings.md index ae7d916078..86254cb29e 100644 --- a/doc/Settings.md +++ b/doc/Settings.md @@ -24,6 +24,9 @@ You are not required to provide the year. System settings --- +**Settings should be done in the admin panel** (/admin). +Those settings found in the database, will always override the settings added to the ``.htconfig.php`` file. + ###Language Please see util/README for information on creating language translations. @@ -219,6 +222,8 @@ LOGGER_DEBUG will show a good deal of information about system activity but will You may also select LOGGER_ALL but due to the volume of information we recommend only enabling this when you are tracking down a specific problem. Other log levels are possible but are not being used at the present time. +Please be aware that turning on the logging can fill up the disk space on your server relatively quick. +You should take preventions with e.g. [logrotate](https://en.wikipedia.org/wiki/Log_rotation) or similar tools. ###PHP error logging @@ -237,4 +242,6 @@ The vast majority of issues reported at these levels are completely harmless. Please report to the developers any errors you encounter in the logs using the recommended settings above. They generally indicate issues which need to be resolved. -If you encounter a blank (white) page when using the application, view the PHP logs - as this almost always indicates an error has occurred. +If you encounter a blank (white) page when using the application, view the PHP logs - as this almost always indicates an error has occurred. + +*Note*: PHP logging cannot be activated from the admin panel but has to be configured from the ``.htconfig.php`` file. From fe6d8ecd1cb12b7da00411e30796895c9ba37037 Mon Sep 17 00:00:00 2001 From: Tobias Diekershoff Date: Tue, 19 Jan 2016 10:55:55 +0100 Subject: [PATCH 080/242] DE update to the strings --- view/de/messages.po | 1114 ++++++++++++++++++++++--------------------- view/de/strings.php | 8 +- 2 files changed, 567 insertions(+), 555 deletions(-) diff --git a/view/de/messages.po b/view/de/messages.po index ca8d2d0a2a..3da9621ff1 100644 --- a/view/de/messages.po +++ b/view/de/messages.po @@ -32,8 +32,8 @@ msgid "" msgstr "" "Project-Id-Version: friendica\n" "Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2016-01-16 16:21+0100\n" -"PO-Revision-Date: 2016-01-17 21:19+0000\n" +"POT-Creation-Date: 2016-01-18 18:49+0100\n" +"PO-Revision-Date: 2016-01-19 09:53+0000\n" "Last-Translator: bavatar \n" "Language-Team: German (http://www.transifex.com/Friendica/friendica/language/de/)\n" "MIME-Version: 1.0\n" @@ -89,7 +89,7 @@ msgstr "Aktualisierung der Kontaktdaten fehlgeschlagen." #: mod/allfriends.php:12 mod/events.php:165 mod/wallmessage.php:9 #: mod/wallmessage.php:33 mod/wallmessage.php:79 mod/wallmessage.php:103 #: mod/wall_attach.php:67 mod/wall_attach.php:70 mod/settings.php:20 -#: mod/settings.php:116 mod/settings.php:637 mod/register.php:42 +#: mod/settings.php:126 mod/settings.php:646 mod/register.php:42 #: mod/delegate.php:12 mod/common.php:18 mod/mood.php:114 mod/suggest.php:58 #: mod/profiles.php:165 mod/profiles.php:615 mod/editpost.php:10 #: mod/api.php:26 mod/api.php:31 mod/notes.php:22 mod/poke.php:149 @@ -128,11 +128,11 @@ msgid "Do you really want to delete this contact?" msgstr "Möchtest Du wirklich diesen Kontakt löschen?" #: mod/contacts.php:456 mod/follow.php:110 mod/message.php:216 -#: mod/settings.php:1094 mod/settings.php:1100 mod/settings.php:1108 -#: mod/settings.php:1112 mod/settings.php:1117 mod/settings.php:1123 -#: mod/settings.php:1129 mod/settings.php:1135 mod/settings.php:1161 -#: mod/settings.php:1162 mod/settings.php:1163 mod/settings.php:1164 -#: mod/settings.php:1165 mod/dfrn_request.php:857 mod/register.php:238 +#: mod/settings.php:1103 mod/settings.php:1109 mod/settings.php:1117 +#: mod/settings.php:1121 mod/settings.php:1126 mod/settings.php:1132 +#: mod/settings.php:1138 mod/settings.php:1144 mod/settings.php:1170 +#: mod/settings.php:1171 mod/settings.php:1172 mod/settings.php:1173 +#: mod/settings.php:1174 mod/dfrn_request.php:857 mod/register.php:238 #: mod/suggest.php:29 mod/profiles.php:658 mod/profiles.php:661 #: mod/profiles.php:687 mod/api.php:105 include/items.php:4905 msgid "Yes" @@ -140,7 +140,7 @@ msgstr "Ja" #: mod/contacts.php:459 mod/tagrm.php:11 mod/tagrm.php:94 mod/follow.php:121 #: mod/videos.php:131 mod/message.php:219 mod/fbrowser.php:93 -#: mod/fbrowser.php:128 mod/settings.php:651 mod/settings.php:677 +#: mod/fbrowser.php:128 mod/settings.php:660 mod/settings.php:686 #: mod/dfrn_request.php:871 mod/suggest.php:32 mod/editpost.php:148 #: mod/photos.php:247 mod/photos.php:336 include/conversation.php:1220 #: include/items.php:4908 @@ -170,7 +170,7 @@ msgstr "%s teilt mit Dir" msgid "Private communications are not available for this contact." msgstr "Private Kommunikation ist für diesen Kontakt nicht verfügbar." -#: mod/contacts.php:544 mod/admin.php:790 +#: mod/contacts.php:544 mod/admin.php:811 msgid "Never" msgstr "Niemals" @@ -199,7 +199,7 @@ msgstr "Verbindungen mit diesem Kontakt verloren!" msgid "Fetch further information for feeds" msgstr "Weitere Informationen zu Feeds holen" -#: mod/contacts.php:571 mod/admin.php:799 +#: mod/contacts.php:571 mod/admin.php:820 msgid "Disabled" msgstr "Deaktiviert" @@ -290,12 +290,12 @@ msgid "Connect/Follow" msgstr "Verbinden/Folgen" #: mod/contacts.php:615 mod/contacts.php:806 mod/contacts.php:865 -#: mod/admin.php:1281 +#: mod/admin.php:1301 msgid "Unblock" msgstr "Entsperren" #: mod/contacts.php:615 mod/contacts.php:806 mod/contacts.php:865 -#: mod/admin.php:1280 +#: mod/admin.php:1300 msgid "Block" msgstr "Sperren" @@ -442,7 +442,7 @@ msgstr "Funde: " msgid "Find" msgstr "Finde" -#: mod/contacts.php:805 mod/settings.php:146 mod/settings.php:676 +#: mod/contacts.php:805 mod/settings.php:156 mod/settings.php:685 msgid "Update" msgstr "Aktualisierungen" @@ -454,8 +454,8 @@ msgstr "Archivieren" msgid "Unarchive" msgstr "Aus Archiv zurückholen" -#: mod/contacts.php:809 mod/group.php:171 mod/admin.php:1279 -#: mod/content.php:440 mod/content.php:743 mod/settings.php:713 +#: mod/contacts.php:809 mod/group.php:171 mod/admin.php:1299 +#: mod/content.php:440 mod/content.php:743 mod/settings.php:722 #: mod/photos.php:1723 object/Item.php:134 include/conversation.php:635 msgid "Delete" msgstr "Löschen" @@ -573,7 +573,7 @@ msgid "All Contacts (with secure profile access)" msgstr "Alle Kontakte (mit gesichertem Profilzugriff)" #: mod/display.php:82 mod/display.php:291 mod/display.php:508 -#: mod/viewsrc.php:15 mod/admin.php:211 mod/admin.php:1334 mod/admin.php:1567 +#: mod/viewsrc.php:15 mod/admin.php:225 mod/admin.php:1354 mod/admin.php:1588 #: mod/notice.php:15 include/items.php:4864 msgid "Item not found." msgstr "Beitrag nicht gefunden." @@ -623,8 +623,8 @@ msgid "" " join." msgstr "Auf der Quick Start Seite findest Du eine kurze Einleitung in die einzelnen Funktionen Deines Profils und die Netzwerk-Reiter, wo Du interessante Foren findest und neue Kontakte knüpfst." -#: mod/newmember.php:22 mod/admin.php:1386 mod/admin.php:1644 -#: mod/settings.php:99 include/nav.php:182 view/theme/diabook/theme.php:544 +#: mod/newmember.php:22 mod/admin.php:1407 mod/admin.php:1665 +#: mod/settings.php:109 include/nav.php:182 view/theme/diabook/theme.php:544 #: view/theme/diabook/theme.php:648 msgid "Settings" msgstr "Einstellungen" @@ -981,11 +981,11 @@ msgstr "Bitte beantworte folgendes:" msgid "Does %s know you?" msgstr "Kennt %s Dich?" -#: mod/follow.php:110 mod/settings.php:1094 mod/settings.php:1100 -#: mod/settings.php:1108 mod/settings.php:1112 mod/settings.php:1117 -#: mod/settings.php:1123 mod/settings.php:1129 mod/settings.php:1135 -#: mod/settings.php:1161 mod/settings.php:1162 mod/settings.php:1163 -#: mod/settings.php:1164 mod/settings.php:1165 mod/dfrn_request.php:857 +#: mod/follow.php:110 mod/settings.php:1103 mod/settings.php:1109 +#: mod/settings.php:1117 mod/settings.php:1121 mod/settings.php:1126 +#: mod/settings.php:1132 mod/settings.php:1138 mod/settings.php:1144 +#: mod/settings.php:1170 mod/settings.php:1171 mod/settings.php:1172 +#: mod/settings.php:1173 mod/settings.php:1174 mod/dfrn_request.php:857 #: mod/register.php:239 mod/profiles.php:658 mod/profiles.php:662 #: mod/profiles.php:687 mod/api.php:106 msgid "No" @@ -1012,8 +1012,8 @@ msgid "Empty post discarded." msgstr "Leerer Beitrag wurde verworfen." #: mod/item.php:467 mod/wall_upload.php:213 mod/wall_upload.php:227 -#: mod/wall_upload.php:234 include/Photo.php:954 include/Photo.php:969 -#: include/Photo.php:976 include/Photo.php:998 include/message.php:145 +#: mod/wall_upload.php:234 include/Photo.php:958 include/Photo.php:973 +#: include/Photo.php:980 include/Photo.php:1002 include/message.php:145 msgid "Wall Photos" msgstr "Pinnwand-Bilder" @@ -1418,7 +1418,7 @@ msgstr "Verwerfen" msgid "System" msgstr "System" -#: mod/notifications.php:87 mod/admin.php:361 include/nav.php:154 +#: mod/notifications.php:87 mod/admin.php:379 include/nav.php:154 msgid "Network" msgstr "Netzwerk" @@ -1464,7 +1464,7 @@ msgstr "Neue-Kontakt Nachricht senden" msgid "if applicable" msgstr "falls anwendbar" -#: mod/notifications.php:176 mod/notifications.php:257 mod/admin.php:1277 +#: mod/notifications.php:176 mod/notifications.php:257 mod/admin.php:1297 msgid "Approve" msgstr "Genehmigen" @@ -1821,9 +1821,9 @@ msgstr "Zurück zum Kontakteditor" msgid "Refetch contact data" msgstr "Kontaktdaten neu laden" -#: mod/crepair.php:170 mod/admin.php:1275 mod/admin.php:1287 -#: mod/admin.php:1288 mod/admin.php:1301 mod/settings.php:652 -#: mod/settings.php:678 +#: mod/crepair.php:170 mod/admin.php:1295 mod/admin.php:1307 +#: mod/admin.php:1308 mod/admin.php:1321 mod/settings.php:661 +#: mod/settings.php:687 msgid "Name" msgstr "Name" @@ -1926,573 +1926,578 @@ msgstr "Dateien" msgid "Contacts who are not members of a group" msgstr "Kontakte, die keiner Gruppe zugewiesen sind" -#: mod/admin.php:88 +#: mod/admin.php:92 msgid "Theme settings updated." msgstr "Themeneinstellungen aktualisiert." -#: mod/admin.php:137 mod/admin.php:856 +#: mod/admin.php:147 mod/admin.php:877 msgid "Site" msgstr "Seite" -#: mod/admin.php:138 mod/admin.php:800 mod/admin.php:1270 mod/admin.php:1285 +#: mod/admin.php:148 mod/admin.php:821 mod/admin.php:1290 mod/admin.php:1305 msgid "Users" msgstr "Nutzer" -#: mod/admin.php:139 mod/admin.php:1384 mod/admin.php:1444 mod/settings.php:66 +#: mod/admin.php:149 mod/admin.php:1405 mod/admin.php:1465 mod/settings.php:72 msgid "Plugins" msgstr "Plugins" -#: mod/admin.php:140 mod/admin.php:1642 mod/admin.php:1692 +#: mod/admin.php:150 mod/admin.php:1663 mod/admin.php:1713 msgid "Themes" msgstr "Themen" -#: mod/admin.php:141 +#: mod/admin.php:151 mod/settings.php:50 +msgid "Additional features" +msgstr "Zusätzliche Features" + +#: mod/admin.php:152 msgid "DB updates" msgstr "DB Updates" -#: mod/admin.php:142 mod/admin.php:356 +#: mod/admin.php:153 mod/admin.php:374 msgid "Inspect Queue" msgstr "Warteschlange Inspizieren" -#: mod/admin.php:143 mod/admin.php:326 +#: mod/admin.php:154 mod/admin.php:343 msgid "Federation Statistics" msgstr "Federation Statistik" -#: mod/admin.php:157 mod/admin.php:168 mod/admin.php:1760 +#: mod/admin.php:168 mod/admin.php:179 mod/admin.php:1781 msgid "Logs" msgstr "Protokolle" -#: mod/admin.php:158 mod/admin.php:1828 +#: mod/admin.php:169 mod/admin.php:1848 msgid "View Logs" msgstr "Protokolle anzeigen" -#: mod/admin.php:159 +#: mod/admin.php:170 msgid "probe address" msgstr "Adresse untersuchen" -#: mod/admin.php:160 +#: mod/admin.php:171 msgid "check webfinger" msgstr "Webfinger überprüfen" -#: mod/admin.php:166 include/nav.php:194 +#: mod/admin.php:177 include/nav.php:194 msgid "Admin" msgstr "Administration" -#: mod/admin.php:167 +#: mod/admin.php:178 msgid "Plugin Features" msgstr "Plugin Features" -#: mod/admin.php:169 +#: mod/admin.php:180 msgid "diagnostics" msgstr "Diagnose" -#: mod/admin.php:170 +#: mod/admin.php:181 msgid "User registrations waiting for confirmation" msgstr "Nutzeranmeldungen die auf Bestätigung warten" -#: mod/admin.php:320 +#: mod/admin.php:336 msgid "" "This page offers you some numbers to the known part of the federated social " "network your Friendica node is part of. These numbers are not complete but " "only reflect the part of the network your node is aware of." msgstr "Diese Seite präsentiert einige Zahlen zu dem bekannten Teil des föderalen sozialen Netzwerks, von dem deine Friendica Installation ein Teil ist. Diese Zahlen sind nicht absolut und reflektieren nur den Teil des Netzwerks, den dein Knoten kennt." -#: mod/admin.php:321 +#: mod/admin.php:337 msgid "" "The Auto Discovered Contact Directory feature is not enabled, it " "will improve the data displayed here." msgstr "Die Funktion um Automatisch ein Kontaktverzeichnis erstellen ist nicht aktiv. Es wird die hier angezeigten Daten verbessern." -#: mod/admin.php:325 mod/admin.php:355 mod/admin.php:411 mod/admin.php:855 -#: mod/admin.php:1269 mod/admin.php:1383 mod/admin.php:1443 mod/admin.php:1641 -#: mod/admin.php:1691 mod/admin.php:1759 mod/admin.php:1827 +#: mod/admin.php:342 mod/admin.php:373 mod/admin.php:430 mod/admin.php:876 +#: mod/admin.php:1289 mod/admin.php:1404 mod/admin.php:1464 mod/admin.php:1662 +#: mod/admin.php:1712 mod/admin.php:1780 mod/admin.php:1847 msgid "Administration" msgstr "Administration" -#: mod/admin.php:332 +#: mod/admin.php:349 msgid "Currently this node is aware of nodes from the following platforms:" msgstr "Momentan kennt dieser Knoten andere Knoten der folgenden Plattformen:" -#: mod/admin.php:358 +#: mod/admin.php:376 msgid "ID" msgstr "ID" -#: mod/admin.php:359 +#: mod/admin.php:377 msgid "Recipient Name" msgstr "Empfänger Name" -#: mod/admin.php:360 +#: mod/admin.php:378 msgid "Recipient Profile" msgstr "Empfänger Profil" -#: mod/admin.php:362 +#: mod/admin.php:380 msgid "Created" msgstr "Erstellt" -#: mod/admin.php:363 +#: mod/admin.php:381 msgid "Last Tried" msgstr "Zuletzt versucht" -#: mod/admin.php:364 +#: mod/admin.php:382 msgid "" "This page lists the content of the queue for outgoing postings. These are " "postings the initial delivery failed for. They will be resend later and " "eventually deleted if the delivery fails permanently." msgstr "Auf dieser Seite werden die in der Warteschlange eingereihten Beiträge aufgelistet. Bei diesen Beiträgen schlug die erste Zustellung fehl. Es wird später wiederholt versucht die Beiträge zuzustellen, bis sie schließlich gelöscht werden." -#: mod/admin.php:382 mod/admin.php:1223 +#: mod/admin.php:401 mod/admin.php:1243 msgid "Normal Account" msgstr "Normales Konto" -#: mod/admin.php:383 mod/admin.php:1224 +#: mod/admin.php:402 mod/admin.php:1244 msgid "Soapbox Account" msgstr "Marktschreier-Konto" -#: mod/admin.php:384 mod/admin.php:1225 +#: mod/admin.php:403 mod/admin.php:1245 msgid "Community/Celebrity Account" msgstr "Forum/Promi-Konto" -#: mod/admin.php:385 mod/admin.php:1226 +#: mod/admin.php:404 mod/admin.php:1246 msgid "Automatic Friend Account" msgstr "Automatisches Freundekonto" -#: mod/admin.php:386 +#: mod/admin.php:405 msgid "Blog Account" msgstr "Blog-Konto" -#: mod/admin.php:387 +#: mod/admin.php:406 msgid "Private Forum" msgstr "Privates Forum" -#: mod/admin.php:406 +#: mod/admin.php:425 msgid "Message queues" msgstr "Nachrichten-Warteschlangen" -#: mod/admin.php:412 +#: mod/admin.php:431 msgid "Summary" msgstr "Zusammenfassung" -#: mod/admin.php:414 +#: mod/admin.php:433 msgid "Registered users" msgstr "Registrierte Nutzer" -#: mod/admin.php:416 +#: mod/admin.php:435 msgid "Pending registrations" msgstr "Anstehende Anmeldungen" -#: mod/admin.php:417 +#: mod/admin.php:436 msgid "Version" msgstr "Version" -#: mod/admin.php:422 +#: mod/admin.php:441 msgid "Active plugins" msgstr "Aktive Plugins" -#: mod/admin.php:445 +#: mod/admin.php:464 msgid "Can not parse base url. Must have at least ://" msgstr "Die Basis-URL konnte nicht analysiert werden. Sie muss mindestens aus :// bestehen" -#: mod/admin.php:728 +#: mod/admin.php:749 msgid "RINO2 needs mcrypt php extension to work." msgstr "RINO2 benötigt die PHP Extension mcrypt." -#: mod/admin.php:736 +#: mod/admin.php:757 msgid "Site settings updated." msgstr "Seiteneinstellungen aktualisiert." -#: mod/admin.php:764 mod/settings.php:903 +#: mod/admin.php:785 mod/settings.php:912 msgid "No special theme for mobile devices" msgstr "Kein spezielles Theme für mobile Geräte verwenden." -#: mod/admin.php:783 +#: mod/admin.php:804 msgid "No community page" msgstr "Keine Gemeinschaftsseite" -#: mod/admin.php:784 +#: mod/admin.php:805 msgid "Public postings from users of this site" msgstr "Öffentliche Beiträge von Nutzer_innen dieser Seite" -#: mod/admin.php:785 +#: mod/admin.php:806 msgid "Global community page" msgstr "Globale Gemeinschaftsseite" -#: mod/admin.php:791 +#: mod/admin.php:812 msgid "At post arrival" msgstr "Beim Empfang von Nachrichten" -#: mod/admin.php:792 include/contact_selectors.php:56 +#: mod/admin.php:813 include/contact_selectors.php:56 msgid "Frequently" msgstr "immer wieder" -#: mod/admin.php:793 include/contact_selectors.php:57 +#: mod/admin.php:814 include/contact_selectors.php:57 msgid "Hourly" msgstr "Stündlich" -#: mod/admin.php:794 include/contact_selectors.php:58 +#: mod/admin.php:815 include/contact_selectors.php:58 msgid "Twice daily" msgstr "Zweimal täglich" -#: mod/admin.php:795 include/contact_selectors.php:59 +#: mod/admin.php:816 include/contact_selectors.php:59 msgid "Daily" msgstr "Täglich" -#: mod/admin.php:801 +#: mod/admin.php:822 msgid "Users, Global Contacts" msgstr "Nutzer, globale Kontakte" -#: mod/admin.php:802 +#: mod/admin.php:823 msgid "Users, Global Contacts/fallback" msgstr "Nutzer, globale Kontakte / Fallback" -#: mod/admin.php:806 +#: mod/admin.php:827 msgid "One month" msgstr "ein Monat" -#: mod/admin.php:807 +#: mod/admin.php:828 msgid "Three months" msgstr "drei Monate" -#: mod/admin.php:808 +#: mod/admin.php:829 msgid "Half a year" msgstr "ein halbes Jahr" -#: mod/admin.php:809 +#: mod/admin.php:830 msgid "One year" msgstr "ein Jahr" -#: mod/admin.php:814 +#: mod/admin.php:835 msgid "Multi user instance" msgstr "Mehrbenutzer Instanz" -#: mod/admin.php:837 +#: mod/admin.php:858 msgid "Closed" msgstr "Geschlossen" -#: mod/admin.php:838 +#: mod/admin.php:859 msgid "Requires approval" msgstr "Bedarf der Zustimmung" -#: mod/admin.php:839 +#: mod/admin.php:860 msgid "Open" msgstr "Offen" -#: mod/admin.php:843 +#: mod/admin.php:864 msgid "No SSL policy, links will track page SSL state" msgstr "Keine SSL Richtlinie, Links werden das verwendete Protokoll beibehalten" -#: mod/admin.php:844 +#: mod/admin.php:865 msgid "Force all links to use SSL" msgstr "SSL für alle Links erzwingen" -#: mod/admin.php:845 +#: mod/admin.php:866 msgid "Self-signed certificate, use SSL for local links only (discouraged)" msgstr "Selbst-unterzeichnetes Zertifikat, SSL nur für lokale Links verwenden (nicht empfohlen)" -#: mod/admin.php:857 mod/admin.php:1445 mod/admin.php:1693 mod/admin.php:1761 -#: mod/settings.php:650 mod/settings.php:760 mod/settings.php:804 -#: mod/settings.php:873 mod/settings.php:960 mod/settings.php:1195 +#: mod/admin.php:878 mod/admin.php:1466 mod/admin.php:1714 mod/admin.php:1782 +#: mod/admin.php:1931 mod/settings.php:659 mod/settings.php:769 +#: mod/settings.php:813 mod/settings.php:882 mod/settings.php:969 +#: mod/settings.php:1204 msgid "Save Settings" msgstr "Einstellungen speichern" -#: mod/admin.php:858 mod/register.php:263 +#: mod/admin.php:879 mod/register.php:263 msgid "Registration" msgstr "Registrierung" -#: mod/admin.php:859 +#: mod/admin.php:880 msgid "File upload" msgstr "Datei hochladen" -#: mod/admin.php:860 +#: mod/admin.php:881 msgid "Policies" msgstr "Regeln" -#: mod/admin.php:861 +#: mod/admin.php:882 msgid "Advanced" msgstr "Erweitert" -#: mod/admin.php:862 +#: mod/admin.php:883 msgid "Auto Discovered Contact Directory" msgstr "Automatisch ein Kontaktverzeichnis erstellen" -#: mod/admin.php:863 +#: mod/admin.php:884 msgid "Performance" msgstr "Performance" -#: mod/admin.php:864 +#: mod/admin.php:885 msgid "" "Relocate - WARNING: advanced function. Could make this server unreachable." msgstr "Umsiedeln - WARNUNG: Könnte diesen Server unerreichbar machen." -#: mod/admin.php:867 +#: mod/admin.php:888 msgid "Site name" msgstr "Seitenname" -#: mod/admin.php:868 +#: mod/admin.php:889 msgid "Host name" msgstr "Host Name" -#: mod/admin.php:869 +#: mod/admin.php:890 msgid "Sender Email" msgstr "Absender für Emails" -#: mod/admin.php:869 +#: mod/admin.php:890 msgid "" "The email address your server shall use to send notification emails from." msgstr "Die E-Mail Adresse die dein Server zum Versenden von Benachrichtigungen verwenden soll." -#: mod/admin.php:870 +#: mod/admin.php:891 msgid "Banner/Logo" msgstr "Banner/Logo" -#: mod/admin.php:871 +#: mod/admin.php:892 msgid "Shortcut icon" msgstr "Shortcut Icon" -#: mod/admin.php:871 +#: mod/admin.php:892 msgid "Link to an icon that will be used for browsers." msgstr "Link zu einem Icon, das Browser verwenden werden." -#: mod/admin.php:872 +#: mod/admin.php:893 msgid "Touch icon" msgstr "Touch Icon" -#: mod/admin.php:872 +#: mod/admin.php:893 msgid "Link to an icon that will be used for tablets and mobiles." msgstr "Link zu einem Icon das Tablets und Handies verwenden sollen." -#: mod/admin.php:873 +#: mod/admin.php:894 msgid "Additional Info" msgstr "Zusätzliche Informationen" -#: mod/admin.php:873 +#: mod/admin.php:894 #, php-format msgid "" "For public servers: you can add additional information here that will be " "listed at %s/siteinfo." msgstr "Für öffentliche Server kannst Du hier zusätzliche Informationen angeben, die dann auf %s/siteinfo angezeigt werden." -#: mod/admin.php:874 +#: mod/admin.php:895 msgid "System language" msgstr "Systemsprache" -#: mod/admin.php:875 +#: mod/admin.php:896 msgid "System theme" msgstr "Systemweites Theme" -#: mod/admin.php:875 +#: mod/admin.php:896 msgid "" "Default system theme - may be over-ridden by user profiles - change theme settings" msgstr "Vorgabe für das System-Theme - kann von Benutzerprofilen überschrieben werden - Theme-Einstellungen ändern" -#: mod/admin.php:876 +#: mod/admin.php:897 msgid "Mobile system theme" msgstr "Systemweites mobiles Theme" -#: mod/admin.php:876 +#: mod/admin.php:897 msgid "Theme for mobile devices" msgstr "Thema für mobile Geräte" -#: mod/admin.php:877 +#: mod/admin.php:898 msgid "SSL link policy" msgstr "Regeln für SSL Links" -#: mod/admin.php:877 +#: mod/admin.php:898 msgid "Determines whether generated links should be forced to use SSL" msgstr "Bestimmt, ob generierte Links SSL verwenden müssen" -#: mod/admin.php:878 +#: mod/admin.php:899 msgid "Force SSL" msgstr "Erzwinge SSL" -#: mod/admin.php:878 +#: mod/admin.php:899 msgid "" "Force all Non-SSL requests to SSL - Attention: on some systems it could lead" " to endless loops." msgstr "Erzinge alle Nicht-SSL Anfragen auf SSL - Achtung: auf manchen Systemen verursacht dies eine Endlosschleife." -#: mod/admin.php:879 +#: mod/admin.php:900 msgid "Old style 'Share'" msgstr "Altes \"Teilen\" Element" -#: mod/admin.php:879 +#: mod/admin.php:900 msgid "Deactivates the bbcode element 'share' for repeating items." msgstr "Deaktiviert das BBCode Element \"share\" beim Wiederholen von Beiträgen." -#: mod/admin.php:880 +#: mod/admin.php:901 msgid "Hide help entry from navigation menu" msgstr "Verberge den Menüeintrag für die Hilfe im Navigationsmenü" -#: mod/admin.php:880 +#: mod/admin.php:901 msgid "" "Hides the menu entry for the Help pages from the navigation menu. You can " "still access it calling /help directly." msgstr "Verbirgt den Menüeintrag für die Hilfe-Seiten im Navigationsmenü. Die Seiten können weiterhin über /help aufgerufen werden." -#: mod/admin.php:881 +#: mod/admin.php:902 msgid "Single user instance" msgstr "Ein-Nutzer Instanz" -#: mod/admin.php:881 +#: mod/admin.php:902 msgid "Make this instance multi-user or single-user for the named user" msgstr "Regelt ob es sich bei dieser Instanz um eine ein Personen Installation oder eine Installation mit mehr als einem Nutzer handelt." -#: mod/admin.php:882 +#: mod/admin.php:903 msgid "Maximum image size" msgstr "Maximale Bildgröße" -#: mod/admin.php:882 +#: mod/admin.php:903 msgid "" "Maximum size in bytes of uploaded images. Default is 0, which means no " "limits." msgstr "Maximale Uploadgröße von Bildern in Bytes. Standard ist 0, d.h. ohne Limit." -#: mod/admin.php:883 +#: mod/admin.php:904 msgid "Maximum image length" msgstr "Maximale Bildlänge" -#: mod/admin.php:883 +#: mod/admin.php:904 msgid "" "Maximum length in pixels of the longest side of uploaded images. Default is " "-1, which means no limits." msgstr "Maximale Länge in Pixeln der längsten Seite eines hoch geladenen Bildes. Grundeinstellung ist -1 was keine Einschränkung bedeutet." -#: mod/admin.php:884 +#: mod/admin.php:905 msgid "JPEG image quality" msgstr "Qualität des JPEG Bildes" -#: mod/admin.php:884 +#: mod/admin.php:905 msgid "" "Uploaded JPEGS will be saved at this quality setting [0-100]. Default is " "100, which is full quality." msgstr "Hoch geladene JPEG Bilder werden mit dieser Qualität [0-100] gespeichert. Grundeinstellung ist 100, kein Qualitätsverlust." -#: mod/admin.php:886 +#: mod/admin.php:907 msgid "Register policy" msgstr "Registrierungsmethode" -#: mod/admin.php:887 +#: mod/admin.php:908 msgid "Maximum Daily Registrations" msgstr "Maximum täglicher Registrierungen" -#: mod/admin.php:887 +#: mod/admin.php:908 msgid "" "If registration is permitted above, this sets the maximum number of new user" " registrations to accept per day. If register is set to closed, this " "setting has no effect." msgstr "Wenn die Registrierung weiter oben erlaubt ist, regelt dies die maximale Anzahl von Neuanmeldungen pro Tag. Wenn die Registrierung geschlossen ist, hat diese Einstellung keinen Effekt." -#: mod/admin.php:888 +#: mod/admin.php:909 msgid "Register text" msgstr "Registrierungstext" -#: mod/admin.php:888 +#: mod/admin.php:909 msgid "Will be displayed prominently on the registration page." msgstr "Wird gut sichtbar auf der Registrierungsseite angezeigt." -#: mod/admin.php:889 +#: mod/admin.php:910 msgid "Accounts abandoned after x days" msgstr "Nutzerkonten gelten nach x Tagen als unbenutzt" -#: mod/admin.php:889 +#: mod/admin.php:910 msgid "" "Will not waste system resources polling external sites for abandonded " "accounts. Enter 0 for no time limit." msgstr "Verschwende keine System-Ressourcen auf das Pollen externer Seiten, wenn Konten nicht mehr benutzt werden. 0 eingeben für kein Limit." -#: mod/admin.php:890 +#: mod/admin.php:911 msgid "Allowed friend domains" msgstr "Erlaubte Domains für Kontakte" -#: mod/admin.php:890 +#: mod/admin.php:911 msgid "" "Comma separated list of domains which are allowed to establish friendships " "with this site. Wildcards are accepted. Empty to allow any domains" msgstr "Liste der Domains, die für Freundschaften erlaubt sind, durch Kommas getrennt. Platzhalter werden akzeptiert. Leer lassen, um alle Domains zu erlauben." -#: mod/admin.php:891 +#: mod/admin.php:912 msgid "Allowed email domains" msgstr "Erlaubte Domains für E-Mails" -#: mod/admin.php:891 +#: mod/admin.php:912 msgid "" "Comma separated list of domains which are allowed in email addresses for " "registrations to this site. Wildcards are accepted. Empty to allow any " "domains" msgstr "Liste der Domains, die für E-Mail-Adressen bei der Registrierung erlaubt sind, durch Kommas getrennt. Platzhalter werden akzeptiert. Leer lassen, um alle Domains zu erlauben." -#: mod/admin.php:892 +#: mod/admin.php:913 msgid "Block public" msgstr "Öffentlichen Zugriff blockieren" -#: mod/admin.php:892 +#: mod/admin.php:913 msgid "" "Check to block public access to all otherwise public personal pages on this " "site unless you are currently logged in." msgstr "Klicken, um öffentlichen Zugriff auf sonst öffentliche Profile zu blockieren, wenn man nicht eingeloggt ist." -#: mod/admin.php:893 +#: mod/admin.php:914 msgid "Force publish" msgstr "Erzwinge Veröffentlichung" -#: mod/admin.php:893 +#: mod/admin.php:914 msgid "" "Check to force all profiles on this site to be listed in the site directory." msgstr "Klicken, um Anzeige aller Profile dieses Servers im Verzeichnis zu erzwingen." -#: mod/admin.php:894 +#: mod/admin.php:915 msgid "Global directory URL" msgstr "URL des weltweiten Verzeichnisses" -#: mod/admin.php:894 +#: mod/admin.php:915 msgid "" "URL to the global directory. If this is not set, the global directory is " "completely unavailable to the application." msgstr "URL des weltweiten Verzeichnisses. Wenn diese nicht gesetzt ist, ist das Verzeichnis für die Applikation nicht erreichbar." -#: mod/admin.php:895 +#: mod/admin.php:916 msgid "Allow threaded items" msgstr "Erlaube Threads in Diskussionen" -#: mod/admin.php:895 +#: mod/admin.php:916 msgid "Allow infinite level threading for items on this site." msgstr "Erlaube ein unendliches Level für Threads auf dieser Seite." -#: mod/admin.php:896 +#: mod/admin.php:917 msgid "Private posts by default for new users" msgstr "Private Beiträge als Standard für neue Nutzer" -#: mod/admin.php:896 +#: mod/admin.php:917 msgid "" "Set default post permissions for all new members to the default privacy " "group rather than public." msgstr "Die Standard-Zugriffsrechte für neue Nutzer werden so gesetzt, dass als Voreinstellung in die private Gruppe gepostet wird anstelle von öffentlichen Beiträgen." -#: mod/admin.php:897 +#: mod/admin.php:918 msgid "Don't include post content in email notifications" msgstr "Inhalte von Beiträgen nicht in E-Mail-Benachrichtigungen versenden" -#: mod/admin.php:897 +#: mod/admin.php:918 msgid "" "Don't include the content of a post/comment/private message/etc. in the " "email notifications that are sent out from this site, as a privacy measure." msgstr "Inhalte von Beiträgen/Kommentaren/privaten Nachrichten/usw., zum Datenschutz nicht in E-Mail-Benachrichtigungen einbinden." -#: mod/admin.php:898 +#: mod/admin.php:919 msgid "Disallow public access to addons listed in the apps menu." msgstr "Öffentlichen Zugriff auf Addons im Apps Menü verbieten." -#: mod/admin.php:898 +#: mod/admin.php:919 msgid "" "Checking this box will restrict addons listed in the apps menu to members " "only." msgstr "Wenn ausgewählt werden die im Apps Menü aufgeführten Addons nur angemeldeten Nutzern der Seite zur Verfügung gestellt." -#: mod/admin.php:899 +#: mod/admin.php:920 msgid "Don't embed private images in posts" msgstr "Private Bilder nicht in Beiträgen einbetten." -#: mod/admin.php:899 +#: mod/admin.php:920 msgid "" "Don't replace locally-hosted private photos in posts with an embedded copy " "of the image. This means that contacts who receive posts containing private " @@ -2500,228 +2505,228 @@ msgid "" "while." msgstr "Ersetze lokal gehostete private Fotos in Beiträgen nicht mit einer eingebetteten Kopie des Bildes. Dies bedeutet, dass Kontakte, die Beiträge mit privaten Fotos erhalten sich zunächst auf den jeweiligen Servern authentifizieren müssen bevor die Bilder geladen und angezeigt werden, was eine gewisse Zeit dauert." -#: mod/admin.php:900 +#: mod/admin.php:921 msgid "Allow Users to set remote_self" msgstr "Nutzern erlauben das remote_self Flag zu setzen" -#: mod/admin.php:900 +#: mod/admin.php:921 msgid "" "With checking this, every user is allowed to mark every contact as a " "remote_self in the repair contact dialog. Setting this flag on a contact " "causes mirroring every posting of that contact in the users stream." msgstr "Ist dies ausgewählt kann jeder Nutzer jeden seiner Kontakte als remote_self (entferntes Konto) im Kontakt reparieren Dialog markieren. Nach dem setzten dieses Flags werden alle Top-Level Beiträge dieser Kontakte automatisch in den Stream dieses Nutzers gepostet." -#: mod/admin.php:901 +#: mod/admin.php:922 msgid "Block multiple registrations" msgstr "Unterbinde Mehrfachregistrierung" -#: mod/admin.php:901 +#: mod/admin.php:922 msgid "Disallow users to register additional accounts for use as pages." msgstr "Benutzern nicht erlauben, weitere Konten als zusätzliche Profile anzulegen." -#: mod/admin.php:902 +#: mod/admin.php:923 msgid "OpenID support" msgstr "OpenID Unterstützung" -#: mod/admin.php:902 +#: mod/admin.php:923 msgid "OpenID support for registration and logins." msgstr "OpenID-Unterstützung für Registrierung und Login." -#: mod/admin.php:903 +#: mod/admin.php:924 msgid "Fullname check" msgstr "Namen auf Vollständigkeit überprüfen" -#: mod/admin.php:903 +#: mod/admin.php:924 msgid "" "Force users to register with a space between firstname and lastname in Full " "name, as an antispam measure" msgstr "Leerzeichen zwischen Vor- und Nachname im vollständigen Namen erzwingen, um SPAM zu vermeiden." -#: mod/admin.php:904 +#: mod/admin.php:925 msgid "UTF-8 Regular expressions" msgstr "UTF-8 Reguläre Ausdrücke" -#: mod/admin.php:904 +#: mod/admin.php:925 msgid "Use PHP UTF8 regular expressions" msgstr "PHP UTF8 Ausdrücke verwenden" -#: mod/admin.php:905 +#: mod/admin.php:926 msgid "Community Page Style" msgstr "Art der Gemeinschaftsseite" -#: mod/admin.php:905 +#: mod/admin.php:926 msgid "" "Type of community page to show. 'Global community' shows every public " "posting from an open distributed network that arrived on this server." msgstr "Welche Art der Gemeinschaftsseite soll verwendet werden? Globale Gemeinschaftsseite zeigt alle öffentlichen Beiträge eines offenen dezentralen Netzwerks an die auf diesem Server eintreffen." -#: mod/admin.php:906 +#: mod/admin.php:927 msgid "Posts per user on community page" msgstr "Anzahl der Beiträge pro Benutzer auf der Gemeinschaftsseite" -#: mod/admin.php:906 +#: mod/admin.php:927 msgid "" "The maximum number of posts per user on the community page. (Not valid for " "'Global Community')" msgstr "Die Anzahl der Beiträge die von jedem Nutzer maximal auf der Gemeinschaftsseite angezeigt werden sollen. Dieser Parameter wird nicht für die Globale Gemeinschaftsseite genutzt." -#: mod/admin.php:907 +#: mod/admin.php:928 msgid "Enable OStatus support" msgstr "OStatus Unterstützung aktivieren" -#: mod/admin.php:907 +#: mod/admin.php:928 msgid "" "Provide built-in OStatus (StatusNet, GNU Social etc.) compatibility. All " "communications in OStatus are public, so privacy warnings will be " "occasionally displayed." msgstr "Biete die eingebaute OStatus (iStatusNet, GNU Social, etc.) Unterstützung an. Jede Kommunikation in OStatus ist öffentlich, Privatsphäre Warnungen werden nur bei Bedarf angezeigt." -#: mod/admin.php:908 +#: mod/admin.php:929 msgid "OStatus conversation completion interval" msgstr "Intervall zum Vervollständigen von OStatus Unterhaltungen" -#: mod/admin.php:908 +#: mod/admin.php:929 msgid "" "How often shall the poller check for new entries in OStatus conversations? " "This can be a very ressource task." msgstr "Wie oft soll der Poller checken ob es neue Nachrichten in OStatus Unterhaltungen gibt die geladen werden müssen. Je nach Anzahl der OStatus Kontakte könnte dies ein sehr Ressourcen lastiger Job sein." -#: mod/admin.php:909 +#: mod/admin.php:930 msgid "OStatus support can only be enabled if threading is enabled." msgstr "OStatus Unterstützung kann nur aktiviert werden wenn \"Threading\" aktiviert ist. " -#: mod/admin.php:911 +#: mod/admin.php:932 msgid "" "Diaspora support can't be enabled because Friendica was installed into a sub" " directory." msgstr "Diaspora Unterstützung kann nicht aktiviert werden da Friendica in ein Unterverzeichnis installiert ist." -#: mod/admin.php:912 +#: mod/admin.php:933 msgid "Enable Diaspora support" msgstr "Diaspora Unterstützung aktivieren" -#: mod/admin.php:912 +#: mod/admin.php:933 msgid "Provide built-in Diaspora network compatibility." msgstr "Verwende die eingebaute Diaspora-Verknüpfung." -#: mod/admin.php:913 +#: mod/admin.php:934 msgid "Only allow Friendica contacts" msgstr "Nur Friendica-Kontakte erlauben" -#: mod/admin.php:913 +#: mod/admin.php:934 msgid "" "All contacts must use Friendica protocols. All other built-in communication " "protocols disabled." msgstr "Alle Kontakte müssen das Friendica Protokoll nutzen. Alle anderen Kommunikationsprotokolle werden deaktiviert." -#: mod/admin.php:914 +#: mod/admin.php:935 msgid "Verify SSL" msgstr "SSL Überprüfen" -#: mod/admin.php:914 +#: mod/admin.php:935 msgid "" "If you wish, you can turn on strict certificate checking. This will mean you" " cannot connect (at all) to self-signed SSL sites." msgstr "Wenn gewollt, kann man hier eine strenge Zertifikatkontrolle einstellen. Das bedeutet, dass man zu keinen Seiten mit selbst unterzeichnetem SSL eine Verbindung herstellen kann." -#: mod/admin.php:915 +#: mod/admin.php:936 msgid "Proxy user" msgstr "Proxy Nutzer" -#: mod/admin.php:916 +#: mod/admin.php:937 msgid "Proxy URL" msgstr "Proxy URL" -#: mod/admin.php:917 +#: mod/admin.php:938 msgid "Network timeout" msgstr "Netzwerk Wartezeit" -#: mod/admin.php:917 +#: mod/admin.php:938 msgid "Value is in seconds. Set to 0 for unlimited (not recommended)." msgstr "Der Wert ist in Sekunden. Setze 0 für unbegrenzt (nicht empfohlen)." -#: mod/admin.php:918 +#: mod/admin.php:939 msgid "Delivery interval" msgstr "Zustellungsintervall" -#: mod/admin.php:918 +#: mod/admin.php:939 msgid "" "Delay background delivery processes by this many seconds to reduce system " "load. Recommend: 4-5 for shared hosts, 2-3 for virtual private servers. 0-1 " "for large dedicated servers." msgstr "Verzögere im Hintergrund laufende Auslieferungsprozesse um die angegebene Anzahl an Sekunden, um die Systemlast zu verringern. Empfehlungen: 4-5 für Shared-Hosts, 2-3 für VPS, 0-1 für große dedizierte Server." -#: mod/admin.php:919 +#: mod/admin.php:940 msgid "Poll interval" msgstr "Abfrageintervall" -#: mod/admin.php:919 +#: mod/admin.php:940 msgid "" "Delay background polling processes by this many seconds to reduce system " "load. If 0, use delivery interval." msgstr "Verzögere Hintergrundprozesse um diese Anzahl an Sekunden, um die Systemlast zu reduzieren. Bei 0 Sekunden wird das Auslieferungsintervall verwendet." -#: mod/admin.php:920 +#: mod/admin.php:941 msgid "Maximum Load Average" msgstr "Maximum Load Average" -#: mod/admin.php:920 +#: mod/admin.php:941 msgid "" "Maximum system load before delivery and poll processes are deferred - " "default 50." msgstr "Maximale Systemlast bevor Verteil- und Empfangsprozesse verschoben werden - Standard 50" -#: mod/admin.php:921 +#: mod/admin.php:942 msgid "Maximum Load Average (Frontend)" msgstr "Maximum Load Average (Frontend)" -#: mod/admin.php:921 +#: mod/admin.php:942 msgid "Maximum system load before the frontend quits service - default 50." msgstr "Maximale Systemlast bevor Vordergrundprozesse pausiert werden - Standard 50." -#: mod/admin.php:922 +#: mod/admin.php:943 msgid "Maximum table size for optimization" msgstr "Maximale Tabellengröße zur Optimierung" -#: mod/admin.php:922 +#: mod/admin.php:943 msgid "" "Maximum table size (in MB) for the automatic optimization - default 100 MB. " "Enter -1 to disable it." msgstr "Maximale Tabellengröße (in MB) für die automatische Optimierung - Standard 100 MB. Gib -1 für Deaktivierung ein." -#: mod/admin.php:923 +#: mod/admin.php:944 msgid "Minimum level of fragmentation" msgstr "Minimaler Fragmentationsgrad" -#: mod/admin.php:923 +#: mod/admin.php:944 msgid "" "Minimum fragmenation level to start the automatic optimization - default " "value is 30%." msgstr "Minimales Fragmentationsgrad von Datenbanktabellen um die automatische Optimierung einzuleiten - Standardwert ist 30%" -#: mod/admin.php:925 +#: mod/admin.php:946 msgid "Periodical check of global contacts" msgstr "Regelmäßig globale Kontakte überprüfen" -#: mod/admin.php:925 +#: mod/admin.php:946 msgid "" "If enabled, the global contacts are checked periodically for missing or " "outdated data and the vitality of the contacts and servers." msgstr "Wenn diese Option aktiviert ist, werden die globalen Kontakte regelmäßig auf fehlende oder veraltete Daten sowie auf Erreichbarkeit des Kontakts und des Servers überprüft." -#: mod/admin.php:926 +#: mod/admin.php:947 msgid "Days between requery" msgstr "Tage zwischen erneuten Abfragen" -#: mod/admin.php:926 +#: mod/admin.php:947 msgid "Number of days after which a server is requeried for his contacts." msgstr "Legt das Abfrageintervall fest, nachdem ein Server erneut nach Kontakten abgefragt werden soll." -#: mod/admin.php:927 +#: mod/admin.php:948 msgid "Discover contacts from other servers" msgstr "Neue Kontakte auf anderen Servern entdecken" -#: mod/admin.php:927 +#: mod/admin.php:948 msgid "" "Periodically query other servers for contacts. You can choose between " "'users': the users on the remote system, 'Global Contacts': active contacts " @@ -2731,32 +2736,32 @@ msgid "" "Global Contacts'." msgstr "Regelmäßig andere Server nach potentiellen Kontakten absuchen. Du kannst zwischen 'Nutzern', den tatsächlichen Nutzern des anderen Systems und 'globalen Kontakten', aktiven Kontakten die auf dem System bekannt sind, wählen. Der Fallback-Mechanismus ist für ältere Friendica und Redmatrix Server gedacht, bei denen globale Kontakte noch nicht verfügbar sind. Durch den Fallbackmodus entsteht auf deinem Server eine wesentlich höhere Last, empfohlen wird der Modus 'Nutzer, globale Kontakte'." -#: mod/admin.php:928 +#: mod/admin.php:949 msgid "Timeframe for fetching global contacts" msgstr "Zeitfenster für globale Kontakte" -#: mod/admin.php:928 +#: mod/admin.php:949 msgid "" "When the discovery is activated, this value defines the timeframe for the " "activity of the global contacts that are fetched from other servers." msgstr "Wenn die Entdeckung neuer Kontakte aktiv ist, definiert dieses Zeitfenster den Zeitraum in dem globale Kontakte als aktiv gelten und von anderen Servern importiert werden." -#: mod/admin.php:929 +#: mod/admin.php:950 msgid "Search the local directory" msgstr "Lokales Verzeichnis durchsuchen" -#: mod/admin.php:929 +#: mod/admin.php:950 msgid "" "Search the local directory instead of the global directory. When searching " "locally, every search will be executed on the global directory in the " "background. This improves the search results when the search is repeated." msgstr "Suche im lokalen Verzeichnis anstelle des globalen Verzeichnisses durchführen. Jede Suche wird im Hintergrund auch im globalen Verzeichnis durchgeführt umd die Suchresultate zu verbessern, wenn diese Suche wiederholt wird." -#: mod/admin.php:931 +#: mod/admin.php:952 msgid "Publish server information" msgstr "Server Informationen veröffentlichen" -#: mod/admin.php:931 +#: mod/admin.php:952 msgid "" "If enabled, general server and usage data will be published. The data " "contains the name and version of the server, number of users with public " @@ -2764,205 +2769,205 @@ msgid "" " href='http://the-federation.info/'>the-federation.info for details." msgstr "Wenn aktiviert, werden allgemeine Informationen über den Server und Nutzungsdaten veröffentlicht. Die Daten beinhalten den Namen sowie die Version des Servers, die Anzahl der Nutzer_innen mit öffentlichen Profilen, die Anzahl der Beiträge sowie aktivierte Protokolle und Connectoren. Für Details bitte the-federation.info aufrufen." -#: mod/admin.php:933 +#: mod/admin.php:954 msgid "Use MySQL full text engine" msgstr "Nutze MySQL full text engine" -#: mod/admin.php:933 +#: mod/admin.php:954 msgid "" "Activates the full text engine. Speeds up search - but can only search for " "four and more characters." msgstr "Aktiviert die 'full text engine'. Beschleunigt die Suche - aber es kann nur nach vier oder mehr Zeichen gesucht werden." -#: mod/admin.php:934 +#: mod/admin.php:955 msgid "Suppress Language" msgstr "Sprachinformation unterdrücken" -#: mod/admin.php:934 +#: mod/admin.php:955 msgid "Suppress language information in meta information about a posting." msgstr "Verhindert das Erzeugen der Meta-Information zur Spracherkennung eines Beitrags." -#: mod/admin.php:935 +#: mod/admin.php:956 msgid "Suppress Tags" msgstr "Tags Unterdrücken" -#: mod/admin.php:935 +#: mod/admin.php:956 msgid "Suppress showing a list of hashtags at the end of the posting." msgstr "Unterdrückt die Anzeige von Tags am Ende eines Beitrags." -#: mod/admin.php:936 +#: mod/admin.php:957 msgid "Path to item cache" msgstr "Pfad zum Eintrag Cache" -#: mod/admin.php:936 +#: mod/admin.php:957 msgid "The item caches buffers generated bbcode and external images." msgstr "Im Item-Cache werden externe Bilder und geparster BBCode zwischen gespeichert." -#: mod/admin.php:937 +#: mod/admin.php:958 msgid "Cache duration in seconds" msgstr "Cache-Dauer in Sekunden" -#: mod/admin.php:937 +#: mod/admin.php:958 msgid "" "How long should the cache files be hold? Default value is 86400 seconds (One" " day). To disable the item cache, set the value to -1." msgstr "Wie lange sollen die gecachedten Dateien vorgehalten werden? Grundeinstellung sind 86400 Sekunden (ein Tag). Um den Item Cache zu deaktivieren, setze diesen Wert auf -1." -#: mod/admin.php:938 +#: mod/admin.php:959 msgid "Maximum numbers of comments per post" msgstr "Maximale Anzahl von Kommentaren pro Beitrag" -#: mod/admin.php:938 +#: mod/admin.php:959 msgid "How much comments should be shown for each post? Default value is 100." msgstr "Wie viele Kommentare sollen pro Beitrag angezeigt werden? Standardwert sind 100." -#: mod/admin.php:939 +#: mod/admin.php:960 msgid "Path for lock file" msgstr "Pfad für die Sperrdatei" -#: mod/admin.php:939 +#: mod/admin.php:960 msgid "" "The lock file is used to avoid multiple pollers at one time. Only define a " "folder here." msgstr "Die lock-Datei wird benutzt, damit nicht mehrere poller auf einmal laufen. Definiere hier einen Dateiverzeichnis." -#: mod/admin.php:940 +#: mod/admin.php:961 msgid "Temp path" msgstr "Temp Pfad" -#: mod/admin.php:940 +#: mod/admin.php:961 msgid "" "If you have a restricted system where the webserver can't access the system " "temp path, enter another path here." msgstr "Solltest du ein eingeschränktes System haben, auf dem der Webserver nicht auf das temp Verzeichnis des Systems zugreifen kann, setze hier einen anderen Pfad." -#: mod/admin.php:941 +#: mod/admin.php:962 msgid "Base path to installation" msgstr "Basis-Pfad zur Installation" -#: mod/admin.php:941 +#: mod/admin.php:962 msgid "" "If the system cannot detect the correct path to your installation, enter the" " correct path here. This setting should only be set if you are using a " "restricted system and symbolic links to your webroot." msgstr "Falls das System nicht den korrekten Pfad zu deiner Installation gefunden hat, gib den richtigen Pfad bitte hier ein. Du solltest hier den Pfad nur auf einem eingeschränkten System angeben müssen, bei dem du mit symbolischen Links auf dein Webverzeichnis verweist." -#: mod/admin.php:942 +#: mod/admin.php:963 msgid "Disable picture proxy" msgstr "Bilder Proxy deaktivieren" -#: mod/admin.php:942 +#: mod/admin.php:963 msgid "" "The picture proxy increases performance and privacy. It shouldn't be used on" " systems with very low bandwith." msgstr "Der Proxy für Bilder verbessert die Leistung und Privatsphäre der Nutzer. Er sollte nicht auf Systemen verwendet werden, die nur über begrenzte Bandbreite verfügen." -#: mod/admin.php:943 +#: mod/admin.php:964 msgid "Enable old style pager" msgstr "Den Old-Style Pager aktiviren" -#: mod/admin.php:943 +#: mod/admin.php:964 msgid "" "The old style pager has page numbers but slows down massively the page " "speed." msgstr "Der Old-Style Pager zeigt Seitennummern an, verlangsamt aber auch drastisch das Laden einer Seite." -#: mod/admin.php:944 +#: mod/admin.php:965 msgid "Only search in tags" msgstr "Nur in Tags suchen" -#: mod/admin.php:944 +#: mod/admin.php:965 msgid "On large systems the text search can slow down the system extremely." msgstr "Auf großen Knoten kann die Volltext-Suche das System ausbremsen." -#: mod/admin.php:946 +#: mod/admin.php:967 msgid "New base url" msgstr "Neue Basis-URL" -#: mod/admin.php:946 +#: mod/admin.php:967 msgid "" "Change base url for this server. Sends relocate message to all DFRN contacts" " of all users." msgstr "Ändert die Basis-URL dieses Servers und sendet eine Umzugsmitteilung an alle DFRN Kontakte deiner Nutzer_innen." -#: mod/admin.php:948 +#: mod/admin.php:969 msgid "RINO Encryption" msgstr "RINO Verschlüsselung" -#: mod/admin.php:948 +#: mod/admin.php:969 msgid "Encryption layer between nodes." msgstr "Verschlüsselung zwischen Friendica Instanzen" -#: mod/admin.php:949 +#: mod/admin.php:970 msgid "Embedly API key" msgstr "Embedly API Schlüssel" -#: mod/admin.php:949 +#: mod/admin.php:970 msgid "" "Embedly is used to fetch additional data for " "web pages. This is an optional parameter." msgstr "Embedly wird verwendet um zusätzliche Informationen von Webseiten zu laden. Dies ist ein optionaler Parameter." -#: mod/admin.php:978 +#: mod/admin.php:999 msgid "Update has been marked successful" msgstr "Update wurde als erfolgreich markiert" -#: mod/admin.php:986 +#: mod/admin.php:1007 #, php-format msgid "Database structure update %s was successfully applied." msgstr "Das Update %s der Struktur der Datenbank wurde erfolgreich angewandt." -#: mod/admin.php:989 +#: mod/admin.php:1010 #, php-format msgid "Executing of database structure update %s failed with error: %s" msgstr "Das Update %s der Struktur der Datenbank schlug mit folgender Fehlermeldung fehl: %s" -#: mod/admin.php:1001 +#: mod/admin.php:1022 #, php-format msgid "Executing %s failed with error: %s" msgstr "Die Ausführung von %s schlug fehl. Fehlermeldung: %s" -#: mod/admin.php:1004 +#: mod/admin.php:1025 #, php-format msgid "Update %s was successfully applied." msgstr "Update %s war erfolgreich." -#: mod/admin.php:1008 +#: mod/admin.php:1029 #, php-format msgid "Update %s did not return a status. Unknown if it succeeded." msgstr "Update %s hat keinen Status zurückgegeben. Unbekannter Status." -#: mod/admin.php:1010 +#: mod/admin.php:1031 #, php-format msgid "There was no additional update function %s that needed to be called." msgstr "Es gab keine weitere Update-Funktion, die von %s ausgeführt werden musste." -#: mod/admin.php:1029 +#: mod/admin.php:1050 msgid "No failed updates." msgstr "Keine fehlgeschlagenen Updates." -#: mod/admin.php:1030 +#: mod/admin.php:1051 msgid "Check database structure" msgstr "Datenbank Struktur überprüfen" -#: mod/admin.php:1035 +#: mod/admin.php:1056 msgid "Failed Updates" msgstr "Fehlgeschlagene Updates" -#: mod/admin.php:1036 +#: mod/admin.php:1057 msgid "" "This does not include updates prior to 1139, which did not return a status." msgstr "Ohne Updates vor 1139, da diese keinen Status zurückgegeben haben." -#: mod/admin.php:1037 +#: mod/admin.php:1058 msgid "Mark success (if update was manually applied)" msgstr "Als erfolgreich markieren (falls das Update manuell installiert wurde)" -#: mod/admin.php:1038 +#: mod/admin.php:1059 msgid "Attempt to execute this update step automatically" msgstr "Versuchen, diesen Schritt automatisch auszuführen" -#: mod/admin.php:1069 +#: mod/admin.php:1091 #, php-format msgid "" "\n" @@ -2970,7 +2975,7 @@ msgid "" "\t\t\t\tthe administrator of %2$s has set up an account for you." msgstr "\nHallo %1$s,\n\nauf %2$s wurde ein Account für Dich angelegt." -#: mod/admin.php:1072 +#: mod/admin.php:1094 #, php-format msgid "" "\n" @@ -3000,168 +3005,168 @@ msgid "" "\t\t\tThank you and welcome to %4$s." msgstr "\nNachfolgend die Anmelde-Details:\n\tAdresse der Seite:\t%1$s\n\tBenutzername:\t%2$s\n\tPasswort:\t%3$s\n\nDu kannst Dein Passwort unter \"Einstellungen\" ändern, sobald Du Dich\nangemeldet hast.\n\nBitte nimm Dir ein paar Minuten um die anderen Einstellungen auf dieser\nSeite zu kontrollieren.\n\nEventuell magst Du ja auch einige Informationen über Dich in Deinem\nProfil veröffentlichen, damit andere Leute Dich einfacher finden können.\nBearbeite hierfür einfach Dein Standard-Profil (über die Profil-Seite).\n\nWir empfehlen Dir, Deinen kompletten Namen anzugeben und ein zu Dir\npassendes Profilbild zu wählen, damit Dich alte Bekannte wieder finden.\nAußerdem ist es nützlich, wenn Du auf Deinem Profil Schlüsselwörter\nangibst. Das erleichtert es, Leute zu finden, die Deine Interessen teilen.\n\nWir respektieren Deine Privatsphäre - keine dieser Angaben ist nötig.\nWenn Du neu im Netzwerk bist und noch niemanden kennst, dann können sie\nallerdings dabei helfen, neue und interessante Kontakte zu knüpfen.\n\nNun viel Spaß, gute Begegnungen und willkommen auf %4$s." -#: mod/admin.php:1104 include/user.php:423 +#: mod/admin.php:1126 include/user.php:423 #, php-format msgid "Registration details for %s" msgstr "Details der Registration von %s" -#: mod/admin.php:1116 +#: mod/admin.php:1138 #, php-format msgid "%s user blocked/unblocked" msgid_plural "%s users blocked/unblocked" msgstr[0] "%s Benutzer geblockt/freigegeben" msgstr[1] "%s Benutzer geblockt/freigegeben" -#: mod/admin.php:1123 +#: mod/admin.php:1145 #, php-format msgid "%s user deleted" msgid_plural "%s users deleted" msgstr[0] "%s Nutzer gelöscht" msgstr[1] "%s Nutzer gelöscht" -#: mod/admin.php:1170 +#: mod/admin.php:1192 #, php-format msgid "User '%s' deleted" msgstr "Nutzer '%s' gelöscht" -#: mod/admin.php:1178 +#: mod/admin.php:1200 #, php-format msgid "User '%s' unblocked" msgstr "Nutzer '%s' entsperrt" -#: mod/admin.php:1178 +#: mod/admin.php:1200 #, php-format msgid "User '%s' blocked" msgstr "Nutzer '%s' gesperrt" -#: mod/admin.php:1271 +#: mod/admin.php:1291 msgid "Add User" msgstr "Nutzer hinzufügen" -#: mod/admin.php:1272 +#: mod/admin.php:1292 msgid "select all" msgstr "Alle auswählen" -#: mod/admin.php:1273 +#: mod/admin.php:1293 msgid "User registrations waiting for confirm" msgstr "Neuanmeldungen, die auf Deine Bestätigung warten" -#: mod/admin.php:1274 +#: mod/admin.php:1294 msgid "User waiting for permanent deletion" msgstr "Nutzer wartet auf permanente Löschung" -#: mod/admin.php:1275 +#: mod/admin.php:1295 msgid "Request date" msgstr "Anfragedatum" -#: mod/admin.php:1275 mod/admin.php:1287 mod/admin.php:1288 mod/admin.php:1303 +#: mod/admin.php:1295 mod/admin.php:1307 mod/admin.php:1308 mod/admin.php:1323 #: include/contact_selectors.php:79 include/contact_selectors.php:86 msgid "Email" msgstr "E-Mail" -#: mod/admin.php:1276 +#: mod/admin.php:1296 msgid "No registrations." msgstr "Keine Neuanmeldungen." -#: mod/admin.php:1278 +#: mod/admin.php:1298 msgid "Deny" msgstr "Verwehren" -#: mod/admin.php:1282 +#: mod/admin.php:1302 msgid "Site admin" msgstr "Seitenadministrator" -#: mod/admin.php:1283 +#: mod/admin.php:1303 msgid "Account expired" msgstr "Account ist abgelaufen" -#: mod/admin.php:1286 +#: mod/admin.php:1306 msgid "New User" msgstr "Neuer Nutzer" -#: mod/admin.php:1287 mod/admin.php:1288 +#: mod/admin.php:1307 mod/admin.php:1308 msgid "Register date" msgstr "Anmeldedatum" -#: mod/admin.php:1287 mod/admin.php:1288 +#: mod/admin.php:1307 mod/admin.php:1308 msgid "Last login" msgstr "Letzte Anmeldung" -#: mod/admin.php:1287 mod/admin.php:1288 +#: mod/admin.php:1307 mod/admin.php:1308 msgid "Last item" msgstr "Letzter Beitrag" -#: mod/admin.php:1287 +#: mod/admin.php:1307 msgid "Deleted since" msgstr "Gelöscht seit" -#: mod/admin.php:1288 mod/settings.php:41 +#: mod/admin.php:1308 mod/settings.php:41 msgid "Account" msgstr "Nutzerkonto" -#: mod/admin.php:1290 +#: mod/admin.php:1310 msgid "" "Selected users will be deleted!\\n\\nEverything these users had posted on " "this site will be permanently deleted!\\n\\nAre you sure?" msgstr "Die markierten Nutzer werden gelöscht!\\n\\nAlle Beiträge, die diese Nutzer auf dieser Seite veröffentlicht haben, werden permanent gelöscht!\\n\\nBist Du sicher?" -#: mod/admin.php:1291 +#: mod/admin.php:1311 msgid "" "The user {0} will be deleted!\\n\\nEverything this user has posted on this " "site will be permanently deleted!\\n\\nAre you sure?" msgstr "Der Nutzer {0} wird gelöscht!\\n\\nAlles was dieser Nutzer auf dieser Seite veröffentlicht hat, wird permanent gelöscht!\\n\\nBist Du sicher?" -#: mod/admin.php:1301 +#: mod/admin.php:1321 msgid "Name of the new user." msgstr "Name des neuen Nutzers" -#: mod/admin.php:1302 +#: mod/admin.php:1322 msgid "Nickname" msgstr "Spitzname" -#: mod/admin.php:1302 +#: mod/admin.php:1322 msgid "Nickname of the new user." msgstr "Spitznamen für den neuen Nutzer" -#: mod/admin.php:1303 +#: mod/admin.php:1323 msgid "Email address of the new user." msgstr "Email Adresse des neuen Nutzers" -#: mod/admin.php:1346 +#: mod/admin.php:1366 #, php-format msgid "Plugin %s disabled." msgstr "Plugin %s deaktiviert." -#: mod/admin.php:1350 +#: mod/admin.php:1370 #, php-format msgid "Plugin %s enabled." msgstr "Plugin %s aktiviert." -#: mod/admin.php:1360 mod/admin.php:1596 +#: mod/admin.php:1381 mod/admin.php:1617 msgid "Disable" msgstr "Ausschalten" -#: mod/admin.php:1362 mod/admin.php:1598 +#: mod/admin.php:1383 mod/admin.php:1619 msgid "Enable" msgstr "Einschalten" -#: mod/admin.php:1385 mod/admin.php:1643 +#: mod/admin.php:1406 mod/admin.php:1664 msgid "Toggle" msgstr "Umschalten" -#: mod/admin.php:1393 mod/admin.php:1652 +#: mod/admin.php:1414 mod/admin.php:1673 msgid "Author: " msgstr "Autor:" -#: mod/admin.php:1394 mod/admin.php:1653 +#: mod/admin.php:1415 mod/admin.php:1674 msgid "Maintainer: " msgstr "Betreuer:" -#: mod/admin.php:1446 +#: mod/admin.php:1467 msgid "Reload active plugins" msgstr "Aktive Plugins neu laden" -#: mod/admin.php:1451 +#: mod/admin.php:1472 #, php-format msgid "" "There are currently no plugins available on your node. You can find the " @@ -3169,62 +3174,62 @@ msgid "" "in the open plugin registry at %2$s" msgstr "Es sind derzeit keine Plugins auf diesem Knoten verfügbar. Du findest das offizielle Plugin-Repository unter %1$s und weitere eventuell interessante Plugins im offenen Plugins-Verzeichnis auf %2$s." -#: mod/admin.php:1556 +#: mod/admin.php:1577 msgid "No themes found." msgstr "Keine Themen gefunden." -#: mod/admin.php:1634 +#: mod/admin.php:1655 msgid "Screenshot" msgstr "Bildschirmfoto" -#: mod/admin.php:1694 +#: mod/admin.php:1715 msgid "Reload active themes" msgstr "Aktives Theme neu laden" -#: mod/admin.php:1699 +#: mod/admin.php:1720 #, php-format msgid "No themes found on the system. They should be paced in %1$s" msgstr "Es wurden keine Themes auf dem System gefunden. Diese sollten in %1$s patziert werden." -#: mod/admin.php:1700 +#: mod/admin.php:1721 msgid "[Experimental]" msgstr "[Experimentell]" -#: mod/admin.php:1701 +#: mod/admin.php:1722 msgid "[Unsupported]" msgstr "[Nicht unterstützt]" -#: mod/admin.php:1725 +#: mod/admin.php:1746 msgid "Log settings updated." msgstr "Protokolleinstellungen aktualisiert." -#: mod/admin.php:1762 +#: mod/admin.php:1783 msgid "Clear" msgstr "löschen" -#: mod/admin.php:1767 +#: mod/admin.php:1788 msgid "Enable Debugging" msgstr "Protokoll führen" -#: mod/admin.php:1768 +#: mod/admin.php:1789 msgid "Log file" msgstr "Protokolldatei" -#: mod/admin.php:1768 +#: mod/admin.php:1789 msgid "" "Must be writable by web server. Relative to your Friendica top-level " "directory." msgstr "Webserver muss Schreibrechte besitzen. Abhängig vom Friendica-Installationsverzeichnis." -#: mod/admin.php:1769 +#: mod/admin.php:1790 msgid "Log level" msgstr "Protokoll-Level" -#: mod/admin.php:1772 +#: mod/admin.php:1793 msgid "PHP logging" msgstr "PHP Protokollieren" -#: mod/admin.php:1773 +#: mod/admin.php:1794 msgid "" "To enable logging of PHP errors and warnings you can add the following to " "the .htconfig.php file of your installation. The filename set in the " @@ -3233,6 +3238,23 @@ msgid "" "'display_errors' is to enable these options, set to '0' to disable them." msgstr "Um PHP Warnungen und Fehler zu protokollieren, kannst du die folgenden Zeilen zur .htconfig.php Datei deiner Installation hinzufügen. Den Dateinamen der Log-Datei legst du in der Zeile mit dem 'error_log' fest, Er ist relativ zum Friendica-Stammverzeichnis und muss schreibbar durch den Webserver sein. Eine \"1\" als Option für die Punkte 'log_errors' und 'display_errors' aktiviert die Funktionen zum Protokollieren bzw. Anzeigen der Fehler, eine \"0\" deaktiviert sie." +#: mod/admin.php:1920 mod/admin.php:1921 mod/settings.php:759 +msgid "Off" +msgstr "Aus" + +#: mod/admin.php:1920 mod/admin.php:1921 mod/settings.php:759 +msgid "On" +msgstr "An" + +#: mod/admin.php:1921 +#, php-format +msgid "Lock feature %s" +msgstr "Feature festlegen: %s" + +#: mod/admin.php:1929 +msgid "Manage Additional Features" +msgstr "Zusätzliche Features Verwalten" + #: mod/network.php:146 #, php-format msgid "Search Results For: %s" @@ -3242,7 +3264,7 @@ msgstr "Suchergebnisse für: %s" msgid "Remove term" msgstr "Begriff entfernen" -#: mod/network.php:200 mod/search.php:34 include/features.php:79 +#: mod/network.php:200 mod/search.php:34 include/features.php:84 msgid "Saved Searches" msgstr "Gespeicherte Suchen" @@ -3363,11 +3385,11 @@ msgstr "Fr" msgid "Sat" msgstr "Sa" -#: mod/events.php:208 mod/settings.php:939 include/text.php:1274 +#: mod/events.php:208 mod/settings.php:948 include/text.php:1274 msgid "Sunday" msgstr "Sonntag" -#: mod/events.php:209 mod/settings.php:939 include/text.php:1274 +#: mod/events.php:209 mod/settings.php:948 include/text.php:1274 msgid "Monday" msgstr "Montag" @@ -3696,7 +3718,7 @@ msgstr "Link" msgid "Video" msgstr "Video" -#: mod/content.php:730 mod/settings.php:712 object/Item.php:122 +#: mod/content.php:730 mod/settings.php:721 object/Item.php:122 #: object/Item.php:124 msgid "Edit" msgstr "Bearbeiten" @@ -4168,699 +4190,687 @@ msgstr "Keine Ergebnisse." msgid "everybody" msgstr "jeder" -#: mod/settings.php:47 -msgid "Additional features" -msgstr "Zusätzliche Features" - -#: mod/settings.php:53 +#: mod/settings.php:58 msgid "Display" msgstr "Anzeige" -#: mod/settings.php:60 mod/settings.php:855 +#: mod/settings.php:65 mod/settings.php:864 msgid "Social Networks" msgstr "Soziale Netzwerke" -#: mod/settings.php:72 include/nav.php:180 +#: mod/settings.php:79 include/nav.php:180 msgid "Delegations" msgstr "Delegationen" -#: mod/settings.php:78 +#: mod/settings.php:86 msgid "Connected apps" msgstr "Verbundene Programme" -#: mod/settings.php:84 mod/uexport.php:85 +#: mod/settings.php:93 mod/uexport.php:85 msgid "Export personal data" msgstr "Persönliche Daten exportieren" -#: mod/settings.php:90 +#: mod/settings.php:100 msgid "Remove account" msgstr "Konto löschen" -#: mod/settings.php:143 +#: mod/settings.php:153 msgid "Missing some important data!" msgstr "Wichtige Daten fehlen!" -#: mod/settings.php:256 +#: mod/settings.php:266 msgid "Failed to connect with email account using the settings provided." msgstr "Verbindung zum E-Mail-Konto mit den angegebenen Einstellungen nicht möglich." -#: mod/settings.php:261 +#: mod/settings.php:271 msgid "Email settings updated." msgstr "E-Mail Einstellungen bearbeitet." -#: mod/settings.php:276 +#: mod/settings.php:286 msgid "Features updated" msgstr "Features aktualisiert" -#: mod/settings.php:343 +#: mod/settings.php:353 msgid "Relocate message has been send to your contacts" msgstr "Die Umzugsbenachrichtigung wurde an Deine Kontakte versendet." -#: mod/settings.php:357 include/user.php:39 +#: mod/settings.php:367 include/user.php:39 msgid "Passwords do not match. Password unchanged." msgstr "Die Passwörter stimmen nicht überein. Das Passwort bleibt unverändert." -#: mod/settings.php:362 +#: mod/settings.php:372 msgid "Empty passwords are not allowed. Password unchanged." msgstr "Leere Passwörter sind nicht erlaubt. Passwort bleibt unverändert." -#: mod/settings.php:370 +#: mod/settings.php:380 msgid "Wrong password." msgstr "Falsches Passwort." -#: mod/settings.php:381 +#: mod/settings.php:391 msgid "Password changed." msgstr "Passwort geändert." -#: mod/settings.php:383 +#: mod/settings.php:393 msgid "Password update failed. Please try again." msgstr "Aktualisierung des Passworts gescheitert, bitte versuche es noch einmal." -#: mod/settings.php:452 +#: mod/settings.php:462 msgid " Please use a shorter name." msgstr " Bitte verwende einen kürzeren Namen." -#: mod/settings.php:454 +#: mod/settings.php:464 msgid " Name too short." msgstr " Name ist zu kurz." -#: mod/settings.php:463 +#: mod/settings.php:473 msgid "Wrong Password" msgstr "Falsches Passwort" -#: mod/settings.php:468 +#: mod/settings.php:478 msgid " Not valid email." msgstr " Keine gültige E-Mail." -#: mod/settings.php:474 +#: mod/settings.php:484 msgid " Cannot change to that email." msgstr "Ändern der E-Mail nicht möglich. " -#: mod/settings.php:530 +#: mod/settings.php:540 msgid "Private forum has no privacy permissions. Using default privacy group." msgstr "Für das private Forum sind keine Zugriffsrechte eingestellt. Die voreingestellte Gruppe für neue Kontakte wird benutzt." -#: mod/settings.php:534 +#: mod/settings.php:544 msgid "Private forum has no privacy permissions and no default privacy group." msgstr "Für das private Forum sind keine Zugriffsrechte eingestellt, und es gibt keine voreingestellte Gruppe für neue Kontakte." -#: mod/settings.php:573 +#: mod/settings.php:583 msgid "Settings updated." msgstr "Einstellungen aktualisiert." -#: mod/settings.php:649 mod/settings.php:675 mod/settings.php:711 +#: mod/settings.php:658 mod/settings.php:684 mod/settings.php:720 msgid "Add application" msgstr "Programm hinzufügen" -#: mod/settings.php:653 mod/settings.php:679 +#: mod/settings.php:662 mod/settings.php:688 msgid "Consumer Key" msgstr "Consumer Key" -#: mod/settings.php:654 mod/settings.php:680 +#: mod/settings.php:663 mod/settings.php:689 msgid "Consumer Secret" msgstr "Consumer Secret" -#: mod/settings.php:655 mod/settings.php:681 +#: mod/settings.php:664 mod/settings.php:690 msgid "Redirect" msgstr "Umleiten" -#: mod/settings.php:656 mod/settings.php:682 +#: mod/settings.php:665 mod/settings.php:691 msgid "Icon url" msgstr "Icon URL" -#: mod/settings.php:667 +#: mod/settings.php:676 msgid "You can't edit this application." msgstr "Du kannst dieses Programm nicht bearbeiten." -#: mod/settings.php:710 +#: mod/settings.php:719 msgid "Connected Apps" msgstr "Verbundene Programme" -#: mod/settings.php:714 +#: mod/settings.php:723 msgid "Client key starts with" msgstr "Anwenderschlüssel beginnt mit" -#: mod/settings.php:715 +#: mod/settings.php:724 msgid "No name" msgstr "Kein Name" -#: mod/settings.php:716 +#: mod/settings.php:725 msgid "Remove authorization" msgstr "Autorisierung entziehen" -#: mod/settings.php:728 +#: mod/settings.php:737 msgid "No Plugin settings configured" msgstr "Keine Plugin-Einstellungen konfiguriert" -#: mod/settings.php:736 +#: mod/settings.php:745 msgid "Plugin Settings" msgstr "Plugin-Einstellungen" -#: mod/settings.php:750 -msgid "Off" -msgstr "Aus" - -#: mod/settings.php:750 -msgid "On" -msgstr "An" - -#: mod/settings.php:758 +#: mod/settings.php:767 msgid "Additional Features" msgstr "Zusätzliche Features" -#: mod/settings.php:768 mod/settings.php:772 +#: mod/settings.php:777 mod/settings.php:781 msgid "General Social Media Settings" msgstr "Allgemeine Einstellungen zu Sozialen Medien" -#: mod/settings.php:778 +#: mod/settings.php:787 msgid "Disable intelligent shortening" msgstr "Intelligentes Link kürzen ausschalten" -#: mod/settings.php:780 +#: mod/settings.php:789 msgid "" "Normally the system tries to find the best link to add to shortened posts. " "If this option is enabled then every shortened post will always point to the" " original friendica post." msgstr "Normalerweise versucht das System den besten Link zu finden um ihn zu gekürzten Postings hinzu zu fügen. Wird diese Option ausgewählt wird stets ein Link auf die originale Friendica Nachricht beigefügt." -#: mod/settings.php:786 +#: mod/settings.php:795 msgid "Automatically follow any GNU Social (OStatus) followers/mentioners" msgstr "Automatisch allen GNU Social (OStatus) Followern/Erwähnern folgen" -#: mod/settings.php:788 +#: mod/settings.php:797 msgid "" "If you receive a message from an unknown OStatus user, this option decides " "what to do. If it is checked, a new contact will be created for every " "unknown user." msgstr "Wenn du eine Nachricht eines unbekannten OStatus Nutzers bekommst, entscheidet diese Option wie diese behandelt werden soll. Ist die Option aktiviert, wird ein neuer Kontakt für den Verfasser erstellt,." -#: mod/settings.php:797 +#: mod/settings.php:806 msgid "Your legacy GNU Social account" msgstr "Dein alter GNU Social Account" -#: mod/settings.php:799 +#: mod/settings.php:808 msgid "" "If you enter your old GNU Social/Statusnet account name here (in the format " "user@domain.tld), your contacts will be added automatically. The field will " "be emptied when done." msgstr "Wenn du deinen alten GNU Socual/Statusnet Accountnamen hier angibst (Format name@domain.tld) werden deine Kontakte automatisch hinzugefügt. Dieses Feld wird geleert, wenn die Kontakte hinzugefügt wurden." -#: mod/settings.php:802 +#: mod/settings.php:811 msgid "Repair OStatus subscriptions" msgstr "OStatus Abonnements reparieren" -#: mod/settings.php:811 mod/settings.php:812 +#: mod/settings.php:820 mod/settings.php:821 #, php-format msgid "Built-in support for %s connectivity is %s" msgstr "Eingebaute Unterstützung für Verbindungen zu %s ist %s" -#: mod/settings.php:811 mod/dfrn_request.php:865 +#: mod/settings.php:820 mod/dfrn_request.php:865 #: include/contact_selectors.php:80 msgid "Diaspora" msgstr "Diaspora" -#: mod/settings.php:811 mod/settings.php:812 +#: mod/settings.php:820 mod/settings.php:821 msgid "enabled" msgstr "eingeschaltet" -#: mod/settings.php:811 mod/settings.php:812 +#: mod/settings.php:820 mod/settings.php:821 msgid "disabled" msgstr "ausgeschaltet" -#: mod/settings.php:812 +#: mod/settings.php:821 msgid "GNU Social (OStatus)" msgstr "GNU Social (OStatus)" -#: mod/settings.php:848 +#: mod/settings.php:857 msgid "Email access is disabled on this site." msgstr "Zugriff auf E-Mails für diese Seite deaktiviert." -#: mod/settings.php:860 +#: mod/settings.php:869 msgid "Email/Mailbox Setup" msgstr "E-Mail/Postfach-Einstellungen" -#: mod/settings.php:861 +#: mod/settings.php:870 msgid "" "If you wish to communicate with email contacts using this service " "(optional), please specify how to connect to your mailbox." msgstr "Wenn Du mit E-Mail-Kontakten über diesen Service kommunizieren möchtest (optional), gib bitte die Einstellungen für Dein Postfach an." -#: mod/settings.php:862 +#: mod/settings.php:871 msgid "Last successful email check:" msgstr "Letzter erfolgreicher E-Mail Check" -#: mod/settings.php:864 +#: mod/settings.php:873 msgid "IMAP server name:" msgstr "IMAP-Server-Name:" -#: mod/settings.php:865 +#: mod/settings.php:874 msgid "IMAP port:" msgstr "IMAP-Port:" -#: mod/settings.php:866 +#: mod/settings.php:875 msgid "Security:" msgstr "Sicherheit:" -#: mod/settings.php:866 mod/settings.php:871 +#: mod/settings.php:875 mod/settings.php:880 msgid "None" msgstr "Keine" -#: mod/settings.php:867 +#: mod/settings.php:876 msgid "Email login name:" msgstr "E-Mail-Login-Name:" -#: mod/settings.php:868 +#: mod/settings.php:877 msgid "Email password:" msgstr "E-Mail-Passwort:" -#: mod/settings.php:869 +#: mod/settings.php:878 msgid "Reply-to address:" msgstr "Reply-to Adresse:" -#: mod/settings.php:870 +#: mod/settings.php:879 msgid "Send public posts to all email contacts:" msgstr "Sende öffentliche Beiträge an alle E-Mail-Kontakte:" -#: mod/settings.php:871 +#: mod/settings.php:880 msgid "Action after import:" msgstr "Aktion nach Import:" -#: mod/settings.php:871 +#: mod/settings.php:880 msgid "Mark as seen" msgstr "Als gelesen markieren" -#: mod/settings.php:871 +#: mod/settings.php:880 msgid "Move to folder" msgstr "In einen Ordner verschieben" -#: mod/settings.php:872 +#: mod/settings.php:881 msgid "Move to folder:" msgstr "In diesen Ordner verschieben:" -#: mod/settings.php:958 +#: mod/settings.php:967 msgid "Display Settings" msgstr "Anzeige-Einstellungen" -#: mod/settings.php:964 mod/settings.php:982 +#: mod/settings.php:973 mod/settings.php:991 msgid "Display Theme:" msgstr "Theme:" -#: mod/settings.php:965 +#: mod/settings.php:974 msgid "Mobile Theme:" msgstr "Mobiles Theme" -#: mod/settings.php:966 +#: mod/settings.php:975 msgid "Update browser every xx seconds" msgstr "Browser alle xx Sekunden aktualisieren" -#: mod/settings.php:966 +#: mod/settings.php:975 msgid "Minimum of 10 seconds. Enter -1 to disable it." msgstr "Minimum sind 10 Sekeunden. Gib -1 ein um abzuschalten." -#: mod/settings.php:967 +#: mod/settings.php:976 msgid "Number of items to display per page:" msgstr "Zahl der Beiträge, die pro Netzwerkseite angezeigt werden sollen: " -#: mod/settings.php:967 mod/settings.php:968 +#: mod/settings.php:976 mod/settings.php:977 msgid "Maximum of 100 items" msgstr "Maximal 100 Beiträge" -#: mod/settings.php:968 +#: mod/settings.php:977 msgid "Number of items to display per page when viewed from mobile device:" msgstr "Zahl der Beiträge, die pro Netzwerkseite auf mobilen Geräten angezeigt werden sollen:" -#: mod/settings.php:969 +#: mod/settings.php:978 msgid "Don't show emoticons" msgstr "Keine Smilies anzeigen" -#: mod/settings.php:970 +#: mod/settings.php:979 msgid "Calendar" msgstr "Kalender" -#: mod/settings.php:971 +#: mod/settings.php:980 msgid "Beginning of week:" msgstr "Wochenbeginn:" -#: mod/settings.php:972 +#: mod/settings.php:981 msgid "Don't show notices" msgstr "Info-Popups nicht anzeigen" -#: mod/settings.php:973 +#: mod/settings.php:982 msgid "Infinite scroll" msgstr "Endloses Scrollen" -#: mod/settings.php:974 +#: mod/settings.php:983 msgid "Automatic updates only at the top of the network page" msgstr "Automatische Updates nur, wenn Du oben auf der Netzwerkseite bist." -#: mod/settings.php:976 view/theme/cleanzero/config.php:82 +#: mod/settings.php:985 view/theme/cleanzero/config.php:82 #: view/theme/dispy/config.php:72 view/theme/quattro/config.php:66 #: view/theme/diabook/config.php:150 view/theme/vier/config.php:109 #: view/theme/duepuntozero/config.php:61 msgid "Theme settings" msgstr "Themeneinstellungen" -#: mod/settings.php:1053 +#: mod/settings.php:1062 msgid "User Types" msgstr "Nutzer Art" -#: mod/settings.php:1054 +#: mod/settings.php:1063 msgid "Community Types" msgstr "Gemeinschafts Art" -#: mod/settings.php:1055 +#: mod/settings.php:1064 msgid "Normal Account Page" msgstr "Normales Konto" -#: mod/settings.php:1056 +#: mod/settings.php:1065 msgid "This account is a normal personal profile" msgstr "Dieses Konto ist ein normales persönliches Profil" -#: mod/settings.php:1059 +#: mod/settings.php:1068 msgid "Soapbox Page" msgstr "Marktschreier-Konto" -#: mod/settings.php:1060 +#: mod/settings.php:1069 msgid "Automatically approve all connection/friend requests as read-only fans" msgstr "Kontaktanfragen werden automatisch als Nurlese-Fans akzeptiert" -#: mod/settings.php:1063 +#: mod/settings.php:1072 msgid "Community Forum/Celebrity Account" msgstr "Forum/Promi-Konto" -#: mod/settings.php:1064 +#: mod/settings.php:1073 msgid "" "Automatically approve all connection/friend requests as read-write fans" msgstr "Kontaktanfragen werden automatisch als Lese-und-Schreib-Fans akzeptiert" -#: mod/settings.php:1067 +#: mod/settings.php:1076 msgid "Automatic Friend Page" msgstr "Automatische Freunde Seite" -#: mod/settings.php:1068 +#: mod/settings.php:1077 msgid "Automatically approve all connection/friend requests as friends" msgstr "Kontaktanfragen werden automatisch als Freund akzeptiert" -#: mod/settings.php:1071 +#: mod/settings.php:1080 msgid "Private Forum [Experimental]" msgstr "Privates Forum [Versuchsstadium]" -#: mod/settings.php:1072 +#: mod/settings.php:1081 msgid "Private forum - approved members only" msgstr "Privates Forum, nur für Mitglieder" -#: mod/settings.php:1084 +#: mod/settings.php:1093 msgid "OpenID:" msgstr "OpenID:" -#: mod/settings.php:1084 +#: mod/settings.php:1093 msgid "(Optional) Allow this OpenID to login to this account." msgstr "(Optional) Erlaube die Anmeldung für dieses Konto mit dieser OpenID." -#: mod/settings.php:1094 +#: mod/settings.php:1103 msgid "Publish your default profile in your local site directory?" msgstr "Darf Dein Standardprofil im Verzeichnis dieses Servers veröffentlicht werden?" -#: mod/settings.php:1100 +#: mod/settings.php:1109 msgid "Publish your default profile in the global social directory?" msgstr "Darf Dein Standardprofil im weltweiten Verzeichnis veröffentlicht werden?" -#: mod/settings.php:1108 +#: mod/settings.php:1117 msgid "Hide your contact/friend list from viewers of your default profile?" msgstr "Liste der Kontakte vor Betrachtern des Standardprofils verbergen?" -#: mod/settings.php:1112 include/acl_selectors.php:331 +#: mod/settings.php:1121 include/acl_selectors.php:331 msgid "Hide your profile details from unknown viewers?" msgstr "Profil-Details vor unbekannten Betrachtern verbergen?" -#: mod/settings.php:1112 +#: mod/settings.php:1121 msgid "" "If enabled, posting public messages to Diaspora and other networks isn't " "possible." msgstr "Wenn aktiviert, ist das senden öffentliche Nachrichten zu Diaspora und anderen Netzwerken nicht möglich" -#: mod/settings.php:1117 +#: mod/settings.php:1126 msgid "Allow friends to post to your profile page?" msgstr "Dürfen Deine Kontakte auf Deine Pinnwand schreiben?" -#: mod/settings.php:1123 +#: mod/settings.php:1132 msgid "Allow friends to tag your posts?" msgstr "Dürfen Deine Kontakte Deine Beiträge mit Schlagwörtern versehen?" -#: mod/settings.php:1129 +#: mod/settings.php:1138 msgid "Allow us to suggest you as a potential friend to new members?" msgstr "Dürfen wir Dich neuen Mitgliedern als potentiellen Kontakt vorschlagen?" -#: mod/settings.php:1135 +#: mod/settings.php:1144 msgid "Permit unknown people to send you private mail?" msgstr "Dürfen Dir Unbekannte private Nachrichten schicken?" -#: mod/settings.php:1143 +#: mod/settings.php:1152 msgid "Profile is not published." msgstr "Profil ist nicht veröffentlicht." -#: mod/settings.php:1151 +#: mod/settings.php:1160 #, php-format msgid "Your Identity Address is '%s' or '%s'." msgstr "Die Adresse deines Profils lautet '%s' oder '%s'." -#: mod/settings.php:1158 +#: mod/settings.php:1167 msgid "Automatically expire posts after this many days:" msgstr "Beiträge verfallen automatisch nach dieser Anzahl von Tagen:" -#: mod/settings.php:1158 +#: mod/settings.php:1167 msgid "If empty, posts will not expire. Expired posts will be deleted" msgstr "Wenn leer verfallen Beiträge nie automatisch. Verfallene Beiträge werden gelöscht." -#: mod/settings.php:1159 +#: mod/settings.php:1168 msgid "Advanced expiration settings" msgstr "Erweiterte Verfallseinstellungen" -#: mod/settings.php:1160 +#: mod/settings.php:1169 msgid "Advanced Expiration" msgstr "Erweitertes Verfallen" -#: mod/settings.php:1161 +#: mod/settings.php:1170 msgid "Expire posts:" msgstr "Beiträge verfallen lassen:" -#: mod/settings.php:1162 +#: mod/settings.php:1171 msgid "Expire personal notes:" msgstr "Persönliche Notizen verfallen lassen:" -#: mod/settings.php:1163 +#: mod/settings.php:1172 msgid "Expire starred posts:" msgstr "Markierte Beiträge verfallen lassen:" -#: mod/settings.php:1164 +#: mod/settings.php:1173 msgid "Expire photos:" msgstr "Fotos verfallen lassen:" -#: mod/settings.php:1165 +#: mod/settings.php:1174 msgid "Only expire posts by others:" msgstr "Nur Beiträge anderer verfallen:" -#: mod/settings.php:1193 +#: mod/settings.php:1202 msgid "Account Settings" msgstr "Kontoeinstellungen" -#: mod/settings.php:1201 +#: mod/settings.php:1210 msgid "Password Settings" msgstr "Passwort-Einstellungen" -#: mod/settings.php:1202 mod/register.php:274 +#: mod/settings.php:1211 mod/register.php:274 msgid "New Password:" msgstr "Neues Passwort:" -#: mod/settings.php:1203 mod/register.php:275 +#: mod/settings.php:1212 mod/register.php:275 msgid "Confirm:" msgstr "Bestätigen:" -#: mod/settings.php:1203 +#: mod/settings.php:1212 msgid "Leave password fields blank unless changing" msgstr "Lass die Passwort-Felder leer, außer Du willst das Passwort ändern" -#: mod/settings.php:1204 +#: mod/settings.php:1213 msgid "Current Password:" msgstr "Aktuelles Passwort:" -#: mod/settings.php:1204 mod/settings.php:1205 +#: mod/settings.php:1213 mod/settings.php:1214 msgid "Your current password to confirm the changes" msgstr "Dein aktuelles Passwort um die Änderungen zu bestätigen" -#: mod/settings.php:1205 +#: mod/settings.php:1214 msgid "Password:" msgstr "Passwort:" -#: mod/settings.php:1209 +#: mod/settings.php:1218 msgid "Basic Settings" msgstr "Grundeinstellungen" -#: mod/settings.php:1210 include/identity.php:588 +#: mod/settings.php:1219 include/identity.php:588 msgid "Full Name:" msgstr "Kompletter Name:" -#: mod/settings.php:1211 +#: mod/settings.php:1220 msgid "Email Address:" msgstr "E-Mail-Adresse:" -#: mod/settings.php:1212 +#: mod/settings.php:1221 msgid "Your Timezone:" msgstr "Deine Zeitzone:" -#: mod/settings.php:1213 +#: mod/settings.php:1222 msgid "Your Language:" msgstr "Deine Sprache:" -#: mod/settings.php:1213 +#: mod/settings.php:1222 msgid "" "Set the language we use to show you friendica interface and to send you " "emails" msgstr "Wähle die Sprache, in der wir Dir die Friendica-Oberfläche präsentieren sollen und Dir E-Mail schicken" -#: mod/settings.php:1214 +#: mod/settings.php:1223 msgid "Default Post Location:" msgstr "Standardstandort:" -#: mod/settings.php:1215 +#: mod/settings.php:1224 msgid "Use Browser Location:" msgstr "Standort des Browsers verwenden:" -#: mod/settings.php:1218 +#: mod/settings.php:1227 msgid "Security and Privacy Settings" msgstr "Sicherheits- und Privatsphäre-Einstellungen" -#: mod/settings.php:1220 +#: mod/settings.php:1229 msgid "Maximum Friend Requests/Day:" msgstr "Maximale Anzahl von Freundschaftsanfragen/Tag:" -#: mod/settings.php:1220 mod/settings.php:1250 +#: mod/settings.php:1229 mod/settings.php:1259 msgid "(to prevent spam abuse)" msgstr "(um SPAM zu vermeiden)" -#: mod/settings.php:1221 +#: mod/settings.php:1230 msgid "Default Post Permissions" msgstr "Standard-Zugriffsrechte für Beiträge" -#: mod/settings.php:1222 +#: mod/settings.php:1231 msgid "(click to open/close)" msgstr "(klicke zum öffnen/schließen)" -#: mod/settings.php:1231 mod/photos.php:1199 mod/photos.php:1584 +#: mod/settings.php:1240 mod/photos.php:1199 mod/photos.php:1584 msgid "Show to Groups" msgstr "Zeige den Gruppen" -#: mod/settings.php:1232 mod/photos.php:1200 mod/photos.php:1585 +#: mod/settings.php:1241 mod/photos.php:1200 mod/photos.php:1585 msgid "Show to Contacts" msgstr "Zeige den Kontakten" -#: mod/settings.php:1233 +#: mod/settings.php:1242 msgid "Default Private Post" msgstr "Privater Standardbeitrag" -#: mod/settings.php:1234 +#: mod/settings.php:1243 msgid "Default Public Post" msgstr "Öffentlicher Standardbeitrag" -#: mod/settings.php:1238 +#: mod/settings.php:1247 msgid "Default Permissions for New Posts" msgstr "Standardberechtigungen für neue Beiträge" -#: mod/settings.php:1250 +#: mod/settings.php:1259 msgid "Maximum private messages per day from unknown people:" msgstr "Maximale Anzahl privater Nachrichten von Unbekannten pro Tag:" -#: mod/settings.php:1253 +#: mod/settings.php:1262 msgid "Notification Settings" msgstr "Benachrichtigungseinstellungen" -#: mod/settings.php:1254 +#: mod/settings.php:1263 msgid "By default post a status message when:" msgstr "Standardmäßig eine Statusnachricht posten, wenn:" -#: mod/settings.php:1255 +#: mod/settings.php:1264 msgid "accepting a friend request" msgstr "– Du eine Kontaktanfrage akzeptierst" -#: mod/settings.php:1256 +#: mod/settings.php:1265 msgid "joining a forum/community" msgstr "– Du einem Forum/einer Gemeinschaftsseite beitrittst" -#: mod/settings.php:1257 +#: mod/settings.php:1266 msgid "making an interesting profile change" msgstr "– Du eine interessante Änderung an Deinem Profil durchführst" -#: mod/settings.php:1258 +#: mod/settings.php:1267 msgid "Send a notification email when:" msgstr "Benachrichtigungs-E-Mail senden wenn:" -#: mod/settings.php:1259 +#: mod/settings.php:1268 msgid "You receive an introduction" msgstr "– Du eine Kontaktanfrage erhältst" -#: mod/settings.php:1260 +#: mod/settings.php:1269 msgid "Your introductions are confirmed" msgstr "– eine Deiner Kontaktanfragen akzeptiert wurde" -#: mod/settings.php:1261 +#: mod/settings.php:1270 msgid "Someone writes on your profile wall" msgstr "– jemand etwas auf Deine Pinnwand schreibt" -#: mod/settings.php:1262 +#: mod/settings.php:1271 msgid "Someone writes a followup comment" msgstr "– jemand auch einen Kommentar verfasst" -#: mod/settings.php:1263 +#: mod/settings.php:1272 msgid "You receive a private message" msgstr "– Du eine private Nachricht erhältst" -#: mod/settings.php:1264 +#: mod/settings.php:1273 msgid "You receive a friend suggestion" msgstr "– Du eine Empfehlung erhältst" -#: mod/settings.php:1265 +#: mod/settings.php:1274 msgid "You are tagged in a post" msgstr "– Du in einem Beitrag erwähnt wirst" -#: mod/settings.php:1266 +#: mod/settings.php:1275 msgid "You are poked/prodded/etc. in a post" msgstr "– Du von jemandem angestupst oder sonstwie behandelt wirst" -#: mod/settings.php:1268 +#: mod/settings.php:1277 msgid "Activate desktop notifications" msgstr "Desktop Benachrichtigungen einschalten" -#: mod/settings.php:1268 +#: mod/settings.php:1277 msgid "Show desktop popup on new notifications" msgstr "Desktop Benachrichtigungen einschalten" -#: mod/settings.php:1270 +#: mod/settings.php:1279 msgid "Text-only notification emails" msgstr "Benachrichtigungs E-Mail als Rein-Text." -#: mod/settings.php:1272 +#: mod/settings.php:1281 msgid "Send text only notification emails, without the html part" msgstr "Sende Benachrichtigungs E-Mail als Rein-Text - ohne HTML-Teil" -#: mod/settings.php:1274 +#: mod/settings.php:1283 msgid "Advanced Account/Page Type Settings" msgstr "Erweiterte Konto-/Seitentyp-Einstellungen" -#: mod/settings.php:1275 +#: mod/settings.php:1284 msgid "Change the behaviour of this account for special situations" msgstr "Verhalten dieses Kontos in bestimmten Situationen:" -#: mod/settings.php:1278 +#: mod/settings.php:1287 msgid "Relocate" msgstr "Umziehen" -#: mod/settings.php:1279 +#: mod/settings.php:1288 msgid "" "If you have moved this profile from another server, and some of your " "contacts don't receive your updates, try pushing this button." msgstr "Wenn Du Dein Profil von einem anderen Server umgezogen hast und einige Deiner Kontakte Deine Beiträge nicht erhalten, verwende diesen Button." -#: mod/settings.php:1280 +#: mod/settings.php:1289 msgid "Resend relocate message to contacts" msgstr "Umzugsbenachrichtigung erneut an Kontakte senden" @@ -5675,39 +5685,39 @@ msgstr "Kategorien (kommasepariert)" msgid "Example: bob@example.com, mary@example.com" msgstr "Z.B.: bob@example.com, mary@example.com" -#: mod/friendica.php:59 +#: mod/friendica.php:70 msgid "This is Friendica, version" msgstr "Dies ist Friendica, Version" -#: mod/friendica.php:60 +#: mod/friendica.php:71 msgid "running at web location" msgstr "die unter folgender Webadresse zu finden ist" -#: mod/friendica.php:62 +#: mod/friendica.php:73 msgid "" "Please visit Friendica.com to learn " "more about the Friendica project." msgstr "Bitte besuche Friendica.com, um mehr über das Friendica Projekt zu erfahren." -#: mod/friendica.php:64 +#: mod/friendica.php:75 msgid "Bug reports and issues: please visit" msgstr "Probleme oder Fehler gefunden? Bitte besuche" -#: mod/friendica.php:64 +#: mod/friendica.php:75 msgid "the bugtracker at github" msgstr "dem Bugtracker auf github" -#: mod/friendica.php:65 +#: mod/friendica.php:76 msgid "" "Suggestions, praise, donations, etc. - please email \"Info\" at Friendica - " "dot com" msgstr "Vorschläge, Lob, Spenden usw.: E-Mail an \"Info\" at Friendica - dot com" -#: mod/friendica.php:79 +#: mod/friendica.php:90 msgid "Installed plugins/addons/apps:" msgstr "Installierte Plugins/Erweiterungen/Apps" -#: mod/friendica.php:92 +#: mod/friendica.php:103 msgid "No installed plugins/addons/apps" msgstr "Keine Plugins/Erweiterungen/Apps installiert" @@ -6333,7 +6343,7 @@ msgstr "Netzwerke" msgid "All Networks" msgstr "Alle Netzwerke" -#: include/contact_widgets.php:141 include/features.php:97 +#: include/contact_widgets.php:141 include/features.php:102 msgid "Saved Folders" msgstr "Gespeicherte Ordner" @@ -6352,194 +6362,194 @@ msgid_plural "%d contacts in common" msgstr[0] "%d gemeinsamer Kontakt" msgstr[1] "%d gemeinsame Kontakte" -#: include/features.php:58 +#: include/features.php:63 msgid "General Features" msgstr "Allgemeine Features" -#: include/features.php:60 +#: include/features.php:65 msgid "Multiple Profiles" msgstr "Mehrere Profile" -#: include/features.php:60 +#: include/features.php:65 msgid "Ability to create multiple profiles" msgstr "Möglichkeit mehrere Profile zu erstellen" -#: include/features.php:61 +#: include/features.php:66 msgid "Photo Location" msgstr "Aufnahmeort" -#: include/features.php:61 +#: include/features.php:66 msgid "" "Photo metadata is normally stripped. This extracts the location (if present)" " prior to stripping metadata and links it to a map." msgstr "Die Foto-Metadaten werden ausgelesen. Dadurch kann der Aufnahmeort (wenn vorhanden) in einer Karte angezeigt werden." -#: include/features.php:66 +#: include/features.php:71 msgid "Post Composition Features" msgstr "Beitragserstellung Features" -#: include/features.php:67 +#: include/features.php:72 msgid "Richtext Editor" msgstr "Web-Editor" -#: include/features.php:67 +#: include/features.php:72 msgid "Enable richtext editor" msgstr "Den Web-Editor für neue Beiträge aktivieren" -#: include/features.php:68 +#: include/features.php:73 msgid "Post Preview" msgstr "Beitragsvorschau" -#: include/features.php:68 +#: include/features.php:73 msgid "Allow previewing posts and comments before publishing them" msgstr "Die Vorschau von Beiträgen und Kommentaren vor dem absenden erlauben." -#: include/features.php:69 +#: include/features.php:74 msgid "Auto-mention Forums" msgstr "Foren automatisch erwähnen" -#: include/features.php:69 +#: include/features.php:74 msgid "" "Add/remove mention when a fourm page is selected/deselected in ACL window." msgstr "Automatisch eine @-Erwähnung eines Forums einfügen/entfehrnen, wenn dieses im ACL Fenster de-/markiert wurde." -#: include/features.php:74 +#: include/features.php:79 msgid "Network Sidebar Widgets" msgstr "Widgets für Netzwerk und Seitenleiste" -#: include/features.php:75 +#: include/features.php:80 msgid "Search by Date" msgstr "Archiv" -#: include/features.php:75 +#: include/features.php:80 msgid "Ability to select posts by date ranges" msgstr "Möglichkeit die Beiträge nach Datumsbereichen zu sortieren" -#: include/features.php:76 include/features.php:106 +#: include/features.php:81 include/features.php:111 msgid "List Forums" msgstr "Zeige Foren" -#: include/features.php:76 +#: include/features.php:81 msgid "Enable widget to display the forums your are connected with" msgstr "Aktiviere Widget, um die Foren mit denen du verbunden bist anzuzeigen" -#: include/features.php:77 +#: include/features.php:82 msgid "Group Filter" msgstr "Gruppen Filter" -#: include/features.php:77 +#: include/features.php:82 msgid "Enable widget to display Network posts only from selected group" msgstr "Widget zur Darstellung der Beiträge nach Kontaktgruppen sortiert aktivieren." -#: include/features.php:78 +#: include/features.php:83 msgid "Network Filter" msgstr "Netzwerk Filter" -#: include/features.php:78 +#: include/features.php:83 msgid "Enable widget to display Network posts only from selected network" msgstr "Widget zum filtern der Beiträge in Abhängigkeit des Netzwerks aus dem der Ersteller sendet aktivieren." -#: include/features.php:79 +#: include/features.php:84 msgid "Save search terms for re-use" msgstr "Speichere Suchanfragen für spätere Wiederholung." -#: include/features.php:84 +#: include/features.php:89 msgid "Network Tabs" msgstr "Netzwerk Reiter" -#: include/features.php:85 +#: include/features.php:90 msgid "Network Personal Tab" msgstr "Netzwerk-Reiter: Persönlich" -#: include/features.php:85 +#: include/features.php:90 msgid "Enable tab to display only Network posts that you've interacted on" msgstr "Aktiviert einen Netzwerk-Reiter in dem Nachrichten angezeigt werden mit denen Du interagiert hast" -#: include/features.php:86 +#: include/features.php:91 msgid "Network New Tab" msgstr "Netzwerk-Reiter: Neue" -#: include/features.php:86 +#: include/features.php:91 msgid "Enable tab to display only new Network posts (from the last 12 hours)" msgstr "Aktiviert einen Netzwerk-Reiter in dem ausschließlich neue Beiträge (der letzten 12 Stunden) angezeigt werden" -#: include/features.php:87 +#: include/features.php:92 msgid "Network Shared Links Tab" msgstr "Netzwerk-Reiter: Geteilte Links" -#: include/features.php:87 +#: include/features.php:92 msgid "Enable tab to display only Network posts with links in them" msgstr "Aktiviert einen Netzwerk-Reiter der ausschließlich Nachrichten mit Links enthält" -#: include/features.php:92 +#: include/features.php:97 msgid "Post/Comment Tools" msgstr "Werkzeuge für Beiträge und Kommentare" -#: include/features.php:93 +#: include/features.php:98 msgid "Multiple Deletion" msgstr "Mehrere Beiträge löschen" -#: include/features.php:93 +#: include/features.php:98 msgid "Select and delete multiple posts/comments at once" msgstr "Mehrere Beiträge/Kommentare markieren und gleichzeitig löschen" -#: include/features.php:94 +#: include/features.php:99 msgid "Edit Sent Posts" msgstr "Gesendete Beiträge editieren" -#: include/features.php:94 +#: include/features.php:99 msgid "Edit and correct posts and comments after sending" msgstr "Erlaubt es Beiträge und Kommentare nach dem Senden zu editieren bzw.zu korrigieren." -#: include/features.php:95 +#: include/features.php:100 msgid "Tagging" msgstr "Tagging" -#: include/features.php:95 +#: include/features.php:100 msgid "Ability to tag existing posts" msgstr "Möglichkeit bereits existierende Beiträge nachträglich mit Tags zu versehen." -#: include/features.php:96 +#: include/features.php:101 msgid "Post Categories" msgstr "Beitragskategorien" -#: include/features.php:96 +#: include/features.php:101 msgid "Add categories to your posts" msgstr "Eigene Beiträge mit Kategorien versehen" -#: include/features.php:97 +#: include/features.php:102 msgid "Ability to file posts under folders" msgstr "Beiträge in Ordnern speichern aktivieren" -#: include/features.php:98 +#: include/features.php:103 msgid "Dislike Posts" msgstr "Beiträge 'nicht mögen'" -#: include/features.php:98 +#: include/features.php:103 msgid "Ability to dislike posts/comments" msgstr "Ermöglicht es Beiträge mit einem Klick 'nicht zu mögen'" -#: include/features.php:99 +#: include/features.php:104 msgid "Star Posts" msgstr "Beiträge Markieren" -#: include/features.php:99 +#: include/features.php:104 msgid "Ability to mark special posts with a star indicator" msgstr "Erlaubt es Beiträge mit einem Stern-Indikator zu markieren" -#: include/features.php:100 +#: include/features.php:105 msgid "Mute Post Notifications" msgstr "Benachrichtigungen für Beiträge Stumm schalten" -#: include/features.php:100 +#: include/features.php:105 msgid "Ability to mute notifications for a thread" msgstr "Möglichkeit Benachrichtigungen für einen Thread abbestellen zu können" -#: include/features.php:105 +#: include/features.php:110 msgid "Advanced Profile Settings" msgstr "Erweiterte Profil-Einstellungen" -#: include/features.php:106 +#: include/features.php:111 msgid "Show visitors public community forums at the Advanced Profile Page" msgstr "Zeige Besuchern öffentliche Gemeinschafts-Foren auf der Erweiterten Profil-Seite" diff --git a/view/de/strings.php b/view/de/strings.php index ca06284c41..f3b04b7c3b 100644 --- a/view/de/strings.php +++ b/view/de/strings.php @@ -416,6 +416,7 @@ $a->strings["Site"] = "Seite"; $a->strings["Users"] = "Nutzer"; $a->strings["Plugins"] = "Plugins"; $a->strings["Themes"] = "Themen"; +$a->strings["Additional features"] = "Zusätzliche Features"; $a->strings["DB updates"] = "DB Updates"; $a->strings["Inspect Queue"] = "Warteschlange Inspizieren"; $a->strings["Federation Statistics"] = "Federation Statistik"; @@ -697,6 +698,10 @@ $a->strings["Must be writable by web server. Relative to your Friendica top-leve $a->strings["Log level"] = "Protokoll-Level"; $a->strings["PHP logging"] = "PHP Protokollieren"; $a->strings["To enable logging of PHP errors and warnings you can add the following to the .htconfig.php file of your installation. The filename set in the 'error_log' line is relative to the friendica top-level directory and must be writeable by the web server. The option '1' for 'log_errors' and 'display_errors' is to enable these options, set to '0' to disable them."] = "Um PHP Warnungen und Fehler zu protokollieren, kannst du die folgenden Zeilen zur .htconfig.php Datei deiner Installation hinzufügen. Den Dateinamen der Log-Datei legst du in der Zeile mit dem 'error_log' fest, Er ist relativ zum Friendica-Stammverzeichnis und muss schreibbar durch den Webserver sein. Eine \"1\" als Option für die Punkte 'log_errors' und 'display_errors' aktiviert die Funktionen zum Protokollieren bzw. Anzeigen der Fehler, eine \"0\" deaktiviert sie."; +$a->strings["Off"] = "Aus"; +$a->strings["On"] = "An"; +$a->strings["Lock feature %s"] = "Feature festlegen: %s"; +$a->strings["Manage Additional Features"] = "Zusätzliche Features Verwalten"; $a->strings["Search Results For: %s"] = "Suchergebnisse für: %s"; $a->strings["Remove term"] = "Begriff entfernen"; $a->strings["Saved Searches"] = "Gespeicherte Suchen"; @@ -918,7 +923,6 @@ $a->strings["Not available."] = "Nicht verfügbar."; $a->strings["Community"] = "Gemeinschaft"; $a->strings["No results."] = "Keine Ergebnisse."; $a->strings["everybody"] = "jeder"; -$a->strings["Additional features"] = "Zusätzliche Features"; $a->strings["Display"] = "Anzeige"; $a->strings["Social Networks"] = "Soziale Netzwerke"; $a->strings["Delegations"] = "Delegationen"; @@ -955,8 +959,6 @@ $a->strings["No name"] = "Kein Name"; $a->strings["Remove authorization"] = "Autorisierung entziehen"; $a->strings["No Plugin settings configured"] = "Keine Plugin-Einstellungen konfiguriert"; $a->strings["Plugin Settings"] = "Plugin-Einstellungen"; -$a->strings["Off"] = "Aus"; -$a->strings["On"] = "An"; $a->strings["Additional Features"] = "Zusätzliche Features"; $a->strings["General Social Media Settings"] = "Allgemeine Einstellungen zu Sozialen Medien"; $a->strings["Disable intelligent shortening"] = "Intelligentes Link kürzen ausschalten"; From 5a6950bace2b8ccb099f3c30192761adb36e3598 Mon Sep 17 00:00:00 2001 From: Michael Vogel Date: Tue, 19 Jan 2016 15:12:18 +0100 Subject: [PATCH 081/242] Auto discovery of contacts from GNU Social --- include/discover_poco.php | 10 +++- include/socgraph.php | 105 +++++++++++++++++++++++++++++++++++--- 2 files changed, 107 insertions(+), 8 deletions(-) diff --git a/include/discover_poco.php b/include/discover_poco.php index 6293317d3f..5411e757ad 100644 --- a/include/discover_poco.php +++ b/include/discover_poco.php @@ -78,9 +78,15 @@ function discover_poco_run(&$argv, &$argc){ discover_users(); elseif (($mode == 1) AND ($search != "") and get_config('system','poco_local_search')) discover_directory($search); - elseif (($mode == 0) AND ($search == "") and (get_config('system','poco_discovery') > 0)) + elseif (($mode == 0) AND ($search == "") and (get_config('system','poco_discovery') > 0)) { + // Query Friendica and Hubzilla servers for their users poco_discover(); + // Query GNU Social servers for their users ("statistics" addon has to be enabled on the GS server) + if (!get_config('system','ostatus_disabled')) + gs_discover(); + } + logger('end '.$search); return; @@ -128,7 +134,7 @@ function discover_users() { else $server_url = poco_detect_server($user["url"]); - if (poco_check_server($server_url, $gcontacts[0]["network"])) { + if (($server_url == "") OR poco_check_server($server_url, $gcontacts[0]["network"])) { logger('Check user '.$user["url"]); poco_last_updated($user["url"], true); diff --git a/include/socgraph.php b/include/socgraph.php index a01c9c5cb0..4b4b358787 100644 --- a/include/socgraph.php +++ b/include/socgraph.php @@ -721,6 +721,10 @@ function poco_to_boolean($val) { function poco_check_server($server_url, $network = "", $force = false) { + // Unify the server address + $server_url = trim($server_url, "/"); + $server_url = str_replace("/index.php", "", $server_url); + if ($server_url == "") return false; @@ -1315,18 +1319,30 @@ function poco_discover_federation() { return; } + // Discover Friendica, Hubzilla and Diaspora servers $serverdata = fetch_url("http://the-federation.info/pods.json"); - if (!$serverdata) - return; + if ($serverdata) { + $servers = json_decode($serverdata); - $servers = json_decode($serverdata); + foreach($servers->pods AS $server) + poco_check_server("https://".$server->host); + } - foreach($servers->pods AS $server) - poco_check_server("https://".$server->host); + // Discover GNU Social Servers + if (!get_config('system','ostatus_disabled')) { + $serverdata = "http://gstools.org/api/get_open_instances/"; + + $result = z_fetch_url($serverdata); + if ($result["success"]) { + $servers = json_decode($result["body"]); + + foreach($servers->data AS $server) + poco_check_server($server->instance_address); + } + } set_config('poco','last_federation_discovery', time()); - } function poco_discover($complete = false) { @@ -1656,4 +1672,81 @@ function update_gcontact_from_probe($url) { if ($data["network"] != NETWORK_PHANTOM) update_gcontact($data); } + +/** + * @brief Fetches users of given GNU Social server + * + * If the "Statistics" plugin is enabled (See http://gstools.org/ for details) we query user data with this. + * + * @param str $server Server address + */ +function gs_fetch_users($server) { + + logger("Fetching users from GNU Social server ".$server, LOGGER_DEBUG); + + $a = get_app(); + + $url = $server."/main/statistics"; + + $result = z_fetch_url($url); + if (!$result["success"]) + return false; + + $statistics = json_decode($result["body"]); + + if (is_object($statistics->config)) { + if ($statistics->config->instance_with_ssl) + $server = "https://"; + else + $server = "http://"; + + $server .= $statistics->config->instance_address; + + $hostname = $statistics->config->instance_address; + } else { + if ($statistics->instance_with_ssl) + $server = "https://"; + else + $server = "http://"; + + $server .= $statistics->instance_address; + + $hostname = $statistics->instance_address; + } + + foreach ($statistics->users AS $nick => $user) { + $profile_url = $server."/".$user->nickname; + + $contact = array("url" => $profile_url, + "name" => $user->fullname, + "addr" => $user->nickname."@".$hostname, + "nick" => $user->nickname, + "about" => $user->bio, + "network" => NETWORK_OSTATUS, + "photo" => $a->get_baseurl()."/images/person-175.jpg"); + get_gcontact_id($contact); + } +} + +/** + * @brief Asking GNU Social server on a regular base for their user data + * + */ +function gs_discover() { + + $requery_days = intval(get_config("system", "poco_requery_days")); + + $last_update = date("c", time() - (60 * 60 * 24 * $requery_days)); + + $r = q("SELECT `nurl`, `url` FROM `gserver` WHERE `last_contact` >= `last_failure` AND `network` = '%s' AND `last_poco_query` < '%s' ORDER BY RAND() LIMIT 5", + dbesc(NETWORK_OSTATUS), dbesc($last_update)); + + if (!$r) + return; + + foreach ($r AS $server) { + gs_fetch_users($server["url"]); + q("UPDATE `gserver` SET `last_poco_query` = '%s' WHERE `nurl` = '%s'", dbesc(datetime_convert()), dbesc($server["nurl"])); + } +} ?> From c6b0e57aa4554624f3194020ba17e4a300ee0dfb Mon Sep 17 00:00:00 2001 From: Michael Vogel Date: Wed, 20 Jan 2016 04:22:07 +0100 Subject: [PATCH 082/242] Bugfix: Comments weren't relayed anymore to Diaspora due to a Diaspora change --- include/diaspora.php | 81 ++++++++++++++++++++------------------------ include/items.php | 2 +- include/notifier.php | 2 +- mod/item.php | 4 +-- 4 files changed, 41 insertions(+), 48 deletions(-) diff --git a/include/diaspora.php b/include/diaspora.php index e0eaf065d6..855dbe1fe9 100644 --- a/include/diaspora.php +++ b/include/diaspora.php @@ -2846,9 +2846,6 @@ function diaspora_send_relay($item,$owner,$contact,$public_batch = false) { $myaddr = $owner['nickname'] . '@' . substr($a->get_baseurl(), strpos($a->get_baseurl(),'://') + 3); // $theiraddr = $contact['addr']; - $body = $item['body']; - $text = html_entity_decode(bb2diaspora($body)); - // Diaspora doesn't support threaded comments, but some // versions of Diaspora (i.e. Diaspora-pistos) support // likes on comments @@ -2899,61 +2896,57 @@ function diaspora_send_relay($item,$owner,$contact,$public_batch = false) { // fetch the original signature if the relayable was created by a Diaspora // or DFRN user. Relayables for other networks are not supported. -/* $r = q("select * from sign where " . $sql_sign_id . " = %d limit 1", + $r = q("SELECT `signed_text`, `signature`, `signer` FROM `sign` WHERE " . $sql_sign_id . " = %d LIMIT 1", intval($item['id']) ); - if(count($r)) { + if(count($r)) { $orig_sign = $r[0]; $signed_text = $orig_sign['signed_text']; $authorsig = $orig_sign['signature']; $handle = $orig_sign['signer']; + + // Friendica servers lower than 3.5 had double encoded the signature ... + if (substr($authorsig, -1, 1) != "=") + $authorsig = base64_decode($authorsig); + + // Split the signed text + $signed_parts = explode(";", $signed_text); + + // Remove the parent guid + array_shift($signed_parts); + + // Remove the comment guid + array_shift($signed_parts); + + // Remove the handle + array_pop($signed_parts); + + // Glue the parts together + $text = implode(";", $signed_parts); } else { + // This part is meant for cases where we don't have the signatur. (Which shouldn't happen with posts from Diaspora and Friendica) + // This means that the comment won't be accepted by newer Diaspora servers - // Author signature information (for likes, comments, and retractions of likes or comments, - // whether from Diaspora or Friendica) must be placed in the `sign` table before this - // function is called - logger('diaspora_send_relay: original author signature not found, cannot send relayable'); - return; - }*/ + $body = $item['body']; + $text = html_entity_decode(bb2diaspora($body)); - /* Since the author signature is only checked by the parent, not by the relay recipients, - * I think it may not be necessary for us to do so much work to preserve all the original - * signatures. The important thing that Diaspora DOES need is the original creator's handle. - * Let's just generate that and forget about all the original author signature stuff. - * - * Note: this might be more of an problem if we want to support likes on comments for older - * versions of Diaspora (diaspora-pistos), but since there are a number of problems with - * doing that, let's ignore it for now. - * - * Currently, only DFRN contacts are supported. StatusNet shouldn't be hard, but it hasn't - * been done yet - */ + $handle = diaspora_handle_from_contact($item['contact-id']); + if(! $handle) + return; - $handle = diaspora_handle_from_contact($item['contact-id']); - if(! $handle) - return; + if($relay_retract) + $signed_text = $item['guid'] . ';' . $target_type; + elseif($like) + $signed_text = $item['guid'] . ';' . $target_type . ';' . $parent['guid'] . ';' . $positive . ';' . $handle; + else + $signed_text = $item['guid'] . ';' . $parent['guid'] . ';' . $text . ';' . $handle; - - if($relay_retract) - $sender_signed_text = $item['guid'] . ';' . $target_type; - elseif($like) - $sender_signed_text = $item['guid'] . ';' . $target_type . ';' . $parent['guid'] . ';' . $positive . ';' . $handle; - else - $sender_signed_text = $item['guid'] . ';' . $parent['guid'] . ';' . $text . ';' . $handle; + $authorsig = base64_encode(rsa_sign($signed_text,$owner['uprvkey'],'sha256')); + } // Sign the relayable with the top-level owner's signature - // - // We'll use the $sender_signed_text that we just created, instead of the $signed_text - // stored in the database, because that provides the best chance that Diaspora will - // be able to reconstruct the signed text the same way we did. This is particularly a - // concern for the comment, whose signed text includes the text of the comment. The - // smallest change in the text of the comment, including removing whitespace, will - // make the signature verification fail. Since we translate from BB code to Diaspora's - // markup at the top of this function, which is AFTER we placed the original $signed_text - // in the database, it's hazardous to trust the original $signed_text. - - $parentauthorsig = base64_encode(rsa_sign($sender_signed_text,$owner['uprvkey'],'sha256')); + $parentauthorsig = base64_encode(rsa_sign($signed_text,$owner['uprvkey'],'sha256')); $msg = replace_macros($tpl,array( '$guid' => xmlify($item['guid']), diff --git a/include/items.php b/include/items.php index eff1366899..1782b72c81 100644 --- a/include/items.php +++ b/include/items.php @@ -2640,7 +2640,7 @@ function consume_feed($xml,$importer,&$contact, &$hub, $datedir = 0, $pass = 0) logger('consume_feed: feed item count = ' . $feed->get_item_quantity()); - // in inverse date order + // in inverse date order if ($datedir) $items = array_reverse($feed->get_items()); else diff --git a/include/notifier.php b/include/notifier.php index ec2b666bed..4adb159f75 100644 --- a/include/notifier.php +++ b/include/notifier.php @@ -975,7 +975,7 @@ function notifier_run(&$argv, &$argc){ if($public_message) { - if (!$followup) + if (!$followup AND $top_level) $r0 = diaspora_fetch_relay(); else $r0 = array(); diff --git a/mod/item.php b/mod/item.php index a2b88a8e30..8726f14248 100644 --- a/mod/item.php +++ b/mod/item.php @@ -892,7 +892,7 @@ function item_post(&$a) { // Store the comment signature information in case we need to relay to Diaspora - store_diaspora_comment_sig($datarray, $author, ($self ? $a->user['prvkey'] : false), $parent_item, $post_id); + store_diaspora_comment_sig($datarray, $author, ($self ? $user['prvkey'] : false), $parent_item, $post_id); } else { $parent = $post_id; @@ -1268,7 +1268,7 @@ function store_diaspora_comment_sig($datarray, $author, $uprvkey, $parent_item, $signed_text = $datarray['guid'] . ';' . $parent_item['guid'] . ';' . $signed_body . ';' . $diaspora_handle; if( $uprvkey !== false ) - $authorsig = base64_encode(rsa_sign($signed_text,$uprvkey,'sha256')); + $authorsig = rsa_sign($signed_text,$uprvkey,'sha256'); else $authorsig = ''; From 98ccefebcf3a56c467709ffaf16a163da931bc0c Mon Sep 17 00:00:00 2001 From: Michael Vogel Date: Wed, 20 Jan 2016 16:00:43 +0100 Subject: [PATCH 083/242] Reworked check for double encoded Diaspora signatures --- include/diaspora.php | 4 ---- include/items.php | 8 ++++++++ 2 files changed, 8 insertions(+), 4 deletions(-) diff --git a/include/diaspora.php b/include/diaspora.php index d61ec016c7..4673cdaf4c 100644 --- a/include/diaspora.php +++ b/include/diaspora.php @@ -2911,10 +2911,6 @@ function diaspora_send_relay($item,$owner,$contact,$public_batch = false) { $authorsig = $orig_sign['signature']; $handle = $orig_sign['signer']; - // Friendica servers lower than 3.5 had double encoded the signature ... - if (substr($authorsig, -1, 1) != "=") - $authorsig = base64_decode($authorsig); - // Split the signed text $signed_parts = explode(";", $signed_text); diff --git a/include/items.php b/include/items.php index b7a759a3b5..76ff6e8b0c 100644 --- a/include/items.php +++ b/include/items.php @@ -1609,6 +1609,14 @@ function item_store($arr,$force_parent = false, $notify = false, $dontcache = fa ); if($dsprsig) { + + // Friendica servers lower than 3.4.3-2 had double encoded the signature ... + // We can check for this condition when we decode and encode the stuff again. + if (base64_encode(base64_decode(base64_decode($dsprsig->signature))) == base64_decode($dsprsig->signature)) { + $dsprsig->signature = base64_decode($dsprsig->signature); + logger("Repaired double encoded signature from handle ".$dsprsig->signer, LOGGER_DEBUG); + } + q("insert into sign (`iid`,`signed_text`,`signature`,`signer`) values (%d,'%s','%s','%s') ", intval($current_post), dbesc($dsprsig->signed_text), From 080319d82d4b5275ad0bb618aca7e0be5e6ffa57 Mon Sep 17 00:00:00 2001 From: Tobias Diekershoff Date: Wed, 20 Jan 2016 17:52:58 +0100 Subject: [PATCH 084/242] issue #2270 --- mod/contacts.php | 2 +- util/messages.po | 706 +++++++++++++++++++++++------------------------ 2 files changed, 354 insertions(+), 354 deletions(-) diff --git a/mod/contacts.php b/mod/contacts.php index f83b1b5daa..38e03459e6 100644 --- a/mod/contacts.php +++ b/mod/contacts.php @@ -125,7 +125,7 @@ function contacts_batch_actions(&$a){ } } if ($count_actions>0) { - info ( sprintf( tt("%d contact edited.", "%d contacts edited", $count_actions), $count_actions) ); + info ( sprintf( tt("%d contact edited.", "%d contacts edited.", $count_actions), $count_actions) ); } if(x($_SESSION,'return_url')) diff --git a/util/messages.po b/util/messages.po index bb2c041e1b..498a5bc5bc 100644 --- a/util/messages.po +++ b/util/messages.po @@ -8,7 +8,7 @@ msgid "" msgstr "" "Project-Id-Version: \n" "Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2016-01-18 18:49+0100\n" +"POT-Creation-Date: 2016-01-20 17:52+0100\n" "PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n" "Last-Translator: FULL NAME \n" "Language-Team: LANGUAGE \n" @@ -33,7 +33,7 @@ msgstr "" #: mod/contacts.php:128 #, php-format msgid "%d contact edited." -msgid_plural "%d contacts edited" +msgid_plural "%d contacts edited." msgstr[0] "" msgstr[1] "" @@ -53,7 +53,7 @@ msgstr "" msgid "Failed to update contact record." msgstr "" -#: mod/contacts.php:365 mod/manage.php:96 mod/display.php:504 +#: mod/contacts.php:365 mod/manage.php:96 mod/display.php:509 #: mod/profile_photo.php:19 mod/profile_photo.php:175 mod/profile_photo.php:186 #: mod/profile_photo.php:199 mod/ostatus_subscribe.php:9 mod/follow.php:11 #: mod/follow.php:73 mod/follow.php:155 mod/item.php:180 mod/item.php:192 @@ -70,7 +70,7 @@ msgstr "" #: mod/api.php:31 mod/notes.php:22 mod/poke.php:149 mod/repair_ostatus.php:9 #: mod/invite.php:15 mod/invite.php:101 mod/photos.php:171 mod/photos.php:1105 #: mod/regmod.php:110 mod/uimport.php:23 mod/attach.php:33 -#: include/items.php:5073 index.php:383 +#: include/items.php:5077 index.php:383 msgid "Permission denied." msgstr "" @@ -109,7 +109,7 @@ msgstr "" #: mod/settings.php:1171 mod/settings.php:1172 mod/settings.php:1173 #: mod/settings.php:1174 mod/dfrn_request.php:857 mod/register.php:238 #: mod/suggest.php:29 mod/profiles.php:658 mod/profiles.php:661 -#: mod/profiles.php:687 mod/api.php:105 include/items.php:4905 +#: mod/profiles.php:687 mod/api.php:105 include/items.php:4909 msgid "Yes" msgstr "" @@ -118,7 +118,7 @@ msgstr "" #: mod/fbrowser.php:128 mod/settings.php:660 mod/settings.php:686 #: mod/dfrn_request.php:871 mod/suggest.php:32 mod/editpost.php:148 #: mod/photos.php:247 mod/photos.php:336 include/conversation.php:1220 -#: include/items.php:4908 +#: include/items.php:4912 msgid "Cancel" msgstr "" @@ -145,7 +145,7 @@ msgstr "" msgid "Private communications are not available for this contact." msgstr "" -#: mod/contacts.php:544 mod/admin.php:811 +#: mod/contacts.php:544 mod/admin.php:820 msgid "Never" msgstr "" @@ -174,7 +174,7 @@ msgstr "" msgid "Fetch further information for feeds" msgstr "" -#: mod/contacts.php:571 mod/admin.php:820 +#: mod/contacts.php:571 mod/admin.php:829 msgid "Disabled" msgstr "" @@ -265,12 +265,12 @@ msgid "Connect/Follow" msgstr "" #: mod/contacts.php:615 mod/contacts.php:806 mod/contacts.php:865 -#: mod/admin.php:1301 +#: mod/admin.php:1310 msgid "Unblock" msgstr "" #: mod/contacts.php:615 mod/contacts.php:806 mod/contacts.php:865 -#: mod/admin.php:1300 +#: mod/admin.php:1309 msgid "Block" msgstr "" @@ -428,7 +428,7 @@ msgstr "" msgid "Unarchive" msgstr "" -#: mod/contacts.php:809 mod/group.php:171 mod/admin.php:1299 +#: mod/contacts.php:809 mod/group.php:171 mod/admin.php:1308 #: mod/content.php:440 mod/content.php:743 mod/settings.php:722 #: mod/photos.php:1723 object/Item.php:134 include/conversation.php:635 msgid "Delete" @@ -546,14 +546,14 @@ msgstr "" msgid "All Contacts (with secure profile access)" msgstr "" -#: mod/display.php:82 mod/display.php:291 mod/display.php:508 -#: mod/viewsrc.php:15 mod/admin.php:225 mod/admin.php:1354 mod/admin.php:1588 -#: mod/notice.php:15 include/items.php:4864 +#: mod/display.php:82 mod/display.php:291 mod/display.php:513 +#: mod/viewsrc.php:15 mod/admin.php:234 mod/admin.php:1363 mod/admin.php:1597 +#: mod/notice.php:15 include/items.php:4868 msgid "Item not found." msgstr "" #: mod/display.php:220 mod/videos.php:197 mod/viewcontacts.php:35 -#: mod/community.php:18 mod/dfrn_request.php:786 mod/search.php:93 +#: mod/community.php:22 mod/dfrn_request.php:786 mod/search.php:93 #: mod/search.php:99 mod/directory.php:37 mod/photos.php:976 msgid "Public access denied." msgstr "" @@ -562,7 +562,7 @@ msgstr "" msgid "Access to this profile has been restricted." msgstr "" -#: mod/display.php:501 +#: mod/display.php:506 msgid "Item has been removed." msgstr "" @@ -597,7 +597,7 @@ msgid "" "join." msgstr "" -#: mod/newmember.php:22 mod/admin.php:1407 mod/admin.php:1665 +#: mod/newmember.php:22 mod/admin.php:1416 mod/admin.php:1674 #: mod/settings.php:109 include/nav.php:182 view/theme/diabook/theme.php:544 #: view/theme/diabook/theme.php:648 msgid "Settings" @@ -842,7 +842,7 @@ msgstr "" #: mod/subthread.php:87 mod/tagger.php:62 include/like.php:165 #: include/conversation.php:130 include/conversation.php:266 -#: include/text.php:1993 include/diaspora.php:2147 +#: include/text.php:2000 include/diaspora.php:2151 #: view/theme/diabook/theme.php:471 msgid "photo" msgstr "" @@ -850,7 +850,7 @@ msgstr "" #: mod/subthread.php:87 mod/tagger.php:62 include/like.php:165 #: include/like.php:325 include/conversation.php:125 #: include/conversation.php:134 include/conversation.php:261 -#: include/conversation.php:270 include/diaspora.php:2147 +#: include/conversation.php:270 include/diaspora.php:2151 #: view/theme/diabook/theme.php:466 view/theme/diabook/theme.php:475 msgid "status" msgstr "" @@ -1161,7 +1161,7 @@ msgstr "" msgid "Unable to update your contact profile details on our system" msgstr "" -#: mod/dfrn_confirm.php:753 mod/dfrn_request.php:741 include/items.php:4276 +#: mod/dfrn_confirm.php:753 mod/dfrn_request.php:741 include/items.php:4280 msgid "[Name Withheld]" msgstr "" @@ -1194,7 +1194,7 @@ msgstr "" msgid "Access to this item is restricted." msgstr "" -#: mod/videos.php:383 include/text.php:1465 +#: mod/videos.php:383 include/text.php:1472 msgid "View Video" msgstr "" @@ -1288,7 +1288,7 @@ msgid "" "Password reset failed." msgstr "" -#: mod/lostpass.php:109 boot.php:1418 +#: mod/lostpass.php:109 boot.php:1444 msgid "Password Reset" msgstr "" @@ -1392,7 +1392,7 @@ msgstr "" msgid "System" msgstr "" -#: mod/notifications.php:87 mod/admin.php:379 include/nav.php:154 +#: mod/notifications.php:87 mod/admin.php:388 include/nav.php:154 msgid "Network" msgstr "" @@ -1438,7 +1438,7 @@ msgstr "" msgid "if applicable" msgstr "" -#: mod/notifications.php:176 mod/notifications.php:257 mod/admin.php:1297 +#: mod/notifications.php:176 mod/notifications.php:257 mod/admin.php:1306 msgid "Approve" msgstr "" @@ -1795,8 +1795,8 @@ msgstr "" msgid "Refetch contact data" msgstr "" -#: mod/crepair.php:170 mod/admin.php:1295 mod/admin.php:1307 mod/admin.php:1308 -#: mod/admin.php:1321 mod/settings.php:661 mod/settings.php:687 +#: mod/crepair.php:170 mod/admin.php:1304 mod/admin.php:1316 mod/admin.php:1317 +#: mod/admin.php:1330 mod/settings.php:661 mod/settings.php:687 msgid "Name" msgstr "" @@ -1846,7 +1846,7 @@ msgid "" "entries from this contact." msgstr "" -#: mod/bookmarklet.php:12 boot.php:1404 include/nav.php:91 +#: mod/bookmarklet.php:12 boot.php:1430 include/nav.php:91 msgid "Login" msgstr "" @@ -1902,802 +1902,802 @@ msgstr "" msgid "Theme settings updated." msgstr "" -#: mod/admin.php:147 mod/admin.php:877 +#: mod/admin.php:156 mod/admin.php:886 msgid "Site" msgstr "" -#: mod/admin.php:148 mod/admin.php:821 mod/admin.php:1290 mod/admin.php:1305 +#: mod/admin.php:157 mod/admin.php:830 mod/admin.php:1299 mod/admin.php:1314 msgid "Users" msgstr "" -#: mod/admin.php:149 mod/admin.php:1405 mod/admin.php:1465 mod/settings.php:72 +#: mod/admin.php:158 mod/admin.php:1414 mod/admin.php:1474 mod/settings.php:72 msgid "Plugins" msgstr "" -#: mod/admin.php:150 mod/admin.php:1663 mod/admin.php:1713 +#: mod/admin.php:159 mod/admin.php:1672 mod/admin.php:1722 msgid "Themes" msgstr "" -#: mod/admin.php:151 mod/settings.php:50 +#: mod/admin.php:160 mod/settings.php:50 msgid "Additional features" msgstr "" -#: mod/admin.php:152 +#: mod/admin.php:161 msgid "DB updates" msgstr "" -#: mod/admin.php:153 mod/admin.php:374 +#: mod/admin.php:162 mod/admin.php:383 msgid "Inspect Queue" msgstr "" -#: mod/admin.php:154 mod/admin.php:343 +#: mod/admin.php:163 mod/admin.php:352 msgid "Federation Statistics" msgstr "" -#: mod/admin.php:168 mod/admin.php:179 mod/admin.php:1781 +#: mod/admin.php:177 mod/admin.php:188 mod/admin.php:1790 msgid "Logs" msgstr "" -#: mod/admin.php:169 mod/admin.php:1848 +#: mod/admin.php:178 mod/admin.php:1857 msgid "View Logs" msgstr "" -#: mod/admin.php:170 +#: mod/admin.php:179 msgid "probe address" msgstr "" -#: mod/admin.php:171 +#: mod/admin.php:180 msgid "check webfinger" msgstr "" -#: mod/admin.php:177 include/nav.php:194 +#: mod/admin.php:186 include/nav.php:194 msgid "Admin" msgstr "" -#: mod/admin.php:178 +#: mod/admin.php:187 msgid "Plugin Features" msgstr "" -#: mod/admin.php:180 +#: mod/admin.php:189 msgid "diagnostics" msgstr "" -#: mod/admin.php:181 +#: mod/admin.php:190 msgid "User registrations waiting for confirmation" msgstr "" -#: mod/admin.php:336 +#: mod/admin.php:345 msgid "" "This page offers you some numbers to the known part of the federated social " "network your Friendica node is part of. These numbers are not complete but " "only reflect the part of the network your node is aware of." msgstr "" -#: mod/admin.php:337 +#: mod/admin.php:346 msgid "" "The Auto Discovered Contact Directory feature is not enabled, it " "will improve the data displayed here." msgstr "" -#: mod/admin.php:342 mod/admin.php:373 mod/admin.php:430 mod/admin.php:876 -#: mod/admin.php:1289 mod/admin.php:1404 mod/admin.php:1464 mod/admin.php:1662 -#: mod/admin.php:1712 mod/admin.php:1780 mod/admin.php:1847 +#: mod/admin.php:351 mod/admin.php:382 mod/admin.php:439 mod/admin.php:885 +#: mod/admin.php:1298 mod/admin.php:1413 mod/admin.php:1473 mod/admin.php:1671 +#: mod/admin.php:1721 mod/admin.php:1789 mod/admin.php:1856 msgid "Administration" msgstr "" -#: mod/admin.php:349 +#: mod/admin.php:358 msgid "Currently this node is aware of nodes from the following platforms:" msgstr "" -#: mod/admin.php:376 +#: mod/admin.php:385 msgid "ID" msgstr "" -#: mod/admin.php:377 +#: mod/admin.php:386 msgid "Recipient Name" msgstr "" -#: mod/admin.php:378 +#: mod/admin.php:387 msgid "Recipient Profile" msgstr "" -#: mod/admin.php:380 +#: mod/admin.php:389 msgid "Created" msgstr "" -#: mod/admin.php:381 +#: mod/admin.php:390 msgid "Last Tried" msgstr "" -#: mod/admin.php:382 +#: mod/admin.php:391 msgid "" "This page lists the content of the queue for outgoing postings. These are " "postings the initial delivery failed for. They will be resend later and " "eventually deleted if the delivery fails permanently." msgstr "" -#: mod/admin.php:401 mod/admin.php:1243 +#: mod/admin.php:410 mod/admin.php:1252 msgid "Normal Account" msgstr "" -#: mod/admin.php:402 mod/admin.php:1244 +#: mod/admin.php:411 mod/admin.php:1253 msgid "Soapbox Account" msgstr "" -#: mod/admin.php:403 mod/admin.php:1245 +#: mod/admin.php:412 mod/admin.php:1254 msgid "Community/Celebrity Account" msgstr "" -#: mod/admin.php:404 mod/admin.php:1246 +#: mod/admin.php:413 mod/admin.php:1255 msgid "Automatic Friend Account" msgstr "" -#: mod/admin.php:405 +#: mod/admin.php:414 msgid "Blog Account" msgstr "" -#: mod/admin.php:406 +#: mod/admin.php:415 msgid "Private Forum" msgstr "" -#: mod/admin.php:425 +#: mod/admin.php:434 msgid "Message queues" msgstr "" -#: mod/admin.php:431 +#: mod/admin.php:440 msgid "Summary" msgstr "" -#: mod/admin.php:433 +#: mod/admin.php:442 msgid "Registered users" msgstr "" -#: mod/admin.php:435 +#: mod/admin.php:444 msgid "Pending registrations" msgstr "" -#: mod/admin.php:436 +#: mod/admin.php:445 msgid "Version" msgstr "" -#: mod/admin.php:441 +#: mod/admin.php:450 msgid "Active plugins" msgstr "" -#: mod/admin.php:464 +#: mod/admin.php:473 msgid "Can not parse base url. Must have at least ://" msgstr "" -#: mod/admin.php:749 +#: mod/admin.php:758 msgid "RINO2 needs mcrypt php extension to work." msgstr "" -#: mod/admin.php:757 +#: mod/admin.php:766 msgid "Site settings updated." msgstr "" -#: mod/admin.php:785 mod/settings.php:912 +#: mod/admin.php:794 mod/settings.php:912 msgid "No special theme for mobile devices" msgstr "" -#: mod/admin.php:804 +#: mod/admin.php:813 msgid "No community page" msgstr "" -#: mod/admin.php:805 +#: mod/admin.php:814 msgid "Public postings from users of this site" msgstr "" -#: mod/admin.php:806 +#: mod/admin.php:815 msgid "Global community page" msgstr "" -#: mod/admin.php:812 +#: mod/admin.php:821 msgid "At post arrival" msgstr "" -#: mod/admin.php:813 include/contact_selectors.php:56 +#: mod/admin.php:822 include/contact_selectors.php:56 msgid "Frequently" msgstr "" -#: mod/admin.php:814 include/contact_selectors.php:57 +#: mod/admin.php:823 include/contact_selectors.php:57 msgid "Hourly" msgstr "" -#: mod/admin.php:815 include/contact_selectors.php:58 +#: mod/admin.php:824 include/contact_selectors.php:58 msgid "Twice daily" msgstr "" -#: mod/admin.php:816 include/contact_selectors.php:59 +#: mod/admin.php:825 include/contact_selectors.php:59 msgid "Daily" msgstr "" -#: mod/admin.php:822 +#: mod/admin.php:831 msgid "Users, Global Contacts" msgstr "" -#: mod/admin.php:823 +#: mod/admin.php:832 msgid "Users, Global Contacts/fallback" msgstr "" -#: mod/admin.php:827 +#: mod/admin.php:836 msgid "One month" msgstr "" -#: mod/admin.php:828 +#: mod/admin.php:837 msgid "Three months" msgstr "" -#: mod/admin.php:829 +#: mod/admin.php:838 msgid "Half a year" msgstr "" -#: mod/admin.php:830 +#: mod/admin.php:839 msgid "One year" msgstr "" -#: mod/admin.php:835 +#: mod/admin.php:844 msgid "Multi user instance" msgstr "" -#: mod/admin.php:858 +#: mod/admin.php:867 msgid "Closed" msgstr "" -#: mod/admin.php:859 +#: mod/admin.php:868 msgid "Requires approval" msgstr "" -#: mod/admin.php:860 +#: mod/admin.php:869 msgid "Open" msgstr "" -#: mod/admin.php:864 +#: mod/admin.php:873 msgid "No SSL policy, links will track page SSL state" msgstr "" -#: mod/admin.php:865 +#: mod/admin.php:874 msgid "Force all links to use SSL" msgstr "" -#: mod/admin.php:866 +#: mod/admin.php:875 msgid "Self-signed certificate, use SSL for local links only (discouraged)" msgstr "" -#: mod/admin.php:878 mod/admin.php:1466 mod/admin.php:1714 mod/admin.php:1782 -#: mod/admin.php:1931 mod/settings.php:659 mod/settings.php:769 +#: mod/admin.php:887 mod/admin.php:1475 mod/admin.php:1723 mod/admin.php:1791 +#: mod/admin.php:1940 mod/settings.php:659 mod/settings.php:769 #: mod/settings.php:813 mod/settings.php:882 mod/settings.php:969 #: mod/settings.php:1204 msgid "Save Settings" msgstr "" -#: mod/admin.php:879 mod/register.php:263 +#: mod/admin.php:888 mod/register.php:263 msgid "Registration" msgstr "" -#: mod/admin.php:880 +#: mod/admin.php:889 msgid "File upload" msgstr "" -#: mod/admin.php:881 +#: mod/admin.php:890 msgid "Policies" msgstr "" -#: mod/admin.php:882 +#: mod/admin.php:891 msgid "Advanced" msgstr "" -#: mod/admin.php:883 +#: mod/admin.php:892 msgid "Auto Discovered Contact Directory" msgstr "" -#: mod/admin.php:884 +#: mod/admin.php:893 msgid "Performance" msgstr "" -#: mod/admin.php:885 +#: mod/admin.php:894 msgid "" "Relocate - WARNING: advanced function. Could make this server unreachable." msgstr "" -#: mod/admin.php:888 +#: mod/admin.php:897 msgid "Site name" msgstr "" -#: mod/admin.php:889 +#: mod/admin.php:898 msgid "Host name" msgstr "" -#: mod/admin.php:890 +#: mod/admin.php:899 msgid "Sender Email" msgstr "" -#: mod/admin.php:890 +#: mod/admin.php:899 msgid "" "The email address your server shall use to send notification emails from." msgstr "" -#: mod/admin.php:891 +#: mod/admin.php:900 msgid "Banner/Logo" msgstr "" -#: mod/admin.php:892 +#: mod/admin.php:901 msgid "Shortcut icon" msgstr "" -#: mod/admin.php:892 +#: mod/admin.php:901 msgid "Link to an icon that will be used for browsers." msgstr "" -#: mod/admin.php:893 +#: mod/admin.php:902 msgid "Touch icon" msgstr "" -#: mod/admin.php:893 +#: mod/admin.php:902 msgid "Link to an icon that will be used for tablets and mobiles." msgstr "" -#: mod/admin.php:894 +#: mod/admin.php:903 msgid "Additional Info" msgstr "" -#: mod/admin.php:894 +#: mod/admin.php:903 #, php-format msgid "" "For public servers: you can add additional information here that will be " "listed at %s/siteinfo." msgstr "" -#: mod/admin.php:895 +#: mod/admin.php:904 msgid "System language" msgstr "" -#: mod/admin.php:896 +#: mod/admin.php:905 msgid "System theme" msgstr "" -#: mod/admin.php:896 +#: mod/admin.php:905 msgid "" "Default system theme - may be over-ridden by user profiles - change theme settings" msgstr "" -#: mod/admin.php:897 +#: mod/admin.php:906 msgid "Mobile system theme" msgstr "" -#: mod/admin.php:897 +#: mod/admin.php:906 msgid "Theme for mobile devices" msgstr "" -#: mod/admin.php:898 +#: mod/admin.php:907 msgid "SSL link policy" msgstr "" -#: mod/admin.php:898 +#: mod/admin.php:907 msgid "Determines whether generated links should be forced to use SSL" msgstr "" -#: mod/admin.php:899 +#: mod/admin.php:908 msgid "Force SSL" msgstr "" -#: mod/admin.php:899 +#: mod/admin.php:908 msgid "" "Force all Non-SSL requests to SSL - Attention: on some systems it could lead " "to endless loops." msgstr "" -#: mod/admin.php:900 +#: mod/admin.php:909 msgid "Old style 'Share'" msgstr "" -#: mod/admin.php:900 +#: mod/admin.php:909 msgid "Deactivates the bbcode element 'share' for repeating items." msgstr "" -#: mod/admin.php:901 +#: mod/admin.php:910 msgid "Hide help entry from navigation menu" msgstr "" -#: mod/admin.php:901 +#: mod/admin.php:910 msgid "" "Hides the menu entry for the Help pages from the navigation menu. You can " "still access it calling /help directly." msgstr "" -#: mod/admin.php:902 +#: mod/admin.php:911 msgid "Single user instance" msgstr "" -#: mod/admin.php:902 +#: mod/admin.php:911 msgid "Make this instance multi-user or single-user for the named user" msgstr "" -#: mod/admin.php:903 +#: mod/admin.php:912 msgid "Maximum image size" msgstr "" -#: mod/admin.php:903 +#: mod/admin.php:912 msgid "" "Maximum size in bytes of uploaded images. Default is 0, which means no " "limits." msgstr "" -#: mod/admin.php:904 +#: mod/admin.php:913 msgid "Maximum image length" msgstr "" -#: mod/admin.php:904 +#: mod/admin.php:913 msgid "" "Maximum length in pixels of the longest side of uploaded images. Default is " "-1, which means no limits." msgstr "" -#: mod/admin.php:905 +#: mod/admin.php:914 msgid "JPEG image quality" msgstr "" -#: mod/admin.php:905 +#: mod/admin.php:914 msgid "" "Uploaded JPEGS will be saved at this quality setting [0-100]. Default is " "100, which is full quality." msgstr "" -#: mod/admin.php:907 +#: mod/admin.php:916 msgid "Register policy" msgstr "" -#: mod/admin.php:908 +#: mod/admin.php:917 msgid "Maximum Daily Registrations" msgstr "" -#: mod/admin.php:908 +#: mod/admin.php:917 msgid "" "If registration is permitted above, this sets the maximum number of new user " "registrations to accept per day. If register is set to closed, this setting " "has no effect." msgstr "" -#: mod/admin.php:909 +#: mod/admin.php:918 msgid "Register text" msgstr "" -#: mod/admin.php:909 +#: mod/admin.php:918 msgid "Will be displayed prominently on the registration page." msgstr "" -#: mod/admin.php:910 +#: mod/admin.php:919 msgid "Accounts abandoned after x days" msgstr "" -#: mod/admin.php:910 +#: mod/admin.php:919 msgid "" "Will not waste system resources polling external sites for abandonded " "accounts. Enter 0 for no time limit." msgstr "" -#: mod/admin.php:911 +#: mod/admin.php:920 msgid "Allowed friend domains" msgstr "" -#: mod/admin.php:911 +#: mod/admin.php:920 msgid "" "Comma separated list of domains which are allowed to establish friendships " "with this site. Wildcards are accepted. Empty to allow any domains" msgstr "" -#: mod/admin.php:912 +#: mod/admin.php:921 msgid "Allowed email domains" msgstr "" -#: mod/admin.php:912 +#: mod/admin.php:921 msgid "" "Comma separated list of domains which are allowed in email addresses for " "registrations to this site. Wildcards are accepted. Empty to allow any " "domains" msgstr "" -#: mod/admin.php:913 +#: mod/admin.php:922 msgid "Block public" msgstr "" -#: mod/admin.php:913 +#: mod/admin.php:922 msgid "" "Check to block public access to all otherwise public personal pages on this " "site unless you are currently logged in." msgstr "" -#: mod/admin.php:914 +#: mod/admin.php:923 msgid "Force publish" msgstr "" -#: mod/admin.php:914 +#: mod/admin.php:923 msgid "" "Check to force all profiles on this site to be listed in the site directory." msgstr "" -#: mod/admin.php:915 +#: mod/admin.php:924 msgid "Global directory URL" msgstr "" -#: mod/admin.php:915 +#: mod/admin.php:924 msgid "" "URL to the global directory. If this is not set, the global directory is " "completely unavailable to the application." msgstr "" -#: mod/admin.php:916 +#: mod/admin.php:925 msgid "Allow threaded items" msgstr "" -#: mod/admin.php:916 +#: mod/admin.php:925 msgid "Allow infinite level threading for items on this site." msgstr "" -#: mod/admin.php:917 +#: mod/admin.php:926 msgid "Private posts by default for new users" msgstr "" -#: mod/admin.php:917 +#: mod/admin.php:926 msgid "" "Set default post permissions for all new members to the default privacy " "group rather than public." msgstr "" -#: mod/admin.php:918 +#: mod/admin.php:927 msgid "Don't include post content in email notifications" msgstr "" -#: mod/admin.php:918 +#: mod/admin.php:927 msgid "" "Don't include the content of a post/comment/private message/etc. in the " "email notifications that are sent out from this site, as a privacy measure." msgstr "" -#: mod/admin.php:919 +#: mod/admin.php:928 msgid "Disallow public access to addons listed in the apps menu." msgstr "" -#: mod/admin.php:919 +#: mod/admin.php:928 msgid "" "Checking this box will restrict addons listed in the apps menu to members " "only." msgstr "" -#: mod/admin.php:920 +#: mod/admin.php:929 msgid "Don't embed private images in posts" msgstr "" -#: mod/admin.php:920 +#: mod/admin.php:929 msgid "" "Don't replace locally-hosted private photos in posts with an embedded copy " "of the image. This means that contacts who receive posts containing private " "photos will have to authenticate and load each image, which may take a while." msgstr "" -#: mod/admin.php:921 +#: mod/admin.php:930 msgid "Allow Users to set remote_self" msgstr "" -#: mod/admin.php:921 +#: mod/admin.php:930 msgid "" "With checking this, every user is allowed to mark every contact as a " "remote_self in the repair contact dialog. Setting this flag on a contact " "causes mirroring every posting of that contact in the users stream." msgstr "" -#: mod/admin.php:922 +#: mod/admin.php:931 msgid "Block multiple registrations" msgstr "" -#: mod/admin.php:922 +#: mod/admin.php:931 msgid "Disallow users to register additional accounts for use as pages." msgstr "" -#: mod/admin.php:923 +#: mod/admin.php:932 msgid "OpenID support" msgstr "" -#: mod/admin.php:923 +#: mod/admin.php:932 msgid "OpenID support for registration and logins." msgstr "" -#: mod/admin.php:924 +#: mod/admin.php:933 msgid "Fullname check" msgstr "" -#: mod/admin.php:924 +#: mod/admin.php:933 msgid "" "Force users to register with a space between firstname and lastname in Full " "name, as an antispam measure" msgstr "" -#: mod/admin.php:925 +#: mod/admin.php:934 msgid "UTF-8 Regular expressions" msgstr "" -#: mod/admin.php:925 +#: mod/admin.php:934 msgid "Use PHP UTF8 regular expressions" msgstr "" -#: mod/admin.php:926 +#: mod/admin.php:935 msgid "Community Page Style" msgstr "" -#: mod/admin.php:926 +#: mod/admin.php:935 msgid "" "Type of community page to show. 'Global community' shows every public " "posting from an open distributed network that arrived on this server." msgstr "" -#: mod/admin.php:927 +#: mod/admin.php:936 msgid "Posts per user on community page" msgstr "" -#: mod/admin.php:927 +#: mod/admin.php:936 msgid "" "The maximum number of posts per user on the community page. (Not valid for " "'Global Community')" msgstr "" -#: mod/admin.php:928 +#: mod/admin.php:937 msgid "Enable OStatus support" msgstr "" -#: mod/admin.php:928 +#: mod/admin.php:937 msgid "" "Provide built-in OStatus (StatusNet, GNU Social etc.) compatibility. All " "communications in OStatus are public, so privacy warnings will be " "occasionally displayed." msgstr "" -#: mod/admin.php:929 +#: mod/admin.php:938 msgid "OStatus conversation completion interval" msgstr "" -#: mod/admin.php:929 +#: mod/admin.php:938 msgid "" "How often shall the poller check for new entries in OStatus conversations? " "This can be a very ressource task." msgstr "" -#: mod/admin.php:930 +#: mod/admin.php:939 msgid "OStatus support can only be enabled if threading is enabled." msgstr "" -#: mod/admin.php:932 +#: mod/admin.php:941 msgid "" "Diaspora support can't be enabled because Friendica was installed into a sub " "directory." msgstr "" -#: mod/admin.php:933 +#: mod/admin.php:942 msgid "Enable Diaspora support" msgstr "" -#: mod/admin.php:933 +#: mod/admin.php:942 msgid "Provide built-in Diaspora network compatibility." msgstr "" -#: mod/admin.php:934 +#: mod/admin.php:943 msgid "Only allow Friendica contacts" msgstr "" -#: mod/admin.php:934 +#: mod/admin.php:943 msgid "" "All contacts must use Friendica protocols. All other built-in communication " "protocols disabled." msgstr "" -#: mod/admin.php:935 +#: mod/admin.php:944 msgid "Verify SSL" msgstr "" -#: mod/admin.php:935 +#: mod/admin.php:944 msgid "" "If you wish, you can turn on strict certificate checking. This will mean you " "cannot connect (at all) to self-signed SSL sites." msgstr "" -#: mod/admin.php:936 +#: mod/admin.php:945 msgid "Proxy user" msgstr "" -#: mod/admin.php:937 +#: mod/admin.php:946 msgid "Proxy URL" msgstr "" -#: mod/admin.php:938 +#: mod/admin.php:947 msgid "Network timeout" msgstr "" -#: mod/admin.php:938 +#: mod/admin.php:947 msgid "Value is in seconds. Set to 0 for unlimited (not recommended)." msgstr "" -#: mod/admin.php:939 +#: mod/admin.php:948 msgid "Delivery interval" msgstr "" -#: mod/admin.php:939 +#: mod/admin.php:948 msgid "" "Delay background delivery processes by this many seconds to reduce system " "load. Recommend: 4-5 for shared hosts, 2-3 for virtual private servers. 0-1 " "for large dedicated servers." msgstr "" -#: mod/admin.php:940 +#: mod/admin.php:949 msgid "Poll interval" msgstr "" -#: mod/admin.php:940 +#: mod/admin.php:949 msgid "" "Delay background polling processes by this many seconds to reduce system " "load. If 0, use delivery interval." msgstr "" -#: mod/admin.php:941 +#: mod/admin.php:950 msgid "Maximum Load Average" msgstr "" -#: mod/admin.php:941 +#: mod/admin.php:950 msgid "" "Maximum system load before delivery and poll processes are deferred - " "default 50." msgstr "" -#: mod/admin.php:942 +#: mod/admin.php:951 msgid "Maximum Load Average (Frontend)" msgstr "" -#: mod/admin.php:942 +#: mod/admin.php:951 msgid "Maximum system load before the frontend quits service - default 50." msgstr "" -#: mod/admin.php:943 +#: mod/admin.php:952 msgid "Maximum table size for optimization" msgstr "" -#: mod/admin.php:943 +#: mod/admin.php:952 msgid "" "Maximum table size (in MB) for the automatic optimization - default 100 MB. " "Enter -1 to disable it." msgstr "" -#: mod/admin.php:944 +#: mod/admin.php:953 msgid "Minimum level of fragmentation" msgstr "" -#: mod/admin.php:944 +#: mod/admin.php:953 msgid "" "Minimum fragmenation level to start the automatic optimization - default " "value is 30%." msgstr "" -#: mod/admin.php:946 +#: mod/admin.php:955 msgid "Periodical check of global contacts" msgstr "" -#: mod/admin.php:946 +#: mod/admin.php:955 msgid "" "If enabled, the global contacts are checked periodically for missing or " "outdated data and the vitality of the contacts and servers." msgstr "" -#: mod/admin.php:947 +#: mod/admin.php:956 msgid "Days between requery" msgstr "" -#: mod/admin.php:947 +#: mod/admin.php:956 msgid "Number of days after which a server is requeried for his contacts." msgstr "" -#: mod/admin.php:948 +#: mod/admin.php:957 msgid "Discover contacts from other servers" msgstr "" -#: mod/admin.php:948 +#: mod/admin.php:957 msgid "" "Periodically query other servers for contacts. You can choose between " "'users': the users on the remote system, 'Global Contacts': active contacts " @@ -2707,32 +2707,32 @@ msgid "" "Global Contacts'." msgstr "" -#: mod/admin.php:949 +#: mod/admin.php:958 msgid "Timeframe for fetching global contacts" msgstr "" -#: mod/admin.php:949 +#: mod/admin.php:958 msgid "" "When the discovery is activated, this value defines the timeframe for the " "activity of the global contacts that are fetched from other servers." msgstr "" -#: mod/admin.php:950 +#: mod/admin.php:959 msgid "Search the local directory" msgstr "" -#: mod/admin.php:950 +#: mod/admin.php:959 msgid "" "Search the local directory instead of the global directory. When searching " "locally, every search will be executed on the global directory in the " "background. This improves the search results when the search is repeated." msgstr "" -#: mod/admin.php:952 +#: mod/admin.php:961 msgid "Publish server information" msgstr "" -#: mod/admin.php:952 +#: mod/admin.php:961 msgid "" "If enabled, general server and usage data will be published. The data " "contains the name and version of the server, number of users with public " @@ -2740,204 +2740,204 @@ msgid "" "href='http://the-federation.info/'>the-federation.info for details." msgstr "" -#: mod/admin.php:954 +#: mod/admin.php:963 msgid "Use MySQL full text engine" msgstr "" -#: mod/admin.php:954 +#: mod/admin.php:963 msgid "" "Activates the full text engine. Speeds up search - but can only search for " "four and more characters." msgstr "" -#: mod/admin.php:955 +#: mod/admin.php:964 msgid "Suppress Language" msgstr "" -#: mod/admin.php:955 +#: mod/admin.php:964 msgid "Suppress language information in meta information about a posting." msgstr "" -#: mod/admin.php:956 +#: mod/admin.php:965 msgid "Suppress Tags" msgstr "" -#: mod/admin.php:956 +#: mod/admin.php:965 msgid "Suppress showing a list of hashtags at the end of the posting." msgstr "" -#: mod/admin.php:957 +#: mod/admin.php:966 msgid "Path to item cache" msgstr "" -#: mod/admin.php:957 +#: mod/admin.php:966 msgid "The item caches buffers generated bbcode and external images." msgstr "" -#: mod/admin.php:958 +#: mod/admin.php:967 msgid "Cache duration in seconds" msgstr "" -#: mod/admin.php:958 +#: mod/admin.php:967 msgid "" "How long should the cache files be hold? Default value is 86400 seconds (One " "day). To disable the item cache, set the value to -1." msgstr "" -#: mod/admin.php:959 +#: mod/admin.php:968 msgid "Maximum numbers of comments per post" msgstr "" -#: mod/admin.php:959 +#: mod/admin.php:968 msgid "How much comments should be shown for each post? Default value is 100." msgstr "" -#: mod/admin.php:960 +#: mod/admin.php:969 msgid "Path for lock file" msgstr "" -#: mod/admin.php:960 +#: mod/admin.php:969 msgid "" "The lock file is used to avoid multiple pollers at one time. Only define a " "folder here." msgstr "" -#: mod/admin.php:961 +#: mod/admin.php:970 msgid "Temp path" msgstr "" -#: mod/admin.php:961 +#: mod/admin.php:970 msgid "" "If you have a restricted system where the webserver can't access the system " "temp path, enter another path here." msgstr "" -#: mod/admin.php:962 +#: mod/admin.php:971 msgid "Base path to installation" msgstr "" -#: mod/admin.php:962 +#: mod/admin.php:971 msgid "" "If the system cannot detect the correct path to your installation, enter the " "correct path here. This setting should only be set if you are using a " "restricted system and symbolic links to your webroot." msgstr "" -#: mod/admin.php:963 +#: mod/admin.php:972 msgid "Disable picture proxy" msgstr "" -#: mod/admin.php:963 +#: mod/admin.php:972 msgid "" "The picture proxy increases performance and privacy. It shouldn't be used on " "systems with very low bandwith." msgstr "" -#: mod/admin.php:964 +#: mod/admin.php:973 msgid "Enable old style pager" msgstr "" -#: mod/admin.php:964 +#: mod/admin.php:973 msgid "" "The old style pager has page numbers but slows down massively the page speed." msgstr "" -#: mod/admin.php:965 +#: mod/admin.php:974 msgid "Only search in tags" msgstr "" -#: mod/admin.php:965 +#: mod/admin.php:974 msgid "On large systems the text search can slow down the system extremely." msgstr "" -#: mod/admin.php:967 +#: mod/admin.php:976 msgid "New base url" msgstr "" -#: mod/admin.php:967 +#: mod/admin.php:976 msgid "" "Change base url for this server. Sends relocate message to all DFRN contacts " "of all users." msgstr "" -#: mod/admin.php:969 +#: mod/admin.php:978 msgid "RINO Encryption" msgstr "" -#: mod/admin.php:969 +#: mod/admin.php:978 msgid "Encryption layer between nodes." msgstr "" -#: mod/admin.php:970 +#: mod/admin.php:979 msgid "Embedly API key" msgstr "" -#: mod/admin.php:970 +#: mod/admin.php:979 msgid "" "Embedly is used to fetch additional data for " "web pages. This is an optional parameter." msgstr "" -#: mod/admin.php:999 +#: mod/admin.php:1008 msgid "Update has been marked successful" msgstr "" -#: mod/admin.php:1007 +#: mod/admin.php:1016 #, php-format msgid "Database structure update %s was successfully applied." msgstr "" -#: mod/admin.php:1010 +#: mod/admin.php:1019 #, php-format msgid "Executing of database structure update %s failed with error: %s" msgstr "" -#: mod/admin.php:1022 +#: mod/admin.php:1031 #, php-format msgid "Executing %s failed with error: %s" msgstr "" -#: mod/admin.php:1025 +#: mod/admin.php:1034 #, php-format msgid "Update %s was successfully applied." msgstr "" -#: mod/admin.php:1029 +#: mod/admin.php:1038 #, php-format msgid "Update %s did not return a status. Unknown if it succeeded." msgstr "" -#: mod/admin.php:1031 +#: mod/admin.php:1040 #, php-format msgid "There was no additional update function %s that needed to be called." msgstr "" -#: mod/admin.php:1050 +#: mod/admin.php:1059 msgid "No failed updates." msgstr "" -#: mod/admin.php:1051 +#: mod/admin.php:1060 msgid "Check database structure" msgstr "" -#: mod/admin.php:1056 +#: mod/admin.php:1065 msgid "Failed Updates" msgstr "" -#: mod/admin.php:1057 +#: mod/admin.php:1066 msgid "" "This does not include updates prior to 1139, which did not return a status." msgstr "" -#: mod/admin.php:1058 +#: mod/admin.php:1067 msgid "Mark success (if update was manually applied)" msgstr "" -#: mod/admin.php:1059 +#: mod/admin.php:1068 msgid "Attempt to execute this update step automatically" msgstr "" -#: mod/admin.php:1091 +#: mod/admin.php:1100 #, php-format msgid "" "\n" @@ -2945,7 +2945,7 @@ msgid "" "\t\t\t\tthe administrator of %2$s has set up an account for you." msgstr "" -#: mod/admin.php:1094 +#: mod/admin.php:1103 #, php-format msgid "" "\n" @@ -2981,168 +2981,168 @@ msgid "" "\t\t\tThank you and welcome to %4$s." msgstr "" -#: mod/admin.php:1126 include/user.php:423 +#: mod/admin.php:1135 include/user.php:423 #, php-format msgid "Registration details for %s" msgstr "" -#: mod/admin.php:1138 +#: mod/admin.php:1147 #, php-format msgid "%s user blocked/unblocked" msgid_plural "%s users blocked/unblocked" msgstr[0] "" msgstr[1] "" -#: mod/admin.php:1145 +#: mod/admin.php:1154 #, php-format msgid "%s user deleted" msgid_plural "%s users deleted" msgstr[0] "" msgstr[1] "" -#: mod/admin.php:1192 +#: mod/admin.php:1201 #, php-format msgid "User '%s' deleted" msgstr "" -#: mod/admin.php:1200 +#: mod/admin.php:1209 #, php-format msgid "User '%s' unblocked" msgstr "" -#: mod/admin.php:1200 +#: mod/admin.php:1209 #, php-format msgid "User '%s' blocked" msgstr "" -#: mod/admin.php:1291 +#: mod/admin.php:1300 msgid "Add User" msgstr "" -#: mod/admin.php:1292 +#: mod/admin.php:1301 msgid "select all" msgstr "" -#: mod/admin.php:1293 +#: mod/admin.php:1302 msgid "User registrations waiting for confirm" msgstr "" -#: mod/admin.php:1294 +#: mod/admin.php:1303 msgid "User waiting for permanent deletion" msgstr "" -#: mod/admin.php:1295 +#: mod/admin.php:1304 msgid "Request date" msgstr "" -#: mod/admin.php:1295 mod/admin.php:1307 mod/admin.php:1308 mod/admin.php:1323 +#: mod/admin.php:1304 mod/admin.php:1316 mod/admin.php:1317 mod/admin.php:1332 #: include/contact_selectors.php:79 include/contact_selectors.php:86 msgid "Email" msgstr "" -#: mod/admin.php:1296 +#: mod/admin.php:1305 msgid "No registrations." msgstr "" -#: mod/admin.php:1298 +#: mod/admin.php:1307 msgid "Deny" msgstr "" -#: mod/admin.php:1302 +#: mod/admin.php:1311 msgid "Site admin" msgstr "" -#: mod/admin.php:1303 +#: mod/admin.php:1312 msgid "Account expired" msgstr "" -#: mod/admin.php:1306 +#: mod/admin.php:1315 msgid "New User" msgstr "" -#: mod/admin.php:1307 mod/admin.php:1308 +#: mod/admin.php:1316 mod/admin.php:1317 msgid "Register date" msgstr "" -#: mod/admin.php:1307 mod/admin.php:1308 +#: mod/admin.php:1316 mod/admin.php:1317 msgid "Last login" msgstr "" -#: mod/admin.php:1307 mod/admin.php:1308 +#: mod/admin.php:1316 mod/admin.php:1317 msgid "Last item" msgstr "" -#: mod/admin.php:1307 +#: mod/admin.php:1316 msgid "Deleted since" msgstr "" -#: mod/admin.php:1308 mod/settings.php:41 +#: mod/admin.php:1317 mod/settings.php:41 msgid "Account" msgstr "" -#: mod/admin.php:1310 +#: mod/admin.php:1319 msgid "" "Selected users will be deleted!\\n\\nEverything these users had posted on " "this site will be permanently deleted!\\n\\nAre you sure?" msgstr "" -#: mod/admin.php:1311 +#: mod/admin.php:1320 msgid "" "The user {0} will be deleted!\\n\\nEverything this user has posted on this " "site will be permanently deleted!\\n\\nAre you sure?" msgstr "" -#: mod/admin.php:1321 +#: mod/admin.php:1330 msgid "Name of the new user." msgstr "" -#: mod/admin.php:1322 +#: mod/admin.php:1331 msgid "Nickname" msgstr "" -#: mod/admin.php:1322 +#: mod/admin.php:1331 msgid "Nickname of the new user." msgstr "" -#: mod/admin.php:1323 +#: mod/admin.php:1332 msgid "Email address of the new user." msgstr "" -#: mod/admin.php:1366 +#: mod/admin.php:1375 #, php-format msgid "Plugin %s disabled." msgstr "" -#: mod/admin.php:1370 +#: mod/admin.php:1379 #, php-format msgid "Plugin %s enabled." msgstr "" -#: mod/admin.php:1381 mod/admin.php:1617 +#: mod/admin.php:1390 mod/admin.php:1626 msgid "Disable" msgstr "" -#: mod/admin.php:1383 mod/admin.php:1619 +#: mod/admin.php:1392 mod/admin.php:1628 msgid "Enable" msgstr "" -#: mod/admin.php:1406 mod/admin.php:1664 +#: mod/admin.php:1415 mod/admin.php:1673 msgid "Toggle" msgstr "" -#: mod/admin.php:1414 mod/admin.php:1673 +#: mod/admin.php:1423 mod/admin.php:1682 msgid "Author: " msgstr "" -#: mod/admin.php:1415 mod/admin.php:1674 +#: mod/admin.php:1424 mod/admin.php:1683 msgid "Maintainer: " msgstr "" -#: mod/admin.php:1467 +#: mod/admin.php:1476 msgid "Reload active plugins" msgstr "" -#: mod/admin.php:1472 +#: mod/admin.php:1481 #, php-format msgid "" "There are currently no plugins available on your node. You can find the " @@ -3150,62 +3150,62 @@ msgid "" "in the open plugin registry at %2$s" msgstr "" -#: mod/admin.php:1577 +#: mod/admin.php:1586 msgid "No themes found." msgstr "" -#: mod/admin.php:1655 +#: mod/admin.php:1664 msgid "Screenshot" msgstr "" -#: mod/admin.php:1715 +#: mod/admin.php:1724 msgid "Reload active themes" msgstr "" -#: mod/admin.php:1720 +#: mod/admin.php:1729 #, php-format msgid "No themes found on the system. They should be paced in %1$s" msgstr "" -#: mod/admin.php:1721 +#: mod/admin.php:1730 msgid "[Experimental]" msgstr "" -#: mod/admin.php:1722 +#: mod/admin.php:1731 msgid "[Unsupported]" msgstr "" -#: mod/admin.php:1746 +#: mod/admin.php:1755 msgid "Log settings updated." msgstr "" -#: mod/admin.php:1783 +#: mod/admin.php:1792 msgid "Clear" msgstr "" -#: mod/admin.php:1788 +#: mod/admin.php:1797 msgid "Enable Debugging" msgstr "" -#: mod/admin.php:1789 +#: mod/admin.php:1798 msgid "Log file" msgstr "" -#: mod/admin.php:1789 +#: mod/admin.php:1798 msgid "" "Must be writable by web server. Relative to your Friendica top-level " "directory." msgstr "" -#: mod/admin.php:1790 +#: mod/admin.php:1799 msgid "Log level" msgstr "" -#: mod/admin.php:1793 +#: mod/admin.php:1802 msgid "PHP logging" msgstr "" -#: mod/admin.php:1794 +#: mod/admin.php:1803 msgid "" "To enable logging of PHP errors and warnings you can add the following to " "the .htconfig.php file of your installation. The filename set in the " @@ -3214,20 +3214,20 @@ msgid "" "'display_errors' is to enable these options, set to '0' to disable them." msgstr "" -#: mod/admin.php:1920 mod/admin.php:1921 mod/settings.php:759 +#: mod/admin.php:1929 mod/admin.php:1930 mod/settings.php:759 msgid "Off" msgstr "" -#: mod/admin.php:1920 mod/admin.php:1921 mod/settings.php:759 +#: mod/admin.php:1929 mod/admin.php:1930 mod/settings.php:759 msgid "On" msgstr "" -#: mod/admin.php:1921 +#: mod/admin.php:1930 #, php-format msgid "Lock feature %s" msgstr "" -#: mod/admin.php:1929 +#: mod/admin.php:1938 msgid "Manage Additional Features" msgstr "" @@ -3505,7 +3505,7 @@ msgstr "" msgid "Edit event" msgstr "" -#: mod/events.php:421 include/text.php:1721 include/text.php:1728 +#: mod/events.php:421 include/text.php:1728 include/text.php:1735 msgid "link to source" msgstr "" @@ -3612,15 +3612,15 @@ msgstr[0] "" msgstr[1] "" #: mod/content.php:607 object/Item.php:421 object/Item.php:434 -#: include/text.php:1997 +#: include/text.php:2004 msgid "comment" msgid_plural "comments" msgstr[0] "" msgstr[1] "" -#: mod/content.php:608 boot.php:863 object/Item.php:422 +#: mod/content.php:608 boot.php:870 object/Item.php:422 #: include/contact_widgets.php:242 include/forums.php:110 -#: include/items.php:5184 view/theme/vier/theme.php:264 +#: include/items.php:5188 view/theme/vier/theme.php:264 msgid "show more" msgstr "" @@ -3658,7 +3658,7 @@ msgid "This is you" msgstr "" #: mod/content.php:711 mod/photos.php:1629 mod/photos.php:1677 -#: mod/photos.php:1765 boot.php:862 object/Item.php:393 object/Item.php:709 +#: mod/photos.php:1765 boot.php:869 object/Item.php:393 object/Item.php:709 msgid "Comment" msgstr "" @@ -4148,16 +4148,16 @@ msgstr "" msgid "link" msgstr "" -#: mod/community.php:23 +#: mod/community.php:27 msgid "Not available." msgstr "" -#: mod/community.php:32 include/nav.php:136 include/nav.php:138 +#: mod/community.php:36 include/nav.php:136 include/nav.php:138 #: view/theme/diabook/theme.php:129 msgid "Community" msgstr "" -#: mod/community.php:62 mod/community.php:71 mod/search.php:228 +#: mod/community.php:66 mod/community.php:75 mod/search.php:228 msgid "No results." msgstr "" @@ -5082,7 +5082,7 @@ msgstr "" msgid "Choose a nickname: " msgstr "" -#: mod/register.php:280 boot.php:1379 include/nav.php:108 +#: mod/register.php:280 boot.php:1405 include/nav.php:108 msgid "Register" msgstr "" @@ -6126,60 +6126,60 @@ msgstr "" msgid "Item was not found." msgstr "" -#: boot.php:861 +#: boot.php:868 msgid "Delete this item?" msgstr "" -#: boot.php:864 +#: boot.php:871 msgid "show fewer" msgstr "" -#: boot.php:1266 +#: boot.php:1292 #, php-format msgid "Update %s failed. See error logs." msgstr "" -#: boot.php:1378 +#: boot.php:1404 msgid "Create a New Account" msgstr "" -#: boot.php:1403 include/nav.php:72 +#: boot.php:1429 include/nav.php:72 msgid "Logout" msgstr "" -#: boot.php:1406 +#: boot.php:1432 msgid "Nickname or Email address: " msgstr "" -#: boot.php:1407 +#: boot.php:1433 msgid "Password: " msgstr "" -#: boot.php:1408 +#: boot.php:1434 msgid "Remember me" msgstr "" -#: boot.php:1411 +#: boot.php:1437 msgid "Or login using OpenID: " msgstr "" -#: boot.php:1417 +#: boot.php:1443 msgid "Forgot your password?" msgstr "" -#: boot.php:1420 +#: boot.php:1446 msgid "Website Terms of Service" msgstr "" -#: boot.php:1421 +#: boot.php:1447 msgid "terms of service" msgstr "" -#: boot.php:1423 +#: boot.php:1449 msgid "Website Privacy Policy" msgstr "" -#: boot.php:1424 +#: boot.php:1450 msgid "privacy policy" msgstr "" @@ -6681,12 +6681,12 @@ msgstr "" msgid "%1$d %2$s ago" msgstr "" -#: include/datetime.php:474 include/items.php:2477 +#: include/datetime.php:474 include/items.php:2481 #, php-format msgid "%s's birthday" msgstr "" -#: include/datetime.php:475 include/items.php:2478 +#: include/datetime.php:475 include/items.php:2482 #, php-format msgid "Happy Birthday %s" msgstr "" @@ -6825,12 +6825,12 @@ msgid "Only You Can See This" msgstr "" #: include/like.php:167 include/conversation.php:122 -#: include/conversation.php:258 include/text.php:1991 +#: include/conversation.php:258 include/text.php:1998 #: view/theme/diabook/theme.php:463 msgid "event" msgstr "" -#: include/like.php:184 include/conversation.php:141 include/diaspora.php:2163 +#: include/like.php:184 include/conversation.php:141 include/diaspora.php:2167 #: view/theme/diabook/theme.php:480 #, php-format msgid "%1$s likes %2$s's %3$s" @@ -7326,31 +7326,31 @@ msgstr "" msgid "surprised" msgstr "" -#: include/text.php:1497 +#: include/text.php:1504 msgid "bytes" msgstr "" -#: include/text.php:1529 include/text.php:1541 +#: include/text.php:1536 include/text.php:1548 msgid "Click to open/close" msgstr "" -#: include/text.php:1715 +#: include/text.php:1722 msgid "View on separate page" msgstr "" -#: include/text.php:1716 +#: include/text.php:1723 msgid "view on separate page" msgstr "" -#: include/text.php:1995 +#: include/text.php:2002 msgid "activity" msgstr "" -#: include/text.php:1998 +#: include/text.php:2005 msgid "post" msgstr "" -#: include/text.php:2166 +#: include/text.php:2173 msgid "Item filed" msgstr "" @@ -7784,7 +7784,7 @@ msgstr "" msgid "Sharing notification from Diaspora network" msgstr "" -#: include/diaspora.php:2604 +#: include/diaspora.php:2608 msgid "Attachments:" msgstr "" @@ -7796,11 +7796,11 @@ msgstr "" msgid "noreply" msgstr "" -#: include/items.php:4903 +#: include/items.php:4907 msgid "Do you really want to delete this item?" msgstr "" -#: include/items.php:5178 +#: include/items.php:5182 msgid "Archives" msgstr "" @@ -8316,11 +8316,11 @@ msgstr "" msgid "Please visit %s to approve or reject the request." msgstr "" -#: include/oembed.php:214 +#: include/oembed.php:226 msgid "Embedded content" msgstr "" -#: include/oembed.php:223 +#: include/oembed.php:235 msgid "Embedding disabled" msgstr "" From f635e81d94ed7ebfc0ad7aebe556f08d2847c05c Mon Sep 17 00:00:00 2001 From: Tobias Diekershoff Date: Wed, 20 Jan 2016 17:54:40 +0100 Subject: [PATCH 085/242] NL update to the strings THX Dasrakel --- view/nl/messages.po | 3032 ++++++++++++++++++++++--------------------- view/nl/strings.php | 141 +- 2 files changed, 1618 insertions(+), 1555 deletions(-) diff --git a/view/nl/messages.po b/view/nl/messages.po index ba81fdb03b..5ae713daf2 100644 --- a/view/nl/messages.po +++ b/view/nl/messages.po @@ -9,15 +9,15 @@ # Gert Cauwenberg , 2013 # jeroenpraat , 2012-2014 # jeroenpraat , 2012 -# Karel Vandecandelaere , 2015 +# Karel Vandecandelaere , 2015-2016 # Ralph , 2015 msgid "" msgstr "" "Project-Id-Version: friendica\n" "Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2015-11-08 21:46+0100\n" -"PO-Revision-Date: 2015-11-17 23:49+0000\n" -"Last-Translator: Ralph \n" +"POT-Creation-Date: 2016-01-18 18:49+0100\n" +"PO-Revision-Date: 2016-01-20 13:13+0000\n" +"Last-Translator: Karel Vandecandelaere \n" "Language-Team: Dutch (http://www.transifex.com/Friendica/friendica/language/nl/)\n" "MIME-Version: 1.0\n" "Content-Type: text/plain; charset=UTF-8\n" @@ -25,233 +25,182 @@ msgstr "" "Language: nl\n" "Plural-Forms: nplurals=2; plural=(n != 1);\n" -#: mod/contacts.php:118 +#: mod/contacts.php:50 include/identity.php:395 +msgid "Network:" +msgstr "Netwerk:" + +#: mod/contacts.php:51 mod/contacts.php:961 mod/videos.php:37 +#: mod/viewcontacts.php:105 mod/dirfind.php:214 mod/network.php:598 +#: mod/allfriends.php:77 mod/match.php:82 mod/directory.php:172 +#: mod/common.php:123 mod/suggest.php:95 mod/photos.php:41 +#: include/identity.php:298 +msgid "Forum" +msgstr "Forum" + +#: mod/contacts.php:128 #, php-format msgid "%d contact edited." msgid_plural "%d contacts edited" -msgstr[0] "" -msgstr[1] "" +msgstr[0] "%d contact gewijzigd." +msgstr[1] "%d contacten gewijzigd." -#: mod/contacts.php:149 mod/contacts.php:372 +#: mod/contacts.php:159 mod/contacts.php:383 msgid "Could not access contact record." msgstr "Kon geen toegang krijgen tot de contactgegevens" -#: mod/contacts.php:163 +#: mod/contacts.php:173 msgid "Could not locate selected profile." msgstr "Kon het geselecteerde profiel niet vinden." -#: mod/contacts.php:196 +#: mod/contacts.php:206 msgid "Contact updated." msgstr "Contact bijgewerkt." -#: mod/contacts.php:198 mod/dfrn_request.php:576 +#: mod/contacts.php:208 mod/dfrn_request.php:575 msgid "Failed to update contact record." msgstr "Ik kon de contactgegevens niet aanpassen." -#: mod/contacts.php:354 mod/manage.php:96 mod/display.php:496 -#: mod/profile_photo.php:19 mod/profile_photo.php:169 -#: mod/profile_photo.php:180 mod/profile_photo.php:193 -#: mod/ostatus_subscribe.php:9 mod/follow.php:10 mod/follow.php:72 -#: mod/follow.php:137 mod/item.php:169 mod/item.php:185 mod/group.php:19 +#: mod/contacts.php:365 mod/manage.php:96 mod/display.php:504 +#: mod/profile_photo.php:19 mod/profile_photo.php:175 +#: mod/profile_photo.php:186 mod/profile_photo.php:199 +#: mod/ostatus_subscribe.php:9 mod/follow.php:11 mod/follow.php:73 +#: mod/follow.php:155 mod/item.php:180 mod/item.php:192 mod/group.php:19 #: mod/dfrn_confirm.php:55 mod/fsuggest.php:78 mod/wall_upload.php:77 -#: mod/wall_upload.php:80 mod/viewcontacts.php:24 mod/notifications.php:69 -#: mod/message.php:45 mod/message.php:181 mod/crepair.php:120 +#: mod/wall_upload.php:80 mod/viewcontacts.php:40 mod/notifications.php:69 +#: mod/message.php:45 mod/message.php:181 mod/crepair.php:117 #: mod/dirfind.php:11 mod/nogroup.php:25 mod/network.php:4 -#: mod/allfriends.php:11 mod/events.php:165 mod/wallmessage.php:9 +#: mod/allfriends.php:12 mod/events.php:165 mod/wallmessage.php:9 #: mod/wallmessage.php:33 mod/wallmessage.php:79 mod/wallmessage.php:103 #: mod/wall_attach.php:67 mod/wall_attach.php:70 mod/settings.php:20 -#: mod/settings.php:116 mod/settings.php:635 mod/register.php:42 -#: mod/delegate.php:12 mod/common.php:17 mod/mood.php:114 mod/suggest.php:58 +#: mod/settings.php:126 mod/settings.php:646 mod/register.php:42 +#: mod/delegate.php:12 mod/common.php:18 mod/mood.php:114 mod/suggest.php:58 #: mod/profiles.php:165 mod/profiles.php:615 mod/editpost.php:10 #: mod/api.php:26 mod/api.php:31 mod/notes.php:22 mod/poke.php:149 #: mod/repair_ostatus.php:9 mod/invite.php:15 mod/invite.php:101 -#: mod/photos.php:163 mod/photos.php:1097 mod/regmod.php:110 -#: mod/uimport.php:23 mod/attach.php:33 include/items.php:5103 index.php:382 +#: mod/photos.php:171 mod/photos.php:1105 mod/regmod.php:110 +#: mod/uimport.php:23 mod/attach.php:33 include/items.php:5073 index.php:383 msgid "Permission denied." msgstr "Toegang geweigerd" -#: mod/contacts.php:393 +#: mod/contacts.php:404 msgid "Contact has been blocked" msgstr "Contact is geblokkeerd" -#: mod/contacts.php:393 +#: mod/contacts.php:404 msgid "Contact has been unblocked" msgstr "Contact is gedeblokkeerd" -#: mod/contacts.php:404 +#: mod/contacts.php:415 msgid "Contact has been ignored" msgstr "Contact wordt genegeerd" -#: mod/contacts.php:404 +#: mod/contacts.php:415 msgid "Contact has been unignored" msgstr "Contact wordt niet meer genegeerd" -#: mod/contacts.php:416 +#: mod/contacts.php:427 msgid "Contact has been archived" msgstr "Contact is gearchiveerd" -#: mod/contacts.php:416 +#: mod/contacts.php:427 msgid "Contact has been unarchived" msgstr "Contact is niet meer gearchiveerd" -#: mod/contacts.php:443 mod/contacts.php:816 +#: mod/contacts.php:454 mod/contacts.php:802 msgid "Do you really want to delete this contact?" msgstr "Wil je echt dit contact verwijderen?" -#: mod/contacts.php:445 mod/follow.php:105 mod/message.php:216 -#: mod/settings.php:1091 mod/settings.php:1097 mod/settings.php:1105 -#: mod/settings.php:1109 mod/settings.php:1114 mod/settings.php:1120 -#: mod/settings.php:1126 mod/settings.php:1132 mod/settings.php:1158 -#: mod/settings.php:1159 mod/settings.php:1160 mod/settings.php:1161 -#: mod/settings.php:1162 mod/dfrn_request.php:848 mod/register.php:235 +#: mod/contacts.php:456 mod/follow.php:110 mod/message.php:216 +#: mod/settings.php:1103 mod/settings.php:1109 mod/settings.php:1117 +#: mod/settings.php:1121 mod/settings.php:1126 mod/settings.php:1132 +#: mod/settings.php:1138 mod/settings.php:1144 mod/settings.php:1170 +#: mod/settings.php:1171 mod/settings.php:1172 mod/settings.php:1173 +#: mod/settings.php:1174 mod/dfrn_request.php:857 mod/register.php:238 #: mod/suggest.php:29 mod/profiles.php:658 mod/profiles.php:661 -#: mod/profiles.php:687 mod/api.php:105 include/items.php:4935 +#: mod/profiles.php:687 mod/api.php:105 include/items.php:4905 msgid "Yes" msgstr "Ja" -#: mod/contacts.php:448 mod/tagrm.php:11 mod/tagrm.php:94 mod/follow.php:116 -#: mod/videos.php:123 mod/message.php:219 mod/fbrowser.php:93 -#: mod/fbrowser.php:128 mod/settings.php:649 mod/settings.php:675 -#: mod/dfrn_request.php:862 mod/suggest.php:32 mod/editpost.php:147 -#: mod/photos.php:239 mod/photos.php:328 include/conversation.php:1221 -#: include/items.php:4938 +#: mod/contacts.php:459 mod/tagrm.php:11 mod/tagrm.php:94 mod/follow.php:121 +#: mod/videos.php:131 mod/message.php:219 mod/fbrowser.php:93 +#: mod/fbrowser.php:128 mod/settings.php:660 mod/settings.php:686 +#: mod/dfrn_request.php:871 mod/suggest.php:32 mod/editpost.php:148 +#: mod/photos.php:247 mod/photos.php:336 include/conversation.php:1220 +#: include/items.php:4908 msgid "Cancel" msgstr "Annuleren" -#: mod/contacts.php:460 +#: mod/contacts.php:471 msgid "Contact has been removed." msgstr "Contact is verwijderd." -#: mod/contacts.php:498 +#: mod/contacts.php:512 #, php-format msgid "You are mutual friends with %s" msgstr "Je bent wederzijds bevriend met %s" -#: mod/contacts.php:502 +#: mod/contacts.php:516 #, php-format msgid "You are sharing with %s" msgstr "Je deelt met %s" -#: mod/contacts.php:507 +#: mod/contacts.php:521 #, php-format msgid "%s is sharing with you" msgstr "%s deelt met jou" -#: mod/contacts.php:527 +#: mod/contacts.php:541 msgid "Private communications are not available for this contact." msgstr "Privécommunicatie met dit contact is niet beschikbaar." -#: mod/contacts.php:530 mod/admin.php:643 +#: mod/contacts.php:544 mod/admin.php:811 msgid "Never" msgstr "Nooit" -#: mod/contacts.php:534 +#: mod/contacts.php:548 msgid "(Update was successful)" msgstr "(Wijziging is geslaagd)" -#: mod/contacts.php:534 +#: mod/contacts.php:548 msgid "(Update was not successful)" msgstr "(Wijziging is niet geslaagd)" -#: mod/contacts.php:536 +#: mod/contacts.php:550 msgid "Suggest friends" msgstr "Stel vrienden voor" -#: mod/contacts.php:540 +#: mod/contacts.php:554 #, php-format msgid "Network type: %s" msgstr "Netwerk type: %s" -#: mod/contacts.php:543 include/contact_widgets.php:200 -#, php-format -msgid "%d contact in common" -msgid_plural "%d contacts in common" -msgstr[0] "%d gedeeld contact" -msgstr[1] "%d gedeelde contacten" - -#: mod/contacts.php:548 -msgid "View all contacts" -msgstr "Alle contacten zien" - -#: mod/contacts.php:553 mod/contacts.php:636 mod/contacts.php:820 -#: mod/admin.php:1114 -msgid "Unblock" -msgstr "Blokkering opheffen" - -#: mod/contacts.php:553 mod/contacts.php:636 mod/contacts.php:820 -#: mod/admin.php:1113 -msgid "Block" -msgstr "Blokkeren" - -#: mod/contacts.php:556 -msgid "Toggle Blocked status" -msgstr "Schakel geblokkeerde status" - -#: mod/contacts.php:561 mod/contacts.php:637 mod/contacts.php:821 -msgid "Unignore" -msgstr "Negeer niet meer" - -#: mod/contacts.php:561 mod/contacts.php:637 mod/contacts.php:821 -#: mod/notifications.php:54 mod/notifications.php:179 -#: mod/notifications.php:259 -msgid "Ignore" -msgstr "Negeren" - -#: mod/contacts.php:564 -msgid "Toggle Ignored status" -msgstr "Schakel negeerstatus" - -#: mod/contacts.php:570 mod/contacts.php:822 -msgid "Unarchive" -msgstr "Archiveer niet meer" - -#: mod/contacts.php:570 mod/contacts.php:822 -msgid "Archive" -msgstr "Archiveer" - -#: mod/contacts.php:573 -msgid "Toggle Archive status" -msgstr "Schakel archiveringsstatus" - -#: mod/contacts.php:578 -msgid "Repair" -msgstr "Herstellen" - -#: mod/contacts.php:581 -msgid "Advanced Contact Settings" -msgstr "Geavanceerde instellingen voor contacten" - -#: mod/contacts.php:589 +#: mod/contacts.php:567 msgid "Communications lost with this contact!" msgstr "Communicatie met dit contact is verbroken!" -#: mod/contacts.php:592 +#: mod/contacts.php:570 msgid "Fetch further information for feeds" msgstr "" -#: mod/contacts.php:593 mod/admin.php:652 +#: mod/contacts.php:571 mod/admin.php:820 msgid "Disabled" msgstr "Uitgeschakeld" -#: mod/contacts.php:593 +#: mod/contacts.php:571 msgid "Fetch information" msgstr "" -#: mod/contacts.php:593 +#: mod/contacts.php:571 msgid "Fetch information and keywords" msgstr "" -#: mod/contacts.php:606 -msgid "Contact Editor" -msgstr "Contactbewerker" - -#: mod/contacts.php:608 mod/manage.php:124 mod/fsuggest.php:107 -#: mod/message.php:342 mod/message.php:525 mod/crepair.php:195 -#: mod/events.php:574 mod/content.php:712 mod/install.php:253 -#: mod/install.php:291 mod/mood.php:137 mod/profiles.php:696 +#: mod/contacts.php:587 mod/manage.php:143 mod/fsuggest.php:107 +#: mod/message.php:342 mod/message.php:525 mod/crepair.php:196 +#: mod/events.php:574 mod/content.php:712 mod/install.php:261 +#: mod/install.php:299 mod/mood.php:137 mod/profiles.php:696 #: mod/localtime.php:45 mod/poke.php:198 mod/invite.php:140 -#: mod/photos.php:1129 mod/photos.php:1253 mod/photos.php:1571 -#: mod/photos.php:1622 mod/photos.php:1670 mod/photos.php:1758 +#: mod/photos.php:1137 mod/photos.php:1261 mod/photos.php:1579 +#: mod/photos.php:1630 mod/photos.php:1678 mod/photos.php:1766 #: object/Item.php:710 view/theme/cleanzero/config.php:80 #: view/theme/dispy/config.php:70 view/theme/quattro/config.php:64 #: view/theme/diabook/config.php:148 view/theme/diabook/theme.php:633 @@ -259,208 +208,304 @@ msgstr "Contactbewerker" msgid "Submit" msgstr "Opslaan" -#: mod/contacts.php:609 +#: mod/contacts.php:588 msgid "Profile Visibility" msgstr "Zichtbaarheid profiel" -#: mod/contacts.php:610 +#: mod/contacts.php:589 #, php-format msgid "" "Please choose the profile you would like to display to %s when viewing your " "profile securely." msgstr "Kies het profiel dat getoond moet worden wanneer %s uw profiel bezoekt. " -#: mod/contacts.php:611 +#: mod/contacts.php:590 msgid "Contact Information / Notes" msgstr "Contactinformatie / aantekeningen" -#: mod/contacts.php:612 +#: mod/contacts.php:591 msgid "Edit contact notes" msgstr "Wijzig aantekeningen over dit contact" -#: mod/contacts.php:617 mod/contacts.php:860 mod/viewcontacts.php:66 +#: mod/contacts.php:596 mod/contacts.php:952 mod/viewcontacts.php:97 #: mod/nogroup.php:41 #, php-format msgid "Visit %s's profile [%s]" msgstr "Bekijk het profiel van %s [%s]" -#: mod/contacts.php:618 +#: mod/contacts.php:597 msgid "Block/Unblock contact" msgstr "Blokkeer/deblokkeer contact" -#: mod/contacts.php:619 +#: mod/contacts.php:598 msgid "Ignore contact" msgstr "Negeer contact" -#: mod/contacts.php:620 +#: mod/contacts.php:599 msgid "Repair URL settings" msgstr "Repareer URL-instellingen" -#: mod/contacts.php:621 +#: mod/contacts.php:600 msgid "View conversations" msgstr "Toon conversaties" -#: mod/contacts.php:623 +#: mod/contacts.php:602 msgid "Delete contact" msgstr "Verwijder contact" -#: mod/contacts.php:627 +#: mod/contacts.php:606 msgid "Last update:" msgstr "Laatste wijziging:" -#: mod/contacts.php:629 +#: mod/contacts.php:608 msgid "Update public posts" msgstr "Openbare posts aanpassen" -#: mod/contacts.php:631 mod/admin.php:1650 +#: mod/contacts.php:610 msgid "Update now" msgstr "Wijzig nu" -#: mod/contacts.php:633 mod/dirfind.php:190 mod/allfriends.php:67 -#: mod/match.php:71 mod/suggest.php:82 include/contact_widgets.php:32 +#: mod/contacts.php:612 mod/follow.php:103 mod/dirfind.php:196 +#: mod/allfriends.php:65 mod/match.php:71 mod/suggest.php:82 +#: include/contact_widgets.php:32 include/Contact.php:297 #: include/conversation.php:924 msgid "Connect/Follow" msgstr "Verbind/Volg" -#: mod/contacts.php:640 +#: mod/contacts.php:615 mod/contacts.php:806 mod/contacts.php:865 +#: mod/admin.php:1301 +msgid "Unblock" +msgstr "Blokkering opheffen" + +#: mod/contacts.php:615 mod/contacts.php:806 mod/contacts.php:865 +#: mod/admin.php:1300 +msgid "Block" +msgstr "Blokkeren" + +#: mod/contacts.php:616 mod/contacts.php:807 mod/contacts.php:872 +msgid "Unignore" +msgstr "Negeer niet meer" + +#: mod/contacts.php:616 mod/contacts.php:807 mod/contacts.php:872 +#: mod/notifications.php:54 mod/notifications.php:179 +#: mod/notifications.php:259 +msgid "Ignore" +msgstr "Negeren" + +#: mod/contacts.php:619 msgid "Currently blocked" msgstr "Op dit moment geblokkeerd" -#: mod/contacts.php:641 +#: mod/contacts.php:620 msgid "Currently ignored" msgstr "Op dit moment genegeerd" -#: mod/contacts.php:642 +#: mod/contacts.php:621 msgid "Currently archived" msgstr "Op dit moment gearchiveerd" -#: mod/contacts.php:643 mod/notifications.php:172 mod/notifications.php:251 +#: mod/contacts.php:622 mod/notifications.php:172 mod/notifications.php:251 msgid "Hide this contact from others" msgstr "Verberg dit contact voor anderen" -#: mod/contacts.php:643 +#: mod/contacts.php:622 msgid "" "Replies/likes to your public posts may still be visible" msgstr "Antwoorden of 'vind ik leuk's op je openbare posts kunnen nog zichtbaar zijn" -#: mod/contacts.php:644 +#: mod/contacts.php:623 msgid "Notification for new posts" msgstr "Meldingen voor nieuwe berichten" -#: mod/contacts.php:644 +#: mod/contacts.php:623 msgid "Send a notification of every new post of this contact" msgstr "" -#: mod/contacts.php:647 +#: mod/contacts.php:626 msgid "Blacklisted keywords" msgstr "" -#: mod/contacts.php:647 +#: mod/contacts.php:626 msgid "" "Comma separated list of keywords that should not be converted to hashtags, " "when \"Fetch information and keywords\" is selected" msgstr "" -#: mod/contacts.php:654 mod/follow.php:121 mod/notifications.php:255 +#: mod/contacts.php:633 mod/follow.php:126 mod/notifications.php:255 msgid "Profile URL" msgstr "Profiel url" -#: mod/contacts.php:700 +#: mod/contacts.php:636 mod/notifications.php:244 mod/events.php:566 +#: mod/directory.php:145 include/identity.php:308 include/bb2diaspora.php:170 +#: include/event.php:36 include/event.php:60 +msgid "Location:" +msgstr "Plaats:" + +#: mod/contacts.php:638 mod/notifications.php:246 mod/directory.php:153 +#: include/identity.php:317 include/identity.php:631 +msgid "About:" +msgstr "Over:" + +#: mod/contacts.php:640 mod/follow.php:134 mod/notifications.php:248 +#: include/identity.php:625 +msgid "Tags:" +msgstr "Labels:" + +#: mod/contacts.php:685 msgid "Suggestions" msgstr "Voorstellen" -#: mod/contacts.php:703 +#: mod/contacts.php:688 msgid "Suggest potential friends" msgstr "Stel vrienden voor" -#: mod/contacts.php:708 mod/group.php:192 +#: mod/contacts.php:693 mod/group.php:192 msgid "All Contacts" msgstr "Alle Contacten" -#: mod/contacts.php:711 +#: mod/contacts.php:696 msgid "Show all contacts" msgstr "Toon alle contacten" -#: mod/contacts.php:716 +#: mod/contacts.php:701 msgid "Unblocked" msgstr "Niet geblokkeerd" -#: mod/contacts.php:719 +#: mod/contacts.php:704 msgid "Only show unblocked contacts" msgstr "Toon alleen niet-geblokkeerde contacten" -#: mod/contacts.php:725 +#: mod/contacts.php:710 msgid "Blocked" msgstr "Geblokkeerd" -#: mod/contacts.php:728 +#: mod/contacts.php:713 msgid "Only show blocked contacts" msgstr "Toon alleen geblokkeerde contacten" -#: mod/contacts.php:734 +#: mod/contacts.php:719 msgid "Ignored" msgstr "Genegeerd" -#: mod/contacts.php:737 +#: mod/contacts.php:722 msgid "Only show ignored contacts" msgstr "Toon alleen genegeerde contacten" -#: mod/contacts.php:743 +#: mod/contacts.php:728 msgid "Archived" msgstr "Gearchiveerd" -#: mod/contacts.php:746 +#: mod/contacts.php:731 msgid "Only show archived contacts" msgstr "Toon alleen gearchiveerde contacten" -#: mod/contacts.php:752 +#: mod/contacts.php:737 msgid "Hidden" msgstr "Verborgen" -#: mod/contacts.php:755 +#: mod/contacts.php:740 msgid "Only show hidden contacts" msgstr "Toon alleen verborgen contacten" -#: mod/contacts.php:807 include/text.php:1005 include/nav.php:123 -#: include/nav.php:187 view/theme/diabook/theme.php:125 +#: mod/contacts.php:793 mod/contacts.php:841 mod/viewcontacts.php:116 +#: include/identity.php:741 include/identity.php:744 include/text.php:1012 +#: include/nav.php:123 include/nav.php:187 view/theme/diabook/theme.php:125 msgid "Contacts" msgstr "Contacten" -#: mod/contacts.php:811 +#: mod/contacts.php:797 msgid "Search your contacts" msgstr "Doorzoek je contacten" -#: mod/contacts.php:812 +#: mod/contacts.php:798 msgid "Finding: " msgstr "Gevonden:" -#: mod/contacts.php:813 mod/directory.php:202 include/contact_widgets.php:34 +#: mod/contacts.php:799 mod/directory.php:210 include/contact_widgets.php:34 msgid "Find" msgstr "Zoek" -#: mod/contacts.php:819 mod/settings.php:146 mod/settings.php:674 +#: mod/contacts.php:805 mod/settings.php:156 mod/settings.php:685 msgid "Update" msgstr "Wijzigen" -#: mod/contacts.php:823 mod/group.php:171 mod/admin.php:1112 -#: mod/content.php:440 mod/content.php:743 mod/settings.php:711 -#: mod/photos.php:1715 object/Item.php:134 include/conversation.php:635 +#: mod/contacts.php:808 mod/contacts.php:879 +msgid "Archive" +msgstr "Archiveer" + +#: mod/contacts.php:808 mod/contacts.php:879 +msgid "Unarchive" +msgstr "Archiveer niet meer" + +#: mod/contacts.php:809 mod/group.php:171 mod/admin.php:1299 +#: mod/content.php:440 mod/content.php:743 mod/settings.php:722 +#: mod/photos.php:1723 object/Item.php:134 include/conversation.php:635 msgid "Delete" msgstr "Verwijder" -#: mod/contacts.php:836 +#: mod/contacts.php:822 include/identity.php:686 include/nav.php:75 +msgid "Status" +msgstr "Tijdlijn" + +#: mod/contacts.php:825 mod/follow.php:143 include/identity.php:689 +msgid "Status Messages and Posts" +msgstr "Berichten op jouw tijdlijn" + +#: mod/contacts.php:830 mod/profperm.php:104 mod/newmember.php:32 +#: include/identity.php:579 include/identity.php:665 include/identity.php:694 +#: include/nav.php:76 view/theme/diabook/theme.php:124 +msgid "Profile" +msgstr "Profiel" + +#: mod/contacts.php:833 include/identity.php:697 +msgid "Profile Details" +msgstr "Profieldetails" + +#: mod/contacts.php:844 +msgid "View all contacts" +msgstr "Alle contacten zien" + +#: mod/contacts.php:850 mod/common.php:134 +msgid "Common Friends" +msgstr "Gedeelde Vrienden" + +#: mod/contacts.php:853 +msgid "View all common friends" +msgstr "" + +#: mod/contacts.php:857 +msgid "Repair" +msgstr "Herstellen" + +#: mod/contacts.php:860 +msgid "Advanced Contact Settings" +msgstr "Geavanceerde instellingen voor contacten" + +#: mod/contacts.php:868 +msgid "Toggle Blocked status" +msgstr "Schakel geblokkeerde status" + +#: mod/contacts.php:875 +msgid "Toggle Ignored status" +msgstr "Schakel negeerstatus" + +#: mod/contacts.php:882 +msgid "Toggle Archive status" +msgstr "Schakel archiveringsstatus" + +#: mod/contacts.php:924 msgid "Mutual Friendship" msgstr "Wederzijdse vriendschap" -#: mod/contacts.php:840 +#: mod/contacts.php:928 msgid "is a fan of yours" msgstr "Is een fan van jou" -#: mod/contacts.php:844 +#: mod/contacts.php:932 msgid "you are a fan of" msgstr "Jij bent een fan van" -#: mod/contacts.php:861 mod/nogroup.php:42 +#: mod/contacts.php:953 mod/nogroup.php:42 msgid "Edit contact" msgstr "Contact bewerken" @@ -468,17 +513,17 @@ msgstr "Contact bewerken" msgid "No profile" msgstr "Geen profiel" -#: mod/manage.php:120 +#: mod/manage.php:139 msgid "Manage Identities and/or Pages" msgstr "Beheer Identiteiten en/of Pagina's" -#: mod/manage.php:121 +#: mod/manage.php:140 msgid "" "Toggle between different identities or community/group pages which share " "your account details or which you have been granted \"manage\" permissions" msgstr "Wissel tussen verschillende identiteiten of forum/groeppagina's die jouw accountdetails delen of waar je \"beheerdersrechten\" hebt gekregen." -#: mod/manage.php:122 +#: mod/manage.php:141 msgid "Select an identity to manage: " msgstr "Selecteer een identiteit om te beheren:" @@ -486,7 +531,7 @@ msgstr "Selecteer een identiteit om te beheren:" msgid "Post successful." msgstr "Bericht succesvol geplaatst." -#: mod/profperm.php:19 mod/group.php:72 index.php:381 +#: mod/profperm.php:19 mod/group.php:72 index.php:382 msgid "Permission denied" msgstr "Toegang geweigerd" @@ -498,13 +543,7 @@ msgstr "Ongeldige profiel-identificatie." msgid "Profile Visibility Editor" msgstr "" -#: mod/profperm.php:104 mod/newmember.php:32 include/identity.php:530 -#: include/identity.php:611 include/identity.php:641 include/nav.php:76 -#: view/theme/diabook/theme.php:124 -msgid "Profile" -msgstr "Profiel" - -#: mod/profperm.php:106 mod/group.php:222 +#: mod/profperm.php:106 mod/group.php:223 msgid "Click on a contact to add or remove." msgstr "Klik op een contact om het toe te voegen of te verwijderen." @@ -516,23 +555,23 @@ msgstr "Zichtbaar voor" msgid "All Contacts (with secure profile access)" msgstr "Alle contacten (met veilige profieltoegang)" -#: mod/display.php:82 mod/display.php:283 mod/display.php:500 -#: mod/viewsrc.php:15 mod/admin.php:196 mod/admin.php:1157 mod/admin.php:1378 -#: mod/notice.php:15 include/items.php:4894 +#: mod/display.php:82 mod/display.php:291 mod/display.php:508 +#: mod/viewsrc.php:15 mod/admin.php:225 mod/admin.php:1354 mod/admin.php:1588 +#: mod/notice.php:15 include/items.php:4864 msgid "Item not found." msgstr "Item niet gevonden." -#: mod/display.php:211 mod/videos.php:189 mod/viewcontacts.php:19 -#: mod/community.php:18 mod/dfrn_request.php:777 mod/search.php:93 -#: mod/search.php:99 mod/directory.php:37 mod/photos.php:968 +#: mod/display.php:220 mod/videos.php:197 mod/viewcontacts.php:35 +#: mod/community.php:18 mod/dfrn_request.php:786 mod/search.php:93 +#: mod/search.php:99 mod/directory.php:37 mod/photos.php:976 msgid "Public access denied." msgstr "Niet vrij toegankelijk" -#: mod/display.php:331 mod/profile.php:155 +#: mod/display.php:339 mod/profile.php:155 msgid "Access to this profile has been restricted." msgstr "Toegang tot dit profiel is beperkt." -#: mod/display.php:493 +#: mod/display.php:501 msgid "Item has been removed." msgstr "Item is verwijderd." @@ -567,8 +606,8 @@ msgid "" " join." msgstr "Op je Snelstart pagina kun je een korte inleiding vinden over je profiel en netwerk tabs, om enkele nieuwe connecties te leggen en groepen te vinden om lid van te worden." -#: mod/newmember.php:22 mod/admin.php:1209 mod/admin.php:1454 -#: mod/settings.php:99 include/nav.php:182 view/theme/diabook/theme.php:544 +#: mod/newmember.php:22 mod/admin.php:1407 mod/admin.php:1665 +#: mod/settings.php:109 include/nav.php:182 view/theme/diabook/theme.php:544 #: view/theme/diabook/theme.php:648 msgid "Settings" msgstr "Instellingen" @@ -592,7 +631,7 @@ msgid "" "potential friends know exactly how to find you." msgstr "Controleer ook de andere instellingen, in het bijzonder de privacy-instellingen. Een niet-gepubliceerd adres is zoals een privé-telefoonnummer. In het algemeen wil je waarschijnlijk je adres publiceren - tenzij al je vrienden en mogelijke vrienden precies weten hoe je te vinden." -#: mod/newmember.php:36 mod/profile_photo.php:244 mod/profiles.php:709 +#: mod/newmember.php:36 mod/profile_photo.php:250 mod/profiles.php:709 msgid "Upload Profile Photo" msgstr "Profielfoto uploaden" @@ -629,60 +668,44 @@ msgstr "Stel enkele openbare sleutelwoorden in voor je standaard profiel die je msgid "Connecting" msgstr "Verbinding aan het maken" -#: mod/newmember.php:49 mod/newmember.php:51 include/contact_selectors.php:81 -msgid "Facebook" -msgstr "Facebook" - -#: mod/newmember.php:49 -msgid "" -"Authorise the Facebook Connector if you currently have a Facebook account " -"and we will (optionally) import all your Facebook friends and conversations." -msgstr "Machtig de Facebook Connector als je een Facebook account hebt. We zullen (optioneel) al je Facebook vrienden en conversaties importeren." - #: mod/newmember.php:51 -msgid "" -"If this is your own personal server, installing the Facebook addon " -"may ease your transition to the free social web." -msgstr "Als dit jouw eigen persoonlijke server is kan het installeren van de Facebook toevoeging je overgang naar het vrije sociale web vergemakkelijken." - -#: mod/newmember.php:56 msgid "Importing Emails" msgstr "E-mails importeren" -#: mod/newmember.php:56 +#: mod/newmember.php:51 msgid "" "Enter your email access information on your Connector Settings page if you " "wish to import and interact with friends or mailing lists from your email " "INBOX" msgstr "Vul je e-mailtoegangsinformatie in op je pagina met verbindingsinstellingen als je vrienden of mailinglijsten uit je e-mail-inbox wilt importeren, en met hen wilt communiceren" -#: mod/newmember.php:58 +#: mod/newmember.php:53 msgid "Go to Your Contacts Page" msgstr "Ga naar je contactenpagina" -#: mod/newmember.php:58 +#: mod/newmember.php:53 msgid "" "Your Contacts page is your gateway to managing friendships and connecting " "with friends on other networks. Typically you enter their address or site " "URL in the Add New Contact dialog." msgstr "Je contactenpagina is jouw poort om vriendschappen te beheren en verbinding te leggen met vrienden op andere netwerken. Je kunt hun adres of URL toevoegen in de Voeg nieuw contact toe dialoog." -#: mod/newmember.php:60 +#: mod/newmember.php:55 msgid "Go to Your Site's Directory" msgstr "Ga naar de gids van je website" -#: mod/newmember.php:60 +#: mod/newmember.php:55 msgid "" "The Directory page lets you find other people in this network or other " "federated sites. Look for a Connect or Follow link on " "their profile page. Provide your own Identity Address if requested." msgstr "In de gids vind je andere mensen in dit netwerk of op andere federatieve sites. Zoek naar het woord Connect of Follow op hun profielpagina (meestal aan de linkerkant). Vul je eigen identiteitsadres in wanneer daar om wordt gevraagd." -#: mod/newmember.php:62 +#: mod/newmember.php:57 msgid "Finding New People" msgstr "Nieuwe mensen vinden" -#: mod/newmember.php:62 +#: mod/newmember.php:57 msgid "" "On the side panel of the Contacts page are several tools to find new " "friends. We can match people by interest, look up people by name or " @@ -691,41 +714,41 @@ msgid "" "hours." msgstr "Op het zijpaneel van de Contacten pagina vind je verschillende tools om nieuwe vrienden te zoeken. We kunnen mensen op interesses matchen, mensen opzoeken op naam of hobby, en suggesties doen gebaseerd op netwerk-relaties. Op een nieuwe webstek beginnen vriendschapssuggesties meestal binnen de 24 uur beschikbaar te worden." -#: mod/newmember.php:66 include/group.php:272 +#: mod/newmember.php:61 include/group.php:283 msgid "Groups" msgstr "Groepen" -#: mod/newmember.php:70 +#: mod/newmember.php:65 msgid "Group Your Contacts" msgstr "Groepeer je contacten" -#: mod/newmember.php:70 +#: mod/newmember.php:65 msgid "" "Once you have made some friends, organize them into private conversation " "groups from the sidebar of your Contacts page and then you can interact with" " each group privately on your Network page." msgstr "Als je een aantal vrienden gemaakt hebt kun je ze in je eigen conversatiegroepen indelen vanuit de zijbalk van je 'Conacten' pagina, en dan kun je met elke groep apart contact houden op je Netwerk pagina. " -#: mod/newmember.php:73 +#: mod/newmember.php:68 msgid "Why Aren't My Posts Public?" msgstr "Waarom zijn mijn berichten niet openbaar?" -#: mod/newmember.php:73 +#: mod/newmember.php:68 msgid "" "Friendica respects your privacy. By default, your posts will only show up to" " people you've added as friends. For more information, see the help section " "from the link above." msgstr "Friendica respecteert je privacy. Standaard zullen je berichten alleen zichtbaar zijn voor personen die jij als vriend hebt toegevoegd. Lees de help (zie de verwijzing hierboven) voor meer informatie." -#: mod/newmember.php:78 +#: mod/newmember.php:73 msgid "Getting Help" msgstr "Hulp krijgen" -#: mod/newmember.php:82 +#: mod/newmember.php:77 msgid "Go to the Help Section" msgstr "Ga naar de help" -#: mod/newmember.php:82 +#: mod/newmember.php:77 msgid "" "Our help pages may be consulted for detail on other program" " features and resources." @@ -740,7 +763,7 @@ msgid "" "Account not found and OpenID registration is not permitted on this site." msgstr "Account niet gevonden, en OpenID-registratie is niet toegelaten op deze website." -#: mod/openid.php:93 include/auth.php:112 include/auth.php:175 +#: mod/openid.php:93 include/auth.php:118 include/auth.php:181 msgid "Login failed." msgstr "Login mislukt." @@ -749,95 +772,95 @@ msgid "Image uploaded but image cropping failed." msgstr "Afbeelding opgeladen, maar bijsnijden mislukt." #: mod/profile_photo.php:74 mod/profile_photo.php:81 mod/profile_photo.php:88 -#: mod/profile_photo.php:204 mod/profile_photo.php:296 -#: mod/profile_photo.php:305 mod/photos.php:70 mod/photos.php:184 -#: mod/photos.php:767 mod/photos.php:1237 mod/photos.php:1260 -#: mod/photos.php:1854 include/user.php:343 include/user.php:350 -#: include/user.php:357 view/theme/diabook/theme.php:500 +#: mod/profile_photo.php:210 mod/profile_photo.php:302 +#: mod/profile_photo.php:311 mod/photos.php:78 mod/photos.php:192 +#: mod/photos.php:775 mod/photos.php:1245 mod/photos.php:1268 +#: mod/photos.php:1862 include/user.php:345 include/user.php:352 +#: include/user.php:359 view/theme/diabook/theme.php:500 msgid "Profile Photos" msgstr "Profielfoto's" #: mod/profile_photo.php:77 mod/profile_photo.php:84 mod/profile_photo.php:91 -#: mod/profile_photo.php:308 +#: mod/profile_photo.php:314 #, php-format msgid "Image size reduction [%s] failed." msgstr "Verkleining van de afbeelding [%s] mislukt." -#: mod/profile_photo.php:118 +#: mod/profile_photo.php:124 msgid "" "Shift-reload the page or clear browser cache if the new photo does not " "display immediately." msgstr "Shift-herlaad de pagina, of maak de browser cache leeg als nieuwe foto's niet onmiddellijk verschijnen." -#: mod/profile_photo.php:128 +#: mod/profile_photo.php:134 msgid "Unable to process image" msgstr "Ik kan de afbeelding niet verwerken" -#: mod/profile_photo.php:144 mod/wall_upload.php:151 mod/photos.php:803 +#: mod/profile_photo.php:150 mod/wall_upload.php:151 mod/photos.php:811 #, php-format msgid "Image exceeds size limit of %s" msgstr "" -#: mod/profile_photo.php:153 mod/wall_upload.php:183 mod/photos.php:843 +#: mod/profile_photo.php:159 mod/wall_upload.php:183 mod/photos.php:851 msgid "Unable to process image." msgstr "Niet in staat om de afbeelding te verwerken" -#: mod/profile_photo.php:242 +#: mod/profile_photo.php:248 msgid "Upload File:" msgstr "Upload bestand:" -#: mod/profile_photo.php:243 +#: mod/profile_photo.php:249 msgid "Select a profile:" msgstr "Kies een profiel:" -#: mod/profile_photo.php:245 +#: mod/profile_photo.php:251 msgid "Upload" msgstr "Uploaden" -#: mod/profile_photo.php:248 +#: mod/profile_photo.php:254 msgid "or" msgstr "of" -#: mod/profile_photo.php:248 +#: mod/profile_photo.php:254 msgid "skip this step" msgstr "Deze stap overslaan" -#: mod/profile_photo.php:248 +#: mod/profile_photo.php:254 msgid "select a photo from your photo albums" msgstr "Kies een foto uit je fotoalbums" -#: mod/profile_photo.php:262 +#: mod/profile_photo.php:268 msgid "Crop Image" msgstr "Afbeelding bijsnijden" -#: mod/profile_photo.php:263 +#: mod/profile_photo.php:269 msgid "Please adjust the image cropping for optimum viewing." msgstr "Pas het afsnijden van de afbeelding aan voor het beste resultaat." -#: mod/profile_photo.php:265 +#: mod/profile_photo.php:271 msgid "Done Editing" msgstr "Wijzigingen compleet" -#: mod/profile_photo.php:299 +#: mod/profile_photo.php:305 msgid "Image uploaded successfully." msgstr "Uploaden van afbeelding gelukt." -#: mod/profile_photo.php:301 mod/wall_upload.php:216 mod/photos.php:870 +#: mod/profile_photo.php:307 mod/wall_upload.php:216 mod/photos.php:878 msgid "Image upload failed." msgstr "Uploaden van afbeelding mislukt." -#: mod/subthread.php:87 mod/tagger.php:62 mod/like.php:168 +#: mod/subthread.php:87 mod/tagger.php:62 include/like.php:165 #: include/conversation.php:130 include/conversation.php:266 -#: include/text.php:1988 include/diaspora.php:2140 +#: include/text.php:1993 include/diaspora.php:2147 #: view/theme/diabook/theme.php:471 msgid "photo" msgstr "foto" -#: mod/subthread.php:87 mod/tagger.php:62 mod/like.php:168 mod/like.php:346 -#: include/conversation.php:125 include/conversation.php:134 -#: include/conversation.php:261 include/conversation.php:270 -#: include/diaspora.php:2140 view/theme/diabook/theme.php:466 -#: view/theme/diabook/theme.php:475 +#: mod/subthread.php:87 mod/tagger.php:62 include/like.php:165 +#: include/like.php:325 include/conversation.php:125 +#: include/conversation.php:134 include/conversation.php:261 +#: include/conversation.php:270 include/diaspora.php:2147 +#: view/theme/diabook/theme.php:466 view/theme/diabook/theme.php:475 msgid "status" msgstr "status" @@ -863,7 +886,7 @@ msgid "Remove" msgstr "Verwijderen" #: mod/ostatus_subscribe.php:14 -msgid "Subsribing to OStatus contacts" +msgid "Subscribing to OStatus contacts" msgstr "" #: mod/ostatus_subscribe.php:25 @@ -898,8 +921,8 @@ msgstr "Verboden" msgid "Keep this window open until done." msgstr "Houd dit scherm open tot het klaar is" -#: mod/filer.php:30 include/conversation.php:1133 -#: include/conversation.php:1151 +#: mod/filer.php:30 include/conversation.php:1132 +#: include/conversation.php:1150 msgid "Save to Folder:" msgstr "Bewaren in map:" @@ -907,73 +930,59 @@ msgstr "Bewaren in map:" msgid "- select -" msgstr "- Kies -" -#: mod/filer.php:31 mod/editpost.php:108 mod/notes.php:61 include/text.php:997 +#: mod/filer.php:31 mod/editpost.php:109 mod/notes.php:61 +#: include/text.php:1004 msgid "Save" msgstr "Bewaren" -#: mod/follow.php:18 mod/dfrn_request.php:861 +#: mod/follow.php:19 mod/dfrn_request.php:870 msgid "Submit Request" msgstr "Aanvraag indienen" -#: mod/follow.php:29 +#: mod/follow.php:30 msgid "You already added this contact." msgstr "Je hebt deze kontakt al toegevoegd" -#: mod/follow.php:38 +#: mod/follow.php:39 msgid "Diaspora support isn't enabled. Contact can't be added." msgstr "" -#: mod/follow.php:45 +#: mod/follow.php:46 msgid "OStatus support is disabled. Contact can't be added." msgstr "" -#: mod/follow.php:52 +#: mod/follow.php:53 msgid "The network type couldn't be detected. Contact can't be added." msgstr "" -#: mod/follow.php:104 mod/dfrn_request.php:847 +#: mod/follow.php:109 mod/dfrn_request.php:856 msgid "Please answer the following:" msgstr "Beantwoord het volgende:" -#: mod/follow.php:105 mod/dfrn_request.php:848 +#: mod/follow.php:110 mod/dfrn_request.php:857 #, php-format msgid "Does %s know you?" msgstr "Kent %s jou?" -#: mod/follow.php:105 mod/settings.php:1091 mod/settings.php:1097 -#: mod/settings.php:1105 mod/settings.php:1109 mod/settings.php:1114 -#: mod/settings.php:1120 mod/settings.php:1126 mod/settings.php:1132 -#: mod/settings.php:1158 mod/settings.php:1159 mod/settings.php:1160 -#: mod/settings.php:1161 mod/settings.php:1162 mod/dfrn_request.php:848 -#: mod/register.php:236 mod/profiles.php:658 mod/profiles.php:662 +#: mod/follow.php:110 mod/settings.php:1103 mod/settings.php:1109 +#: mod/settings.php:1117 mod/settings.php:1121 mod/settings.php:1126 +#: mod/settings.php:1132 mod/settings.php:1138 mod/settings.php:1144 +#: mod/settings.php:1170 mod/settings.php:1171 mod/settings.php:1172 +#: mod/settings.php:1173 mod/settings.php:1174 mod/dfrn_request.php:857 +#: mod/register.php:239 mod/profiles.php:658 mod/profiles.php:662 #: mod/profiles.php:687 mod/api.php:106 msgid "No" msgstr "Nee" -#: mod/follow.php:106 mod/dfrn_request.php:852 +#: mod/follow.php:111 mod/dfrn_request.php:861 msgid "Add a personal note:" msgstr "Voeg een persoonlijke opmerking toe:" -#: mod/follow.php:112 mod/dfrn_request.php:858 +#: mod/follow.php:117 mod/dfrn_request.php:867 msgid "Your Identity Address:" msgstr "Adres van uw identiteit:" -#: mod/follow.php:125 mod/notifications.php:244 mod/events.php:566 -#: mod/directory.php:139 include/identity.php:268 include/bb2diaspora.php:170 -#: include/event.php:36 include/event.php:60 -msgid "Location:" -msgstr "Plaats:" - -#: mod/follow.php:127 mod/notifications.php:246 mod/directory.php:147 -#: include/identity.php:277 include/identity.php:582 -msgid "About:" -msgstr "Over:" - -#: mod/follow.php:129 mod/notifications.php:248 include/identity.php:576 -msgid "Tags:" -msgstr "Labels:" - -#: mod/follow.php:162 +#: mod/follow.php:180 msgid "Contact added" msgstr "Contact toegevoegd" @@ -981,39 +990,39 @@ msgstr "Contact toegevoegd" msgid "Unable to locate original post." msgstr "Ik kan de originele post niet meer vinden." -#: mod/item.php:322 +#: mod/item.php:329 msgid "Empty post discarded." msgstr "Lege post weggegooid." -#: mod/item.php:461 mod/wall_upload.php:213 mod/wall_upload.php:227 -#: mod/wall_upload.php:234 include/Photo.php:954 include/Photo.php:969 -#: include/Photo.php:976 include/Photo.php:998 include/message.php:145 +#: mod/item.php:467 mod/wall_upload.php:213 mod/wall_upload.php:227 +#: mod/wall_upload.php:234 include/Photo.php:958 include/Photo.php:973 +#: include/Photo.php:980 include/Photo.php:1002 include/message.php:145 msgid "Wall Photos" msgstr "" -#: mod/item.php:835 +#: mod/item.php:842 msgid "System error. Post not saved." msgstr "Systeemfout. Post niet bewaard." -#: mod/item.php:964 +#: mod/item.php:971 #, php-format msgid "" "This message was sent to you by %s, a member of the Friendica social " "network." msgstr "Dit bericht werd naar jou gestuurd door %s, een lid van het Friendica sociale netwerk." -#: mod/item.php:966 +#: mod/item.php:973 #, php-format msgid "You may visit them online at %s" msgstr "Je kunt ze online bezoeken op %s" -#: mod/item.php:967 +#: mod/item.php:974 msgid "" "Please contact the sender by replying to this post if you do not wish to " "receive these messages." msgstr "Contacteer de afzender door op dit bericht te antwoorden als je deze berichten niet wilt ontvangen." -#: mod/item.php:971 +#: mod/item.php:978 #, php-format msgid "%s posted an update." msgstr "%s heeft een wijziging geplaatst." @@ -1042,7 +1051,7 @@ msgstr "Bewaar groep" msgid "Create a group of contacts/friends." msgstr "Maak een groep contacten/vrienden aan." -#: mod/group.php:94 mod/group.php:178 include/group.php:275 +#: mod/group.php:94 mod/group.php:178 include/group.php:289 msgid "Group Name: " msgstr "Groepsnaam:" @@ -1062,7 +1071,11 @@ msgstr "Groepsbewerker" msgid "Members" msgstr "Leden" -#: mod/apps.php:7 index.php:225 +#: mod/group.php:193 mod/network.php:576 mod/content.php:130 +msgid "Group is empty" +msgstr "De groep is leeg" + +#: mod/apps.php:7 index.php:226 msgid "You must be logged in to use addons. " msgstr "Je moet ingelogd zijn om deze addons te kunnen gebruiken. " @@ -1080,7 +1093,7 @@ msgid "Profile not found." msgstr "Profiel niet gevonden" #: mod/dfrn_confirm.php:120 mod/fsuggest.php:20 mod/fsuggest.php:92 -#: mod/crepair.php:134 +#: mod/crepair.php:131 msgid "Contact not found." msgstr "Contact niet gevonden" @@ -1119,7 +1132,7 @@ msgid "Unable to set contact photo." msgstr "Ik kan geen contact foto instellen." #: mod/dfrn_confirm.php:487 include/conversation.php:185 -#: include/diaspora.php:636 +#: include/diaspora.php:637 #, php-format msgid "%1$s is now friends with %2$s" msgstr "%1$s is nu bevriend met %2$s" @@ -1160,7 +1173,7 @@ msgstr "Niet in staat om op dit systeem je contactreferenties in te stellen." msgid "Unable to update your contact profile details on our system" msgstr "" -#: mod/dfrn_confirm.php:753 mod/dfrn_request.php:732 include/items.php:4313 +#: mod/dfrn_confirm.php:753 mod/dfrn_request.php:741 include/items.php:4276 msgid "[Name Withheld]" msgstr "[Naam achtergehouden]" @@ -1169,7 +1182,7 @@ msgstr "[Naam achtergehouden]" msgid "%1$s has joined %2$s" msgstr "%1$s is toegetreden tot %2$s" -#: mod/profile.php:21 include/identity.php:77 +#: mod/profile.php:21 include/identity.php:51 msgid "Requested profile is not available." msgstr "Gevraagde profiel is niet beschikbaar." @@ -1177,35 +1190,35 @@ msgstr "Gevraagde profiel is niet beschikbaar." msgid "Tips for New Members" msgstr "Tips voor nieuwe leden" -#: mod/videos.php:115 +#: mod/videos.php:123 msgid "Do you really want to delete this video?" msgstr "Wil je deze video echt verwijderen?" -#: mod/videos.php:120 +#: mod/videos.php:128 msgid "Delete Video" msgstr "Verwijder video" -#: mod/videos.php:199 +#: mod/videos.php:207 msgid "No videos selected" msgstr "Geen video's geselecteerd" -#: mod/videos.php:300 mod/photos.php:1079 +#: mod/videos.php:308 mod/photos.php:1087 msgid "Access to this item is restricted." msgstr "Toegang tot dit item is beperkt." -#: mod/videos.php:375 include/text.php:1458 +#: mod/videos.php:383 include/text.php:1465 msgid "View Video" msgstr "Bekijk Video" -#: mod/videos.php:382 mod/photos.php:1882 +#: mod/videos.php:390 mod/photos.php:1890 msgid "View Album" msgstr "Album bekijken" -#: mod/videos.php:391 +#: mod/videos.php:399 msgid "Recent Videos" msgstr "Recente video's" -#: mod/videos.php:393 +#: mod/videos.php:401 msgid "Upload New Videos" msgstr "Nieuwe video's uploaden" @@ -1229,7 +1242,7 @@ msgstr "Stel een vriend voor aan %s" #: mod/wall_upload.php:20 mod/wall_upload.php:33 mod/wall_upload.php:86 #: mod/wall_upload.php:122 mod/wall_upload.php:125 mod/wall_attach.php:17 -#: mod/wall_attach.php:25 mod/wall_attach.php:76 include/api.php:1702 +#: mod/wall_attach.php:25 mod/wall_attach.php:76 include/api.php:1781 msgid "Invalid request." msgstr "" @@ -1285,7 +1298,7 @@ msgid "" "Password reset failed." msgstr "Verzoek kon niet geverifieerd worden. (Misschien heb je het voordien al ingediend.) Wachtwoord niet opnieuw ingesteld." -#: mod/lostpass.php:109 boot.php:1295 +#: mod/lostpass.php:109 boot.php:1418 msgid "Password Reset" msgstr "Wachtwoord opnieuw instellen" @@ -1359,57 +1372,22 @@ msgstr "Bijnaam of e-mail:" msgid "Reset" msgstr "Opnieuw" -#: mod/like.php:170 include/conversation.php:122 include/conversation.php:258 -#: include/text.php:1986 view/theme/diabook/theme.php:463 -msgid "event" -msgstr "gebeurtenis" - -#: mod/like.php:187 include/conversation.php:141 include/diaspora.php:2156 -#: view/theme/diabook/theme.php:480 -#, php-format -msgid "%1$s likes %2$s's %3$s" -msgstr "%1$s vindt het %3$s van %2$s leuk" - -#: mod/like.php:189 include/conversation.php:144 -#, php-format -msgid "%1$s doesn't like %2$s's %3$s" -msgstr "%1$s vindt het %3$s van %2$s niet leuk" - -#: mod/like.php:191 -#, php-format -msgid "%1$s is attending %2$s's %3$s" -msgstr "" - -#: mod/like.php:193 -#, php-format -msgid "%1$s is not attending %2$s's %3$s" -msgstr "" - -#: mod/like.php:195 -#, php-format -msgid "%1$s may attend %2$s's %3$s" -msgstr "" - -#: mod/ping.php:257 +#: mod/ping.php:265 msgid "{0} wants to be your friend" msgstr "{0} wilt je vriend worden" -#: mod/ping.php:272 +#: mod/ping.php:280 msgid "{0} sent you a message" msgstr "{0} stuurde jou een bericht" -#: mod/ping.php:287 +#: mod/ping.php:295 msgid "{0} requested registration" msgstr "{0} vroeg om zich te registreren" -#: mod/viewcontacts.php:41 +#: mod/viewcontacts.php:72 msgid "No contacts." msgstr "Geen contacten." -#: mod/viewcontacts.php:83 include/text.php:917 -msgid "View Contacts" -msgstr "Bekijk contacten" - #: mod/notifications.php:29 msgid "Invalid request identifier." msgstr "Ongeldige request identifier." @@ -1423,11 +1401,11 @@ msgstr "Verwerpen" msgid "System" msgstr "Systeem" -#: mod/notifications.php:87 mod/admin.php:228 include/nav.php:154 +#: mod/notifications.php:87 mod/admin.php:379 include/nav.php:154 msgid "Network" msgstr "Netwerk" -#: mod/notifications.php:93 mod/network.php:385 +#: mod/notifications.php:93 mod/network.php:384 msgid "Personal" msgstr "Persoonlijk" @@ -1469,7 +1447,7 @@ msgstr "Bericht over een nieuwe vriend" msgid "if applicable" msgstr "Indien toepasbaar" -#: mod/notifications.php:176 mod/notifications.php:257 mod/admin.php:1110 +#: mod/notifications.php:176 mod/notifications.php:257 mod/admin.php:1297 msgid "Approve" msgstr "Goedkeuren" @@ -1519,8 +1497,8 @@ msgstr "Vriendschapsverzoek" msgid "New Follower" msgstr "Nieuwe Volger" -#: mod/notifications.php:250 mod/directory.php:141 include/identity.php:270 -#: include/identity.php:541 +#: mod/notifications.php:250 mod/directory.php:147 include/identity.php:310 +#: include/identity.php:590 msgid "Gender:" msgstr "Geslacht:" @@ -1691,7 +1669,7 @@ msgstr "Gesprek verwijderd." #: mod/message.php:290 mod/message.php:298 mod/message.php:427 #: mod/message.php:435 mod/wallmessage.php:127 mod/wallmessage.php:135 -#: include/conversation.php:1129 include/conversation.php:1147 +#: include/conversation.php:1128 include/conversation.php:1146 msgid "Please enter a link URL:" msgstr "Vul een internetadres/URL in:" @@ -1713,19 +1691,19 @@ msgid "Your message:" msgstr "Jouw bericht:" #: mod/message.php:339 mod/message.php:523 mod/wallmessage.php:154 -#: mod/editpost.php:109 include/conversation.php:1184 +#: mod/editpost.php:110 include/conversation.php:1183 msgid "Upload photo" msgstr "Foto uploaden" #: mod/message.php:340 mod/message.php:524 mod/wallmessage.php:155 -#: mod/editpost.php:113 include/conversation.php:1188 +#: mod/editpost.php:114 include/conversation.php:1187 msgid "Insert web link" msgstr "Voeg een webadres in" #: mod/message.php:341 mod/message.php:526 mod/content.php:501 -#: mod/content.php:885 mod/wallmessage.php:156 mod/editpost.php:123 -#: mod/photos.php:1602 object/Item.php:396 include/conversation.php:713 -#: include/conversation.php:1202 +#: mod/content.php:885 mod/wallmessage.php:156 mod/editpost.php:124 +#: mod/photos.php:1610 object/Item.php:396 include/conversation.php:713 +#: include/conversation.php:1201 msgid "Please wait" msgstr "Even geduld" @@ -1741,7 +1719,7 @@ msgstr "Bericht niet beschikbaar." msgid "Delete message" msgstr "Verwijder bericht" -#: mod/message.php:507 mod/message.php:582 +#: mod/message.php:507 mod/message.php:584 msgid "Delete conversation" msgstr "Verwijder gesprek" @@ -1755,26 +1733,26 @@ msgstr "Geen beveiligde communicatie beschikbaar. Je kunt misschienWARNING: This is highly advanced and if you enter incorrect" " information your communications with this contact may stop working." msgstr "" -#: mod/crepair.php:141 +#: mod/crepair.php:138 msgid "" "Please use your browser 'Back' button now if you are " "uncertain what to do on this page." msgstr "Gebruik nu de \"terug\"-knop in je webbrowser wanneer je niet weet wat je op deze pagina moet doen." -#: mod/crepair.php:154 mod/crepair.php:156 +#: mod/crepair.php:151 mod/crepair.php:153 msgid "No mirroring" msgstr "" -#: mod/crepair.php:154 +#: mod/crepair.php:151 msgid "Mirror as forwarded posting" msgstr "" -#: mod/crepair.php:154 mod/crepair.php:156 +#: mod/crepair.php:151 mod/crepair.php:153 msgid "Mirror as my own posting" msgstr "" -#: mod/crepair.php:162 -msgid "Repair Contact Settings" -msgstr "Contactinstellingen herstellen" - -#: mod/crepair.php:166 +#: mod/crepair.php:167 msgid "Return to contact editor" msgstr "Ga terug naar contactbewerker" -#: mod/crepair.php:168 +#: mod/crepair.php:169 msgid "Refetch contact data" msgstr "" -#: mod/crepair.php:169 mod/admin.php:1108 mod/admin.php:1120 -#: mod/admin.php:1121 mod/admin.php:1134 mod/settings.php:650 -#: mod/settings.php:676 +#: mod/crepair.php:170 mod/admin.php:1295 mod/admin.php:1307 +#: mod/admin.php:1308 mod/admin.php:1321 mod/settings.php:661 +#: mod/settings.php:687 msgid "Name" msgstr "Naam" -#: mod/crepair.php:170 +#: mod/crepair.php:171 msgid "Account Nickname" msgstr "Bijnaam account" -#: mod/crepair.php:171 +#: mod/crepair.php:172 msgid "@Tagname - overrides Name/Nickname" msgstr "@Labelnaam - krijgt voorrang op naam/bijnaam" -#: mod/crepair.php:172 +#: mod/crepair.php:173 msgid "Account URL" msgstr "URL account" -#: mod/crepair.php:173 +#: mod/crepair.php:174 msgid "Friend Request URL" msgstr "URL vriendschapsverzoek" -#: mod/crepair.php:174 +#: mod/crepair.php:175 msgid "Friend Confirm URL" msgstr "URL vriendschapsbevestiging" -#: mod/crepair.php:175 +#: mod/crepair.php:176 msgid "Notification Endpoint URL" msgstr "" -#: mod/crepair.php:176 +#: mod/crepair.php:177 msgid "Poll/Feed URL" msgstr "URL poll/feed" -#: mod/crepair.php:177 +#: mod/crepair.php:178 msgid "New photo from this URL" msgstr "Nieuwe foto van deze URL" -#: mod/crepair.php:178 +#: mod/crepair.php:179 msgid "Remote Self" msgstr "" -#: mod/crepair.php:181 +#: mod/crepair.php:182 msgid "Mirror postings from this contact" msgstr "" -#: mod/crepair.php:183 +#: mod/crepair.php:184 msgid "" "Mark this contact as remote_self, this will cause friendica to repost new " "entries from this contact." msgstr "" -#: mod/bookmarklet.php:12 boot.php:1281 include/nav.php:91 +#: mod/bookmarklet.php:12 boot.php:1404 include/nav.php:91 msgid "Login" msgstr "Login" @@ -1894,34 +1868,35 @@ msgstr "" msgid "Access denied." msgstr "Toegang geweigerd" -#: mod/dirfind.php:188 mod/allfriends.php:82 mod/match.php:84 -#: mod/suggest.php:97 include/contact_widgets.php:10 include/identity.php:188 +#: mod/dirfind.php:194 mod/allfriends.php:80 mod/match.php:85 +#: mod/suggest.php:98 include/contact_widgets.php:10 include/identity.php:212 msgid "Connect" msgstr "Verbinden" -#: mod/dirfind.php:189 mod/allfriends.php:66 mod/match.php:70 -#: mod/directory.php:156 mod/suggest.php:81 include/Contact.php:335 +#: mod/dirfind.php:195 mod/allfriends.php:64 mod/match.php:70 +#: mod/directory.php:162 mod/suggest.php:81 include/Contact.php:283 +#: include/Contact.php:296 include/Contact.php:338 #: include/conversation.php:912 include/conversation.php:926 msgid "View Profile" msgstr "Bekijk profiel" -#: mod/dirfind.php:217 +#: mod/dirfind.php:224 #, php-format msgid "People Search - %s" msgstr "" -#: mod/dirfind.php:224 mod/match.php:104 +#: mod/dirfind.php:231 mod/match.php:105 msgid "No matches" msgstr "Geen resultaten" -#: mod/fbrowser.php:32 include/identity.php:649 include/nav.php:77 +#: mod/fbrowser.php:32 include/identity.php:702 include/nav.php:77 #: view/theme/diabook/theme.php:126 msgid "Photos" msgstr "Foto's" -#: mod/fbrowser.php:41 mod/fbrowser.php:62 mod/photos.php:54 -#: mod/photos.php:184 mod/photos.php:1111 mod/photos.php:1237 -#: mod/photos.php:1260 mod/photos.php:1830 mod/photos.php:1842 +#: mod/fbrowser.php:41 mod/fbrowser.php:62 mod/photos.php:62 +#: mod/photos.php:192 mod/photos.php:1119 mod/photos.php:1245 +#: mod/photos.php:1268 mod/photos.php:1838 mod/photos.php:1850 #: view/theme/diabook/theme.php:499 msgid "Contact Photos" msgstr "Contactfoto's" @@ -1934,548 +1909,578 @@ msgstr "Bestanden" msgid "Contacts who are not members of a group" msgstr "Contacten die geen leden zijn van een groep" -#: mod/admin.php:80 +#: mod/admin.php:92 msgid "Theme settings updated." msgstr "Thema-instellingen aangepast." -#: mod/admin.php:127 mod/admin.php:709 +#: mod/admin.php:147 mod/admin.php:877 msgid "Site" msgstr "Website" -#: mod/admin.php:128 mod/admin.php:653 mod/admin.php:1103 mod/admin.php:1118 +#: mod/admin.php:148 mod/admin.php:821 mod/admin.php:1290 mod/admin.php:1305 msgid "Users" msgstr "Gebruiker" -#: mod/admin.php:129 mod/admin.php:1207 mod/admin.php:1267 mod/settings.php:66 +#: mod/admin.php:149 mod/admin.php:1405 mod/admin.php:1465 mod/settings.php:72 msgid "Plugins" msgstr "Plugins" -#: mod/admin.php:130 mod/admin.php:1452 mod/admin.php:1503 +#: mod/admin.php:150 mod/admin.php:1663 mod/admin.php:1713 msgid "Themes" msgstr "Thema's" -#: mod/admin.php:131 +#: mod/admin.php:151 mod/settings.php:50 +msgid "Additional features" +msgstr "Extra functies" + +#: mod/admin.php:152 msgid "DB updates" msgstr "DB aanpassingen" -#: mod/admin.php:132 mod/admin.php:223 +#: mod/admin.php:153 mod/admin.php:374 msgid "Inspect Queue" msgstr "" -#: mod/admin.php:147 mod/admin.php:156 mod/admin.php:1591 +#: mod/admin.php:154 mod/admin.php:343 +msgid "Federation Statistics" +msgstr "" + +#: mod/admin.php:168 mod/admin.php:179 mod/admin.php:1781 msgid "Logs" msgstr "Logs" -#: mod/admin.php:148 +#: mod/admin.php:169 mod/admin.php:1848 +msgid "View Logs" +msgstr "" + +#: mod/admin.php:170 msgid "probe address" msgstr "" -#: mod/admin.php:149 +#: mod/admin.php:171 msgid "check webfinger" msgstr "" -#: mod/admin.php:154 include/nav.php:194 +#: mod/admin.php:177 include/nav.php:194 msgid "Admin" msgstr "Beheer" -#: mod/admin.php:155 +#: mod/admin.php:178 msgid "Plugin Features" msgstr "Plugin Functies" -#: mod/admin.php:157 +#: mod/admin.php:180 msgid "diagnostics" msgstr "" -#: mod/admin.php:158 +#: mod/admin.php:181 msgid "User registrations waiting for confirmation" msgstr "Gebruikersregistraties wachten op bevestiging" -#: mod/admin.php:222 mod/admin.php:272 mod/admin.php:708 mod/admin.php:1102 -#: mod/admin.php:1206 mod/admin.php:1266 mod/admin.php:1451 mod/admin.php:1502 -#: mod/admin.php:1590 +#: mod/admin.php:336 +msgid "" +"This page offers you some numbers to the known part of the federated social " +"network your Friendica node is part of. These numbers are not complete but " +"only reflect the part of the network your node is aware of." +msgstr "" + +#: mod/admin.php:337 +msgid "" +"The Auto Discovered Contact Directory feature is not enabled, it " +"will improve the data displayed here." +msgstr "" + +#: mod/admin.php:342 mod/admin.php:373 mod/admin.php:430 mod/admin.php:876 +#: mod/admin.php:1289 mod/admin.php:1404 mod/admin.php:1464 mod/admin.php:1662 +#: mod/admin.php:1712 mod/admin.php:1780 mod/admin.php:1847 msgid "Administration" msgstr "Beheer" -#: mod/admin.php:225 +#: mod/admin.php:349 +msgid "Currently this node is aware of nodes from the following platforms:" +msgstr "" + +#: mod/admin.php:376 msgid "ID" msgstr "ID" -#: mod/admin.php:226 +#: mod/admin.php:377 msgid "Recipient Name" msgstr "" -#: mod/admin.php:227 +#: mod/admin.php:378 msgid "Recipient Profile" msgstr "" -#: mod/admin.php:229 +#: mod/admin.php:380 msgid "Created" msgstr "" -#: mod/admin.php:230 +#: mod/admin.php:381 msgid "Last Tried" msgstr "" -#: mod/admin.php:231 +#: mod/admin.php:382 msgid "" "This page lists the content of the queue for outgoing postings. These are " "postings the initial delivery failed for. They will be resend later and " "eventually deleted if the delivery fails permanently." msgstr "" -#: mod/admin.php:243 mod/admin.php:1056 +#: mod/admin.php:401 mod/admin.php:1243 msgid "Normal Account" msgstr "Normaal account" -#: mod/admin.php:244 mod/admin.php:1057 +#: mod/admin.php:402 mod/admin.php:1244 msgid "Soapbox Account" msgstr "Zeepkist-account" -#: mod/admin.php:245 mod/admin.php:1058 +#: mod/admin.php:403 mod/admin.php:1245 msgid "Community/Celebrity Account" msgstr "Account voor een groep/forum of beroemdheid" -#: mod/admin.php:246 mod/admin.php:1059 +#: mod/admin.php:404 mod/admin.php:1246 msgid "Automatic Friend Account" msgstr "Automatisch Vriendschapsaccount" -#: mod/admin.php:247 +#: mod/admin.php:405 msgid "Blog Account" msgstr "Blog Account" -#: mod/admin.php:248 +#: mod/admin.php:406 msgid "Private Forum" msgstr "Privéforum/-groep" -#: mod/admin.php:267 +#: mod/admin.php:425 msgid "Message queues" msgstr "Bericht-wachtrijen" -#: mod/admin.php:273 +#: mod/admin.php:431 msgid "Summary" msgstr "Samenvatting" -#: mod/admin.php:275 +#: mod/admin.php:433 msgid "Registered users" msgstr "Geregistreerde gebruikers" -#: mod/admin.php:277 +#: mod/admin.php:435 msgid "Pending registrations" msgstr "Registraties die in de wacht staan" -#: mod/admin.php:278 +#: mod/admin.php:436 msgid "Version" msgstr "Versie" -#: mod/admin.php:283 +#: mod/admin.php:441 msgid "Active plugins" msgstr "Actieve plug-ins" -#: mod/admin.php:306 +#: mod/admin.php:464 msgid "Can not parse base url. Must have at least ://" msgstr "" -#: mod/admin.php:585 +#: mod/admin.php:749 msgid "RINO2 needs mcrypt php extension to work." msgstr "" -#: mod/admin.php:593 +#: mod/admin.php:757 msgid "Site settings updated." msgstr "Site instellingen gewijzigd." -#: mod/admin.php:617 mod/settings.php:901 +#: mod/admin.php:785 mod/settings.php:912 msgid "No special theme for mobile devices" msgstr "Geen speciaal thema voor mobiele apparaten" -#: mod/admin.php:636 +#: mod/admin.php:804 msgid "No community page" msgstr "" -#: mod/admin.php:637 +#: mod/admin.php:805 msgid "Public postings from users of this site" msgstr "" -#: mod/admin.php:638 +#: mod/admin.php:806 msgid "Global community page" msgstr "" -#: mod/admin.php:644 +#: mod/admin.php:812 msgid "At post arrival" msgstr "" -#: mod/admin.php:645 include/contact_selectors.php:56 +#: mod/admin.php:813 include/contact_selectors.php:56 msgid "Frequently" msgstr "Frequent" -#: mod/admin.php:646 include/contact_selectors.php:57 +#: mod/admin.php:814 include/contact_selectors.php:57 msgid "Hourly" msgstr "elk uur" -#: mod/admin.php:647 include/contact_selectors.php:58 +#: mod/admin.php:815 include/contact_selectors.php:58 msgid "Twice daily" msgstr "Twee keer per dag" -#: mod/admin.php:648 include/contact_selectors.php:59 +#: mod/admin.php:816 include/contact_selectors.php:59 msgid "Daily" msgstr "dagelijks" -#: mod/admin.php:654 +#: mod/admin.php:822 msgid "Users, Global Contacts" msgstr "" -#: mod/admin.php:655 +#: mod/admin.php:823 msgid "Users, Global Contacts/fallback" msgstr "" -#: mod/admin.php:659 +#: mod/admin.php:827 msgid "One month" msgstr "" -#: mod/admin.php:660 +#: mod/admin.php:828 msgid "Three months" msgstr "" -#: mod/admin.php:661 +#: mod/admin.php:829 msgid "Half a year" msgstr "" -#: mod/admin.php:662 +#: mod/admin.php:830 msgid "One year" msgstr "" -#: mod/admin.php:667 +#: mod/admin.php:835 msgid "Multi user instance" msgstr "Server voor meerdere gebruikers" -#: mod/admin.php:690 +#: mod/admin.php:858 msgid "Closed" msgstr "Gesloten" -#: mod/admin.php:691 +#: mod/admin.php:859 msgid "Requires approval" msgstr "Toestemming vereist" -#: mod/admin.php:692 +#: mod/admin.php:860 msgid "Open" msgstr "Open" -#: mod/admin.php:696 +#: mod/admin.php:864 msgid "No SSL policy, links will track page SSL state" msgstr "Geen SSL beleid, links zullen SSL status van pagina volgen" -#: mod/admin.php:697 +#: mod/admin.php:865 msgid "Force all links to use SSL" msgstr "Verplicht alle links om SSL te gebruiken" -#: mod/admin.php:698 +#: mod/admin.php:866 msgid "Self-signed certificate, use SSL for local links only (discouraged)" msgstr "Zelf-ondertekend certificaat, gebruik SSL alleen voor lokale links (afgeraden)" -#: mod/admin.php:710 mod/admin.php:1268 mod/admin.php:1504 mod/admin.php:1592 -#: mod/settings.php:648 mod/settings.php:758 mod/settings.php:802 -#: mod/settings.php:871 mod/settings.php:957 mod/settings.php:1192 +#: mod/admin.php:878 mod/admin.php:1466 mod/admin.php:1714 mod/admin.php:1782 +#: mod/admin.php:1931 mod/settings.php:659 mod/settings.php:769 +#: mod/settings.php:813 mod/settings.php:882 mod/settings.php:969 +#: mod/settings.php:1204 msgid "Save Settings" msgstr "Instellingen opslaan" -#: mod/admin.php:711 mod/register.php:260 +#: mod/admin.php:879 mod/register.php:263 msgid "Registration" msgstr "Registratie" -#: mod/admin.php:712 +#: mod/admin.php:880 msgid "File upload" msgstr "Uploaden bestand" -#: mod/admin.php:713 +#: mod/admin.php:881 msgid "Policies" msgstr "Beleid" -#: mod/admin.php:714 +#: mod/admin.php:882 msgid "Advanced" msgstr "Geavanceerd" -#: mod/admin.php:715 +#: mod/admin.php:883 msgid "Auto Discovered Contact Directory" msgstr "" -#: mod/admin.php:716 +#: mod/admin.php:884 msgid "Performance" msgstr "Performantie" -#: mod/admin.php:717 +#: mod/admin.php:885 msgid "" "Relocate - WARNING: advanced function. Could make this server unreachable." msgstr "" -#: mod/admin.php:720 +#: mod/admin.php:888 msgid "Site name" msgstr "Site naam" -#: mod/admin.php:721 +#: mod/admin.php:889 msgid "Host name" msgstr "" -#: mod/admin.php:722 +#: mod/admin.php:890 msgid "Sender Email" msgstr "" -#: mod/admin.php:722 +#: mod/admin.php:890 msgid "" "The email address your server shall use to send notification emails from." msgstr "" -#: mod/admin.php:723 +#: mod/admin.php:891 msgid "Banner/Logo" msgstr "Banner/Logo" -#: mod/admin.php:724 +#: mod/admin.php:892 msgid "Shortcut icon" msgstr "" -#: mod/admin.php:724 +#: mod/admin.php:892 msgid "Link to an icon that will be used for browsers." msgstr "" -#: mod/admin.php:725 +#: mod/admin.php:893 msgid "Touch icon" msgstr "" -#: mod/admin.php:725 +#: mod/admin.php:893 msgid "Link to an icon that will be used for tablets and mobiles." msgstr "" -#: mod/admin.php:726 +#: mod/admin.php:894 msgid "Additional Info" msgstr "" -#: mod/admin.php:726 +#: mod/admin.php:894 #, php-format msgid "" "For public servers: you can add additional information here that will be " "listed at %s/siteinfo." msgstr "" -#: mod/admin.php:727 +#: mod/admin.php:895 msgid "System language" msgstr "Systeemtaal" -#: mod/admin.php:728 +#: mod/admin.php:896 msgid "System theme" msgstr "Systeem thema" -#: mod/admin.php:728 +#: mod/admin.php:896 msgid "" "Default system theme - may be over-ridden by user profiles - change theme settings" msgstr "Standaard systeem thema - kan door gebruikersprofielen veranderd worden - verander thema instellingen" -#: mod/admin.php:729 +#: mod/admin.php:897 msgid "Mobile system theme" msgstr "Mobiel systeem thema" -#: mod/admin.php:729 +#: mod/admin.php:897 msgid "Theme for mobile devices" msgstr "Thema voor mobiele apparaten" -#: mod/admin.php:730 +#: mod/admin.php:898 msgid "SSL link policy" msgstr "Beleid SSL-links" -#: mod/admin.php:730 +#: mod/admin.php:898 msgid "Determines whether generated links should be forced to use SSL" msgstr "Bepaald of gegenereerde verwijzingen verplicht SSL moeten gebruiken" -#: mod/admin.php:731 +#: mod/admin.php:899 msgid "Force SSL" msgstr "" -#: mod/admin.php:731 +#: mod/admin.php:899 msgid "" "Force all Non-SSL requests to SSL - Attention: on some systems it could lead" " to endless loops." msgstr "" -#: mod/admin.php:732 +#: mod/admin.php:900 msgid "Old style 'Share'" msgstr "" -#: mod/admin.php:732 +#: mod/admin.php:900 msgid "Deactivates the bbcode element 'share' for repeating items." msgstr "" -#: mod/admin.php:733 +#: mod/admin.php:901 msgid "Hide help entry from navigation menu" msgstr "Verberg de 'help' uit het navigatiemenu" -#: mod/admin.php:733 +#: mod/admin.php:901 msgid "" "Hides the menu entry for the Help pages from the navigation menu. You can " "still access it calling /help directly." msgstr "Verbergt het menu-item voor de Help pagina's uit het navigatiemenu. Je kunt ze nog altijd vinden door /help direct in te geven." -#: mod/admin.php:734 +#: mod/admin.php:902 msgid "Single user instance" msgstr "Server voor één gebruiker" -#: mod/admin.php:734 +#: mod/admin.php:902 msgid "Make this instance multi-user or single-user for the named user" msgstr "Stel deze server in voor meerdere gebruikers, of enkel voor de geselecteerde gebruiker." -#: mod/admin.php:735 +#: mod/admin.php:903 msgid "Maximum image size" msgstr "Maximum afbeeldingsgrootte" -#: mod/admin.php:735 +#: mod/admin.php:903 msgid "" "Maximum size in bytes of uploaded images. Default is 0, which means no " "limits." msgstr "Maximum afmeting in bytes van afbeeldingen. Standaard is 0, dus geen beperking." -#: mod/admin.php:736 +#: mod/admin.php:904 msgid "Maximum image length" msgstr "Maximum afbeeldingslengte" -#: mod/admin.php:736 +#: mod/admin.php:904 msgid "" "Maximum length in pixels of the longest side of uploaded images. Default is " "-1, which means no limits." msgstr "Maximum lengte in pixels van de langste kant van afbeeldingen. Standaard is -1, dus geen beperkingen." -#: mod/admin.php:737 +#: mod/admin.php:905 msgid "JPEG image quality" msgstr "JPEG afbeeldingskwaliteit" -#: mod/admin.php:737 +#: mod/admin.php:905 msgid "" "Uploaded JPEGS will be saved at this quality setting [0-100]. Default is " "100, which is full quality." msgstr "JPEGS zullen met deze kwaliteitsinstelling bewaard worden [0-100]. Standaard is 100, dit is volledige kwaliteit." -#: mod/admin.php:739 +#: mod/admin.php:907 msgid "Register policy" msgstr "Registratiebeleid" -#: mod/admin.php:740 +#: mod/admin.php:908 msgid "Maximum Daily Registrations" msgstr "Maximum aantal registraties per dag" -#: mod/admin.php:740 +#: mod/admin.php:908 msgid "" "If registration is permitted above, this sets the maximum number of new user" " registrations to accept per day. If register is set to closed, this " "setting has no effect." msgstr "Als registratie hierboven is toegelaten, zet dit het maximum aantal registraties van nieuwe gebruikers per dag. Als registratie niet is toegelaten heeft deze instelling geen effect." -#: mod/admin.php:741 +#: mod/admin.php:909 msgid "Register text" msgstr "Registratietekst" -#: mod/admin.php:741 +#: mod/admin.php:909 msgid "Will be displayed prominently on the registration page." msgstr "Dit zal prominent op de registratiepagina getoond worden." -#: mod/admin.php:742 +#: mod/admin.php:910 msgid "Accounts abandoned after x days" msgstr "Verlaten accounts na x dagen" -#: mod/admin.php:742 +#: mod/admin.php:910 msgid "" "Will not waste system resources polling external sites for abandonded " "accounts. Enter 0 for no time limit." msgstr "Dit zal geen systeembronnen verspillen aan het nakijken van externe sites voor verlaten accounts. Geef 0 is voor geen tijdslimiet." -#: mod/admin.php:743 +#: mod/admin.php:911 msgid "Allowed friend domains" msgstr "Toegelaten vriend domeinen" -#: mod/admin.php:743 +#: mod/admin.php:911 msgid "" "Comma separated list of domains which are allowed to establish friendships " "with this site. Wildcards are accepted. Empty to allow any domains" msgstr "Komma-gescheiden lijst van domeinen die een vriendschapsband met deze website mogen aangaan. Jokers zijn toegelaten. Laat leeg om alle domeinen toe te laten." -#: mod/admin.php:744 +#: mod/admin.php:912 msgid "Allowed email domains" msgstr "Toegelaten e-mail domeinen" -#: mod/admin.php:744 +#: mod/admin.php:912 msgid "" "Comma separated list of domains which are allowed in email addresses for " "registrations to this site. Wildcards are accepted. Empty to allow any " "domains" msgstr "Door komma's gescheiden lijst met e-maildomeinen die op deze website mogen registeren. Wildcards zijn toegestaan.\nLeeg laten om alle domeinen toe te staan." -#: mod/admin.php:745 +#: mod/admin.php:913 msgid "Block public" msgstr "Openbare toegang blokkeren" -#: mod/admin.php:745 +#: mod/admin.php:913 msgid "" "Check to block public access to all otherwise public personal pages on this " "site unless you are currently logged in." msgstr "Kruis dit aan om alle openbare persoonlijke pagina's alleen toegankelijk te maken voor ingelogde gebruikers." -#: mod/admin.php:746 +#: mod/admin.php:914 msgid "Force publish" msgstr "Dwing publiceren af" -#: mod/admin.php:746 +#: mod/admin.php:914 msgid "" "Check to force all profiles on this site to be listed in the site directory." msgstr "Kruis dit aan om af te dwingen dat alle profielen op deze website in de gids van deze website gepubliceerd worden." -#: mod/admin.php:747 +#: mod/admin.php:915 msgid "Global directory URL" msgstr "" -#: mod/admin.php:747 +#: mod/admin.php:915 msgid "" "URL to the global directory. If this is not set, the global directory is " "completely unavailable to the application." msgstr "" -#: mod/admin.php:748 +#: mod/admin.php:916 msgid "Allow threaded items" msgstr "Sta threads in conversaties toe" -#: mod/admin.php:748 +#: mod/admin.php:916 msgid "Allow infinite level threading for items on this site." msgstr "Sta oneindige niveaus threads in conversaties op deze website toe." -#: mod/admin.php:749 +#: mod/admin.php:917 msgid "Private posts by default for new users" msgstr "Privéberichten als standaard voor nieuwe gebruikers" -#: mod/admin.php:749 +#: mod/admin.php:917 msgid "" "Set default post permissions for all new members to the default privacy " "group rather than public." msgstr "Stel de standaardrechten van berichten voor nieuwe leden op de standaard privacygroep in, in plaats van openbaar." -#: mod/admin.php:750 +#: mod/admin.php:918 msgid "Don't include post content in email notifications" msgstr "De inhoud van het bericht niet insluiten bij e-mailnotificaties" -#: mod/admin.php:750 +#: mod/admin.php:918 msgid "" "Don't include the content of a post/comment/private message/etc. in the " "email notifications that are sent out from this site, as a privacy measure." msgstr "De inhoud van berichten/commentaar/privéberichten/enzovoort niet insluiten in e-mailnotificaties die door deze website verzonden worden, voor de bescherming van je privacy." -#: mod/admin.php:751 +#: mod/admin.php:919 msgid "Disallow public access to addons listed in the apps menu." msgstr "" -#: mod/admin.php:751 +#: mod/admin.php:919 msgid "" "Checking this box will restrict addons listed in the apps menu to members " "only." msgstr "" -#: mod/admin.php:752 +#: mod/admin.php:920 msgid "Don't embed private images in posts" msgstr "" -#: mod/admin.php:752 +#: mod/admin.php:920 msgid "" "Don't replace locally-hosted private photos in posts with an embedded copy " "of the image. This means that contacts who receive posts containing private " @@ -2483,208 +2488,228 @@ msgid "" "while." msgstr "" -#: mod/admin.php:753 +#: mod/admin.php:921 msgid "Allow Users to set remote_self" msgstr "" -#: mod/admin.php:753 +#: mod/admin.php:921 msgid "" "With checking this, every user is allowed to mark every contact as a " "remote_self in the repair contact dialog. Setting this flag on a contact " "causes mirroring every posting of that contact in the users stream." msgstr "" -#: mod/admin.php:754 +#: mod/admin.php:922 msgid "Block multiple registrations" msgstr "Blokkeer meerdere registraties" -#: mod/admin.php:754 +#: mod/admin.php:922 msgid "Disallow users to register additional accounts for use as pages." msgstr "Laat niet toe dat gebruikers meerdere accounts aanmaken." -#: mod/admin.php:755 +#: mod/admin.php:923 msgid "OpenID support" msgstr "OpenID ondersteuning" -#: mod/admin.php:755 +#: mod/admin.php:923 msgid "OpenID support for registration and logins." msgstr "OpenID ondersteuning voor registraties en logins." -#: mod/admin.php:756 +#: mod/admin.php:924 msgid "Fullname check" msgstr "Controleer volledige naam" -#: mod/admin.php:756 +#: mod/admin.php:924 msgid "" "Force users to register with a space between firstname and lastname in Full " "name, as an antispam measure" msgstr "Verplicht gebruikers om zich te registreren met een spatie tussen voornaam en achternaam, als anti-spam maatregel" -#: mod/admin.php:757 +#: mod/admin.php:925 msgid "UTF-8 Regular expressions" msgstr "UTF-8 reguliere uitdrukkingen" -#: mod/admin.php:757 +#: mod/admin.php:925 msgid "Use PHP UTF8 regular expressions" msgstr "Gebruik PHP UTF8 reguliere uitdrukkingen" -#: mod/admin.php:758 +#: mod/admin.php:926 msgid "Community Page Style" msgstr "" -#: mod/admin.php:758 +#: mod/admin.php:926 msgid "" "Type of community page to show. 'Global community' shows every public " "posting from an open distributed network that arrived on this server." msgstr "" -#: mod/admin.php:759 +#: mod/admin.php:927 msgid "Posts per user on community page" msgstr "" -#: mod/admin.php:759 +#: mod/admin.php:927 msgid "" "The maximum number of posts per user on the community page. (Not valid for " "'Global Community')" msgstr "" -#: mod/admin.php:760 +#: mod/admin.php:928 msgid "Enable OStatus support" msgstr "Activeer OStatus ondersteuning" -#: mod/admin.php:760 +#: mod/admin.php:928 msgid "" "Provide built-in OStatus (StatusNet, GNU Social etc.) compatibility. All " "communications in OStatus are public, so privacy warnings will be " "occasionally displayed." msgstr "" -#: mod/admin.php:761 +#: mod/admin.php:929 msgid "OStatus conversation completion interval" msgstr "" -#: mod/admin.php:761 +#: mod/admin.php:929 msgid "" "How often shall the poller check for new entries in OStatus conversations? " "This can be a very ressource task." msgstr "" -#: mod/admin.php:762 +#: mod/admin.php:930 msgid "OStatus support can only be enabled if threading is enabled." msgstr "" -#: mod/admin.php:764 +#: mod/admin.php:932 msgid "" "Diaspora support can't be enabled because Friendica was installed into a sub" " directory." msgstr "" -#: mod/admin.php:765 +#: mod/admin.php:933 msgid "Enable Diaspora support" msgstr "Activeer Diaspora ondersteuning" -#: mod/admin.php:765 +#: mod/admin.php:933 msgid "Provide built-in Diaspora network compatibility." msgstr "Bied ingebouwde ondersteuning voor het Diaspora netwerk." -#: mod/admin.php:766 +#: mod/admin.php:934 msgid "Only allow Friendica contacts" msgstr "Laat alleen Friendica contacten toe" -#: mod/admin.php:766 +#: mod/admin.php:934 msgid "" "All contacts must use Friendica protocols. All other built-in communication " "protocols disabled." msgstr "Alle contacten moeten een Friendica protocol gebruiken. Alle andere ingebouwde communicatieprotocols worden uitgeschakeld." -#: mod/admin.php:767 +#: mod/admin.php:935 msgid "Verify SSL" msgstr "Controleer SSL" -#: mod/admin.php:767 +#: mod/admin.php:935 msgid "" "If you wish, you can turn on strict certificate checking. This will mean you" " cannot connect (at all) to self-signed SSL sites." msgstr "Als je wilt kun je striktere certificaat controle activeren. Dit betekent dat je (totaal) niet kunt connecteren met sites die zelf-ondertekende SSL certificaten gebruiken." -#: mod/admin.php:768 +#: mod/admin.php:936 msgid "Proxy user" msgstr "Proxy-gebruiker" -#: mod/admin.php:769 +#: mod/admin.php:937 msgid "Proxy URL" msgstr "Proxy-URL" -#: mod/admin.php:770 +#: mod/admin.php:938 msgid "Network timeout" msgstr "Netwerk timeout" -#: mod/admin.php:770 +#: mod/admin.php:938 msgid "Value is in seconds. Set to 0 for unlimited (not recommended)." msgstr "Waarde is in seconden. Zet op 0 voor onbeperkt (niet aanbevolen)." -#: mod/admin.php:771 +#: mod/admin.php:939 msgid "Delivery interval" msgstr "Afleverinterval" -#: mod/admin.php:771 +#: mod/admin.php:939 msgid "" "Delay background delivery processes by this many seconds to reduce system " "load. Recommend: 4-5 for shared hosts, 2-3 for virtual private servers. 0-1 " "for large dedicated servers." msgstr "Stel achtergrond processen voor aflevering een aantal seconden uit om systeembelasting te beperken. Aanbevolen: 4-5 voor gedeelde hosten, 2-3 voor virtuele privé servers, 0-1 voor grote servers." -#: mod/admin.php:772 +#: mod/admin.php:940 msgid "Poll interval" msgstr "Poll-interval" -#: mod/admin.php:772 +#: mod/admin.php:940 msgid "" "Delay background polling processes by this many seconds to reduce system " "load. If 0, use delivery interval." msgstr "Stel achtergrondprocessen zoveel seconden uit om de systeembelasting te beperken. Indien 0 wordt het afleverinterval gebruikt." -#: mod/admin.php:773 +#: mod/admin.php:941 msgid "Maximum Load Average" msgstr "Maximum gemiddelde belasting" -#: mod/admin.php:773 +#: mod/admin.php:941 msgid "" "Maximum system load before delivery and poll processes are deferred - " "default 50." msgstr "Maximum systeembelasting voordat aflever- en poll-processen uitgesteld worden - standaard 50." -#: mod/admin.php:774 +#: mod/admin.php:942 msgid "Maximum Load Average (Frontend)" msgstr "" -#: mod/admin.php:774 +#: mod/admin.php:942 msgid "Maximum system load before the frontend quits service - default 50." msgstr "" -#: mod/admin.php:776 +#: mod/admin.php:943 +msgid "Maximum table size for optimization" +msgstr "" + +#: mod/admin.php:943 +msgid "" +"Maximum table size (in MB) for the automatic optimization - default 100 MB. " +"Enter -1 to disable it." +msgstr "" + +#: mod/admin.php:944 +msgid "Minimum level of fragmentation" +msgstr "" + +#: mod/admin.php:944 +msgid "" +"Minimum fragmenation level to start the automatic optimization - default " +"value is 30%." +msgstr "" + +#: mod/admin.php:946 msgid "Periodical check of global contacts" msgstr "" -#: mod/admin.php:776 +#: mod/admin.php:946 msgid "" "If enabled, the global contacts are checked periodically for missing or " "outdated data and the vitality of the contacts and servers." msgstr "" -#: mod/admin.php:777 +#: mod/admin.php:947 msgid "Days between requery" msgstr "" -#: mod/admin.php:777 +#: mod/admin.php:947 msgid "Number of days after which a server is requeried for his contacts." msgstr "" -#: mod/admin.php:778 +#: mod/admin.php:948 msgid "Discover contacts from other servers" msgstr "" -#: mod/admin.php:778 +#: mod/admin.php:948 msgid "" "Periodically query other servers for contacts. You can choose between " "'users': the users on the remote system, 'Global Contacts': active contacts " @@ -2694,32 +2719,32 @@ msgid "" "Global Contacts'." msgstr "" -#: mod/admin.php:779 +#: mod/admin.php:949 msgid "Timeframe for fetching global contacts" msgstr "" -#: mod/admin.php:779 +#: mod/admin.php:949 msgid "" "When the discovery is activated, this value defines the timeframe for the " "activity of the global contacts that are fetched from other servers." msgstr "" -#: mod/admin.php:780 +#: mod/admin.php:950 msgid "Search the local directory" msgstr "" -#: mod/admin.php:780 +#: mod/admin.php:950 msgid "" "Search the local directory instead of the global directory. When searching " "locally, every search will be executed on the global directory in the " "background. This improves the search results when the search is repeated." msgstr "" -#: mod/admin.php:782 +#: mod/admin.php:952 msgid "Publish server information" msgstr "" -#: mod/admin.php:782 +#: mod/admin.php:952 msgid "" "If enabled, general server and usage data will be published. The data " "contains the name and version of the server, number of users with public " @@ -2727,205 +2752,205 @@ msgid "" " href='http://the-federation.info/'>the-federation.info for details." msgstr "" -#: mod/admin.php:784 +#: mod/admin.php:954 msgid "Use MySQL full text engine" msgstr "Gebruik de tekst-zoekfunctie van MySQL" -#: mod/admin.php:784 +#: mod/admin.php:954 msgid "" "Activates the full text engine. Speeds up search - but can only search for " "four and more characters." msgstr "Activeert de zoekmotor. Dit maakt zoeken sneller, maar het kan alleen zoeken naar teksten van minstens vier letters." -#: mod/admin.php:785 +#: mod/admin.php:955 msgid "Suppress Language" msgstr "" -#: mod/admin.php:785 +#: mod/admin.php:955 msgid "Suppress language information in meta information about a posting." msgstr "" -#: mod/admin.php:786 +#: mod/admin.php:956 msgid "Suppress Tags" msgstr "" -#: mod/admin.php:786 +#: mod/admin.php:956 msgid "Suppress showing a list of hashtags at the end of the posting." msgstr "" -#: mod/admin.php:787 +#: mod/admin.php:957 msgid "Path to item cache" msgstr "Pad naar cache voor items" -#: mod/admin.php:787 +#: mod/admin.php:957 msgid "The item caches buffers generated bbcode and external images." msgstr "" -#: mod/admin.php:788 +#: mod/admin.php:958 msgid "Cache duration in seconds" msgstr "Cache tijdsduur in seconden" -#: mod/admin.php:788 +#: mod/admin.php:958 msgid "" "How long should the cache files be hold? Default value is 86400 seconds (One" " day). To disable the item cache, set the value to -1." msgstr "" -#: mod/admin.php:789 +#: mod/admin.php:959 msgid "Maximum numbers of comments per post" msgstr "" -#: mod/admin.php:789 +#: mod/admin.php:959 msgid "How much comments should be shown for each post? Default value is 100." msgstr "" -#: mod/admin.php:790 +#: mod/admin.php:960 msgid "Path for lock file" msgstr "Pad voor lock bestand" -#: mod/admin.php:790 +#: mod/admin.php:960 msgid "" "The lock file is used to avoid multiple pollers at one time. Only define a " "folder here." msgstr "" -#: mod/admin.php:791 +#: mod/admin.php:961 msgid "Temp path" msgstr "Tijdelijk pad" -#: mod/admin.php:791 +#: mod/admin.php:961 msgid "" "If you have a restricted system where the webserver can't access the system " "temp path, enter another path here." msgstr "" -#: mod/admin.php:792 +#: mod/admin.php:962 msgid "Base path to installation" msgstr "Basispad voor installatie" -#: mod/admin.php:792 +#: mod/admin.php:962 msgid "" "If the system cannot detect the correct path to your installation, enter the" " correct path here. This setting should only be set if you are using a " "restricted system and symbolic links to your webroot." msgstr "" -#: mod/admin.php:793 +#: mod/admin.php:963 msgid "Disable picture proxy" msgstr "" -#: mod/admin.php:793 +#: mod/admin.php:963 msgid "" "The picture proxy increases performance and privacy. It shouldn't be used on" " systems with very low bandwith." msgstr "" -#: mod/admin.php:794 +#: mod/admin.php:964 msgid "Enable old style pager" msgstr "" -#: mod/admin.php:794 +#: mod/admin.php:964 msgid "" "The old style pager has page numbers but slows down massively the page " "speed." msgstr "" -#: mod/admin.php:795 +#: mod/admin.php:965 msgid "Only search in tags" msgstr "" -#: mod/admin.php:795 +#: mod/admin.php:965 msgid "On large systems the text search can slow down the system extremely." msgstr "" -#: mod/admin.php:797 +#: mod/admin.php:967 msgid "New base url" msgstr "" -#: mod/admin.php:797 +#: mod/admin.php:967 msgid "" "Change base url for this server. Sends relocate message to all DFRN contacts" " of all users." msgstr "" -#: mod/admin.php:799 +#: mod/admin.php:969 msgid "RINO Encryption" msgstr "" -#: mod/admin.php:799 +#: mod/admin.php:969 msgid "Encryption layer between nodes." msgstr "" -#: mod/admin.php:800 +#: mod/admin.php:970 msgid "Embedly API key" msgstr "" -#: mod/admin.php:800 +#: mod/admin.php:970 msgid "" "Embedly is used to fetch additional data for " "web pages. This is an optional parameter." msgstr "" -#: mod/admin.php:818 +#: mod/admin.php:999 msgid "Update has been marked successful" msgstr "Wijziging succesvol gemarkeerd " -#: mod/admin.php:826 +#: mod/admin.php:1007 #, php-format msgid "Database structure update %s was successfully applied." msgstr "" -#: mod/admin.php:829 +#: mod/admin.php:1010 #, php-format msgid "Executing of database structure update %s failed with error: %s" msgstr "" -#: mod/admin.php:841 +#: mod/admin.php:1022 #, php-format msgid "Executing %s failed with error: %s" msgstr "" -#: mod/admin.php:844 +#: mod/admin.php:1025 #, php-format msgid "Update %s was successfully applied." msgstr "Wijziging %s geslaagd." -#: mod/admin.php:848 +#: mod/admin.php:1029 #, php-format msgid "Update %s did not return a status. Unknown if it succeeded." msgstr "Wijziging %s gaf geen status terug. We weten niet of de wijziging geslaagd is." -#: mod/admin.php:850 +#: mod/admin.php:1031 #, php-format msgid "There was no additional update function %s that needed to be called." msgstr "" -#: mod/admin.php:869 +#: mod/admin.php:1050 msgid "No failed updates." msgstr "Geen misluke wijzigingen" -#: mod/admin.php:870 +#: mod/admin.php:1051 msgid "Check database structure" msgstr "" -#: mod/admin.php:875 +#: mod/admin.php:1056 msgid "Failed Updates" msgstr "Misluke wijzigingen" -#: mod/admin.php:876 +#: mod/admin.php:1057 msgid "" "This does not include updates prior to 1139, which did not return a status." msgstr "Dit is zonder de wijzigingen voor 1139, welke geen status teruggaven." -#: mod/admin.php:877 +#: mod/admin.php:1058 msgid "Mark success (if update was manually applied)" msgstr "Markeren als succes (als aanpassing manueel doorgevoerd werd)" -#: mod/admin.php:878 +#: mod/admin.php:1059 msgid "Attempt to execute this update step automatically" msgstr "Probeer deze stap automatisch uit te voeren" -#: mod/admin.php:910 +#: mod/admin.php:1091 #, php-format msgid "" "\n" @@ -2933,7 +2958,7 @@ msgid "" "\t\t\t\tthe administrator of %2$s has set up an account for you." msgstr "" -#: mod/admin.php:913 +#: mod/admin.php:1094 #, php-format msgid "" "\n" @@ -2963,295 +2988,318 @@ msgid "" "\t\t\tThank you and welcome to %4$s." msgstr "" -#: mod/admin.php:945 include/user.php:421 +#: mod/admin.php:1126 include/user.php:423 #, php-format msgid "Registration details for %s" msgstr "Registratie details voor %s" -#: mod/admin.php:957 +#: mod/admin.php:1138 #, php-format msgid "%s user blocked/unblocked" msgid_plural "%s users blocked/unblocked" msgstr[0] "%s gebruiker geblokkeerd/niet geblokkeerd" msgstr[1] "%s gebruikers geblokkeerd/niet geblokkeerd" -#: mod/admin.php:964 +#: mod/admin.php:1145 #, php-format msgid "%s user deleted" msgid_plural "%s users deleted" msgstr[0] "%s gebruiker verwijderd" msgstr[1] "%s gebruikers verwijderd" -#: mod/admin.php:1003 +#: mod/admin.php:1192 #, php-format msgid "User '%s' deleted" msgstr "Gebruiker '%s' verwijderd" -#: mod/admin.php:1011 +#: mod/admin.php:1200 #, php-format msgid "User '%s' unblocked" msgstr "Gebruiker '%s' niet meer geblokkeerd" -#: mod/admin.php:1011 +#: mod/admin.php:1200 #, php-format msgid "User '%s' blocked" msgstr "Gebruiker '%s' geblokkeerd" -#: mod/admin.php:1104 +#: mod/admin.php:1291 msgid "Add User" msgstr "Gebruiker toevoegen" -#: mod/admin.php:1105 +#: mod/admin.php:1292 msgid "select all" msgstr "Alles selecteren" -#: mod/admin.php:1106 +#: mod/admin.php:1293 msgid "User registrations waiting for confirm" msgstr "Gebruikersregistraties wachten op een bevestiging" -#: mod/admin.php:1107 +#: mod/admin.php:1294 msgid "User waiting for permanent deletion" msgstr "" -#: mod/admin.php:1108 +#: mod/admin.php:1295 msgid "Request date" msgstr "Registratiedatum" -#: mod/admin.php:1108 mod/admin.php:1120 mod/admin.php:1121 mod/admin.php:1136 +#: mod/admin.php:1295 mod/admin.php:1307 mod/admin.php:1308 mod/admin.php:1323 #: include/contact_selectors.php:79 include/contact_selectors.php:86 msgid "Email" msgstr "E-mail" -#: mod/admin.php:1109 +#: mod/admin.php:1296 msgid "No registrations." msgstr "Geen registraties." -#: mod/admin.php:1111 +#: mod/admin.php:1298 msgid "Deny" msgstr "Weiger" -#: mod/admin.php:1115 +#: mod/admin.php:1302 msgid "Site admin" msgstr "Sitebeheerder" -#: mod/admin.php:1116 +#: mod/admin.php:1303 msgid "Account expired" msgstr "Account verlopen" -#: mod/admin.php:1119 +#: mod/admin.php:1306 msgid "New User" msgstr "Nieuwe gebruiker" -#: mod/admin.php:1120 mod/admin.php:1121 +#: mod/admin.php:1307 mod/admin.php:1308 msgid "Register date" msgstr "Registratiedatum" -#: mod/admin.php:1120 mod/admin.php:1121 +#: mod/admin.php:1307 mod/admin.php:1308 msgid "Last login" msgstr "Laatste login" -#: mod/admin.php:1120 mod/admin.php:1121 +#: mod/admin.php:1307 mod/admin.php:1308 msgid "Last item" msgstr "Laatste item" -#: mod/admin.php:1120 +#: mod/admin.php:1307 msgid "Deleted since" msgstr "Verwijderd sinds" -#: mod/admin.php:1121 mod/settings.php:41 +#: mod/admin.php:1308 mod/settings.php:41 msgid "Account" msgstr "Account" -#: mod/admin.php:1123 +#: mod/admin.php:1310 msgid "" "Selected users will be deleted!\\n\\nEverything these users had posted on " "this site will be permanently deleted!\\n\\nAre you sure?" msgstr "Geselecteerde gebruikers zullen verwijderd worden!\\n\\nAlles wat deze gebruikers gepost hebben op deze website zal permanent verwijderd worden!\\n\\nBen je zeker?" -#: mod/admin.php:1124 +#: mod/admin.php:1311 msgid "" "The user {0} will be deleted!\\n\\nEverything this user has posted on this " "site will be permanently deleted!\\n\\nAre you sure?" msgstr "De gebruiker {0} zal verwijderd worden!\\n\\nAlles wat deze gebruiker gepost heeft op deze website zal permanent verwijderd worden!\\n\\nBen je zeker?" -#: mod/admin.php:1134 +#: mod/admin.php:1321 msgid "Name of the new user." msgstr "Naam van nieuwe gebruiker" -#: mod/admin.php:1135 +#: mod/admin.php:1322 msgid "Nickname" msgstr "Bijnaam" -#: mod/admin.php:1135 +#: mod/admin.php:1322 msgid "Nickname of the new user." msgstr "Bijnaam van nieuwe gebruiker" -#: mod/admin.php:1136 +#: mod/admin.php:1323 msgid "Email address of the new user." msgstr "E-mailadres van nieuwe gebruiker" -#: mod/admin.php:1169 +#: mod/admin.php:1366 #, php-format msgid "Plugin %s disabled." msgstr "Plugin %s uitgeschakeld." -#: mod/admin.php:1173 +#: mod/admin.php:1370 #, php-format msgid "Plugin %s enabled." msgstr "Plugin %s ingeschakeld." -#: mod/admin.php:1183 mod/admin.php:1407 +#: mod/admin.php:1381 mod/admin.php:1617 msgid "Disable" msgstr "Uitschakelen" -#: mod/admin.php:1185 mod/admin.php:1409 +#: mod/admin.php:1383 mod/admin.php:1619 msgid "Enable" msgstr "Inschakelen" -#: mod/admin.php:1208 mod/admin.php:1453 +#: mod/admin.php:1406 mod/admin.php:1664 msgid "Toggle" msgstr "Schakelaar" -#: mod/admin.php:1216 mod/admin.php:1463 +#: mod/admin.php:1414 mod/admin.php:1673 msgid "Author: " msgstr "Auteur:" -#: mod/admin.php:1217 mod/admin.php:1464 +#: mod/admin.php:1415 mod/admin.php:1674 msgid "Maintainer: " msgstr "Onderhoud:" -#: mod/admin.php:1269 +#: mod/admin.php:1467 msgid "Reload active plugins" msgstr "" -#: mod/admin.php:1367 +#: mod/admin.php:1472 +#, php-format +msgid "" +"There are currently no plugins available on your node. You can find the " +"official plugin repository at %1$s and might find other interesting plugins " +"in the open plugin registry at %2$s" +msgstr "" + +#: mod/admin.php:1577 msgid "No themes found." msgstr "Geen thema's gevonden." -#: mod/admin.php:1445 +#: mod/admin.php:1655 msgid "Screenshot" msgstr "Schermafdruk" -#: mod/admin.php:1505 +#: mod/admin.php:1715 msgid "Reload active themes" msgstr "" -#: mod/admin.php:1509 +#: mod/admin.php:1720 +#, php-format +msgid "No themes found on the system. They should be paced in %1$s" +msgstr "" + +#: mod/admin.php:1721 msgid "[Experimental]" msgstr "[Experimenteel]" -#: mod/admin.php:1510 +#: mod/admin.php:1722 msgid "[Unsupported]" msgstr "[Niet ondersteund]" -#: mod/admin.php:1537 +#: mod/admin.php:1746 msgid "Log settings updated." msgstr "Log instellingen gewijzigd" -#: mod/admin.php:1593 +#: mod/admin.php:1783 msgid "Clear" msgstr "Wis" -#: mod/admin.php:1599 +#: mod/admin.php:1788 msgid "Enable Debugging" msgstr "" -#: mod/admin.php:1600 +#: mod/admin.php:1789 msgid "Log file" msgstr "Logbestand" -#: mod/admin.php:1600 +#: mod/admin.php:1789 msgid "" "Must be writable by web server. Relative to your Friendica top-level " "directory." msgstr "De webserver moet hier kunnen schrijven. Relatief t.o.v. van de hoogste folder binnen uw Friendica-installatie." -#: mod/admin.php:1601 +#: mod/admin.php:1790 msgid "Log level" msgstr "Log niveau" -#: mod/admin.php:1651 include/acl_selectors.php:347 -msgid "Close" -msgstr "Afsluiten" +#: mod/admin.php:1793 +msgid "PHP logging" +msgstr "" -#: mod/admin.php:1657 -msgid "FTP Host" -msgstr "FTP Server" +#: mod/admin.php:1794 +msgid "" +"To enable logging of PHP errors and warnings you can add the following to " +"the .htconfig.php file of your installation. The filename set in the " +"'error_log' line is relative to the friendica top-level directory and must " +"be writeable by the web server. The option '1' for 'log_errors' and " +"'display_errors' is to enable these options, set to '0' to disable them." +msgstr "" -#: mod/admin.php:1658 -msgid "FTP Path" -msgstr "FTP Pad" +#: mod/admin.php:1920 mod/admin.php:1921 mod/settings.php:759 +msgid "Off" +msgstr "Uit" -#: mod/admin.php:1659 -msgid "FTP User" -msgstr "FTP Gebruiker" +#: mod/admin.php:1920 mod/admin.php:1921 mod/settings.php:759 +msgid "On" +msgstr "Aan" -#: mod/admin.php:1660 -msgid "FTP Password" -msgstr "FTP wachtwoord" +#: mod/admin.php:1921 +#, php-format +msgid "Lock feature %s" +msgstr "" -#: mod/network.php:143 +#: mod/admin.php:1929 +msgid "Manage Additional Features" +msgstr "" + +#: mod/network.php:146 #, php-format msgid "Search Results For: %s" msgstr "" -#: mod/network.php:195 mod/search.php:25 +#: mod/network.php:191 mod/search.php:25 msgid "Remove term" msgstr "Verwijder zoekterm" -#: mod/network.php:204 mod/search.php:34 include/features.php:43 +#: mod/network.php:200 mod/search.php:34 include/features.php:84 msgid "Saved Searches" msgstr "Opgeslagen zoekopdrachten" -#: mod/network.php:205 include/group.php:279 +#: mod/network.php:201 include/group.php:293 msgid "add" msgstr "toevoegen" -#: mod/network.php:366 +#: mod/network.php:365 msgid "Commented Order" msgstr "Nieuwe reacties bovenaan" -#: mod/network.php:369 +#: mod/network.php:368 msgid "Sort by Comment Date" msgstr "Berichten met nieuwe reacties bovenaan" -#: mod/network.php:374 +#: mod/network.php:373 msgid "Posted Order" msgstr "Nieuwe berichten bovenaan" -#: mod/network.php:377 +#: mod/network.php:376 msgid "Sort by Post Date" msgstr "Nieuwe berichten bovenaan" -#: mod/network.php:388 +#: mod/network.php:387 msgid "Posts that mention or involve you" msgstr "Alleen berichten die jou vermelden of op jou betrekking hebben" -#: mod/network.php:396 +#: mod/network.php:395 msgid "New" msgstr "Nieuw" -#: mod/network.php:399 +#: mod/network.php:398 msgid "Activity Stream - by date" msgstr "Activiteitenstroom - volgens datum" -#: mod/network.php:407 +#: mod/network.php:406 msgid "Shared Links" msgstr "Gedeelde links" -#: mod/network.php:410 +#: mod/network.php:409 msgid "Interesting Links" msgstr "Interessante links" -#: mod/network.php:418 +#: mod/network.php:417 msgid "Starred" msgstr "Met ster" -#: mod/network.php:421 +#: mod/network.php:420 msgid "Favourite Posts" msgstr "Favoriete berichten" -#: mod/network.php:480 +#: mod/network.php:479 #, php-format msgid "Warning: This group contains %s member from an insecure network." msgid_plural "" @@ -3259,49 +3307,31 @@ msgid_plural "" msgstr[0] "Waarschuwing: Deze groep bevat %s lid van een onveilig netwerk." msgstr[1] "Waarschuwing: Deze groep bevat %s leden van een onveilig netwerk." -#: mod/network.php:483 +#: mod/network.php:482 msgid "Private messages to this group are at risk of public disclosure." msgstr "Privéberichten naar deze groep kunnen openbaar gemaakt worden." -#: mod/network.php:550 mod/content.php:119 +#: mod/network.php:549 mod/content.php:119 msgid "No such group" msgstr "Zo'n groep bestaat niet" -#: mod/network.php:567 mod/content.php:130 -msgid "Group is empty" -msgstr "De groep is leeg" - -#: mod/network.php:578 mod/content.php:135 +#: mod/network.php:580 mod/content.php:135 #, php-format msgid "Group: %s" msgstr "" -#: mod/network.php:596 -#, php-format -msgid "Contact: %s" -msgstr "" - -#: mod/network.php:600 +#: mod/network.php:608 msgid "Private messages to this person are at risk of public disclosure." msgstr "Privéberichten naar deze persoon kunnen openbaar gemaakt worden." -#: mod/network.php:605 +#: mod/network.php:613 msgid "Invalid contact." msgstr "Ongeldig contact." -#: mod/allfriends.php:45 +#: mod/allfriends.php:43 msgid "No friends to display." msgstr "Geen vrienden om te laten zien." -#: mod/allfriends.php:79 mod/common.php:122 -msgid "Forum" -msgstr "" - -#: mod/allfriends.php:92 -#, php-format -msgid "Friends of %s" -msgstr "Vrienden van %s" - #: mod/events.php:71 mod/events.php:73 msgid "Event can not end before it has started." msgstr "" @@ -3338,31 +3368,31 @@ msgstr "" msgid "Sat" msgstr "" -#: mod/events.php:208 mod/settings.php:936 include/text.php:1267 +#: mod/events.php:208 mod/settings.php:948 include/text.php:1274 msgid "Sunday" msgstr "Zondag" -#: mod/events.php:209 mod/settings.php:936 include/text.php:1267 +#: mod/events.php:209 mod/settings.php:948 include/text.php:1274 msgid "Monday" msgstr "Maandag" -#: mod/events.php:210 include/text.php:1267 +#: mod/events.php:210 include/text.php:1274 msgid "Tuesday" msgstr "Dinsdag" -#: mod/events.php:211 include/text.php:1267 +#: mod/events.php:211 include/text.php:1274 msgid "Wednesday" msgstr "Woensdag" -#: mod/events.php:212 include/text.php:1267 +#: mod/events.php:212 include/text.php:1274 msgid "Thursday" msgstr "Donderdag" -#: mod/events.php:213 include/text.php:1267 +#: mod/events.php:213 include/text.php:1274 msgid "Friday" msgstr "Vrijdag" -#: mod/events.php:214 include/text.php:1267 +#: mod/events.php:214 include/text.php:1274 msgid "Saturday" msgstr "Zaterdag" @@ -3382,7 +3412,7 @@ msgstr "" msgid "Apr" msgstr "" -#: mod/events.php:219 mod/events.php:231 include/text.php:1271 +#: mod/events.php:219 mod/events.php:231 include/text.php:1278 msgid "May" msgstr "Mei" @@ -3414,47 +3444,47 @@ msgstr "" msgid "Dec" msgstr "" -#: mod/events.php:227 include/text.php:1271 +#: mod/events.php:227 include/text.php:1278 msgid "January" msgstr "Januari" -#: mod/events.php:228 include/text.php:1271 +#: mod/events.php:228 include/text.php:1278 msgid "February" msgstr "Februari" -#: mod/events.php:229 include/text.php:1271 +#: mod/events.php:229 include/text.php:1278 msgid "March" msgstr "Maart" -#: mod/events.php:230 include/text.php:1271 +#: mod/events.php:230 include/text.php:1278 msgid "April" msgstr "April" -#: mod/events.php:232 include/text.php:1271 +#: mod/events.php:232 include/text.php:1278 msgid "June" msgstr "Juni" -#: mod/events.php:233 include/text.php:1271 +#: mod/events.php:233 include/text.php:1278 msgid "July" msgstr "Juli" -#: mod/events.php:234 include/text.php:1271 +#: mod/events.php:234 include/text.php:1278 msgid "August" msgstr "Augustus" -#: mod/events.php:235 include/text.php:1271 +#: mod/events.php:235 include/text.php:1278 msgid "September" msgstr "September" -#: mod/events.php:236 include/text.php:1271 +#: mod/events.php:236 include/text.php:1278 msgid "October" msgstr "Oktober" -#: mod/events.php:237 include/text.php:1271 +#: mod/events.php:237 include/text.php:1278 msgid "November" msgstr "November" -#: mod/events.php:238 include/text.php:1271 +#: mod/events.php:238 include/text.php:1278 msgid "December" msgstr "December" @@ -3482,11 +3512,11 @@ msgstr "l j F" msgid "Edit event" msgstr "Gebeurtenis bewerken" -#: mod/events.php:421 include/text.php:1714 include/text.php:1721 +#: mod/events.php:421 include/text.php:1721 include/text.php:1728 msgid "link to source" msgstr "Verwijzing naar bron" -#: mod/events.php:456 include/identity.php:669 include/nav.php:79 +#: mod/events.php:456 include/identity.php:722 include/nav.php:79 #: include/nav.php:140 view/theme/diabook/theme.php:127 msgid "Events" msgstr "Gebeurtenissen" @@ -3499,7 +3529,7 @@ msgstr "Maak een nieuwe gebeurtenis" msgid "Previous" msgstr "Vorige" -#: mod/events.php:459 mod/install.php:212 +#: mod/events.php:459 mod/install.php:220 msgid "Next" msgstr "Volgende" @@ -3543,9 +3573,9 @@ msgstr "Titel:" msgid "Share this event" msgstr "Deel deze gebeurtenis" -#: mod/events.php:572 mod/content.php:721 mod/editpost.php:144 -#: mod/photos.php:1623 mod/photos.php:1671 mod/photos.php:1759 -#: object/Item.php:719 include/conversation.php:1217 +#: mod/events.php:572 mod/content.php:721 mod/editpost.php:145 +#: mod/photos.php:1631 mod/photos.php:1679 mod/photos.php:1767 +#: object/Item.php:719 include/conversation.php:1216 msgid "Preview" msgstr "Voorvertoning" @@ -3560,7 +3590,7 @@ msgid "" "code or the translation of Friendica. Thank you all!" msgstr "" -#: mod/content.php:439 mod/content.php:742 mod/photos.php:1714 +#: mod/content.php:439 mod/content.php:742 mod/photos.php:1722 #: object/Item.php:133 include/conversation.php:634 msgid "Select" msgstr "Kies" @@ -3589,22 +3619,23 @@ msgstr[0] "%d reactie" msgstr[1] "%d reacties" #: mod/content.php:607 object/Item.php:421 object/Item.php:434 -#: include/text.php:1992 +#: include/text.php:1997 msgid "comment" msgid_plural "comments" msgstr[0] "reactie" msgstr[1] "reacties" -#: mod/content.php:608 boot.php:773 object/Item.php:422 -#: include/contact_widgets.php:205 include/items.php:5214 +#: mod/content.php:608 boot.php:863 object/Item.php:422 +#: include/contact_widgets.php:242 include/forums.php:110 +#: include/items.php:5184 view/theme/vier/theme.php:264 msgid "show more" msgstr "toon meer" -#: mod/content.php:622 mod/photos.php:1410 object/Item.php:117 +#: mod/content.php:622 mod/photos.php:1418 object/Item.php:117 msgid "Private Message" msgstr "Privébericht" -#: mod/content.php:686 mod/photos.php:1599 object/Item.php:253 +#: mod/content.php:686 mod/photos.php:1607 object/Item.php:253 msgid "I like this (toggle)" msgstr "Vind ik leuk" @@ -3612,7 +3643,7 @@ msgstr "Vind ik leuk" msgid "like" msgstr "leuk" -#: mod/content.php:687 mod/photos.php:1600 object/Item.php:254 +#: mod/content.php:687 mod/photos.php:1608 object/Item.php:254 msgid "I don't like this (toggle)" msgstr "Vind ik niet leuk" @@ -3628,13 +3659,13 @@ msgstr "Delen" msgid "share" msgstr "Delen" -#: mod/content.php:709 mod/photos.php:1619 mod/photos.php:1667 -#: mod/photos.php:1755 object/Item.php:707 +#: mod/content.php:709 mod/photos.php:1627 mod/photos.php:1675 +#: mod/photos.php:1763 object/Item.php:707 msgid "This is you" msgstr "Dit ben jij" -#: mod/content.php:711 mod/photos.php:1621 mod/photos.php:1669 -#: mod/photos.php:1757 boot.php:772 object/Item.php:393 object/Item.php:709 +#: mod/content.php:711 mod/photos.php:1629 mod/photos.php:1677 +#: mod/photos.php:1765 boot.php:862 object/Item.php:393 object/Item.php:709 msgid "Comment" msgstr "Reacties" @@ -3670,7 +3701,7 @@ msgstr "Link" msgid "Video" msgstr "Video" -#: mod/content.php:730 mod/settings.php:710 object/Item.php:122 +#: mod/content.php:730 mod/settings.php:721 object/Item.php:122 #: object/Item.php:124 msgid "Edit" msgstr "Bewerken" @@ -3725,105 +3756,105 @@ msgstr "Dit zal je account volledig verwijderen. Dit kan niet hersteld worden al msgid "Please enter your password for verification:" msgstr "Voer je wachtwoord in voor verificatie:" -#: mod/install.php:120 +#: mod/install.php:128 msgid "Friendica Communications Server - Setup" msgstr "" -#: mod/install.php:126 +#: mod/install.php:134 msgid "Could not connect to database." msgstr "Kon geen toegang krijgen tot de database." -#: mod/install.php:130 +#: mod/install.php:138 msgid "Could not create table." msgstr "Kon tabel niet aanmaken." -#: mod/install.php:136 +#: mod/install.php:144 msgid "Your Friendica site database has been installed." msgstr "De database van je Friendica-website is geïnstalleerd." -#: mod/install.php:141 +#: mod/install.php:149 msgid "" "You may need to import the file \"database.sql\" manually using phpmyadmin " "or mysql." msgstr "Het kan nodig zijn om het bestand \"database.sql\" manueel te importeren met phpmyadmin of mysql." -#: mod/install.php:142 mod/install.php:211 mod/install.php:569 +#: mod/install.php:150 mod/install.php:219 mod/install.php:577 msgid "Please see the file \"INSTALL.txt\"." msgstr "Zie het bestand \"INSTALL.txt\"." -#: mod/install.php:154 +#: mod/install.php:162 msgid "Database already in use." msgstr "" -#: mod/install.php:208 +#: mod/install.php:216 msgid "System check" msgstr "Systeemcontrole" -#: mod/install.php:213 +#: mod/install.php:221 msgid "Check again" msgstr "Controleer opnieuw" -#: mod/install.php:232 +#: mod/install.php:240 msgid "Database connection" msgstr "Verbinding met database" -#: mod/install.php:233 +#: mod/install.php:241 msgid "" "In order to install Friendica we need to know how to connect to your " "database." msgstr "Om Friendica te kunnen installeren moet ik weten hoe ik jouw database kan bereiken." -#: mod/install.php:234 +#: mod/install.php:242 msgid "" "Please contact your hosting provider or site administrator if you have " "questions about these settings." msgstr "Neem contact op met jouw hostingprovider of websitebeheerder, wanneer je vragen hebt over deze instellingen. " -#: mod/install.php:235 +#: mod/install.php:243 msgid "" "The database you specify below should already exist. If it does not, please " "create it before continuing." msgstr "De database die je hier opgeeft zou al moeten bestaan. Maak anders de database aan voordat je verder gaat." -#: mod/install.php:239 +#: mod/install.php:247 msgid "Database Server Name" msgstr "Servernaam database" -#: mod/install.php:240 +#: mod/install.php:248 msgid "Database Login Name" msgstr "Gebruikersnaam database" -#: mod/install.php:241 +#: mod/install.php:249 msgid "Database Login Password" msgstr "Wachtwoord database" -#: mod/install.php:242 +#: mod/install.php:250 msgid "Database Name" msgstr "Naam database" -#: mod/install.php:243 mod/install.php:282 +#: mod/install.php:251 mod/install.php:290 msgid "Site administrator email address" msgstr "E-mailadres van de websitebeheerder" -#: mod/install.php:243 mod/install.php:282 +#: mod/install.php:251 mod/install.php:290 msgid "" "Your account email address must match this in order to use the web admin " "panel." msgstr "Het e-mailadres van je account moet hiermee overeenkomen om het administratiepaneel te kunnen gebruiken." -#: mod/install.php:247 mod/install.php:285 +#: mod/install.php:255 mod/install.php:293 msgid "Please select a default timezone for your website" msgstr "Selecteer een standaard tijdzone voor uw website" -#: mod/install.php:272 +#: mod/install.php:280 msgid "Site settings" msgstr "Website-instellingen" -#: mod/install.php:326 +#: mod/install.php:334 msgid "Could not find a command line version of PHP in the web server PATH." msgstr "Kan geen command-line-versie van PHP vinden in het PATH van de webserver." -#: mod/install.php:327 +#: mod/install.php:335 msgid "" "If you don't have a command line version of PHP installed on server, you " "will not be able to run background polling via cron. See 'Setup the poller'" msgstr "" -#: mod/install.php:331 +#: mod/install.php:339 msgid "PHP executable path" msgstr "PATH van het PHP commando" -#: mod/install.php:331 +#: mod/install.php:339 msgid "" "Enter full path to php executable. You can leave this blank to continue the " "installation." msgstr "Vul het volledige path in naar het php programma. Je kunt dit blanco laten om de installatie verder te zetten." -#: mod/install.php:336 +#: mod/install.php:344 msgid "Command line PHP" msgstr "PHP-opdrachtregel" -#: mod/install.php:345 +#: mod/install.php:353 msgid "PHP executable is not the php cli binary (could be cgi-fgci version)" msgstr "" -#: mod/install.php:346 +#: mod/install.php:354 msgid "Found PHP version: " msgstr "Gevonden PHP versie:" -#: mod/install.php:348 +#: mod/install.php:356 msgid "PHP cli binary" msgstr "" -#: mod/install.php:359 +#: mod/install.php:367 msgid "" "The command line version of PHP on your system does not have " "\"register_argc_argv\" enabled." msgstr "De command-line versie van PHP op jouw systeem heeft \"register_argc_argv\" niet geactiveerd." -#: mod/install.php:360 +#: mod/install.php:368 msgid "This is required for message delivery to work." msgstr "Dit is nodig om het verzenden van berichten mogelijk te maken." -#: mod/install.php:362 +#: mod/install.php:370 msgid "PHP register_argc_argv" msgstr "PHP register_argc_argv" -#: mod/install.php:383 +#: mod/install.php:391 msgid "" "Error: the \"openssl_pkey_new\" function on this system is not able to " "generate encryption keys" msgstr "" -#: mod/install.php:384 +#: mod/install.php:392 msgid "" "If running under Windows, please see " "\"http://www.php.net/manual/en/openssl.installation.php\"." msgstr "Zie \"http://www.php.net/manual/en/openssl.installation.php\" wanneer u Friendica onder Windows draait." -#: mod/install.php:386 +#: mod/install.php:394 msgid "Generate encryption keys" msgstr "" -#: mod/install.php:393 +#: mod/install.php:401 msgid "libCurl PHP module" msgstr "libCurl PHP module" -#: mod/install.php:394 +#: mod/install.php:402 msgid "GD graphics PHP module" msgstr "GD graphics PHP module" -#: mod/install.php:395 +#: mod/install.php:403 msgid "OpenSSL PHP module" msgstr "OpenSSL PHP module" -#: mod/install.php:396 +#: mod/install.php:404 msgid "mysqli PHP module" msgstr "mysqli PHP module" -#: mod/install.php:397 +#: mod/install.php:405 msgid "mb_string PHP module" msgstr "mb_string PHP module" -#: mod/install.php:398 +#: mod/install.php:406 msgid "mcrypt PHP module" msgstr "" -#: mod/install.php:403 mod/install.php:405 +#: mod/install.php:411 mod/install.php:413 msgid "Apache mod_rewrite module" msgstr "Apache mod_rewrite module" -#: mod/install.php:403 +#: mod/install.php:411 msgid "" "Error: Apache webserver mod-rewrite module is required but not installed." msgstr "Fout: Apache-module mod-rewrite is vereist, maar niet geïnstalleerd." -#: mod/install.php:411 +#: mod/install.php:419 msgid "Error: libCURL PHP module required but not installed." msgstr "Fout: PHP-module libCURL is vereist, maar niet geïnstalleerd." -#: mod/install.php:415 +#: mod/install.php:423 msgid "" "Error: GD graphics PHP module with JPEG support required but not installed." msgstr "Fout: PHP-module GD graphics met JPEG support is vereist, maar niet geïnstalleerd." -#: mod/install.php:419 +#: mod/install.php:427 msgid "Error: openssl PHP module required but not installed." msgstr "Fout: PHP-module openssl is vereist, maar niet geïnstalleerd." -#: mod/install.php:423 +#: mod/install.php:431 msgid "Error: mysqli PHP module required but not installed." msgstr "Fout: PHP-module mysqli is vereist, maar niet geïnstalleerd." -#: mod/install.php:427 +#: mod/install.php:435 msgid "Error: mb_string PHP module required but not installed." msgstr "Fout: PHP-module mb_string is vereist, maar niet geïnstalleerd." -#: mod/install.php:431 +#: mod/install.php:439 msgid "Error: mcrypt PHP module required but not installed." msgstr "" -#: mod/install.php:443 +#: mod/install.php:451 msgid "" "Function mcrypt_create_iv() is not defined. This is needed to enable RINO2 " "encryption layer." msgstr "" -#: mod/install.php:445 +#: mod/install.php:453 msgid "mcrypt_create_iv() function" msgstr "" -#: mod/install.php:461 +#: mod/install.php:469 msgid "" "The web installer needs to be able to create a file called \".htconfig.php\"" " in the top folder of your web server and it is unable to do so." msgstr "Het installatieprogramma moet een bestand \".htconfig.php\" in de bovenste map van je webserver aanmaken, maar kan dit niet doen." -#: mod/install.php:462 +#: mod/install.php:470 msgid "" "This is most often a permission setting, as the web server may not be able " "to write files in your folder - even if you can." msgstr "Dit is meestal een permissieprobleem, omdat de webserver niet in staat is om in deze map bestanden weg te schrijven - ook al kun je dit zelf wel." -#: mod/install.php:463 +#: mod/install.php:471 msgid "" "At the end of this procedure, we will give you a text to save in a file " "named .htconfig.php in your Friendica top folder." msgstr "Op het einde van deze procedure zal ik je een tekst geven om te bewaren in een bestand .htconfig.php in je hoogste Friendica map." -#: mod/install.php:464 +#: mod/install.php:472 msgid "" "You can alternatively skip this procedure and perform a manual installation." " Please see the file \"INSTALL.txt\" for instructions." msgstr "Je kunt ook deze procedure overslaan, en een manuele installatie uitvoeren. Lees het bestand \"INSTALL.txt\" voor instructies." -#: mod/install.php:467 +#: mod/install.php:475 msgid ".htconfig.php is writable" msgstr ".htconfig.php is schrijfbaar" -#: mod/install.php:477 +#: mod/install.php:485 msgid "" "Friendica uses the Smarty3 template engine to render its web views. Smarty3 " "compiles templates to PHP to speed up rendering." msgstr "Friendica gebruikt het Smarty3 sjabloon systeem om zijn webpagina's weer te geven. Smarty3 compileert sjablonen naar PHP om de weergave te versnellen." -#: mod/install.php:478 +#: mod/install.php:486 msgid "" "In order to store these compiled templates, the web server needs to have " "write access to the directory view/smarty3/ under the Friendica top level " "folder." msgstr "Om deze gecompileerde sjablonen op te slaan moet de webserver schrijftoegang hebben tot de folder view/smarty3, t.o.v. van de hoogste folder van je Friendica-installatie." -#: mod/install.php:479 +#: mod/install.php:487 msgid "" "Please ensure that the user that your web server runs as (e.g. www-data) has" " write access to this folder." msgstr "Zorg ervoor dat de gebruiker waaronder je webserver runt (bijv. www-data) schrijf-toegang heeft tot deze map." -#: mod/install.php:480 +#: mod/install.php:488 msgid "" "Note: as a security measure, you should give the web server write access to " "view/smarty3/ only--not the template files (.tpl) that it contains." msgstr "Opmerking: voor een goede beveiliging zou je de webserver alleen schrijf-toegang moeten geven voor de map view/smarty3 -- niet voor de template bestanden (.tpl) die in die map zitten." -#: mod/install.php:483 +#: mod/install.php:491 msgid "view/smarty3 is writable" msgstr "view/smarty3 is schrijfbaar" -#: mod/install.php:499 +#: mod/install.php:507 msgid "" "Url rewrite in .htaccess is not working. Check your server configuration." msgstr "" -#: mod/install.php:501 +#: mod/install.php:509 msgid "Url rewrite is working" msgstr "" -#: mod/install.php:518 +#: mod/install.php:526 msgid "ImageMagick PHP extension is installed" msgstr "" -#: mod/install.php:520 +#: mod/install.php:528 msgid "ImageMagick supports GIF" msgstr "" -#: mod/install.php:528 +#: mod/install.php:536 msgid "" "The database configuration file \".htconfig.php\" could not be written. " "Please use the enclosed text to create a configuration file in your web " "server root." msgstr "Het databaseconfiguratiebestand \".htconfig.php\" kon niet worden weggeschreven. Je kunt de bijgevoegde tekst gebruiken om in een configuratiebestand aan te maken in de hoogste map van je webserver." -#: mod/install.php:567 +#: mod/install.php:575 msgid "

      What next

      " msgstr "

      Wat nu

      " -#: mod/install.php:568 +#: mod/install.php:576 msgid "" "IMPORTANT: You will need to [manually] setup a scheduled task for the " "poller." @@ -4066,19 +4097,19 @@ msgid "" "your site allow private mail from unknown senders." msgstr "Als je wilt dat %s antwoordt moet je nakijken dat de privacy-instellingen op jouw website privéberichten van onbekende afzenders toelaat." -#: mod/help.php:31 +#: mod/help.php:41 msgid "Help:" msgstr "Help:" -#: mod/help.php:36 include/nav.php:113 view/theme/vier/theme.php:273 +#: mod/help.php:47 include/nav.php:113 view/theme/vier/theme.php:302 msgid "Help" msgstr "Help" -#: mod/help.php:42 mod/p.php:16 mod/p.php:25 index.php:269 +#: mod/help.php:53 mod/p.php:16 mod/p.php:25 index.php:270 msgid "Not Found" msgstr "Niet gevonden" -#: mod/help.php:45 index.php:272 +#: mod/help.php:56 index.php:273 msgid "Page not found." msgstr "Pagina niet gevonden" @@ -4113,11 +4144,11 @@ msgstr "Uploaden van bestand mislukt." msgid "No keywords to match. Please add keywords to your default profile." msgstr "Geen sleutelwoorden om te zoeken. Voeg sleutelwoorden toe aan je standaard profiel." -#: mod/match.php:83 +#: mod/match.php:84 msgid "is interested in:" msgstr "Is geïnteresseerd in:" -#: mod/match.php:97 +#: mod/match.php:98 msgid "Profile Match" msgstr "Profielmatch" @@ -4134,727 +4165,715 @@ msgstr "Niet beschikbaar" msgid "Community" msgstr "Website" -#: mod/community.php:62 mod/community.php:71 mod/search.php:218 +#: mod/community.php:62 mod/community.php:71 mod/search.php:228 msgid "No results." msgstr "Geen resultaten." -#: mod/settings.php:34 mod/photos.php:109 +#: mod/settings.php:34 mod/photos.php:117 msgid "everybody" msgstr "iedereen" -#: mod/settings.php:47 -msgid "Additional features" -msgstr "Extra functies" - -#: mod/settings.php:53 +#: mod/settings.php:58 msgid "Display" msgstr "Weergave" -#: mod/settings.php:60 mod/settings.php:853 +#: mod/settings.php:65 mod/settings.php:864 msgid "Social Networks" msgstr "Sociale netwerken" -#: mod/settings.php:72 include/nav.php:180 +#: mod/settings.php:79 include/nav.php:180 msgid "Delegations" msgstr "" -#: mod/settings.php:78 +#: mod/settings.php:86 msgid "Connected apps" msgstr "Verbonden applicaties" -#: mod/settings.php:84 mod/uexport.php:85 +#: mod/settings.php:93 mod/uexport.php:85 msgid "Export personal data" msgstr "Persoonlijke gegevens exporteren" -#: mod/settings.php:90 +#: mod/settings.php:100 msgid "Remove account" msgstr "Account verwijderen" -#: mod/settings.php:143 +#: mod/settings.php:153 msgid "Missing some important data!" msgstr "Een belangrijk gegeven ontbreekt!" -#: mod/settings.php:256 +#: mod/settings.php:266 msgid "Failed to connect with email account using the settings provided." msgstr "Ik kon geen verbinding maken met het e-mail account met de gegeven instellingen." -#: mod/settings.php:261 +#: mod/settings.php:271 msgid "Email settings updated." msgstr "E-mail instellingen bijgewerkt.." -#: mod/settings.php:276 +#: mod/settings.php:286 msgid "Features updated" msgstr "Functies bijgewerkt" -#: mod/settings.php:341 +#: mod/settings.php:353 msgid "Relocate message has been send to your contacts" msgstr "" -#: mod/settings.php:355 include/user.php:39 +#: mod/settings.php:367 include/user.php:39 msgid "Passwords do not match. Password unchanged." msgstr "Wachtwoorden komen niet overeen. Wachtwoord niet gewijzigd." -#: mod/settings.php:360 +#: mod/settings.php:372 msgid "Empty passwords are not allowed. Password unchanged." msgstr "Lege wachtwoorden zijn niet toegelaten. Wachtwoord niet gewijzigd." -#: mod/settings.php:368 +#: mod/settings.php:380 msgid "Wrong password." msgstr "Verkeerd wachtwoord." -#: mod/settings.php:379 +#: mod/settings.php:391 msgid "Password changed." msgstr "Wachtwoord gewijzigd." -#: mod/settings.php:381 +#: mod/settings.php:393 msgid "Password update failed. Please try again." msgstr "Wachtwoord-)wijziging mislukt. Probeer opnieuw." -#: mod/settings.php:450 +#: mod/settings.php:462 msgid " Please use a shorter name." msgstr "Gebruik een kortere naam." -#: mod/settings.php:452 +#: mod/settings.php:464 msgid " Name too short." msgstr "Naam te kort." -#: mod/settings.php:461 +#: mod/settings.php:473 msgid "Wrong Password" msgstr "Verkeerd wachtwoord" -#: mod/settings.php:466 +#: mod/settings.php:478 msgid " Not valid email." msgstr "Geen geldig e-mailadres." -#: mod/settings.php:472 +#: mod/settings.php:484 msgid " Cannot change to that email." msgstr "Kan niet veranderen naar die e-mail." -#: mod/settings.php:528 +#: mod/settings.php:540 msgid "Private forum has no privacy permissions. Using default privacy group." msgstr "Privéforum/-groep heeft geen privacyrechten. De standaard privacygroep wordt gebruikt." -#: mod/settings.php:532 +#: mod/settings.php:544 msgid "Private forum has no privacy permissions and no default privacy group." msgstr "Privéforum/-groep heeft geen privacyrechten en geen standaard privacygroep." -#: mod/settings.php:571 +#: mod/settings.php:583 msgid "Settings updated." msgstr "Instellingen bijgewerkt." -#: mod/settings.php:647 mod/settings.php:673 mod/settings.php:709 +#: mod/settings.php:658 mod/settings.php:684 mod/settings.php:720 msgid "Add application" msgstr "Toepassing toevoegen" -#: mod/settings.php:651 mod/settings.php:677 +#: mod/settings.php:662 mod/settings.php:688 msgid "Consumer Key" msgstr "Gebruikerssleutel" -#: mod/settings.php:652 mod/settings.php:678 +#: mod/settings.php:663 mod/settings.php:689 msgid "Consumer Secret" msgstr "Gebruikersgeheim" -#: mod/settings.php:653 mod/settings.php:679 +#: mod/settings.php:664 mod/settings.php:690 msgid "Redirect" msgstr "Doorverwijzing" -#: mod/settings.php:654 mod/settings.php:680 +#: mod/settings.php:665 mod/settings.php:691 msgid "Icon url" msgstr "URL pictogram" -#: mod/settings.php:665 +#: mod/settings.php:676 msgid "You can't edit this application." msgstr "Je kunt deze toepassing niet wijzigen." -#: mod/settings.php:708 +#: mod/settings.php:719 msgid "Connected Apps" msgstr "Verbonden applicaties" -#: mod/settings.php:712 +#: mod/settings.php:723 msgid "Client key starts with" msgstr "" -#: mod/settings.php:713 +#: mod/settings.php:724 msgid "No name" msgstr "Geen naam" -#: mod/settings.php:714 +#: mod/settings.php:725 msgid "Remove authorization" msgstr "Verwijder authorisatie" -#: mod/settings.php:726 +#: mod/settings.php:737 msgid "No Plugin settings configured" msgstr "" -#: mod/settings.php:734 +#: mod/settings.php:745 msgid "Plugin Settings" msgstr "Plugin Instellingen" -#: mod/settings.php:748 -msgid "Off" -msgstr "Uit" - -#: mod/settings.php:748 -msgid "On" -msgstr "Aan" - -#: mod/settings.php:756 +#: mod/settings.php:767 msgid "Additional Features" msgstr "Extra functies" -#: mod/settings.php:766 mod/settings.php:770 +#: mod/settings.php:777 mod/settings.php:781 msgid "General Social Media Settings" msgstr "" -#: mod/settings.php:776 +#: mod/settings.php:787 msgid "Disable intelligent shortening" msgstr "" -#: mod/settings.php:778 +#: mod/settings.php:789 msgid "" "Normally the system tries to find the best link to add to shortened posts. " "If this option is enabled then every shortened post will always point to the" " original friendica post." msgstr "" -#: mod/settings.php:784 +#: mod/settings.php:795 msgid "Automatically follow any GNU Social (OStatus) followers/mentioners" msgstr "" -#: mod/settings.php:786 +#: mod/settings.php:797 msgid "" "If you receive a message from an unknown OStatus user, this option decides " "what to do. If it is checked, a new contact will be created for every " "unknown user." msgstr "" -#: mod/settings.php:795 +#: mod/settings.php:806 msgid "Your legacy GNU Social account" msgstr "" -#: mod/settings.php:797 +#: mod/settings.php:808 msgid "" "If you enter your old GNU Social/Statusnet account name here (in the format " "user@domain.tld), your contacts will be added automatically. The field will " "be emptied when done." msgstr "" -#: mod/settings.php:800 +#: mod/settings.php:811 msgid "Repair OStatus subscriptions" msgstr "" -#: mod/settings.php:809 mod/settings.php:810 +#: mod/settings.php:820 mod/settings.php:821 #, php-format msgid "Built-in support for %s connectivity is %s" msgstr "Ingebouwde ondersteuning voor connectiviteit met %s is %s" -#: mod/settings.php:809 mod/dfrn_request.php:856 +#: mod/settings.php:820 mod/dfrn_request.php:865 #: include/contact_selectors.php:80 msgid "Diaspora" msgstr "Diaspora" -#: mod/settings.php:809 mod/settings.php:810 +#: mod/settings.php:820 mod/settings.php:821 msgid "enabled" msgstr "ingeschakeld" -#: mod/settings.php:809 mod/settings.php:810 +#: mod/settings.php:820 mod/settings.php:821 msgid "disabled" msgstr "uitgeschakeld" -#: mod/settings.php:810 +#: mod/settings.php:821 msgid "GNU Social (OStatus)" msgstr "" -#: mod/settings.php:846 +#: mod/settings.php:857 msgid "Email access is disabled on this site." msgstr "E-mailtoegang is op deze website uitgeschakeld." -#: mod/settings.php:858 +#: mod/settings.php:869 msgid "Email/Mailbox Setup" msgstr "E-mail Instellen" -#: mod/settings.php:859 +#: mod/settings.php:870 msgid "" "If you wish to communicate with email contacts using this service " "(optional), please specify how to connect to your mailbox." msgstr "Als je wilt communiceren met e-mail contacten via deze dienst (optioneel), moet je hier opgeven hoe ik jouw mailbox kan bereiken." -#: mod/settings.php:860 +#: mod/settings.php:871 msgid "Last successful email check:" msgstr "Laatste succesvolle e-mail controle:" -#: mod/settings.php:862 +#: mod/settings.php:873 msgid "IMAP server name:" msgstr "IMAP server naam:" -#: mod/settings.php:863 +#: mod/settings.php:874 msgid "IMAP port:" msgstr "IMAP poort:" -#: mod/settings.php:864 +#: mod/settings.php:875 msgid "Security:" msgstr "Beveiliging:" -#: mod/settings.php:864 mod/settings.php:869 +#: mod/settings.php:875 mod/settings.php:880 msgid "None" msgstr "Geen" -#: mod/settings.php:865 +#: mod/settings.php:876 msgid "Email login name:" msgstr "E-mail login naam:" -#: mod/settings.php:866 +#: mod/settings.php:877 msgid "Email password:" msgstr "E-mail wachtwoord:" -#: mod/settings.php:867 +#: mod/settings.php:878 msgid "Reply-to address:" msgstr "Antwoord adres:" -#: mod/settings.php:868 +#: mod/settings.php:879 msgid "Send public posts to all email contacts:" msgstr "Openbare posts naar alle e-mail contacten versturen:" -#: mod/settings.php:869 +#: mod/settings.php:880 msgid "Action after import:" msgstr "Actie na importeren:" -#: mod/settings.php:869 +#: mod/settings.php:880 msgid "Mark as seen" msgstr "Als 'gelezen' markeren" -#: mod/settings.php:869 +#: mod/settings.php:880 msgid "Move to folder" msgstr "Naar map verplaatsen" -#: mod/settings.php:870 +#: mod/settings.php:881 msgid "Move to folder:" msgstr "Verplaatsen naar map:" -#: mod/settings.php:955 +#: mod/settings.php:967 msgid "Display Settings" msgstr "Scherminstellingen" -#: mod/settings.php:961 mod/settings.php:979 +#: mod/settings.php:973 mod/settings.php:991 msgid "Display Theme:" msgstr "Schermthema:" -#: mod/settings.php:962 +#: mod/settings.php:974 msgid "Mobile Theme:" msgstr "Mobiel thema:" -#: mod/settings.php:963 +#: mod/settings.php:975 msgid "Update browser every xx seconds" msgstr "Browser elke xx seconden verversen" -#: mod/settings.php:963 -msgid "Minimum of 10 seconds, no maximum" -msgstr "Minimum 10 seconden, geen maximum" +#: mod/settings.php:975 +msgid "Minimum of 10 seconds. Enter -1 to disable it." +msgstr "" -#: mod/settings.php:964 +#: mod/settings.php:976 msgid "Number of items to display per page:" msgstr "Aantal items te tonen per pagina:" -#: mod/settings.php:964 mod/settings.php:965 +#: mod/settings.php:976 mod/settings.php:977 msgid "Maximum of 100 items" msgstr "Maximum 100 items" -#: mod/settings.php:965 +#: mod/settings.php:977 msgid "Number of items to display per page when viewed from mobile device:" msgstr "Aantal items per pagina als je een mobiel toestel gebruikt:" -#: mod/settings.php:966 +#: mod/settings.php:978 msgid "Don't show emoticons" msgstr "Emoticons niet tonen" -#: mod/settings.php:967 +#: mod/settings.php:979 msgid "Calendar" msgstr "" -#: mod/settings.php:968 +#: mod/settings.php:980 msgid "Beginning of week:" msgstr "" -#: mod/settings.php:969 +#: mod/settings.php:981 msgid "Don't show notices" msgstr "" -#: mod/settings.php:970 +#: mod/settings.php:982 msgid "Infinite scroll" msgstr "Oneindig scrollen" -#: mod/settings.php:971 +#: mod/settings.php:983 msgid "Automatic updates only at the top of the network page" msgstr "" -#: mod/settings.php:973 view/theme/cleanzero/config.php:82 +#: mod/settings.php:985 view/theme/cleanzero/config.php:82 #: view/theme/dispy/config.php:72 view/theme/quattro/config.php:66 #: view/theme/diabook/config.php:150 view/theme/vier/config.php:109 #: view/theme/duepuntozero/config.php:61 msgid "Theme settings" msgstr "Thema-instellingen" -#: mod/settings.php:1050 +#: mod/settings.php:1062 msgid "User Types" msgstr "Gebruikerstypes" -#: mod/settings.php:1051 +#: mod/settings.php:1063 msgid "Community Types" msgstr "Forum/groepstypes" -#: mod/settings.php:1052 +#: mod/settings.php:1064 msgid "Normal Account Page" msgstr "Normale accountpagina" -#: mod/settings.php:1053 +#: mod/settings.php:1065 msgid "This account is a normal personal profile" msgstr "Deze account is een normaal persoonlijk profiel" -#: mod/settings.php:1056 +#: mod/settings.php:1068 msgid "Soapbox Page" msgstr "Zeepkist-pagina" -#: mod/settings.php:1057 +#: mod/settings.php:1069 msgid "Automatically approve all connection/friend requests as read-only fans" msgstr "Keur automatisch alle vriendschaps-/connectieverzoeken goed als fans met alleen recht tot lezen." -#: mod/settings.php:1060 +#: mod/settings.php:1072 msgid "Community Forum/Celebrity Account" msgstr "Forum/groeps- of beroemdheid-account" -#: mod/settings.php:1061 +#: mod/settings.php:1073 msgid "" "Automatically approve all connection/friend requests as read-write fans" msgstr "Keur automatisch alle vriendschaps-/connectieverzoeken goed als fans met recht tot lezen en schrijven." -#: mod/settings.php:1064 +#: mod/settings.php:1076 msgid "Automatic Friend Page" msgstr "Automatisch Vriendschapspagina" -#: mod/settings.php:1065 +#: mod/settings.php:1077 msgid "Automatically approve all connection/friend requests as friends" msgstr "Keur automatisch alle vriendschaps-/connectieverzoeken goed als vrienden." -#: mod/settings.php:1068 +#: mod/settings.php:1080 msgid "Private Forum [Experimental]" msgstr "Privé-forum [experimenteel]" -#: mod/settings.php:1069 +#: mod/settings.php:1081 msgid "Private forum - approved members only" msgstr "Privé-forum - enkel voor goedgekeurde leden" -#: mod/settings.php:1081 +#: mod/settings.php:1093 msgid "OpenID:" msgstr "OpenID:" -#: mod/settings.php:1081 +#: mod/settings.php:1093 msgid "(Optional) Allow this OpenID to login to this account." msgstr "(Optioneel) Laat dit OpenID toe om in te loggen op deze account." -#: mod/settings.php:1091 +#: mod/settings.php:1103 msgid "Publish your default profile in your local site directory?" msgstr "Je standaardprofiel in je lokale gids publiceren?" -#: mod/settings.php:1097 +#: mod/settings.php:1109 msgid "Publish your default profile in the global social directory?" msgstr "Je standaardprofiel in de globale sociale gids publiceren?" -#: mod/settings.php:1105 +#: mod/settings.php:1117 msgid "Hide your contact/friend list from viewers of your default profile?" msgstr "Je vrienden/contacten verbergen voor bezoekers van je standaard profiel?" -#: mod/settings.php:1109 include/acl_selectors.php:330 +#: mod/settings.php:1121 include/acl_selectors.php:331 msgid "Hide your profile details from unknown viewers?" msgstr "Je profieldetails verbergen voor onbekende bezoekers?" -#: mod/settings.php:1109 +#: mod/settings.php:1121 msgid "" "If enabled, posting public messages to Diaspora and other networks isn't " "possible." msgstr "" -#: mod/settings.php:1114 +#: mod/settings.php:1126 msgid "Allow friends to post to your profile page?" msgstr "Vrienden toestaan om op jou profielpagina te posten?" -#: mod/settings.php:1120 +#: mod/settings.php:1132 msgid "Allow friends to tag your posts?" msgstr "Sta vrienden toe om jouw berichten te labelen?" -#: mod/settings.php:1126 +#: mod/settings.php:1138 msgid "Allow us to suggest you as a potential friend to new members?" msgstr "Sta je mij toe om jou als mogelijke vriend voor te stellen aan nieuwe leden?" -#: mod/settings.php:1132 +#: mod/settings.php:1144 msgid "Permit unknown people to send you private mail?" msgstr "Mogen onbekende personen jou privé berichten sturen?" -#: mod/settings.php:1140 +#: mod/settings.php:1152 msgid "Profile is not published." msgstr "Profiel is niet gepubliceerd." -#: mod/settings.php:1148 +#: mod/settings.php:1160 #, php-format msgid "Your Identity Address is '%s' or '%s'." msgstr "" -#: mod/settings.php:1155 +#: mod/settings.php:1167 msgid "Automatically expire posts after this many days:" msgstr "Laat berichten automatisch vervallen na zo veel dagen:" -#: mod/settings.php:1155 +#: mod/settings.php:1167 msgid "If empty, posts will not expire. Expired posts will be deleted" msgstr "Berichten zullen niet vervallen indien leeg. Vervallen berichten zullen worden verwijderd." -#: mod/settings.php:1156 +#: mod/settings.php:1168 msgid "Advanced expiration settings" msgstr "Geavanceerde instellingen voor vervallen" -#: mod/settings.php:1157 +#: mod/settings.php:1169 msgid "Advanced Expiration" msgstr "Geavanceerd Verval:" -#: mod/settings.php:1158 +#: mod/settings.php:1170 msgid "Expire posts:" msgstr "Laat berichten vervallen:" -#: mod/settings.php:1159 +#: mod/settings.php:1171 msgid "Expire personal notes:" msgstr "Laat persoonlijke aantekeningen verlopen:" -#: mod/settings.php:1160 +#: mod/settings.php:1172 msgid "Expire starred posts:" msgstr "Laat berichten met ster verlopen" -#: mod/settings.php:1161 +#: mod/settings.php:1173 msgid "Expire photos:" msgstr "Laat foto's vervallen:" -#: mod/settings.php:1162 +#: mod/settings.php:1174 msgid "Only expire posts by others:" msgstr "Laat alleen berichten door anderen vervallen:" -#: mod/settings.php:1190 +#: mod/settings.php:1202 msgid "Account Settings" msgstr "Account Instellingen" -#: mod/settings.php:1198 +#: mod/settings.php:1210 msgid "Password Settings" msgstr "Wachtwoord Instellingen" -#: mod/settings.php:1199 mod/register.php:271 +#: mod/settings.php:1211 mod/register.php:274 msgid "New Password:" msgstr "Nieuw Wachtwoord:" -#: mod/settings.php:1200 mod/register.php:272 +#: mod/settings.php:1212 mod/register.php:275 msgid "Confirm:" msgstr "Bevestig:" -#: mod/settings.php:1200 +#: mod/settings.php:1212 msgid "Leave password fields blank unless changing" msgstr "Laat de wachtwoord-velden leeg, tenzij je het wilt veranderen" -#: mod/settings.php:1201 +#: mod/settings.php:1213 msgid "Current Password:" msgstr "Huidig wachtwoord:" -#: mod/settings.php:1201 mod/settings.php:1202 +#: mod/settings.php:1213 mod/settings.php:1214 msgid "Your current password to confirm the changes" msgstr "Je huidig wachtwoord om de wijzigingen te bevestigen" -#: mod/settings.php:1202 +#: mod/settings.php:1214 msgid "Password:" msgstr "Wachtwoord:" -#: mod/settings.php:1206 +#: mod/settings.php:1218 msgid "Basic Settings" msgstr "Basis Instellingen" -#: mod/settings.php:1207 include/identity.php:539 +#: mod/settings.php:1219 include/identity.php:588 msgid "Full Name:" msgstr "Volledige Naam:" -#: mod/settings.php:1208 +#: mod/settings.php:1220 msgid "Email Address:" msgstr "E-mailadres:" -#: mod/settings.php:1209 +#: mod/settings.php:1221 msgid "Your Timezone:" msgstr "Je Tijdzone:" -#: mod/settings.php:1210 +#: mod/settings.php:1222 msgid "Your Language:" msgstr "" -#: mod/settings.php:1210 +#: mod/settings.php:1222 msgid "" "Set the language we use to show you friendica interface and to send you " "emails" msgstr "" -#: mod/settings.php:1211 +#: mod/settings.php:1223 msgid "Default Post Location:" msgstr "Standaard locatie:" -#: mod/settings.php:1212 +#: mod/settings.php:1224 msgid "Use Browser Location:" msgstr "Gebruik Webbrowser Locatie:" -#: mod/settings.php:1215 +#: mod/settings.php:1227 msgid "Security and Privacy Settings" msgstr "Instellingen voor Beveiliging en Privacy" -#: mod/settings.php:1217 +#: mod/settings.php:1229 msgid "Maximum Friend Requests/Day:" msgstr "Maximum aantal vriendschapsverzoeken per dag:" -#: mod/settings.php:1217 mod/settings.php:1247 +#: mod/settings.php:1229 mod/settings.php:1259 msgid "(to prevent spam abuse)" msgstr "(om spam misbruik te voorkomen)" -#: mod/settings.php:1218 +#: mod/settings.php:1230 msgid "Default Post Permissions" msgstr "Standaard rechten voor nieuwe berichten" -#: mod/settings.php:1219 +#: mod/settings.php:1231 msgid "(click to open/close)" msgstr "(klik om te openen/sluiten)" -#: mod/settings.php:1228 mod/photos.php:1191 mod/photos.php:1576 +#: mod/settings.php:1240 mod/photos.php:1199 mod/photos.php:1584 msgid "Show to Groups" msgstr "Tonen aan groepen" -#: mod/settings.php:1229 mod/photos.php:1192 mod/photos.php:1577 +#: mod/settings.php:1241 mod/photos.php:1200 mod/photos.php:1585 msgid "Show to Contacts" msgstr "Tonen aan contacten" -#: mod/settings.php:1230 +#: mod/settings.php:1242 msgid "Default Private Post" msgstr "Standaard Privé Post" -#: mod/settings.php:1231 +#: mod/settings.php:1243 msgid "Default Public Post" msgstr "Standaard Publieke Post" -#: mod/settings.php:1235 +#: mod/settings.php:1247 msgid "Default Permissions for New Posts" msgstr "Standaard rechten voor nieuwe berichten" -#: mod/settings.php:1247 +#: mod/settings.php:1259 msgid "Maximum private messages per day from unknown people:" msgstr "Maximum aantal privé-berichten per dag van onbekende personen:" -#: mod/settings.php:1250 +#: mod/settings.php:1262 msgid "Notification Settings" msgstr "Notificatie Instellingen" -#: mod/settings.php:1251 +#: mod/settings.php:1263 msgid "By default post a status message when:" msgstr "Post automatisch een bericht op je tijdlijn wanneer:" -#: mod/settings.php:1252 +#: mod/settings.php:1264 msgid "accepting a friend request" msgstr "Een vriendschapsverzoek accepteren" -#: mod/settings.php:1253 +#: mod/settings.php:1265 msgid "joining a forum/community" msgstr "Lid worden van een groep/forum" -#: mod/settings.php:1254 +#: mod/settings.php:1266 msgid "making an interesting profile change" msgstr "Een interessante verandering aan je profiel" -#: mod/settings.php:1255 +#: mod/settings.php:1267 msgid "Send a notification email when:" msgstr "Stuur een notificatie e-mail wanneer:" -#: mod/settings.php:1256 +#: mod/settings.php:1268 msgid "You receive an introduction" msgstr "Je ontvangt een vriendschaps- of connectieverzoek" -#: mod/settings.php:1257 +#: mod/settings.php:1269 msgid "Your introductions are confirmed" msgstr "Jouw vriendschaps- of connectieverzoeken zijn bevestigd" -#: mod/settings.php:1258 +#: mod/settings.php:1270 msgid "Someone writes on your profile wall" msgstr "Iemand iets op je tijdlijn schrijft" -#: mod/settings.php:1259 +#: mod/settings.php:1271 msgid "Someone writes a followup comment" msgstr "Iemand een reactie schrijft" -#: mod/settings.php:1260 +#: mod/settings.php:1272 msgid "You receive a private message" msgstr "Je een privé-bericht ontvangt" -#: mod/settings.php:1261 +#: mod/settings.php:1273 msgid "You receive a friend suggestion" msgstr "Je een suggestie voor een vriendschap ontvangt" -#: mod/settings.php:1262 +#: mod/settings.php:1274 msgid "You are tagged in a post" msgstr "Je expliciet in een bericht bent genoemd" -#: mod/settings.php:1263 +#: mod/settings.php:1275 msgid "You are poked/prodded/etc. in a post" msgstr "Je in een bericht bent aangestoten/gepord/etc." -#: mod/settings.php:1265 +#: mod/settings.php:1277 msgid "Activate desktop notifications" msgstr "" -#: mod/settings.php:1265 +#: mod/settings.php:1277 msgid "Show desktop popup on new notifications" msgstr "" -#: mod/settings.php:1267 +#: mod/settings.php:1279 msgid "Text-only notification emails" msgstr "" -#: mod/settings.php:1269 +#: mod/settings.php:1281 msgid "Send text only notification emails, without the html part" msgstr "" -#: mod/settings.php:1271 +#: mod/settings.php:1283 msgid "Advanced Account/Page Type Settings" msgstr "" -#: mod/settings.php:1272 +#: mod/settings.php:1284 msgid "Change the behaviour of this account for special situations" msgstr "" -#: mod/settings.php:1275 +#: mod/settings.php:1287 msgid "Relocate" msgstr "" -#: mod/settings.php:1276 +#: mod/settings.php:1288 msgid "" "If you have moved this profile from another server, and some of your " "contacts don't receive your updates, try pushing this button." msgstr "" -#: mod/settings.php:1277 +#: mod/settings.php:1289 msgid "Resend relocate message to contacts" msgstr "" -#: mod/dfrn_request.php:95 +#: mod/dfrn_request.php:96 msgid "This introduction has already been accepted." msgstr "Verzoek is al goedgekeurd" -#: mod/dfrn_request.php:120 mod/dfrn_request.php:518 +#: mod/dfrn_request.php:119 mod/dfrn_request.php:516 msgid "Profile location is not valid or does not contain profile information." msgstr "Profiel is ongeldig of bevat geen informatie" -#: mod/dfrn_request.php:125 mod/dfrn_request.php:523 +#: mod/dfrn_request.php:124 mod/dfrn_request.php:521 msgid "Warning: profile location has no identifiable owner name." msgstr "Waarschuwing: de profiellocatie heeft geen identificeerbare eigenaar." -#: mod/dfrn_request.php:127 mod/dfrn_request.php:525 +#: mod/dfrn_request.php:126 mod/dfrn_request.php:523 msgid "Warning: profile location has no profile photo." msgstr "Waarschuwing: Profieladres heeft geen profielfoto." -#: mod/dfrn_request.php:130 mod/dfrn_request.php:528 +#: mod/dfrn_request.php:129 mod/dfrn_request.php:526 #, php-format msgid "%d required parameter was not found at the given location" msgid_plural "%d required parameters were not found at the given location" @@ -4898,66 +4917,68 @@ msgstr "Geen geldig e-mailadres" msgid "This account has not been configured for email. Request failed." msgstr "Aanvraag mislukt. Dit account is niet geconfigureerd voor e-mail." -#: mod/dfrn_request.php:463 -msgid "Unable to resolve your name at the provided location." -msgstr "Ik kan jouw naam op het opgegeven adres niet vinden." - -#: mod/dfrn_request.php:476 +#: mod/dfrn_request.php:474 msgid "You have already introduced yourself here." msgstr "Je hebt jezelf hier al voorgesteld." -#: mod/dfrn_request.php:480 +#: mod/dfrn_request.php:478 #, php-format msgid "Apparently you are already friends with %s." msgstr "Blijkbaar bent u al bevriend met %s." -#: mod/dfrn_request.php:501 +#: mod/dfrn_request.php:499 msgid "Invalid profile URL." msgstr "Ongeldig profiel adres." -#: mod/dfrn_request.php:507 include/follow.php:72 +#: mod/dfrn_request.php:505 include/follow.php:72 msgid "Disallowed profile URL." msgstr "Niet toegelaten profiel adres." -#: mod/dfrn_request.php:597 +#: mod/dfrn_request.php:596 msgid "Your introduction has been sent." msgstr "Je verzoek is verzonden." -#: mod/dfrn_request.php:650 +#: mod/dfrn_request.php:636 +msgid "" +"Remote subscription can't be done for your network. Please subscribe " +"directly on your system." +msgstr "" + +#: mod/dfrn_request.php:659 msgid "Please login to confirm introduction." msgstr "Log in om je verzoek te bevestigen." -#: mod/dfrn_request.php:660 +#: mod/dfrn_request.php:669 msgid "" "Incorrect identity currently logged in. Please login to " "this profile." msgstr "Je huidige identiteit is niet de juiste. Log met dit profiel in." -#: mod/dfrn_request.php:674 mod/dfrn_request.php:691 +#: mod/dfrn_request.php:683 mod/dfrn_request.php:700 msgid "Confirm" msgstr "Bevestig" -#: mod/dfrn_request.php:686 +#: mod/dfrn_request.php:695 msgid "Hide this contact" msgstr "Verberg dit contact" -#: mod/dfrn_request.php:689 +#: mod/dfrn_request.php:698 #, php-format msgid "Welcome home %s." msgstr "Welkom terug %s." -#: mod/dfrn_request.php:690 +#: mod/dfrn_request.php:699 #, php-format msgid "Please confirm your introduction/connection request to %s." msgstr "Bevestig je vriendschaps-/connectieverzoek voor %s." -#: mod/dfrn_request.php:819 +#: mod/dfrn_request.php:828 msgid "" "Please enter your 'Identity Address' from one of the following supported " "communications networks:" msgstr "Vul hier uw 'Identiteitsadres' in van een van de volgende ondersteunde communicatienetwerken:" -#: mod/dfrn_request.php:840 +#: mod/dfrn_request.php:849 #, php-format msgid "" "If you are not yet a member of the free social web, ." msgstr "" -#: mod/dfrn_request.php:845 +#: mod/dfrn_request.php:854 msgid "Friend/Connection Request" msgstr "Vriendschaps-/connectieverzoek" -#: mod/dfrn_request.php:846 +#: mod/dfrn_request.php:855 msgid "" "Examples: jojo@demo.friendica.com, http://demo.friendica.com/profile/jojo, " "testuser@identi.ca" msgstr "Voorbeelden: jojo@demo.friendica.com, http://demo.friendica.com/profile/jojo, testuser@identi.ca" -#: mod/dfrn_request.php:854 include/contact_selectors.php:76 +#: mod/dfrn_request.php:863 include/contact_selectors.php:76 msgid "Friendica" msgstr "Friendica" -#: mod/dfrn_request.php:855 +#: mod/dfrn_request.php:864 msgid "StatusNet/Federated Social Web" msgstr "StatusNet/Gefedereerde Sociale Web" -#: mod/dfrn_request.php:857 +#: mod/dfrn_request.php:866 #, php-format msgid "" " - please do not use this form. Instead, enter %s into your Diaspora search" @@ -5002,80 +5023,84 @@ msgid "" "password: %s

      You can change your password after login." msgstr "" -#: mod/register.php:107 +#: mod/register.php:104 +msgid "Registration successful." +msgstr "" + +#: mod/register.php:110 msgid "Your registration can not be processed." msgstr "Je registratie kan niet verwerkt worden." -#: mod/register.php:150 +#: mod/register.php:153 msgid "Your registration is pending approval by the site owner." msgstr "Jouw registratie wacht op goedkeuring van de beheerder." -#: mod/register.php:188 mod/uimport.php:50 +#: mod/register.php:191 mod/uimport.php:50 msgid "" "This site has exceeded the number of allowed daily account registrations. " "Please try again tomorrow." msgstr "Deze website heeft het toegelaten dagelijkse aantal registraties overschreden. Probeer morgen opnieuw." -#: mod/register.php:216 +#: mod/register.php:219 msgid "" "You may (optionally) fill in this form via OpenID by supplying your OpenID " "and clicking 'Register'." msgstr "Je kunt (optioneel) dit formulier invullen via OpenID door je OpenID in te geven en op 'Registreren' te klikken." -#: mod/register.php:217 +#: mod/register.php:220 msgid "" "If you are not familiar with OpenID, please leave that field blank and fill " "in the rest of the items." msgstr "Laat dit veld leeg als je niet vertrouwd bent met OpenID, en vul de rest van de items in." -#: mod/register.php:218 +#: mod/register.php:221 msgid "Your OpenID (optional): " msgstr "Je OpenID (optioneel):" -#: mod/register.php:232 +#: mod/register.php:235 msgid "Include your profile in member directory?" msgstr "Je profiel in de ledengids opnemen?" -#: mod/register.php:256 +#: mod/register.php:259 msgid "Membership on this site is by invitation only." msgstr "Lidmaatschap van deze website is uitsluitend op uitnodiging." -#: mod/register.php:257 +#: mod/register.php:260 msgid "Your invitation ID: " msgstr "Je uitnodigingsid:" -#: mod/register.php:268 +#: mod/register.php:271 msgid "Your Full Name (e.g. Joe Smith, real or real-looking): " msgstr "" -#: mod/register.php:269 +#: mod/register.php:272 msgid "Your Email Address: " msgstr "Je email adres:" -#: mod/register.php:271 +#: mod/register.php:274 msgid "Leave empty for an auto generated password." msgstr "" -#: mod/register.php:273 +#: mod/register.php:276 msgid "" "Choose a profile nickname. This must begin with a text character. Your " "profile address on this site will then be " "'nickname@$sitename'." msgstr "Kies een bijnaam voor je profiel. Deze moet met een letter beginnen. Je profieladres op deze website zal dan 'bijnaam@$sitename' zijn." -#: mod/register.php:274 +#: mod/register.php:277 msgid "Choose a nickname: " msgstr "Kies een bijnaam:" -#: mod/register.php:277 boot.php:1256 include/nav.php:108 +#: mod/register.php:280 boot.php:1379 include/nav.php:108 msgid "Register" msgstr "Registreer" -#: mod/register.php:283 mod/uimport.php:64 +#: mod/register.php:286 mod/uimport.php:64 msgid "Import" msgstr "Importeren" -#: mod/register.php:284 +#: mod/register.php:287 msgid "Import your profile to this friendica instance" msgstr "" @@ -5087,62 +5112,54 @@ msgstr "Systeem onbeschikbaar wegens onderhoud" msgid "Only logged in users are permitted to perform a search." msgstr "" -#: mod/search.php:115 +#: mod/search.php:124 msgid "Too Many Requests" msgstr "" -#: mod/search.php:116 +#: mod/search.php:125 msgid "Only one search per minute is permitted for not logged in users." msgstr "" -#: mod/search.php:126 include/text.php:996 include/nav.php:118 +#: mod/search.php:136 include/text.php:1003 include/nav.php:118 msgid "Search" msgstr "Zoeken" -#: mod/search.php:224 +#: mod/search.php:234 #, php-format msgid "Items tagged with: %s" msgstr "" -#: mod/search.php:226 +#: mod/search.php:236 #, php-format msgid "Search results for: %s" msgstr "" -#: mod/directory.php:116 mod/profiles.php:760 -msgid "Age: " -msgstr "Leeftijd:" - -#: mod/directory.php:119 -msgid "Gender: " -msgstr "Geslacht:" - -#: mod/directory.php:143 include/identity.php:273 include/identity.php:561 +#: mod/directory.php:149 include/identity.php:313 include/identity.php:610 msgid "Status:" msgstr "Tijdlijn:" -#: mod/directory.php:145 include/identity.php:275 include/identity.php:572 +#: mod/directory.php:151 include/identity.php:315 include/identity.php:621 msgid "Homepage:" msgstr "Website:" -#: mod/directory.php:195 view/theme/diabook/theme.php:525 -#: view/theme/vier/theme.php:191 +#: mod/directory.php:203 view/theme/diabook/theme.php:525 +#: view/theme/vier/theme.php:205 msgid "Global Directory" msgstr "Globale gids" -#: mod/directory.php:197 +#: mod/directory.php:205 msgid "Find on this site" msgstr "Op deze website zoeken" -#: mod/directory.php:199 +#: mod/directory.php:207 msgid "Finding:" msgstr "" -#: mod/directory.php:201 +#: mod/directory.php:209 msgid "Site Directory" msgstr "Websitegids" -#: mod/directory.php:208 +#: mod/directory.php:216 msgid "No entries (some entries may be hidden)." msgstr "Geen gegevens (sommige gegevens kunnen verborgen zijn)." @@ -5181,14 +5198,10 @@ msgstr "Toevoegen" msgid "No entries." msgstr "Geen gegevens." -#: mod/common.php:85 +#: mod/common.php:86 msgid "No contacts in common." msgstr "Geen gedeelde contacten." -#: mod/common.php:133 -msgid "Common Friends" -msgstr "Gedeelde Vrienden" - #: mod/uexport.php:77 msgid "Export account" msgstr "Account exporteren" @@ -5233,12 +5246,12 @@ msgid "" "hours." msgstr "Geen voorstellen beschikbaar. Als dit een nieuwe website is, kun je het over 24 uur nog eens proberen." -#: mod/suggest.php:83 mod/suggest.php:100 +#: mod/suggest.php:83 mod/suggest.php:101 msgid "Ignore/Hide" msgstr "Negeren/Verbergen" -#: mod/suggest.php:110 include/contact_widgets.php:35 -#: view/theme/diabook/theme.php:527 view/theme/vier/theme.php:193 +#: mod/suggest.php:111 include/contact_widgets.php:35 +#: view/theme/diabook/theme.php:527 view/theme/vier/theme.php:207 msgid "Friend Suggestions" msgstr "Vriendschapsvoorstellen" @@ -5270,11 +5283,11 @@ msgstr "Echtelijke staat" msgid "Romantic Partner" msgstr "Romantische Partner" -#: mod/profiles.php:344 mod/photos.php:1639 include/conversation.php:508 +#: mod/profiles.php:344 mod/photos.php:1647 include/conversation.php:508 msgid "Likes" msgstr "Houdt van" -#: mod/profiles.php:348 mod/photos.php:1639 include/conversation.php:508 +#: mod/profiles.php:348 mod/photos.php:1647 include/conversation.php:508 msgid "Dislikes" msgstr "Houdt niet van" @@ -5453,7 +5466,7 @@ msgstr "Voorbeelden: Kathleen123, Kathleen Peeters, kathleen@voorbeeld.nl" msgid "Since [date]:" msgstr "Sinds [datum]:" -#: mod/profiles.php:724 include/identity.php:570 +#: mod/profiles.php:724 include/identity.php:619 msgid "Sexual Preference:" msgstr "Seksuele Voorkeur:" @@ -5461,11 +5474,11 @@ msgstr "Seksuele Voorkeur:" msgid "Homepage URL:" msgstr "Adres tijdlijn:" -#: mod/profiles.php:726 include/identity.php:574 +#: mod/profiles.php:726 include/identity.php:623 msgid "Hometown:" msgstr "Woonplaats:" -#: mod/profiles.php:727 include/identity.php:578 +#: mod/profiles.php:727 include/identity.php:627 msgid "Political Views:" msgstr "Politieke standpunten:" @@ -5481,11 +5494,11 @@ msgstr "Publieke Sleutelwoorden:" msgid "Private Keywords:" msgstr "Privé Sleutelwoorden:" -#: mod/profiles.php:731 include/identity.php:586 +#: mod/profiles.php:731 include/identity.php:635 msgid "Likes:" msgstr "Houdt van:" -#: mod/profiles.php:732 include/identity.php:588 +#: mod/profiles.php:732 include/identity.php:637 msgid "Dislikes:" msgstr "Houdt niet van:" @@ -5547,27 +5560,31 @@ msgid "" "be visible to anybody using the internet." msgstr "Dit is jouw publiek profiel.
      Het kan zichtbaar zijn voor iedereen op het internet." +#: mod/profiles.php:760 +msgid "Age: " +msgstr "Leeftijd:" + #: mod/profiles.php:813 msgid "Edit/Manage Profiles" msgstr "Wijzig/Beheer Profielen" -#: mod/profiles.php:814 include/identity.php:231 include/identity.php:257 +#: mod/profiles.php:814 include/identity.php:260 include/identity.php:286 msgid "Change profile photo" msgstr "Profiel foto wijzigen" -#: mod/profiles.php:815 include/identity.php:232 +#: mod/profiles.php:815 include/identity.php:261 msgid "Create New Profile" msgstr "Maak nieuw profiel" -#: mod/profiles.php:826 include/identity.php:242 +#: mod/profiles.php:826 include/identity.php:271 msgid "Profile Image" msgstr "Profiel afbeelding" -#: mod/profiles.php:828 include/identity.php:245 +#: mod/profiles.php:828 include/identity.php:274 msgid "visible to everybody" msgstr "zichtbaar voor iedereen" -#: mod/profiles.php:829 include/identity.php:246 +#: mod/profiles.php:829 include/identity.php:275 msgid "Edit visibility" msgstr "Pas zichtbaarheid aan" @@ -5579,111 +5596,111 @@ msgstr "Item niet gevonden" msgid "Edit post" msgstr "Bericht bewerken" -#: mod/editpost.php:110 include/conversation.php:1185 +#: mod/editpost.php:111 include/conversation.php:1184 msgid "upload photo" msgstr "Foto uploaden" -#: mod/editpost.php:111 include/conversation.php:1186 +#: mod/editpost.php:112 include/conversation.php:1185 msgid "Attach file" msgstr "Bestand bijvoegen" -#: mod/editpost.php:112 include/conversation.php:1187 +#: mod/editpost.php:113 include/conversation.php:1186 msgid "attach file" msgstr "bestand bijvoegen" -#: mod/editpost.php:114 include/conversation.php:1189 +#: mod/editpost.php:115 include/conversation.php:1188 msgid "web link" msgstr "webadres" -#: mod/editpost.php:115 include/conversation.php:1190 +#: mod/editpost.php:116 include/conversation.php:1189 msgid "Insert video link" msgstr "Voeg video toe" -#: mod/editpost.php:116 include/conversation.php:1191 +#: mod/editpost.php:117 include/conversation.php:1190 msgid "video link" msgstr "video adres" -#: mod/editpost.php:117 include/conversation.php:1192 +#: mod/editpost.php:118 include/conversation.php:1191 msgid "Insert audio link" msgstr "Voeg audio adres toe" -#: mod/editpost.php:118 include/conversation.php:1193 +#: mod/editpost.php:119 include/conversation.php:1192 msgid "audio link" msgstr "audio adres" -#: mod/editpost.php:119 include/conversation.php:1194 +#: mod/editpost.php:120 include/conversation.php:1193 msgid "Set your location" msgstr "Stel uw locatie in" -#: mod/editpost.php:120 include/conversation.php:1195 +#: mod/editpost.php:121 include/conversation.php:1194 msgid "set location" msgstr "Stel uw locatie in" -#: mod/editpost.php:121 include/conversation.php:1196 +#: mod/editpost.php:122 include/conversation.php:1195 msgid "Clear browser location" msgstr "Verwijder locatie uit uw webbrowser" -#: mod/editpost.php:122 include/conversation.php:1197 +#: mod/editpost.php:123 include/conversation.php:1196 msgid "clear location" msgstr "Verwijder locatie uit uw webbrowser" -#: mod/editpost.php:124 include/conversation.php:1203 +#: mod/editpost.php:125 include/conversation.php:1202 msgid "Permission settings" msgstr "Instellingen van rechten" -#: mod/editpost.php:132 include/acl_selectors.php:343 +#: mod/editpost.php:133 include/acl_selectors.php:344 msgid "CC: email addresses" msgstr "CC: e-mailadressen" -#: mod/editpost.php:133 include/conversation.php:1212 +#: mod/editpost.php:134 include/conversation.php:1211 msgid "Public post" msgstr "Openbare post" -#: mod/editpost.php:136 include/conversation.php:1199 +#: mod/editpost.php:137 include/conversation.php:1198 msgid "Set title" msgstr "Titel plaatsen" -#: mod/editpost.php:138 include/conversation.php:1201 +#: mod/editpost.php:139 include/conversation.php:1200 msgid "Categories (comma-separated list)" msgstr "Categorieën (komma-gescheiden lijst)" -#: mod/editpost.php:139 include/acl_selectors.php:344 +#: mod/editpost.php:140 include/acl_selectors.php:345 msgid "Example: bob@example.com, mary@example.com" msgstr "Voorbeeld: bob@voorbeeld.nl, an@voorbeeld.be" -#: mod/friendica.php:59 +#: mod/friendica.php:70 msgid "This is Friendica, version" msgstr "Dit is Friendica, versie" -#: mod/friendica.php:60 +#: mod/friendica.php:71 msgid "running at web location" msgstr "draaiend op web-adres" -#: mod/friendica.php:62 +#: mod/friendica.php:73 msgid "" "Please visit
      Friendica.com to learn " "more about the Friendica project." msgstr "Bezoek Friendica.com om meer te leren over het Friendica project." -#: mod/friendica.php:64 +#: mod/friendica.php:75 msgid "Bug reports and issues: please visit" msgstr "Bug rapporten en problemen: bezoek" -#: mod/friendica.php:64 +#: mod/friendica.php:75 msgid "the bugtracker at github" msgstr "" -#: mod/friendica.php:65 +#: mod/friendica.php:76 msgid "" "Suggestions, praise, donations, etc. - please email \"Info\" at Friendica - " "dot com" msgstr "Suggesties, lof, donaties, enzovoort - stuur een e-mail naar \"info\" op Friendica - dot com" -#: mod/friendica.php:79 +#: mod/friendica.php:90 msgid "Installed plugins/addons/apps:" msgstr "Geïnstalleerde plugins/toepassingen:" -#: mod/friendica.php:92 +#: mod/friendica.php:103 msgid "No installed plugins/addons/apps" msgstr "Geen plugins of toepassingen geïnstalleerd" @@ -5713,7 +5730,7 @@ msgstr "Privacyinformatie op afstand niet beschikbaar." msgid "Visible to:" msgstr "Zichtbaar voor:" -#: mod/notes.php:46 include/identity.php:677 +#: mod/notes.php:46 include/identity.php:730 msgid "Personal Notes" msgstr "Persoonlijke Nota's" @@ -5771,7 +5788,7 @@ msgid "Make this post private" msgstr "Dit bericht privé maken" #: mod/repair_ostatus.php:14 -msgid "Resubsribing to OStatus contacts" +msgid "Resubscribing to OStatus contacts" msgstr "" #: mod/repair_ostatus.php:30 @@ -5870,197 +5887,197 @@ msgid "" "important, please visit http://friendica.com" msgstr "Voor meer informatie over het Friendica project en waarom wij denken dat het belangrijk is kun je http://friendica.com/ bezoeken" -#: mod/photos.php:91 include/identity.php:652 +#: mod/photos.php:99 include/identity.php:705 msgid "Photo Albums" msgstr "Fotoalbums" -#: mod/photos.php:92 mod/photos.php:1891 +#: mod/photos.php:100 mod/photos.php:1899 msgid "Recent Photos" msgstr "Recente foto's" -#: mod/photos.php:95 mod/photos.php:1312 mod/photos.php:1893 +#: mod/photos.php:103 mod/photos.php:1320 mod/photos.php:1901 msgid "Upload New Photos" msgstr "Nieuwe foto's uploaden" -#: mod/photos.php:173 +#: mod/photos.php:181 msgid "Contact information unavailable" msgstr "Contactinformatie niet beschikbaar" -#: mod/photos.php:194 +#: mod/photos.php:202 msgid "Album not found." msgstr "Album niet gevonden" -#: mod/photos.php:224 mod/photos.php:236 mod/photos.php:1254 +#: mod/photos.php:232 mod/photos.php:244 mod/photos.php:1262 msgid "Delete Album" msgstr "Verwijder album" -#: mod/photos.php:234 +#: mod/photos.php:242 msgid "Do you really want to delete this photo album and all its photos?" msgstr "Wil je echt dit fotoalbum en alle foto's erin verwijderen?" -#: mod/photos.php:314 mod/photos.php:325 mod/photos.php:1572 +#: mod/photos.php:322 mod/photos.php:333 mod/photos.php:1580 msgid "Delete Photo" msgstr "Verwijder foto" -#: mod/photos.php:323 +#: mod/photos.php:331 msgid "Do you really want to delete this photo?" msgstr "Wil je echt deze foto verwijderen?" -#: mod/photos.php:698 +#: mod/photos.php:706 #, php-format msgid "%1$s was tagged in %2$s by %3$s" msgstr "%1$s is gelabeld in %2$s door %3$s" -#: mod/photos.php:698 +#: mod/photos.php:706 msgid "a photo" msgstr "een foto" -#: mod/photos.php:811 +#: mod/photos.php:819 msgid "Image file is empty." msgstr "Afbeeldingsbestand is leeg." -#: mod/photos.php:978 +#: mod/photos.php:986 msgid "No photos selected" msgstr "Geen foto's geselecteerd" -#: mod/photos.php:1139 +#: mod/photos.php:1147 #, php-format msgid "You have used %1$.2f Mbytes of %2$.2f Mbytes photo storage." msgstr "Je hebt %1$.2f Mbytes van %2$.2f Mbytes foto-opslagruimte gebruikt." -#: mod/photos.php:1174 +#: mod/photos.php:1182 msgid "Upload Photos" msgstr "Upload foto's" -#: mod/photos.php:1178 mod/photos.php:1249 +#: mod/photos.php:1186 mod/photos.php:1257 msgid "New album name: " msgstr "Nieuwe albumnaam: " -#: mod/photos.php:1179 +#: mod/photos.php:1187 msgid "or existing album name: " msgstr "of bestaande albumnaam: " -#: mod/photos.php:1180 +#: mod/photos.php:1188 msgid "Do not show a status post for this upload" msgstr "Toon geen bericht op je tijdlijn van deze upload" -#: mod/photos.php:1182 mod/photos.php:1567 include/acl_selectors.php:346 +#: mod/photos.php:1190 mod/photos.php:1575 include/acl_selectors.php:347 msgid "Permissions" msgstr "Rechten" -#: mod/photos.php:1193 +#: mod/photos.php:1201 msgid "Private Photo" msgstr "Privé foto" -#: mod/photos.php:1194 +#: mod/photos.php:1202 msgid "Public Photo" msgstr "Publieke foto" -#: mod/photos.php:1262 +#: mod/photos.php:1270 msgid "Edit Album" msgstr "Album wijzigen" -#: mod/photos.php:1268 +#: mod/photos.php:1276 msgid "Show Newest First" msgstr "Toon niewste eerst" -#: mod/photos.php:1270 +#: mod/photos.php:1278 msgid "Show Oldest First" msgstr "Toon oudste eerst" -#: mod/photos.php:1298 mod/photos.php:1876 +#: mod/photos.php:1306 mod/photos.php:1884 msgid "View Photo" msgstr "Bekijk foto" -#: mod/photos.php:1345 +#: mod/photos.php:1353 msgid "Permission denied. Access to this item may be restricted." msgstr "Toegang geweigerd. Toegang tot dit item is mogelijk beperkt." -#: mod/photos.php:1347 +#: mod/photos.php:1355 msgid "Photo not available" msgstr "Foto is niet beschikbaar" -#: mod/photos.php:1403 +#: mod/photos.php:1411 msgid "View photo" msgstr "Bekijk foto" -#: mod/photos.php:1403 +#: mod/photos.php:1411 msgid "Edit photo" msgstr "Bewerk foto" -#: mod/photos.php:1404 +#: mod/photos.php:1412 msgid "Use as profile photo" msgstr "Gebruik als profielfoto" -#: mod/photos.php:1429 +#: mod/photos.php:1437 msgid "View Full Size" msgstr "Bekijk in volledig formaat" -#: mod/photos.php:1515 +#: mod/photos.php:1523 msgid "Tags: " msgstr "Labels: " -#: mod/photos.php:1518 +#: mod/photos.php:1526 msgid "[Remove any tag]" msgstr "[Alle labels verwijderen]" -#: mod/photos.php:1558 +#: mod/photos.php:1566 msgid "New album name" msgstr "Nieuwe albumnaam" -#: mod/photos.php:1559 +#: mod/photos.php:1567 msgid "Caption" msgstr "Onderschrift" -#: mod/photos.php:1560 +#: mod/photos.php:1568 msgid "Add a Tag" msgstr "Een label toevoegen" -#: mod/photos.php:1560 +#: mod/photos.php:1568 msgid "" "Example: @bob, @Barbara_Jensen, @jim@example.com, #California, #camping" msgstr "Voorbeeld: @bob, @Barbara_Jansen, @jan@voorbeeld.nl, #Ardennen, #camping " -#: mod/photos.php:1561 +#: mod/photos.php:1569 msgid "Do not rotate" msgstr "" -#: mod/photos.php:1562 +#: mod/photos.php:1570 msgid "Rotate CW (right)" msgstr "Roteren met de klok mee (rechts)" -#: mod/photos.php:1563 +#: mod/photos.php:1571 msgid "Rotate CCW (left)" msgstr "Roteren tegen de klok in (links)" -#: mod/photos.php:1578 +#: mod/photos.php:1586 msgid "Private photo" msgstr "Privé foto" -#: mod/photos.php:1579 +#: mod/photos.php:1587 msgid "Public photo" msgstr "Publieke foto" -#: mod/photos.php:1601 include/conversation.php:1183 +#: mod/photos.php:1609 include/conversation.php:1182 msgid "Share" msgstr "Delen" -#: mod/photos.php:1640 include/conversation.php:509 -#: include/conversation.php:1405 +#: mod/photos.php:1648 include/conversation.php:509 +#: include/conversation.php:1413 msgid "Attending" msgid_plural "Attending" msgstr[0] "" msgstr[1] "" -#: mod/photos.php:1640 include/conversation.php:509 +#: mod/photos.php:1648 include/conversation.php:509 msgid "Not attending" msgstr "" -#: mod/photos.php:1640 include/conversation.php:509 +#: mod/photos.php:1648 include/conversation.php:509 msgid "Might attend" msgstr "" -#: mod/photos.php:1805 +#: mod/photos.php:1813 msgid "Map" msgstr "" @@ -6120,60 +6137,60 @@ msgstr "Item niet beschikbaar" msgid "Item was not found." msgstr "Item niet gevonden" -#: boot.php:771 +#: boot.php:861 msgid "Delete this item?" msgstr "Dit item verwijderen?" -#: boot.php:774 +#: boot.php:864 msgid "show fewer" msgstr "Minder tonen" -#: boot.php:1148 +#: boot.php:1266 #, php-format msgid "Update %s failed. See error logs." msgstr "Wijziging %s mislukt. Lees de error logbestanden." -#: boot.php:1255 +#: boot.php:1378 msgid "Create a New Account" msgstr "Nieuwe account aanmaken" -#: boot.php:1280 include/nav.php:72 +#: boot.php:1403 include/nav.php:72 msgid "Logout" msgstr "Uitloggen" -#: boot.php:1283 +#: boot.php:1406 msgid "Nickname or Email address: " msgstr "Bijnaam of e-mailadres:" -#: boot.php:1284 +#: boot.php:1407 msgid "Password: " msgstr "Wachtwoord:" -#: boot.php:1285 +#: boot.php:1408 msgid "Remember me" msgstr "Onthou me" -#: boot.php:1288 +#: boot.php:1411 msgid "Or login using OpenID: " msgstr "Of log in met OpenID:" -#: boot.php:1294 +#: boot.php:1417 msgid "Forgot your password?" msgstr "Wachtwoord vergeten?" -#: boot.php:1297 +#: boot.php:1420 msgid "Website Terms of Service" msgstr "Gebruikersvoorwaarden website" -#: boot.php:1298 +#: boot.php:1421 msgid "terms of service" msgstr "servicevoorwaarden" -#: boot.php:1300 +#: boot.php:1423 msgid "Website Privacy Policy" msgstr "Privacybeleid website" -#: boot.php:1301 +#: boot.php:1424 msgid "privacy policy" msgstr "privacybeleid" @@ -6234,25 +6251,25 @@ msgid "" "[pre]%s[/pre]" msgstr "" -#: include/dbstructure.php:152 +#: include/dbstructure.php:153 msgid "Errors encountered creating database tables." msgstr "Tijdens het aanmaken van databasetabellen zijn fouten vastgesteld." -#: include/dbstructure.php:210 +#: include/dbstructure.php:230 msgid "Errors encountered performing database changes." msgstr "" -#: include/auth.php:38 +#: include/auth.php:44 msgid "Logged out." msgstr "Uitgelogd." -#: include/auth.php:128 include/user.php:75 +#: include/auth.php:134 include/user.php:75 msgid "" "We encountered a problem while logging in with the OpenID you provided. " "Please check the correct spelling of the ID." msgstr "" -#: include/auth.php:128 include/user.php:75 +#: include/auth.php:134 include/user.php:75 msgid "The error message was:" msgstr "De foutboodschap was:" @@ -6288,7 +6305,7 @@ msgid "Examples: Robert Morgenstein, Fishing" msgstr "Voorbeelden: Jan Peeters, Vissen" #: include/contact_widgets.php:36 view/theme/diabook/theme.php:526 -#: view/theme/vier/theme.php:192 +#: view/theme/vier/theme.php:206 msgid "Similar Interests" msgstr "Dezelfde interesses" @@ -6297,205 +6314,228 @@ msgid "Random Profile" msgstr "Willekeurig Profiel" #: include/contact_widgets.php:38 view/theme/diabook/theme.php:528 -#: view/theme/vier/theme.php:194 +#: view/theme/vier/theme.php:208 msgid "Invite Friends" msgstr "Vrienden uitnodigen" -#: include/contact_widgets.php:71 +#: include/contact_widgets.php:108 msgid "Networks" msgstr "Netwerken" -#: include/contact_widgets.php:74 +#: include/contact_widgets.php:111 msgid "All Networks" msgstr "Alle netwerken" -#: include/contact_widgets.php:104 include/features.php:61 +#: include/contact_widgets.php:141 include/features.php:102 msgid "Saved Folders" msgstr "Bewaarde Mappen" -#: include/contact_widgets.php:107 include/contact_widgets.php:139 +#: include/contact_widgets.php:144 include/contact_widgets.php:176 msgid "Everything" msgstr "Alles" -#: include/contact_widgets.php:136 +#: include/contact_widgets.php:173 msgid "Categories" msgstr "Categorieën" -#: include/features.php:23 +#: include/contact_widgets.php:237 +#, php-format +msgid "%d contact in common" +msgid_plural "%d contacts in common" +msgstr[0] "%d gedeeld contact" +msgstr[1] "%d gedeelde contacten" + +#: include/features.php:63 msgid "General Features" msgstr "Algemene functies" -#: include/features.php:25 +#: include/features.php:65 msgid "Multiple Profiles" msgstr "Meerdere profielen" -#: include/features.php:25 +#: include/features.php:65 msgid "Ability to create multiple profiles" msgstr "Mogelijkheid om meerdere profielen aan te maken" -#: include/features.php:26 +#: include/features.php:66 msgid "Photo Location" msgstr "" -#: include/features.php:26 +#: include/features.php:66 msgid "" "Photo metadata is normally stripped. This extracts the location (if present)" " prior to stripping metadata and links it to a map." msgstr "" -#: include/features.php:31 +#: include/features.php:71 msgid "Post Composition Features" msgstr "Functies voor het opstellen van berichten" -#: include/features.php:32 +#: include/features.php:72 msgid "Richtext Editor" msgstr "Tekstverwerker met opmaak" -#: include/features.php:32 +#: include/features.php:72 msgid "Enable richtext editor" msgstr "Gebruik een tekstverwerker met eenvoudige opmaakfuncties" -#: include/features.php:33 +#: include/features.php:73 msgid "Post Preview" msgstr "Voorvertoning bericht" -#: include/features.php:33 +#: include/features.php:73 msgid "Allow previewing posts and comments before publishing them" msgstr "" -#: include/features.php:34 +#: include/features.php:74 msgid "Auto-mention Forums" msgstr "" -#: include/features.php:34 +#: include/features.php:74 msgid "" "Add/remove mention when a fourm page is selected/deselected in ACL window." msgstr "" -#: include/features.php:39 +#: include/features.php:79 msgid "Network Sidebar Widgets" msgstr "Zijbalkwidgets op netwerkpagina" -#: include/features.php:40 +#: include/features.php:80 msgid "Search by Date" msgstr "Zoeken op datum" -#: include/features.php:40 +#: include/features.php:80 msgid "Ability to select posts by date ranges" msgstr "Mogelijkheid om berichten te selecteren volgens datumbereik" -#: include/features.php:41 +#: include/features.php:81 include/features.php:111 +msgid "List Forums" +msgstr "" + +#: include/features.php:81 +msgid "Enable widget to display the forums your are connected with" +msgstr "" + +#: include/features.php:82 msgid "Group Filter" msgstr "Groepsfilter" -#: include/features.php:41 +#: include/features.php:82 msgid "Enable widget to display Network posts only from selected group" msgstr "Sta de widget toe om netwerkberichten te tonen van bepaalde groepen" -#: include/features.php:42 +#: include/features.php:83 msgid "Network Filter" msgstr "Netwerkfilter" -#: include/features.php:42 +#: include/features.php:83 msgid "Enable widget to display Network posts only from selected network" msgstr "Sta de widget toe om netwerkberichten te tonen van bepaalde netwerken" -#: include/features.php:43 +#: include/features.php:84 msgid "Save search terms for re-use" msgstr "Sla zoekopdrachten op voor hergebruik" -#: include/features.php:48 +#: include/features.php:89 msgid "Network Tabs" msgstr "Netwerktabs" -#: include/features.php:49 +#: include/features.php:90 msgid "Network Personal Tab" msgstr "Persoonlijke netwerktab" -#: include/features.php:49 +#: include/features.php:90 msgid "Enable tab to display only Network posts that you've interacted on" msgstr "Sta het toe dat de tab netwerkberichten toont waarmee je interactie had" -#: include/features.php:50 +#: include/features.php:91 msgid "Network New Tab" msgstr "Nieuwe netwerktab" -#: include/features.php:50 +#: include/features.php:91 msgid "Enable tab to display only new Network posts (from the last 12 hours)" msgstr "Laat de tab alleen nieuwe netwerkberichten tonen (van de laatste 12 uur)" -#: include/features.php:51 +#: include/features.php:92 msgid "Network Shared Links Tab" msgstr "" -#: include/features.php:51 +#: include/features.php:92 msgid "Enable tab to display only Network posts with links in them" msgstr "" -#: include/features.php:56 +#: include/features.php:97 msgid "Post/Comment Tools" msgstr "Bericht-/reactiehulpmiddelen" -#: include/features.php:57 +#: include/features.php:98 msgid "Multiple Deletion" msgstr "Meervoudige verwijdering" -#: include/features.php:57 +#: include/features.php:98 msgid "Select and delete multiple posts/comments at once" msgstr "Selecteer en verwijder meerdere berichten/reacties in een keer" -#: include/features.php:58 +#: include/features.php:99 msgid "Edit Sent Posts" msgstr "Bewerk verzonden berichten" -#: include/features.php:58 +#: include/features.php:99 msgid "Edit and correct posts and comments after sending" msgstr "Bewerk en corrigeer berichten en reacties na verzending" -#: include/features.php:59 +#: include/features.php:100 msgid "Tagging" msgstr "Labelen" -#: include/features.php:59 +#: include/features.php:100 msgid "Ability to tag existing posts" msgstr "Mogelijkheid om bestaande berichten te labelen" -#: include/features.php:60 +#: include/features.php:101 msgid "Post Categories" msgstr "Categorieën berichten" -#: include/features.php:60 +#: include/features.php:101 msgid "Add categories to your posts" msgstr "Voeg categorieën toe aan je berichten" -#: include/features.php:61 +#: include/features.php:102 msgid "Ability to file posts under folders" msgstr "Mogelijkheid om berichten in mappen te bewaren" -#: include/features.php:62 +#: include/features.php:103 msgid "Dislike Posts" msgstr "Vind berichten niet leuk" -#: include/features.php:62 +#: include/features.php:103 msgid "Ability to dislike posts/comments" msgstr "Mogelijkheid om berichten of reacties niet leuk te vinden" -#: include/features.php:63 +#: include/features.php:104 msgid "Star Posts" msgstr "Geef berichten een ster" -#: include/features.php:63 +#: include/features.php:104 msgid "Ability to mark special posts with a star indicator" msgstr "" -#: include/features.php:64 +#: include/features.php:105 msgid "Mute Post Notifications" msgstr "" -#: include/features.php:64 +#: include/features.php:105 msgid "Ability to mute notifications for a thread" msgstr "" +#: include/features.php:110 +msgid "Advanced Profile Settings" +msgstr "" + +#: include/features.php:111 +msgid "Show visitors public community forums at the Advanced Profile Page" +msgstr "" + #: include/follow.php:77 msgid "Connect URL missing." msgstr "" @@ -6562,23 +6602,27 @@ msgstr "Een verwijderde groep met deze naam is weer tot leven gewekt. Bestaande msgid "Default privacy group for new contacts" msgstr "" -#: include/group.php:228 +#: include/group.php:239 msgid "Everybody" msgstr "Iedereen" -#: include/group.php:251 +#: include/group.php:262 msgid "edit" msgstr "verander" -#: include/group.php:273 +#: include/group.php:285 +msgid "Edit groups" +msgstr "" + +#: include/group.php:287 msgid "Edit group" msgstr "Verander groep" -#: include/group.php:274 +#: include/group.php:288 msgid "Create a new group" msgstr "Maak nieuwe groep" -#: include/group.php:277 +#: include/group.php:291 msgid "Contacts not in any group" msgstr "" @@ -6647,180 +6691,208 @@ msgstr "secondes" msgid "%1$d %2$s ago" msgstr "%1$d %2$s geleden" -#: include/datetime.php:474 include/items.php:2484 +#: include/datetime.php:474 include/items.php:2477 #, php-format msgid "%s's birthday" msgstr "%s's verjaardag" -#: include/datetime.php:475 include/items.php:2485 +#: include/datetime.php:475 include/items.php:2478 #, php-format msgid "Happy Birthday %s" msgstr "Gefeliciteerd %s" -#: include/identity.php:38 +#: include/identity.php:42 msgid "Requested account is not available." msgstr "Gevraagde account is niet beschikbaar." -#: include/identity.php:121 include/identity.php:255 include/identity.php:608 +#: include/identity.php:95 include/identity.php:284 include/identity.php:662 msgid "Edit profile" msgstr "Bewerk profiel" -#: include/identity.php:220 +#: include/identity.php:244 +msgid "Atom feed" +msgstr "" + +#: include/identity.php:249 msgid "Message" msgstr "Bericht" -#: include/identity.php:226 include/nav.php:185 +#: include/identity.php:255 include/nav.php:185 msgid "Profiles" msgstr "Profielen" -#: include/identity.php:226 +#: include/identity.php:255 msgid "Manage/edit profiles" msgstr "Beheer/wijzig profielen" -#: include/identity.php:342 -msgid "Network:" -msgstr "" - -#: include/identity.php:374 include/identity.php:460 +#: include/identity.php:425 include/identity.php:509 msgid "g A l F d" msgstr "G l j F" -#: include/identity.php:375 include/identity.php:461 +#: include/identity.php:426 include/identity.php:510 msgid "F d" msgstr "d F" -#: include/identity.php:420 include/identity.php:507 +#: include/identity.php:471 include/identity.php:556 msgid "[today]" msgstr "[vandaag]" -#: include/identity.php:432 +#: include/identity.php:483 msgid "Birthday Reminders" msgstr "Verjaardagsherinneringen" -#: include/identity.php:433 +#: include/identity.php:484 msgid "Birthdays this week:" msgstr "Verjaardagen deze week:" -#: include/identity.php:494 +#: include/identity.php:543 msgid "[No description]" msgstr "[Geen omschrijving]" -#: include/identity.php:518 +#: include/identity.php:567 msgid "Event Reminders" msgstr "Gebeurtenisherinneringen" -#: include/identity.php:519 +#: include/identity.php:568 msgid "Events this week:" msgstr "Gebeurtenissen deze week:" -#: include/identity.php:546 +#: include/identity.php:595 msgid "j F, Y" msgstr "F j Y" -#: include/identity.php:547 +#: include/identity.php:596 msgid "j F" msgstr "F j" -#: include/identity.php:554 +#: include/identity.php:603 msgid "Birthday:" msgstr "Verjaardag:" -#: include/identity.php:558 +#: include/identity.php:607 msgid "Age:" msgstr "Leeftijd:" -#: include/identity.php:567 +#: include/identity.php:616 #, php-format msgid "for %1$d %2$s" msgstr "voor %1$d %2$s" -#: include/identity.php:580 +#: include/identity.php:629 msgid "Religion:" msgstr "Religie:" -#: include/identity.php:584 +#: include/identity.php:633 msgid "Hobbies/Interests:" msgstr "Hobby:" -#: include/identity.php:591 +#: include/identity.php:640 msgid "Contact information and Social Networks:" msgstr "Contactinformatie en sociale netwerken:" -#: include/identity.php:593 +#: include/identity.php:642 msgid "Musical interests:" msgstr "Muzikale interesse " -#: include/identity.php:595 +#: include/identity.php:644 msgid "Books, literature:" msgstr "Boeken, literatuur:" -#: include/identity.php:597 +#: include/identity.php:646 msgid "Television:" msgstr "Televisie" -#: include/identity.php:599 +#: include/identity.php:648 msgid "Film/dance/culture/entertainment:" msgstr "Film/dans/cultuur/ontspanning:" -#: include/identity.php:601 +#: include/identity.php:650 msgid "Love/Romance:" msgstr "Liefde/romance:" -#: include/identity.php:603 +#: include/identity.php:652 msgid "Work/employment:" msgstr "Werk/beroep:" -#: include/identity.php:605 +#: include/identity.php:654 msgid "School/education:" msgstr "School/opleiding:" -#: include/identity.php:633 include/nav.php:75 -msgid "Status" -msgstr "Tijdlijn" +#: include/identity.php:658 +msgid "Forums:" +msgstr "" -#: include/identity.php:636 -msgid "Status Messages and Posts" -msgstr "Berichten op jouw tijdlijn" - -#: include/identity.php:644 -msgid "Profile Details" -msgstr "Profieldetails" - -#: include/identity.php:657 include/identity.php:660 include/nav.php:78 +#: include/identity.php:710 include/identity.php:713 include/nav.php:78 msgid "Videos" msgstr "Video's" -#: include/identity.php:672 include/nav.php:140 +#: include/identity.php:725 include/nav.php:140 msgid "Events and Calendar" msgstr "Gebeurtenissen en kalender" -#: include/identity.php:680 +#: include/identity.php:733 msgid "Only You Can See This" msgstr "Alleen jij kunt dit zien" -#: include/acl_selectors.php:324 +#: include/like.php:167 include/conversation.php:122 +#: include/conversation.php:258 include/text.php:1991 +#: view/theme/diabook/theme.php:463 +msgid "event" +msgstr "gebeurtenis" + +#: include/like.php:184 include/conversation.php:141 include/diaspora.php:2163 +#: view/theme/diabook/theme.php:480 +#, php-format +msgid "%1$s likes %2$s's %3$s" +msgstr "%1$s vindt het %3$s van %2$s leuk" + +#: include/like.php:186 include/conversation.php:144 +#, php-format +msgid "%1$s doesn't like %2$s's %3$s" +msgstr "%1$s vindt het %3$s van %2$s niet leuk" + +#: include/like.php:188 +#, php-format +msgid "%1$s is attending %2$s's %3$s" +msgstr "" + +#: include/like.php:190 +#, php-format +msgid "%1$s is not attending %2$s's %3$s" +msgstr "" + +#: include/like.php:192 +#, php-format +msgid "%1$s may attend %2$s's %3$s" +msgstr "" + +#: include/acl_selectors.php:325 msgid "Post to Email" msgstr "Verzenden per e-mail" -#: include/acl_selectors.php:329 +#: include/acl_selectors.php:330 #, php-format msgid "Connectors disabled, since \"%s\" is enabled." msgstr "" -#: include/acl_selectors.php:335 +#: include/acl_selectors.php:336 msgid "Visible to everybody" msgstr "Zichtbaar voor iedereen" -#: include/acl_selectors.php:336 view/theme/diabook/config.php:142 +#: include/acl_selectors.php:337 view/theme/diabook/config.php:142 #: view/theme/diabook/theme.php:621 view/theme/vier/config.php:103 msgid "show" msgstr "tonen" -#: include/acl_selectors.php:337 view/theme/diabook/config.php:142 +#: include/acl_selectors.php:338 view/theme/diabook/config.php:142 #: view/theme/diabook/theme.php:621 view/theme/vier/config.php:103 msgid "don't show" msgstr "niet tonen" +#: include/acl_selectors.php:348 +msgid "Close" +msgstr "Afsluiten" + #: include/message.php:15 include/message.php:173 msgid "[no subject]" msgstr "[geen onderwerp]" @@ -6829,31 +6901,31 @@ msgstr "[geen onderwerp]" msgid "stopped following" msgstr "" -#: include/Contact.php:334 include/conversation.php:911 +#: include/Contact.php:337 include/conversation.php:911 msgid "View Status" msgstr "Bekijk status" -#: include/Contact.php:336 include/conversation.php:913 +#: include/Contact.php:339 include/conversation.php:913 msgid "View Photos" msgstr "Bekijk foto's" -#: include/Contact.php:337 include/conversation.php:914 +#: include/Contact.php:340 include/conversation.php:914 msgid "Network Posts" msgstr "Netwerkberichten" -#: include/Contact.php:338 include/conversation.php:915 +#: include/Contact.php:341 include/conversation.php:915 msgid "Edit Contact" msgstr "Bewerk contact" -#: include/Contact.php:339 +#: include/Contact.php:342 msgid "Drop Contact" msgstr "Verwijder contact" -#: include/Contact.php:340 include/conversation.php:916 +#: include/Contact.php:343 include/conversation.php:916 msgid "Send PM" msgstr "Stuur een privébericht" -#: include/Contact.php:341 include/conversation.php:920 +#: include/Contact.php:344 include/conversation.php:920 msgid "Poke" msgstr "Aanstoten" @@ -6916,406 +6988,407 @@ msgstr "Geselecteerde items verwijderen" msgid "Follow Thread" msgstr "Conversatie volgen" -#: include/conversation.php:1035 +#: include/conversation.php:1034 #, php-format msgid "%s likes this." msgstr "%s vindt dit leuk." -#: include/conversation.php:1038 +#: include/conversation.php:1037 #, php-format msgid "%s doesn't like this." msgstr "%s vindt dit niet leuk." -#: include/conversation.php:1041 +#: include/conversation.php:1040 #, php-format msgid "%s attends." msgstr "" -#: include/conversation.php:1044 +#: include/conversation.php:1043 #, php-format msgid "%s doesn't attend." msgstr "" -#: include/conversation.php:1047 +#: include/conversation.php:1046 #, php-format msgid "%s attends maybe." msgstr "" -#: include/conversation.php:1057 +#: include/conversation.php:1056 msgid "and" msgstr "en" -#: include/conversation.php:1063 +#: include/conversation.php:1062 #, php-format msgid ", and %d other people" msgstr ", en %d andere mensen" -#: include/conversation.php:1072 +#: include/conversation.php:1071 #, php-format msgid "%2$d people like this" msgstr "%2$d mensen vinden dit leuk" -#: include/conversation.php:1073 +#: include/conversation.php:1072 #, php-format msgid "%s like this." msgstr "" -#: include/conversation.php:1076 +#: include/conversation.php:1075 #, php-format msgid "%2$d people don't like this" msgstr "%2$d people vinden dit niet leuk" -#: include/conversation.php:1077 +#: include/conversation.php:1076 #, php-format msgid "%s don't like this." msgstr "" -#: include/conversation.php:1080 +#: include/conversation.php:1079 #, php-format msgid "%2$d people attend" msgstr "" -#: include/conversation.php:1081 +#: include/conversation.php:1080 #, php-format msgid "%s attend." msgstr "" -#: include/conversation.php:1084 +#: include/conversation.php:1083 #, php-format msgid "%2$d people don't attend" msgstr "" -#: include/conversation.php:1085 +#: include/conversation.php:1084 #, php-format msgid "%s don't attend." msgstr "" -#: include/conversation.php:1088 +#: include/conversation.php:1087 #, php-format msgid "%2$d people anttend maybe" msgstr "" -#: include/conversation.php:1089 +#: include/conversation.php:1088 #, php-format msgid "%s anttend maybe." msgstr "" -#: include/conversation.php:1128 include/conversation.php:1146 +#: include/conversation.php:1127 include/conversation.php:1145 msgid "Visible to everybody" msgstr "Zichtbaar voor iedereen" -#: include/conversation.php:1130 include/conversation.php:1148 +#: include/conversation.php:1129 include/conversation.php:1147 msgid "Please enter a video link/URL:" msgstr "Vul een videolink/URL in:" -#: include/conversation.php:1131 include/conversation.php:1149 +#: include/conversation.php:1130 include/conversation.php:1148 msgid "Please enter an audio link/URL:" msgstr "Vul een audiolink/URL in:" -#: include/conversation.php:1132 include/conversation.php:1150 +#: include/conversation.php:1131 include/conversation.php:1149 msgid "Tag term:" msgstr "Label:" -#: include/conversation.php:1134 include/conversation.php:1152 +#: include/conversation.php:1133 include/conversation.php:1151 msgid "Where are you right now?" msgstr "Waar ben je nu?" -#: include/conversation.php:1135 +#: include/conversation.php:1134 msgid "Delete item(s)?" msgstr "Item(s) verwijderen?" -#: include/conversation.php:1204 +#: include/conversation.php:1203 msgid "permissions" msgstr "rechten" -#: include/conversation.php:1227 +#: include/conversation.php:1226 msgid "Post to Groups" msgstr "Verzenden naar Groepen" -#: include/conversation.php:1228 +#: include/conversation.php:1227 msgid "Post to Contacts" msgstr "Verzenden naar Contacten" -#: include/conversation.php:1229 +#: include/conversation.php:1228 msgid "Private post" msgstr "Privé verzending" -#: include/conversation.php:1377 +#: include/conversation.php:1385 msgid "View all" msgstr "" -#: include/conversation.php:1399 +#: include/conversation.php:1407 msgid "Like" msgid_plural "Likes" msgstr[0] "" msgstr[1] "" -#: include/conversation.php:1402 +#: include/conversation.php:1410 msgid "Dislike" msgid_plural "Dislikes" msgstr[0] "" msgstr[1] "" -#: include/conversation.php:1408 +#: include/conversation.php:1416 msgid "Not Attending" msgid_plural "Not Attending" msgstr[0] "" msgstr[1] "" -#: include/conversation.php:1411 include/profile_selectors.php:6 +#: include/conversation.php:1419 include/profile_selectors.php:6 msgid "Undecided" msgid_plural "Undecided" msgstr[0] "" msgstr[1] "" +#: include/forums.php:105 include/text.php:1015 include/nav.php:126 +#: view/theme/vier/theme.php:259 +msgid "Forums" +msgstr "" + +#: include/forums.php:107 view/theme/vier/theme.php:261 +msgid "External link to forum" +msgstr "" + #: include/network.php:967 msgid "view full size" msgstr "Volledig formaat" -#: include/text.php:299 +#: include/text.php:303 msgid "newer" msgstr "nieuwere berichten" -#: include/text.php:301 +#: include/text.php:305 msgid "older" msgstr "oudere berichten" -#: include/text.php:306 +#: include/text.php:310 msgid "prev" msgstr "vorige" -#: include/text.php:308 +#: include/text.php:312 msgid "first" msgstr "eerste" -#: include/text.php:340 +#: include/text.php:344 msgid "last" msgstr "laatste" -#: include/text.php:343 +#: include/text.php:347 msgid "next" msgstr "volgende" -#: include/text.php:398 +#: include/text.php:402 msgid "Loading more entries..." msgstr "" -#: include/text.php:399 +#: include/text.php:403 msgid "The end" msgstr "" -#: include/text.php:890 +#: include/text.php:894 msgid "No contacts" msgstr "Geen contacten" -#: include/text.php:905 +#: include/text.php:909 #, php-format msgid "%d Contact" msgid_plural "%d Contacts" msgstr[0] "%d contact" msgstr[1] "%d contacten" -#: include/text.php:1003 include/nav.php:121 +#: include/text.php:921 +msgid "View Contacts" +msgstr "Bekijk contacten" + +#: include/text.php:1010 include/nav.php:121 msgid "Full Text" msgstr "" -#: include/text.php:1004 include/nav.php:122 +#: include/text.php:1011 include/nav.php:122 msgid "Tags" msgstr "" -#: include/text.php:1008 include/nav.php:126 -msgid "Forums" -msgstr "" - -#: include/text.php:1059 +#: include/text.php:1066 msgid "poke" msgstr "aanstoten" -#: include/text.php:1059 +#: include/text.php:1066 msgid "poked" msgstr "aangestoten" -#: include/text.php:1060 +#: include/text.php:1067 msgid "ping" msgstr "ping" -#: include/text.php:1060 +#: include/text.php:1067 msgid "pinged" msgstr "gepingd" -#: include/text.php:1061 +#: include/text.php:1068 msgid "prod" msgstr "porren" -#: include/text.php:1061 +#: include/text.php:1068 msgid "prodded" msgstr "gepord" -#: include/text.php:1062 +#: include/text.php:1069 msgid "slap" msgstr "slaan" -#: include/text.php:1062 +#: include/text.php:1069 msgid "slapped" msgstr "geslagen" -#: include/text.php:1063 +#: include/text.php:1070 msgid "finger" msgstr "finger" -#: include/text.php:1063 +#: include/text.php:1070 msgid "fingered" msgstr "gerfingerd" -#: include/text.php:1064 +#: include/text.php:1071 msgid "rebuff" msgstr "afpoeieren" -#: include/text.php:1064 +#: include/text.php:1071 msgid "rebuffed" msgstr "afgepoeierd" -#: include/text.php:1078 +#: include/text.php:1085 msgid "happy" msgstr "Blij" -#: include/text.php:1079 +#: include/text.php:1086 msgid "sad" msgstr "Verdrietig" -#: include/text.php:1080 +#: include/text.php:1087 msgid "mellow" msgstr "mellow" -#: include/text.php:1081 +#: include/text.php:1088 msgid "tired" msgstr "vermoeid" -#: include/text.php:1082 +#: include/text.php:1089 msgid "perky" msgstr "parmantig" -#: include/text.php:1083 +#: include/text.php:1090 msgid "angry" msgstr "boos" -#: include/text.php:1084 +#: include/text.php:1091 msgid "stupified" msgstr "verbijsterd" -#: include/text.php:1085 +#: include/text.php:1092 msgid "puzzled" msgstr "onzeker" -#: include/text.php:1086 +#: include/text.php:1093 msgid "interested" msgstr "Geïnteresseerd" -#: include/text.php:1087 +#: include/text.php:1094 msgid "bitter" msgstr "bitter" -#: include/text.php:1088 +#: include/text.php:1095 msgid "cheerful" msgstr "vrolijk" -#: include/text.php:1089 +#: include/text.php:1096 msgid "alive" msgstr "levend" -#: include/text.php:1090 +#: include/text.php:1097 msgid "annoyed" msgstr "verveeld" -#: include/text.php:1091 +#: include/text.php:1098 msgid "anxious" msgstr "bezorgd" -#: include/text.php:1092 +#: include/text.php:1099 msgid "cranky" msgstr "humeurig " -#: include/text.php:1093 +#: include/text.php:1100 msgid "disturbed" msgstr "verontrust" -#: include/text.php:1094 +#: include/text.php:1101 msgid "frustrated" msgstr "gefrustreerd" -#: include/text.php:1095 +#: include/text.php:1102 msgid "motivated" msgstr "gemotiveerd" -#: include/text.php:1096 +#: include/text.php:1103 msgid "relaxed" msgstr "ontspannen" -#: include/text.php:1097 +#: include/text.php:1104 msgid "surprised" msgstr "verbaasd" -#: include/text.php:1490 +#: include/text.php:1497 msgid "bytes" msgstr "bytes" -#: include/text.php:1522 include/text.php:1534 +#: include/text.php:1529 include/text.php:1541 msgid "Click to open/close" msgstr "klik om te openen/sluiten" -#: include/text.php:1708 +#: include/text.php:1715 msgid "View on separate page" msgstr "" -#: include/text.php:1709 +#: include/text.php:1716 msgid "view on separate page" msgstr "" -#: include/text.php:1990 +#: include/text.php:1995 msgid "activity" msgstr "activiteit" -#: include/text.php:1993 +#: include/text.php:1998 msgid "post" msgstr "bericht" -#: include/text.php:2161 +#: include/text.php:2166 msgid "Item filed" msgstr "Item bewaard" -#: include/bbcode.php:474 include/bbcode.php:1132 include/bbcode.php:1133 +#: include/bbcode.php:482 include/bbcode.php:1157 include/bbcode.php:1158 msgid "Image/photo" msgstr "Afbeelding/foto" -#: include/bbcode.php:572 +#: include/bbcode.php:595 #, php-format msgid "%2$s %3$s" msgstr "" -#: include/bbcode.php:606 +#: include/bbcode.php:629 #, php-format msgid "" "%s wrote the following post" msgstr "" -#: include/bbcode.php:1092 include/bbcode.php:1112 +#: include/bbcode.php:1117 include/bbcode.php:1137 msgid "$1 wrote:" msgstr "$1 schreef:" -#: include/bbcode.php:1141 include/bbcode.php:1142 +#: include/bbcode.php:1166 include/bbcode.php:1167 msgid "Encrypted content" msgstr "Versleutelde inhoud" -#: include/notifier.php:840 include/delivery.php:456 -msgid "(no subject)" -msgstr "(geen onderwerp)" - -#: include/notifier.php:850 include/delivery.php:467 include/enotify.php:37 -msgid "noreply" -msgstr "geen reactie" - -#: include/dba_pdo.php:72 include/dba.php:56 +#: include/dba_pdo.php:72 include/dba.php:55 #, php-format msgid "Cannot locate DNS info for database server '%s'" msgstr "" @@ -7360,6 +7433,10 @@ msgstr "OStatus" msgid "RSS/Atom" msgstr "RSS/Atom" +#: include/contact_selectors.php:81 +msgid "Facebook" +msgstr "Facebook" + #: include/contact_selectors.php:82 msgid "Zot!" msgstr "Zot!" @@ -7404,7 +7481,7 @@ msgstr "" msgid "Redmatrix" msgstr "" -#: include/Scrape.php:603 +#: include/Scrape.php:624 msgid " on Last.fm" msgstr " op Last.fm" @@ -7416,15 +7493,15 @@ msgstr "Begint:" msgid "Finishes:" msgstr "Eindigt:" -#: include/plugin.php:458 include/plugin.php:460 +#: include/plugin.php:522 include/plugin.php:524 msgid "Click here to upgrade." msgstr "" -#: include/plugin.php:466 +#: include/plugin.php:530 msgid "This action exceeds the limits set by your subscription plan." msgstr "" -#: include/plugin.php:471 +#: include/plugin.php:535 msgid "This action is not available under your subscription plan." msgstr "" @@ -7580,46 +7657,21 @@ msgstr "Navigatie" msgid "Site map" msgstr "Sitemap" -#: include/api.php:321 include/api.php:332 include/api.php:441 -#: include/api.php:1151 include/api.php:1153 -msgid "User not found." -msgstr "Gebruiker niet gevonden" - -#: include/api.php:799 +#: include/api.php:878 #, php-format msgid "Daily posting limit of %d posts reached. The post was rejected." msgstr "" -#: include/api.php:818 +#: include/api.php:897 #, php-format msgid "Weekly posting limit of %d posts reached. The post was rejected." msgstr "" -#: include/api.php:837 +#: include/api.php:916 #, php-format msgid "Monthly posting limit of %d posts reached. The post was rejected." msgstr "" -#: include/api.php:1360 -msgid "There is no status with this id." -msgstr "Er is geen status met dit kenmerk" - -#: include/api.php:1434 -msgid "There is no conversation with this id." -msgstr "" - -#: include/api.php:1713 -msgid "Invalid item." -msgstr "" - -#: include/api.php:1723 -msgid "Invalid action. " -msgstr "" - -#: include/api.php:1731 -msgid "DB error" -msgstr "" - #: include/user.php:48 msgid "An invitation is required." msgstr "Een uitnodiging is vereist." @@ -7664,37 +7716,37 @@ msgstr "Ik kan die e-mail niet gebruiken." msgid "Your \"nickname\" can only contain \"a-z\", \"0-9\" and \"_\"." msgstr "" -#: include/user.php:146 include/user.php:244 +#: include/user.php:147 include/user.php:245 msgid "Nickname is already registered. Please choose another." msgstr "Bijnaam is al geregistreerd. Kies een andere." -#: include/user.php:156 +#: include/user.php:157 msgid "" "Nickname was once registered here and may not be re-used. Please choose " "another." msgstr "Bijnaam was ooit hier geregistreerd en kan niet herbruikt worden. Kies een andere." -#: include/user.php:172 +#: include/user.php:173 msgid "SERIOUS ERROR: Generation of security keys failed." msgstr "ERNSTIGE FOUT: aanmaken van beveiligingssleutels mislukt." -#: include/user.php:230 +#: include/user.php:231 msgid "An error occurred during registration. Please try again." msgstr "" -#: include/user.php:255 view/theme/duepuntozero/config.php:44 +#: include/user.php:256 view/theme/duepuntozero/config.php:44 msgid "default" msgstr "standaard" -#: include/user.php:265 +#: include/user.php:266 msgid "An error occurred creating your default profile. Please try again." msgstr "" -#: include/user.php:297 include/user.php:301 include/profile_selectors.php:42 +#: include/user.php:299 include/user.php:303 include/profile_selectors.php:42 msgid "Friends" msgstr "Vrienden" -#: include/user.php:385 +#: include/user.php:387 #, php-format msgid "" "\n" @@ -7703,7 +7755,7 @@ msgid "" "\t" msgstr "" -#: include/user.php:389 +#: include/user.php:391 #, php-format msgid "" "\n" @@ -7733,19 +7785,27 @@ msgid "" "\t\tThank you and welcome to %2$s." msgstr "" -#: include/diaspora.php:719 +#: include/diaspora.php:720 msgid "Sharing notification from Diaspora network" msgstr "" -#: include/diaspora.php:2574 +#: include/diaspora.php:2604 msgid "Attachments:" msgstr "Bijlagen:" -#: include/items.php:4933 +#: include/delivery.php:533 +msgid "(no subject)" +msgstr "(geen onderwerp)" + +#: include/delivery.php:544 include/enotify.php:37 +msgid "noreply" +msgstr "geen reactie" + +#: include/items.php:4903 msgid "Do you really want to delete this item?" msgstr "Wil je echt dit item verwijderen?" -#: include/items.php:5208 +#: include/items.php:5178 msgid "Archives" msgstr "Archieven" @@ -8261,11 +8321,11 @@ msgstr "" msgid "Please visit %s to approve or reject the request." msgstr "" -#: include/oembed.php:220 +#: include/oembed.php:214 msgid "Embedded content" msgstr "Ingebedde inhoud" -#: include/oembed.php:229 +#: include/oembed.php:223 msgid "Embedding disabled" msgstr "Inbedden uitgeschakeld" @@ -8305,7 +8365,7 @@ msgstr[1] "%d contacten werden niet geïmporteerd" msgid "Done. You can now login with your username and password" msgstr "Gebeurd. Je kunt nu inloggen met je gebruikersnaam en wachtwoord" -#: index.php:441 +#: index.php:442 msgid "toggle mobile" msgstr "mobiel thema omwisselen" @@ -8376,7 +8436,7 @@ msgstr "" #: view/theme/diabook/config.php:158 view/theme/diabook/theme.php:130 #: view/theme/diabook/theme.php:544 view/theme/diabook/theme.php:624 -#: view/theme/vier/config.php:111 view/theme/vier/theme.php:230 +#: view/theme/vier/config.php:111 msgid "Community Pages" msgstr "Forum/groepspagina's" @@ -8387,7 +8447,7 @@ msgstr "Earth Layers" #: view/theme/diabook/config.php:160 view/theme/diabook/theme.php:391 #: view/theme/diabook/theme.php:626 view/theme/vier/config.php:112 -#: view/theme/vier/theme.php:142 +#: view/theme/vier/theme.php:156 msgid "Community Profiles" msgstr "Forum/groepsprofielen" @@ -8398,19 +8458,19 @@ msgstr "" #: view/theme/diabook/config.php:162 view/theme/diabook/theme.php:606 #: view/theme/diabook/theme.php:628 view/theme/vier/config.php:114 -#: view/theme/vier/theme.php:348 +#: view/theme/vier/theme.php:377 msgid "Connect Services" msgstr "Diensten verbinden" #: view/theme/diabook/config.php:163 view/theme/diabook/theme.php:523 #: view/theme/diabook/theme.php:629 view/theme/vier/config.php:115 -#: view/theme/vier/theme.php:189 +#: view/theme/vier/theme.php:203 msgid "Find Friends" msgstr "Zoek vrienden" #: view/theme/diabook/config.php:164 view/theme/diabook/theme.php:412 #: view/theme/diabook/theme.php:630 view/theme/vier/config.php:116 -#: view/theme/vier/theme.php:171 +#: view/theme/vier/theme.php:185 msgid "Last users" msgstr "Laatste gebruikers" @@ -8432,7 +8492,7 @@ msgstr "Jouw contacten" msgid "Your personal photos" msgstr "Jouw persoonlijke foto's" -#: view/theme/diabook/theme.php:524 view/theme/vier/theme.php:190 +#: view/theme/diabook/theme.php:524 view/theme/vier/theme.php:204 msgid "Local Directory" msgstr "Lokale gids" @@ -8452,11 +8512,7 @@ msgstr "" msgid "Set style" msgstr "" -#: view/theme/vier/theme.php:234 -msgid "External link to forum" -msgstr "" - -#: view/theme/vier/theme.php:266 +#: view/theme/vier/theme.php:295 msgid "Quick Start" msgstr "" diff --git a/view/nl/strings.php b/view/nl/strings.php index f535f54be0..0e8399be7b 100644 --- a/view/nl/strings.php +++ b/view/nl/strings.php @@ -5,9 +5,11 @@ function string_plural_select_nl($n){ return ($n != 1);; }} ; +$a->strings["Network:"] = "Netwerk:"; +$a->strings["Forum"] = "Forum"; $a->strings["%d contact edited."] = array( - 0 => "", - 1 => "", + 0 => "%d contact gewijzigd.", + 1 => "%d contacten gewijzigd.", ); $a->strings["Could not access contact record."] = "Kon geen toegang krijgen tot de contactgegevens"; $a->strings["Could not locate selected profile."] = "Kon het geselecteerde profiel niet vinden."; @@ -33,28 +35,11 @@ $a->strings["(Update was successful)"] = "(Wijziging is geslaagd)"; $a->strings["(Update was not successful)"] = "(Wijziging is niet geslaagd)"; $a->strings["Suggest friends"] = "Stel vrienden voor"; $a->strings["Network type: %s"] = "Netwerk type: %s"; -$a->strings["%d contact in common"] = array( - 0 => "%d gedeeld contact", - 1 => "%d gedeelde contacten", -); -$a->strings["View all contacts"] = "Alle contacten zien"; -$a->strings["Unblock"] = "Blokkering opheffen"; -$a->strings["Block"] = "Blokkeren"; -$a->strings["Toggle Blocked status"] = "Schakel geblokkeerde status"; -$a->strings["Unignore"] = "Negeer niet meer"; -$a->strings["Ignore"] = "Negeren"; -$a->strings["Toggle Ignored status"] = "Schakel negeerstatus"; -$a->strings["Unarchive"] = "Archiveer niet meer"; -$a->strings["Archive"] = "Archiveer"; -$a->strings["Toggle Archive status"] = "Schakel archiveringsstatus"; -$a->strings["Repair"] = "Herstellen"; -$a->strings["Advanced Contact Settings"] = "Geavanceerde instellingen voor contacten"; $a->strings["Communications lost with this contact!"] = "Communicatie met dit contact is verbroken!"; $a->strings["Fetch further information for feeds"] = ""; $a->strings["Disabled"] = "Uitgeschakeld"; $a->strings["Fetch information"] = ""; $a->strings["Fetch information and keywords"] = ""; -$a->strings["Contact Editor"] = "Contactbewerker"; $a->strings["Submit"] = "Opslaan"; $a->strings["Profile Visibility"] = "Zichtbaarheid profiel"; $a->strings["Please choose the profile you would like to display to %s when viewing your profile securely."] = "Kies het profiel dat getoond moet worden wanneer %s uw profiel bezoekt. "; @@ -70,6 +55,10 @@ $a->strings["Last update:"] = "Laatste wijziging:"; $a->strings["Update public posts"] = "Openbare posts aanpassen"; $a->strings["Update now"] = "Wijzig nu"; $a->strings["Connect/Follow"] = "Verbind/Volg"; +$a->strings["Unblock"] = "Blokkering opheffen"; +$a->strings["Block"] = "Blokkeren"; +$a->strings["Unignore"] = "Negeer niet meer"; +$a->strings["Ignore"] = "Negeren"; $a->strings["Currently blocked"] = "Op dit moment geblokkeerd"; $a->strings["Currently ignored"] = "Op dit moment genegeerd"; $a->strings["Currently archived"] = "Op dit moment gearchiveerd"; @@ -80,6 +69,9 @@ $a->strings["Send a notification of every new post of this contact"] = ""; $a->strings["Blacklisted keywords"] = ""; $a->strings["Comma separated list of keywords that should not be converted to hashtags, when \"Fetch information and keywords\" is selected"] = ""; $a->strings["Profile URL"] = "Profiel url"; +$a->strings["Location:"] = "Plaats:"; +$a->strings["About:"] = "Over:"; +$a->strings["Tags:"] = "Labels:"; $a->strings["Suggestions"] = "Voorstellen"; $a->strings["Suggest potential friends"] = "Stel vrienden voor"; $a->strings["All Contacts"] = "Alle Contacten"; @@ -99,7 +91,21 @@ $a->strings["Search your contacts"] = "Doorzoek je contacten"; $a->strings["Finding: "] = "Gevonden:"; $a->strings["Find"] = "Zoek"; $a->strings["Update"] = "Wijzigen"; +$a->strings["Archive"] = "Archiveer"; +$a->strings["Unarchive"] = "Archiveer niet meer"; $a->strings["Delete"] = "Verwijder"; +$a->strings["Status"] = "Tijdlijn"; +$a->strings["Status Messages and Posts"] = "Berichten op jouw tijdlijn"; +$a->strings["Profile"] = "Profiel"; +$a->strings["Profile Details"] = "Profieldetails"; +$a->strings["View all contacts"] = "Alle contacten zien"; +$a->strings["Common Friends"] = "Gedeelde Vrienden"; +$a->strings["View all common friends"] = ""; +$a->strings["Repair"] = "Herstellen"; +$a->strings["Advanced Contact Settings"] = "Geavanceerde instellingen voor contacten"; +$a->strings["Toggle Blocked status"] = "Schakel geblokkeerde status"; +$a->strings["Toggle Ignored status"] = "Schakel negeerstatus"; +$a->strings["Toggle Archive status"] = "Schakel archiveringsstatus"; $a->strings["Mutual Friendship"] = "Wederzijdse vriendschap"; $a->strings["is a fan of yours"] = "Is een fan van jou"; $a->strings["you are a fan of"] = "Jij bent een fan van"; @@ -112,7 +118,6 @@ $a->strings["Post successful."] = "Bericht succesvol geplaatst."; $a->strings["Permission denied"] = "Toegang geweigerd"; $a->strings["Invalid profile identifier."] = "Ongeldige profiel-identificatie."; $a->strings["Profile Visibility Editor"] = ""; -$a->strings["Profile"] = "Profiel"; $a->strings["Click on a contact to add or remove."] = "Klik op een contact om het toe te voegen of te verwijderen."; $a->strings["Visible To"] = "Zichtbaar voor"; $a->strings["All Contacts (with secure profile access)"] = "Alle contacten (met veilige profieltoegang)"; @@ -137,9 +142,6 @@ $a->strings["Edit your default profile to your liking. Review t $a->strings["Profile Keywords"] = "Sleutelwoorden voor dit profiel"; $a->strings["Set some public keywords for your default profile which describe your interests. We may be able to find other people with similar interests and suggest friendships."] = "Stel enkele openbare sleutelwoorden in voor je standaard profiel die je interesses beschrijven. We kunnen dan misschien mensen vinden met gelijkaardige interesses, en vrienden voorstellen."; $a->strings["Connecting"] = "Verbinding aan het maken"; -$a->strings["Facebook"] = "Facebook"; -$a->strings["Authorise the Facebook Connector if you currently have a Facebook account and we will (optionally) import all your Facebook friends and conversations."] = "Machtig de Facebook Connector als je een Facebook account hebt. We zullen (optioneel) al je Facebook vrienden en conversaties importeren."; -$a->strings["If this is your own personal server, installing the Facebook addon may ease your transition to the free social web."] = "Als dit jouw eigen persoonlijke server is kan het installeren van de Facebook toevoeging je overgang naar het vrije sociale web vergemakkelijken."; $a->strings["Importing Emails"] = "E-mails importeren"; $a->strings["Enter your email access information on your Connector Settings page if you wish to import and interact with friends or mailing lists from your email INBOX"] = "Vul je e-mailtoegangsinformatie in op je pagina met verbindingsinstellingen als je vrienden of mailinglijsten uit je e-mail-inbox wilt importeren, en met hen wilt communiceren"; $a->strings["Go to Your Contacts Page"] = "Ga naar je contactenpagina"; @@ -184,7 +186,7 @@ $a->strings["Tag removed"] = "Label verwijderd"; $a->strings["Remove Item Tag"] = "Verwijder label van item"; $a->strings["Select a tag to remove: "] = "Selecteer een label om te verwijderen: "; $a->strings["Remove"] = "Verwijderen"; -$a->strings["Subsribing to OStatus contacts"] = ""; +$a->strings["Subscribing to OStatus contacts"] = ""; $a->strings["No contact provided."] = ""; $a->strings["Couldn't fetch information for contact."] = ""; $a->strings["Couldn't fetch friends for contact."] = ""; @@ -206,9 +208,6 @@ $a->strings["Does %s know you?"] = "Kent %s jou?"; $a->strings["No"] = "Nee"; $a->strings["Add a personal note:"] = "Voeg een persoonlijke opmerking toe:"; $a->strings["Your Identity Address:"] = "Adres van uw identiteit:"; -$a->strings["Location:"] = "Plaats:"; -$a->strings["About:"] = "Over:"; -$a->strings["Tags:"] = "Labels:"; $a->strings["Contact added"] = "Contact toegevoegd"; $a->strings["Unable to locate original post."] = "Ik kan de originele post niet meer vinden."; $a->strings["Empty post discarded."] = "Lege post weggegooid."; @@ -229,6 +228,7 @@ $a->strings["Group removed."] = "Groep verwijderd."; $a->strings["Unable to remove group."] = "Niet in staat om groep te verwijderen."; $a->strings["Group Editor"] = "Groepsbewerker"; $a->strings["Members"] = "Leden"; +$a->strings["Group is empty"] = "De groep is leeg"; $a->strings["You must be logged in to use addons. "] = "Je moet ingelogd zijn om deze addons te kunnen gebruiken. "; $a->strings["Applications"] = "Toepassingen"; $a->strings["No installed applications."] = "Geen toepassingen geïnstalleerd"; @@ -287,17 +287,10 @@ $a->strings["Forgot your Password?"] = "Wachtwoord vergeten?"; $a->strings["Enter your email address and submit to have your password reset. Then check your email for further instructions."] = "Voer je e-mailadres in en verstuur het om je wachtwoord opnieuw in te stellen. Kijk dan je e-mail na voor verdere instructies."; $a->strings["Nickname or Email: "] = "Bijnaam of e-mail:"; $a->strings["Reset"] = "Opnieuw"; -$a->strings["event"] = "gebeurtenis"; -$a->strings["%1\$s likes %2\$s's %3\$s"] = "%1\$s vindt het %3\$s van %2\$s leuk"; -$a->strings["%1\$s doesn't like %2\$s's %3\$s"] = "%1\$s vindt het %3\$s van %2\$s niet leuk"; -$a->strings["%1\$s is attending %2\$s's %3\$s"] = ""; -$a->strings["%1\$s is not attending %2\$s's %3\$s"] = ""; -$a->strings["%1\$s may attend %2\$s's %3\$s"] = ""; $a->strings["{0} wants to be your friend"] = "{0} wilt je vriend worden"; $a->strings["{0} sent you a message"] = "{0} stuurde jou een bericht"; $a->strings["{0} requested registration"] = "{0} vroeg om zich te registreren"; $a->strings["No contacts."] = "Geen contacten."; -$a->strings["View Contacts"] = "Bekijk contacten"; $a->strings["Invalid request identifier."] = "Ongeldige request identifier."; $a->strings["Discard"] = "Verwerpen"; $a->strings["System"] = "Systeem"; @@ -393,7 +386,6 @@ $a->strings["Please use your browser 'Back' button now if you a $a->strings["No mirroring"] = ""; $a->strings["Mirror as forwarded posting"] = ""; $a->strings["Mirror as my own posting"] = ""; -$a->strings["Repair Contact Settings"] = "Contactinstellingen herstellen"; $a->strings["Return to contact editor"] = "Ga terug naar contactbewerker"; $a->strings["Refetch contact data"] = ""; $a->strings["Name"] = "Naam"; @@ -424,16 +416,22 @@ $a->strings["Site"] = "Website"; $a->strings["Users"] = "Gebruiker"; $a->strings["Plugins"] = "Plugins"; $a->strings["Themes"] = "Thema's"; +$a->strings["Additional features"] = "Extra functies"; $a->strings["DB updates"] = "DB aanpassingen"; $a->strings["Inspect Queue"] = ""; +$a->strings["Federation Statistics"] = ""; $a->strings["Logs"] = "Logs"; +$a->strings["View Logs"] = ""; $a->strings["probe address"] = ""; $a->strings["check webfinger"] = ""; $a->strings["Admin"] = "Beheer"; $a->strings["Plugin Features"] = "Plugin Functies"; $a->strings["diagnostics"] = ""; $a->strings["User registrations waiting for confirmation"] = "Gebruikersregistraties wachten op bevestiging"; +$a->strings["This page offers you some numbers to the known part of the federated social network your Friendica node is part of. These numbers are not complete but only reflect the part of the network your node is aware of."] = ""; +$a->strings["The Auto Discovered Contact Directory feature is not enabled, it will improve the data displayed here."] = ""; $a->strings["Administration"] = "Beheer"; +$a->strings["Currently this node is aware of nodes from the following platforms:"] = ""; $a->strings["ID"] = "ID"; $a->strings["Recipient Name"] = ""; $a->strings["Recipient Profile"] = ""; @@ -582,6 +580,10 @@ $a->strings["Maximum Load Average"] = "Maximum gemiddelde belasting"; $a->strings["Maximum system load before delivery and poll processes are deferred - default 50."] = "Maximum systeembelasting voordat aflever- en poll-processen uitgesteld worden - standaard 50."; $a->strings["Maximum Load Average (Frontend)"] = ""; $a->strings["Maximum system load before the frontend quits service - default 50."] = ""; +$a->strings["Maximum table size for optimization"] = ""; +$a->strings["Maximum table size (in MB) for the automatic optimization - default 100 MB. Enter -1 to disable it."] = ""; +$a->strings["Minimum level of fragmentation"] = ""; +$a->strings["Minimum fragmenation level to start the automatic optimization - default value is 30%."] = ""; $a->strings["Periodical check of global contacts"] = ""; $a->strings["If enabled, the global contacts are checked periodically for missing or outdated data and the vitality of the contacts and servers."] = ""; $a->strings["Days between requery"] = ""; @@ -681,9 +683,11 @@ $a->strings["Toggle"] = "Schakelaar"; $a->strings["Author: "] = "Auteur:"; $a->strings["Maintainer: "] = "Onderhoud:"; $a->strings["Reload active plugins"] = ""; +$a->strings["There are currently no plugins available on your node. You can find the official plugin repository at %1\$s and might find other interesting plugins in the open plugin registry at %2\$s"] = ""; $a->strings["No themes found."] = "Geen thema's gevonden."; $a->strings["Screenshot"] = "Schermafdruk"; $a->strings["Reload active themes"] = ""; +$a->strings["No themes found on the system. They should be paced in %1\$s"] = ""; $a->strings["[Experimental]"] = "[Experimenteel]"; $a->strings["[Unsupported]"] = "[Niet ondersteund]"; $a->strings["Log settings updated."] = "Log instellingen gewijzigd"; @@ -692,11 +696,12 @@ $a->strings["Enable Debugging"] = ""; $a->strings["Log file"] = "Logbestand"; $a->strings["Must be writable by web server. Relative to your Friendica top-level directory."] = "De webserver moet hier kunnen schrijven. Relatief t.o.v. van de hoogste folder binnen uw Friendica-installatie."; $a->strings["Log level"] = "Log niveau"; -$a->strings["Close"] = "Afsluiten"; -$a->strings["FTP Host"] = "FTP Server"; -$a->strings["FTP Path"] = "FTP Pad"; -$a->strings["FTP User"] = "FTP Gebruiker"; -$a->strings["FTP Password"] = "FTP wachtwoord"; +$a->strings["PHP logging"] = ""; +$a->strings["To enable logging of PHP errors and warnings you can add the following to the .htconfig.php file of your installation. The filename set in the 'error_log' line is relative to the friendica top-level directory and must be writeable by the web server. The option '1' for 'log_errors' and 'display_errors' is to enable these options, set to '0' to disable them."] = ""; +$a->strings["Off"] = "Uit"; +$a->strings["On"] = "Aan"; +$a->strings["Lock feature %s"] = ""; +$a->strings["Manage Additional Features"] = ""; $a->strings["Search Results For: %s"] = ""; $a->strings["Remove term"] = "Verwijder zoekterm"; $a->strings["Saved Searches"] = "Opgeslagen zoekopdrachten"; @@ -718,14 +723,10 @@ $a->strings["Warning: This group contains %s member from an insecure network."] ); $a->strings["Private messages to this group are at risk of public disclosure."] = "Privéberichten naar deze groep kunnen openbaar gemaakt worden."; $a->strings["No such group"] = "Zo'n groep bestaat niet"; -$a->strings["Group is empty"] = "De groep is leeg"; $a->strings["Group: %s"] = ""; -$a->strings["Contact: %s"] = ""; $a->strings["Private messages to this person are at risk of public disclosure."] = "Privéberichten naar deze persoon kunnen openbaar gemaakt worden."; $a->strings["Invalid contact."] = "Ongeldig contact."; $a->strings["No friends to display."] = "Geen vrienden om te laten zien."; -$a->strings["Forum"] = ""; -$a->strings["Friends of %s"] = "Vrienden van %s"; $a->strings["Event can not end before it has started."] = ""; $a->strings["Event title and start time are required."] = "Titel en begintijd van de gebeurtenis zijn vereist."; $a->strings["Sun"] = ""; @@ -922,7 +923,6 @@ $a->strings["Not available."] = "Niet beschikbaar"; $a->strings["Community"] = "Website"; $a->strings["No results."] = "Geen resultaten."; $a->strings["everybody"] = "iedereen"; -$a->strings["Additional features"] = "Extra functies"; $a->strings["Display"] = "Weergave"; $a->strings["Social Networks"] = "Sociale netwerken"; $a->strings["Delegations"] = ""; @@ -959,8 +959,6 @@ $a->strings["No name"] = "Geen naam"; $a->strings["Remove authorization"] = "Verwijder authorisatie"; $a->strings["No Plugin settings configured"] = ""; $a->strings["Plugin Settings"] = "Plugin Instellingen"; -$a->strings["Off"] = "Uit"; -$a->strings["On"] = "Aan"; $a->strings["Additional Features"] = "Extra functies"; $a->strings["General Social Media Settings"] = ""; $a->strings["Disable intelligent shortening"] = ""; @@ -995,7 +993,7 @@ $a->strings["Display Settings"] = "Scherminstellingen"; $a->strings["Display Theme:"] = "Schermthema:"; $a->strings["Mobile Theme:"] = "Mobiel thema:"; $a->strings["Update browser every xx seconds"] = "Browser elke xx seconden verversen"; -$a->strings["Minimum of 10 seconds, no maximum"] = "Minimum 10 seconden, geen maximum"; +$a->strings["Minimum of 10 seconds. Enter -1 to disable it."] = ""; $a->strings["Number of items to display per page:"] = "Aantal items te tonen per pagina:"; $a->strings["Maximum of 100 items"] = "Maximum 100 items"; $a->strings["Number of items to display per page when viewed from mobile device:"] = "Aantal items per pagina als je een mobiel toestel gebruikt:"; @@ -1107,12 +1105,12 @@ $a->strings["Friends are advised to please try again in 24 hours."] = "Wij advis $a->strings["Invalid locator"] = "Ongeldige plaatsbepaler"; $a->strings["Invalid email address."] = "Geen geldig e-mailadres"; $a->strings["This account has not been configured for email. Request failed."] = "Aanvraag mislukt. Dit account is niet geconfigureerd voor e-mail."; -$a->strings["Unable to resolve your name at the provided location."] = "Ik kan jouw naam op het opgegeven adres niet vinden."; $a->strings["You have already introduced yourself here."] = "Je hebt jezelf hier al voorgesteld."; $a->strings["Apparently you are already friends with %s."] = "Blijkbaar bent u al bevriend met %s."; $a->strings["Invalid profile URL."] = "Ongeldig profiel adres."; $a->strings["Disallowed profile URL."] = "Niet toegelaten profiel adres."; $a->strings["Your introduction has been sent."] = "Je verzoek is verzonden."; +$a->strings["Remote subscription can't be done for your network. Please subscribe directly on your system."] = ""; $a->strings["Please login to confirm introduction."] = "Log in om je verzoek te bevestigen."; $a->strings["Incorrect identity currently logged in. Please login to this profile."] = "Je huidige identiteit is niet de juiste. Log met dit profiel in."; $a->strings["Confirm"] = "Bevestig"; @@ -1128,6 +1126,7 @@ $a->strings["StatusNet/Federated Social Web"] = "StatusNet/Gefedereerde Sociale $a->strings[" - please do not use this form. Instead, enter %s into your Diaspora search bar."] = "- Gebruik niet dit formulier. Vul %s in in je Diaspora zoekbalk."; $a->strings["Registration successful. Please check your email for further instructions."] = "Registratie geslaagd. Kijk je e-mail na voor verdere instructies."; $a->strings["Failed to send email message. Here your accout details:
      login: %s
      password: %s

      You can change your password after login."] = ""; +$a->strings["Registration successful."] = ""; $a->strings["Your registration can not be processed."] = "Je registratie kan niet verwerkt worden."; $a->strings["Your registration is pending approval by the site owner."] = "Jouw registratie wacht op goedkeuring van de beheerder."; $a->strings["This site has exceeded the number of allowed daily account registrations. Please try again tomorrow."] = "Deze website heeft het toegelaten dagelijkse aantal registraties overschreden. Probeer morgen opnieuw."; @@ -1152,8 +1151,6 @@ $a->strings["Only one search per minute is permitted for not logged in users."] $a->strings["Search"] = "Zoeken"; $a->strings["Items tagged with: %s"] = ""; $a->strings["Search results for: %s"] = ""; -$a->strings["Age: "] = "Leeftijd:"; -$a->strings["Gender: "] = "Geslacht:"; $a->strings["Status:"] = "Tijdlijn:"; $a->strings["Homepage:"] = "Website:"; $a->strings["Global Directory"] = "Globale gids"; @@ -1170,7 +1167,6 @@ $a->strings["Potential Delegates"] = "Mogelijke personen waaraan het paginabehee $a->strings["Add"] = "Toevoegen"; $a->strings["No entries."] = "Geen gegevens."; $a->strings["No contacts in common."] = "Geen gedeelde contacten."; -$a->strings["Common Friends"] = "Gedeelde Vrienden"; $a->strings["Export account"] = "Account exporteren"; $a->strings["Export your account info and contacts. Use this to make a backup of your account and/or to move it to another server."] = "Je account informatie en contacten exporteren. Gebruik dit om een backup van je account te maken en/of om het te verhuizen naar een andere server."; $a->strings["Export all"] = "Alles exporteren"; @@ -1257,6 +1253,7 @@ $a->strings["Love/romance"] = "Liefde/romance"; $a->strings["Work/employment"] = "Werk"; $a->strings["School/education"] = "School/opleiding"; $a->strings["This is your public profile.
      It may be visible to anybody using the internet."] = "Dit is jouw publiek profiel.
      Het kan zichtbaar zijn voor iedereen op het internet."; +$a->strings["Age: "] = "Leeftijd:"; $a->strings["Edit/Manage Profiles"] = "Wijzig/Beheer Profielen"; $a->strings["Change profile photo"] = "Profiel foto wijzigen"; $a->strings["Create New Profile"] = "Maak nieuw profiel"; @@ -1310,7 +1307,7 @@ $a->strings["poke, prod or do other things to somebody"] = "aanstoten, porren of $a->strings["Recipient"] = "Ontvanger"; $a->strings["Choose what you wish to do to recipient"] = "Kies wat je met de ontvanger wil doen"; $a->strings["Make this post private"] = "Dit bericht privé maken"; -$a->strings["Resubsribing to OStatus contacts"] = ""; +$a->strings["Resubscribing to OStatus contacts"] = ""; $a->strings["Error"] = ""; $a->strings["Total invitation limit exceeded."] = "Totale uitnodigingslimiet overschreden."; $a->strings["%s : Not a valid email address."] = "%s: Geen geldig e-mailadres."; @@ -1443,6 +1440,10 @@ $a->strings["All Networks"] = "Alle netwerken"; $a->strings["Saved Folders"] = "Bewaarde Mappen"; $a->strings["Everything"] = "Alles"; $a->strings["Categories"] = "Categorieën"; +$a->strings["%d contact in common"] = array( + 0 => "%d gedeeld contact", + 1 => "%d gedeelde contacten", +); $a->strings["General Features"] = "Algemene functies"; $a->strings["Multiple Profiles"] = "Meerdere profielen"; $a->strings["Ability to create multiple profiles"] = "Mogelijkheid om meerdere profielen aan te maken"; @@ -1458,6 +1459,8 @@ $a->strings["Add/remove mention when a fourm page is selected/deselected in ACL $a->strings["Network Sidebar Widgets"] = "Zijbalkwidgets op netwerkpagina"; $a->strings["Search by Date"] = "Zoeken op datum"; $a->strings["Ability to select posts by date ranges"] = "Mogelijkheid om berichten te selecteren volgens datumbereik"; +$a->strings["List Forums"] = ""; +$a->strings["Enable widget to display the forums your are connected with"] = ""; $a->strings["Group Filter"] = "Groepsfilter"; $a->strings["Enable widget to display Network posts only from selected group"] = "Sta de widget toe om netwerkberichten te tonen van bepaalde groepen"; $a->strings["Network Filter"] = "Netwerkfilter"; @@ -1486,6 +1489,8 @@ $a->strings["Star Posts"] = "Geef berichten een ster"; $a->strings["Ability to mark special posts with a star indicator"] = ""; $a->strings["Mute Post Notifications"] = ""; $a->strings["Ability to mute notifications for a thread"] = ""; +$a->strings["Advanced Profile Settings"] = ""; +$a->strings["Show visitors public community forums at the Advanced Profile Page"] = ""; $a->strings["Connect URL missing."] = ""; $a->strings["This site is not configured to allow communications with other networks."] = "Deze website is niet geconfigureerd voor communicatie met andere netwerken."; $a->strings["No compatible communication protocols or feeds were discovered."] = "Er werden geen compatibele communicatieprotocols of feeds ontdekt."; @@ -1502,6 +1507,7 @@ $a->strings["A deleted group with this name was revived. Existing item permissio $a->strings["Default privacy group for new contacts"] = ""; $a->strings["Everybody"] = "Iedereen"; $a->strings["edit"] = "verander"; +$a->strings["Edit groups"] = ""; $a->strings["Edit group"] = "Verander groep"; $a->strings["Create a new group"] = "Maak nieuwe groep"; $a->strings["Contacts not in any group"] = ""; @@ -1525,10 +1531,10 @@ $a->strings["%s's birthday"] = "%s's verjaardag"; $a->strings["Happy Birthday %s"] = "Gefeliciteerd %s"; $a->strings["Requested account is not available."] = "Gevraagde account is niet beschikbaar."; $a->strings["Edit profile"] = "Bewerk profiel"; +$a->strings["Atom feed"] = ""; $a->strings["Message"] = "Bericht"; $a->strings["Profiles"] = "Profielen"; $a->strings["Manage/edit profiles"] = "Beheer/wijzig profielen"; -$a->strings["Network:"] = ""; $a->strings["g A l F d"] = "G l j F"; $a->strings["F d"] = "d F"; $a->strings["[today]"] = "[vandaag]"; @@ -1552,17 +1558,22 @@ $a->strings["Film/dance/culture/entertainment:"] = "Film/dans/cultuur/ontspannin $a->strings["Love/Romance:"] = "Liefde/romance:"; $a->strings["Work/employment:"] = "Werk/beroep:"; $a->strings["School/education:"] = "School/opleiding:"; -$a->strings["Status"] = "Tijdlijn"; -$a->strings["Status Messages and Posts"] = "Berichten op jouw tijdlijn"; -$a->strings["Profile Details"] = "Profieldetails"; +$a->strings["Forums:"] = ""; $a->strings["Videos"] = "Video's"; $a->strings["Events and Calendar"] = "Gebeurtenissen en kalender"; $a->strings["Only You Can See This"] = "Alleen jij kunt dit zien"; +$a->strings["event"] = "gebeurtenis"; +$a->strings["%1\$s likes %2\$s's %3\$s"] = "%1\$s vindt het %3\$s van %2\$s leuk"; +$a->strings["%1\$s doesn't like %2\$s's %3\$s"] = "%1\$s vindt het %3\$s van %2\$s niet leuk"; +$a->strings["%1\$s is attending %2\$s's %3\$s"] = ""; +$a->strings["%1\$s is not attending %2\$s's %3\$s"] = ""; +$a->strings["%1\$s may attend %2\$s's %3\$s"] = ""; $a->strings["Post to Email"] = "Verzenden per e-mail"; $a->strings["Connectors disabled, since \"%s\" is enabled."] = ""; $a->strings["Visible to everybody"] = "Zichtbaar voor iedereen"; $a->strings["show"] = "tonen"; $a->strings["don't show"] = "niet tonen"; +$a->strings["Close"] = "Afsluiten"; $a->strings["[no subject]"] = "[geen onderwerp]"; $a->strings["stopped following"] = ""; $a->strings["View Status"] = "Bekijk status"; @@ -1629,6 +1640,8 @@ $a->strings["Undecided"] = array( 0 => "", 1 => "", ); +$a->strings["Forums"] = ""; +$a->strings["External link to forum"] = ""; $a->strings["view full size"] = "Volledig formaat"; $a->strings["newer"] = "nieuwere berichten"; $a->strings["older"] = "oudere berichten"; @@ -1643,9 +1656,9 @@ $a->strings["%d Contact"] = array( 0 => "%d contact", 1 => "%d contacten", ); +$a->strings["View Contacts"] = "Bekijk contacten"; $a->strings["Full Text"] = ""; $a->strings["Tags"] = ""; -$a->strings["Forums"] = ""; $a->strings["poke"] = "aanstoten"; $a->strings["poked"] = "aangestoten"; $a->strings["ping"] = "ping"; @@ -1690,8 +1703,6 @@ $a->strings["%2\$s %3\$s"] = ""; $a->strings["%s wrote the following post"] = ""; $a->strings["$1 wrote:"] = "$1 schreef:"; $a->strings["Encrypted content"] = "Versleutelde inhoud"; -$a->strings["(no subject)"] = "(geen onderwerp)"; -$a->strings["noreply"] = "geen reactie"; $a->strings["Cannot locate DNS info for database server '%s'"] = ""; $a->strings["Unknown | Not categorised"] = "Onbekend | Niet "; $a->strings["Block immediately"] = "Onmiddellijk blokkeren"; @@ -1703,6 +1714,7 @@ $a->strings["Weekly"] = "wekelijks"; $a->strings["Monthly"] = "maandelijks"; $a->strings["OStatus"] = "OStatus"; $a->strings["RSS/Atom"] = "RSS/Atom"; +$a->strings["Facebook"] = "Facebook"; $a->strings["Zot!"] = "Zot!"; $a->strings["LinkedIn"] = "Linkedln"; $a->strings["XMPP/IM"] = "XMPP/IM"; @@ -1758,15 +1770,9 @@ $a->strings["Manage/edit friends and contacts"] = "Beheer/Wijzig vrienden en con $a->strings["Site setup and configuration"] = "Website opzetten en configureren"; $a->strings["Navigation"] = "Navigatie"; $a->strings["Site map"] = "Sitemap"; -$a->strings["User not found."] = "Gebruiker niet gevonden"; $a->strings["Daily posting limit of %d posts reached. The post was rejected."] = ""; $a->strings["Weekly posting limit of %d posts reached. The post was rejected."] = ""; $a->strings["Monthly posting limit of %d posts reached. The post was rejected."] = ""; -$a->strings["There is no status with this id."] = "Er is geen status met dit kenmerk"; -$a->strings["There is no conversation with this id."] = ""; -$a->strings["Invalid item."] = ""; -$a->strings["Invalid action. "] = ""; -$a->strings["DB error"] = ""; $a->strings["An invitation is required."] = "Een uitnodiging is vereist."; $a->strings["Invitation could not be verified."] = "Uitnodiging kon niet geverifieerd worden."; $a->strings["Invalid OpenID url"] = "Ongeldige OpenID url"; @@ -1789,6 +1795,8 @@ $a->strings["\n\t\tDear %1\$s,\n\t\t\tThank you for registering at %2\$s. Your a $a->strings["\n\t\tThe login details are as follows:\n\t\t\tSite Location:\t%3\$s\n\t\t\tLogin Name:\t%1\$s\n\t\t\tPassword:\t%5\$s\n\n\t\tYou may change your password from your account \"Settings\" page after logging\n\t\tin.\n\n\t\tPlease take a few moments to review the other account settings on that page.\n\n\t\tYou may also wish to add some basic information to your default profile\n\t\t(on the \"Profiles\" page) so that other people can easily find you.\n\n\t\tWe recommend setting your full name, adding a profile photo,\n\t\tadding some profile \"keywords\" (very useful in making new friends) - and\n\t\tperhaps what country you live in; if you do not wish to be more specific\n\t\tthan that.\n\n\t\tWe fully respect your right to privacy, and none of these items are necessary.\n\t\tIf you are new and do not know anybody here, they may help\n\t\tyou to make some new and interesting friends.\n\n\n\t\tThank you and welcome to %2\$s."] = ""; $a->strings["Sharing notification from Diaspora network"] = ""; $a->strings["Attachments:"] = "Bijlagen:"; +$a->strings["(no subject)"] = "(geen onderwerp)"; +$a->strings["noreply"] = "geen reactie"; $a->strings["Do you really want to delete this item?"] = "Wil je echt dit item verwijderen?"; $a->strings["Archives"] = "Archieven"; $a->strings["Male"] = "Man"; @@ -1951,7 +1959,6 @@ $a->strings["Set zoomfactor for Earth Layers"] = ""; $a->strings["Show/hide boxes at right-hand column:"] = ""; $a->strings["Comma separated list of helper forums"] = ""; $a->strings["Set style"] = ""; -$a->strings["External link to forum"] = ""; $a->strings["Quick Start"] = ""; $a->strings["greenzero"] = ""; $a->strings["purplezero"] = ""; From 1c84054322d6f7859b3b8444194cab53e62ad2f2 Mon Sep 17 00:00:00 2001 From: Michael Vogel Date: Thu, 21 Jan 2016 03:21:33 +0100 Subject: [PATCH 086/242] Queue delivery should be now more reliable --- include/queue.php | 43 +++++++++++++++++++++++++++++-------------- include/socgraph.php | 28 ++++++++++++++++------------ 2 files changed, 45 insertions(+), 26 deletions(-) diff --git a/include/queue.php b/include/queue.php index cb5fe28ad9..f40768f0d0 100644 --- a/include/queue.php +++ b/include/queue.php @@ -52,6 +52,8 @@ function queue_run(&$argv, &$argc){ $queue_id = 0; $deadguys = array(); + $deadservers = array(); + $serverlist = array(); logger('queue: start'); @@ -95,7 +97,7 @@ function queue_run(&$argv, &$argc){ // For the first 12 hours we'll try to deliver every 15 minutes // After that, we'll only attempt delivery once per hour. - $r = q("SELECT `id` FROM `queue` WHERE (( `created` > UTC_TIMESTAMP() - INTERVAL 12 HOUR && `last` < UTC_TIMESTAMP() - INTERVAL 15 MINUTE ) OR ( `last` < UTC_TIMESTAMP() - INTERVAL 1 HOUR ))"); + $r = q("SELECT `id` FROM `queue` WHERE ((`created` > UTC_TIMESTAMP() - INTERVAL 12 HOUR && `last` < UTC_TIMESTAMP() - INTERVAL 15 MINUTE) OR (`last` < UTC_TIMESTAMP() - INTERVAL 1 HOUR)) ORDER BY `cid`, `created`"); } if(! $r){ return; @@ -116,7 +118,7 @@ function queue_run(&$argv, &$argc){ // so check again if this entry still needs processing if($queue_id) { - $qi = q("select * from queue where `id` = %d limit 1", + $qi = q("SELECT * FROM `queue` WHERE `id` = %d LIMIT 1", intval($queue_id) ); } @@ -142,8 +144,18 @@ function queue_run(&$argv, &$argc){ continue; } - if (!poco_reachable($c[0]['url'])) { - logger('queue: skipping probably dead url: ' . $c[0]['url']); + $server = poco_detect_server($c[0]['url']); + + if (($server != "") AND !in_array($server, $serverlist)) { + logger("Check server ".$server." (".$c[0]["network"].")"); + if (!poco_check_server($server, $c[0]["network"], true)) + $deadservers[] = $server; + + $serverlist[] = $server; + } + + if (($server != "") AND in_array($server, $deadservers)) { + logger('queue: skipping known dead server: '.$server); update_queue_time($q_item['id']); continue; } @@ -166,37 +178,39 @@ function queue_run(&$argv, &$argc){ switch($contact['network']) { case NETWORK_DFRN: - logger('queue: dfrndelivery: item ' . $q_item['id'] . ' for ' . $contact['name']); + logger('queue: dfrndelivery: item '.$q_item['id'].' for '.$contact['name'].' <'.$contact['url'].'>'); $deliver_status = dfrn_deliver($owner,$contact,$data); if($deliver_status == (-1)) { update_queue_time($q_item['id']); $deadguys[] = $contact['notify']; - } - else { + } else remove_queue_item($q_item['id']); - } + break; case NETWORK_OSTATUS: if($contact['notify']) { - logger('queue: slapdelivery: item ' . $q_item['id'] . ' for ' . $contact['name']); + logger('queue: slapdelivery: item '.$q_item['id'].' for '.$contact['name'].' <'.$contact['url'].'>'); $deliver_status = slapper($owner,$contact['notify'],$data); - if($deliver_status == (-1)) + if($deliver_status == (-1)) { update_queue_time($q_item['id']); - else + $deadguys[] = $contact['notify']; + } else remove_queue_item($q_item['id']); } break; case NETWORK_DIASPORA: if($contact['notify']) { - logger('queue: diaspora_delivery: item ' . $q_item['id'] . ' for ' . $contact['name']); + logger('queue: diaspora_delivery: item '.$q_item['id'].' for '.$contact['name'].' <'.$contact['url'].'>'); $deliver_status = diaspora_transmit($owner,$contact,$data,$public,true); - if($deliver_status == (-1)) + if($deliver_status == (-1)) { update_queue_time($q_item['id']); - else + $deadguys[] = $contact['notify']; + } else remove_queue_item($q_item['id']); + } break; @@ -212,6 +226,7 @@ function queue_run(&$argv, &$argc){ break; } + logger('Deliver status '.$deliver_status.' for item '.$q_item['id'].' to '.$contact['name'].' <'.$contact['url'].'>'); } return; diff --git a/include/socgraph.php b/include/socgraph.php index 4b4b358787..5eaad235b1 100644 --- a/include/socgraph.php +++ b/include/socgraph.php @@ -796,19 +796,23 @@ function poco_check_server($server_url, $network = "", $force = false) { // Test for Diaspora $serverret = z_fetch_url($server_url); - $lines = explode("\n",$serverret["header"]); - if(count($lines)) - foreach($lines as $line) { - $line = trim($line); - if(stristr($line,'X-Diaspora-Version:')) { - $platform = "Diaspora"; - $version = trim(str_replace("X-Diaspora-Version:", "", $line)); - $version = trim(str_replace("x-diaspora-version:", "", $version)); - $network = NETWORK_DIASPORA; - $versionparts = explode("-", $version); - $version = $versionparts[0]; + if (!$serverret["success"] OR ($serverret["body"] == "")) + $failure = true; + else { + $lines = explode("\n",$serverret["header"]); + if(count($lines)) + foreach($lines as $line) { + $line = trim($line); + if(stristr($line,'X-Diaspora-Version:')) { + $platform = "Diaspora"; + $version = trim(str_replace("X-Diaspora-Version:", "", $line)); + $version = trim(str_replace("x-diaspora-version:", "", $version)); + $network = NETWORK_DIASPORA; + $versionparts = explode("-", $version); + $version = $versionparts[0]; + } } - } + } } if (!$failure) { From c0120170232ba7edc29f236d3dfe9dc8a07454de Mon Sep 17 00:00:00 2001 From: Tobias Diekershoff Date: Thu, 21 Jan 2016 11:56:19 +0100 Subject: [PATCH 087/242] DE update to the strings --- view/de/messages.po | 710 ++++++++++++++++++++++---------------------- view/de/strings.php | 2 +- 2 files changed, 356 insertions(+), 356 deletions(-) diff --git a/view/de/messages.po b/view/de/messages.po index 3da9621ff1..e8b8532e9b 100644 --- a/view/de/messages.po +++ b/view/de/messages.po @@ -32,8 +32,8 @@ msgid "" msgstr "" "Project-Id-Version: friendica\n" "Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2016-01-18 18:49+0100\n" -"PO-Revision-Date: 2016-01-19 09:53+0000\n" +"POT-Creation-Date: 2016-01-20 17:52+0100\n" +"PO-Revision-Date: 2016-01-21 10:53+0000\n" "Last-Translator: bavatar \n" "Language-Team: German (http://www.transifex.com/Friendica/friendica/language/de/)\n" "MIME-Version: 1.0\n" @@ -57,9 +57,9 @@ msgstr "Forum" #: mod/contacts.php:128 #, php-format msgid "%d contact edited." -msgid_plural "%d contacts edited" +msgid_plural "%d contacts edited." msgstr[0] "%d Kontakt bearbeitet." -msgstr[1] "%d Kontakte bearbeitet" +msgstr[1] "%d Kontakte bearbeitet." #: mod/contacts.php:159 mod/contacts.php:383 msgid "Could not access contact record." @@ -77,7 +77,7 @@ msgstr "Kontakt aktualisiert." msgid "Failed to update contact record." msgstr "Aktualisierung der Kontaktdaten fehlgeschlagen." -#: mod/contacts.php:365 mod/manage.php:96 mod/display.php:504 +#: mod/contacts.php:365 mod/manage.php:96 mod/display.php:509 #: mod/profile_photo.php:19 mod/profile_photo.php:175 #: mod/profile_photo.php:186 mod/profile_photo.php:199 #: mod/ostatus_subscribe.php:9 mod/follow.php:11 mod/follow.php:73 @@ -95,7 +95,7 @@ msgstr "Aktualisierung der Kontaktdaten fehlgeschlagen." #: mod/api.php:26 mod/api.php:31 mod/notes.php:22 mod/poke.php:149 #: mod/repair_ostatus.php:9 mod/invite.php:15 mod/invite.php:101 #: mod/photos.php:171 mod/photos.php:1105 mod/regmod.php:110 -#: mod/uimport.php:23 mod/attach.php:33 include/items.php:5073 index.php:383 +#: mod/uimport.php:23 mod/attach.php:33 include/items.php:5077 index.php:383 msgid "Permission denied." msgstr "Zugriff verweigert." @@ -134,7 +134,7 @@ msgstr "Möchtest Du wirklich diesen Kontakt löschen?" #: mod/settings.php:1171 mod/settings.php:1172 mod/settings.php:1173 #: mod/settings.php:1174 mod/dfrn_request.php:857 mod/register.php:238 #: mod/suggest.php:29 mod/profiles.php:658 mod/profiles.php:661 -#: mod/profiles.php:687 mod/api.php:105 include/items.php:4905 +#: mod/profiles.php:687 mod/api.php:105 include/items.php:4909 msgid "Yes" msgstr "Ja" @@ -143,7 +143,7 @@ msgstr "Ja" #: mod/fbrowser.php:128 mod/settings.php:660 mod/settings.php:686 #: mod/dfrn_request.php:871 mod/suggest.php:32 mod/editpost.php:148 #: mod/photos.php:247 mod/photos.php:336 include/conversation.php:1220 -#: include/items.php:4908 +#: include/items.php:4912 msgid "Cancel" msgstr "Abbrechen" @@ -170,7 +170,7 @@ msgstr "%s teilt mit Dir" msgid "Private communications are not available for this contact." msgstr "Private Kommunikation ist für diesen Kontakt nicht verfügbar." -#: mod/contacts.php:544 mod/admin.php:811 +#: mod/contacts.php:544 mod/admin.php:820 msgid "Never" msgstr "Niemals" @@ -199,7 +199,7 @@ msgstr "Verbindungen mit diesem Kontakt verloren!" msgid "Fetch further information for feeds" msgstr "Weitere Informationen zu Feeds holen" -#: mod/contacts.php:571 mod/admin.php:820 +#: mod/contacts.php:571 mod/admin.php:829 msgid "Disabled" msgstr "Deaktiviert" @@ -290,12 +290,12 @@ msgid "Connect/Follow" msgstr "Verbinden/Folgen" #: mod/contacts.php:615 mod/contacts.php:806 mod/contacts.php:865 -#: mod/admin.php:1301 +#: mod/admin.php:1310 msgid "Unblock" msgstr "Entsperren" #: mod/contacts.php:615 mod/contacts.php:806 mod/contacts.php:865 -#: mod/admin.php:1300 +#: mod/admin.php:1309 msgid "Block" msgstr "Sperren" @@ -454,7 +454,7 @@ msgstr "Archivieren" msgid "Unarchive" msgstr "Aus Archiv zurückholen" -#: mod/contacts.php:809 mod/group.php:171 mod/admin.php:1299 +#: mod/contacts.php:809 mod/group.php:171 mod/admin.php:1308 #: mod/content.php:440 mod/content.php:743 mod/settings.php:722 #: mod/photos.php:1723 object/Item.php:134 include/conversation.php:635 msgid "Delete" @@ -572,14 +572,14 @@ msgstr "Sichtbar für" msgid "All Contacts (with secure profile access)" msgstr "Alle Kontakte (mit gesichertem Profilzugriff)" -#: mod/display.php:82 mod/display.php:291 mod/display.php:508 -#: mod/viewsrc.php:15 mod/admin.php:225 mod/admin.php:1354 mod/admin.php:1588 -#: mod/notice.php:15 include/items.php:4864 +#: mod/display.php:82 mod/display.php:291 mod/display.php:513 +#: mod/viewsrc.php:15 mod/admin.php:234 mod/admin.php:1363 mod/admin.php:1597 +#: mod/notice.php:15 include/items.php:4868 msgid "Item not found." msgstr "Beitrag nicht gefunden." #: mod/display.php:220 mod/videos.php:197 mod/viewcontacts.php:35 -#: mod/community.php:18 mod/dfrn_request.php:786 mod/search.php:93 +#: mod/community.php:22 mod/dfrn_request.php:786 mod/search.php:93 #: mod/search.php:99 mod/directory.php:37 mod/photos.php:976 msgid "Public access denied." msgstr "Öffentlicher Zugriff verweigert." @@ -588,7 +588,7 @@ msgstr "Öffentlicher Zugriff verweigert." msgid "Access to this profile has been restricted." msgstr "Der Zugriff zu diesem Profil wurde eingeschränkt." -#: mod/display.php:501 +#: mod/display.php:506 msgid "Item has been removed." msgstr "Eintrag wurde entfernt." @@ -623,7 +623,7 @@ msgid "" " join." msgstr "Auf der Quick Start Seite findest Du eine kurze Einleitung in die einzelnen Funktionen Deines Profils und die Netzwerk-Reiter, wo Du interessante Foren findest und neue Kontakte knüpfst." -#: mod/newmember.php:22 mod/admin.php:1407 mod/admin.php:1665 +#: mod/newmember.php:22 mod/admin.php:1416 mod/admin.php:1674 #: mod/settings.php:109 include/nav.php:182 view/theme/diabook/theme.php:544 #: view/theme/diabook/theme.php:648 msgid "Settings" @@ -868,7 +868,7 @@ msgstr "Hochladen des Bildes gescheitert." #: mod/subthread.php:87 mod/tagger.php:62 include/like.php:165 #: include/conversation.php:130 include/conversation.php:266 -#: include/text.php:1993 include/diaspora.php:2147 +#: include/text.php:2000 include/diaspora.php:2151 #: view/theme/diabook/theme.php:471 msgid "photo" msgstr "Foto" @@ -876,7 +876,7 @@ msgstr "Foto" #: mod/subthread.php:87 mod/tagger.php:62 include/like.php:165 #: include/like.php:325 include/conversation.php:125 #: include/conversation.php:134 include/conversation.php:261 -#: include/conversation.php:270 include/diaspora.php:2147 +#: include/conversation.php:270 include/diaspora.php:2151 #: view/theme/diabook/theme.php:466 view/theme/diabook/theme.php:475 msgid "status" msgstr "Status" @@ -1190,7 +1190,7 @@ msgstr "Deine Kontaktreferenzen konnten nicht in unserem System gespeichert werd msgid "Unable to update your contact profile details on our system" msgstr "Die Updates für Dein Profil konnten nicht gespeichert werden" -#: mod/dfrn_confirm.php:753 mod/dfrn_request.php:741 include/items.php:4276 +#: mod/dfrn_confirm.php:753 mod/dfrn_request.php:741 include/items.php:4280 msgid "[Name Withheld]" msgstr "[Name unterdrückt]" @@ -1223,7 +1223,7 @@ msgstr "Keine Videos ausgewählt" msgid "Access to this item is restricted." msgstr "Zugriff zu diesem Eintrag wurde eingeschränkt." -#: mod/videos.php:383 include/text.php:1465 +#: mod/videos.php:383 include/text.php:1472 msgid "View Video" msgstr "Video ansehen" @@ -1315,7 +1315,7 @@ msgid "" "Password reset failed." msgstr "Anfrage konnte nicht verifiziert werden. (Eventuell hast Du bereits eine ähnliche Anfrage gestellt.) Zurücksetzen des Passworts gescheitert." -#: mod/lostpass.php:109 boot.php:1418 +#: mod/lostpass.php:109 boot.php:1444 msgid "Password Reset" msgstr "Passwort zurücksetzen" @@ -1418,7 +1418,7 @@ msgstr "Verwerfen" msgid "System" msgstr "System" -#: mod/notifications.php:87 mod/admin.php:379 include/nav.php:154 +#: mod/notifications.php:87 mod/admin.php:388 include/nav.php:154 msgid "Network" msgstr "Netzwerk" @@ -1464,7 +1464,7 @@ msgstr "Neue-Kontakt Nachricht senden" msgid "if applicable" msgstr "falls anwendbar" -#: mod/notifications.php:176 mod/notifications.php:257 mod/admin.php:1297 +#: mod/notifications.php:176 mod/notifications.php:257 mod/admin.php:1306 msgid "Approve" msgstr "Genehmigen" @@ -1821,8 +1821,8 @@ msgstr "Zurück zum Kontakteditor" msgid "Refetch contact data" msgstr "Kontaktdaten neu laden" -#: mod/crepair.php:170 mod/admin.php:1295 mod/admin.php:1307 -#: mod/admin.php:1308 mod/admin.php:1321 mod/settings.php:661 +#: mod/crepair.php:170 mod/admin.php:1304 mod/admin.php:1316 +#: mod/admin.php:1317 mod/admin.php:1330 mod/settings.php:661 #: mod/settings.php:687 msgid "Name" msgstr "Name" @@ -1873,7 +1873,7 @@ msgid "" "entries from this contact." msgstr "Markiere diesen Kontakt als remote_self (entferntes Konto), dies veranlasst Friendica alle Top-Level Beiträge dieses Kontakts an all Deine Kontakte zu senden." -#: mod/bookmarklet.php:12 boot.php:1404 include/nav.php:91 +#: mod/bookmarklet.php:12 boot.php:1430 include/nav.php:91 msgid "Login" msgstr "Anmeldung" @@ -1930,574 +1930,574 @@ msgstr "Kontakte, die keiner Gruppe zugewiesen sind" msgid "Theme settings updated." msgstr "Themeneinstellungen aktualisiert." -#: mod/admin.php:147 mod/admin.php:877 +#: mod/admin.php:156 mod/admin.php:886 msgid "Site" msgstr "Seite" -#: mod/admin.php:148 mod/admin.php:821 mod/admin.php:1290 mod/admin.php:1305 +#: mod/admin.php:157 mod/admin.php:830 mod/admin.php:1299 mod/admin.php:1314 msgid "Users" msgstr "Nutzer" -#: mod/admin.php:149 mod/admin.php:1405 mod/admin.php:1465 mod/settings.php:72 +#: mod/admin.php:158 mod/admin.php:1414 mod/admin.php:1474 mod/settings.php:72 msgid "Plugins" msgstr "Plugins" -#: mod/admin.php:150 mod/admin.php:1663 mod/admin.php:1713 +#: mod/admin.php:159 mod/admin.php:1672 mod/admin.php:1722 msgid "Themes" msgstr "Themen" -#: mod/admin.php:151 mod/settings.php:50 +#: mod/admin.php:160 mod/settings.php:50 msgid "Additional features" msgstr "Zusätzliche Features" -#: mod/admin.php:152 +#: mod/admin.php:161 msgid "DB updates" msgstr "DB Updates" -#: mod/admin.php:153 mod/admin.php:374 +#: mod/admin.php:162 mod/admin.php:383 msgid "Inspect Queue" msgstr "Warteschlange Inspizieren" -#: mod/admin.php:154 mod/admin.php:343 +#: mod/admin.php:163 mod/admin.php:352 msgid "Federation Statistics" msgstr "Federation Statistik" -#: mod/admin.php:168 mod/admin.php:179 mod/admin.php:1781 +#: mod/admin.php:177 mod/admin.php:188 mod/admin.php:1790 msgid "Logs" msgstr "Protokolle" -#: mod/admin.php:169 mod/admin.php:1848 +#: mod/admin.php:178 mod/admin.php:1857 msgid "View Logs" msgstr "Protokolle anzeigen" -#: mod/admin.php:170 +#: mod/admin.php:179 msgid "probe address" msgstr "Adresse untersuchen" -#: mod/admin.php:171 +#: mod/admin.php:180 msgid "check webfinger" msgstr "Webfinger überprüfen" -#: mod/admin.php:177 include/nav.php:194 +#: mod/admin.php:186 include/nav.php:194 msgid "Admin" msgstr "Administration" -#: mod/admin.php:178 +#: mod/admin.php:187 msgid "Plugin Features" msgstr "Plugin Features" -#: mod/admin.php:180 +#: mod/admin.php:189 msgid "diagnostics" msgstr "Diagnose" -#: mod/admin.php:181 +#: mod/admin.php:190 msgid "User registrations waiting for confirmation" msgstr "Nutzeranmeldungen die auf Bestätigung warten" -#: mod/admin.php:336 +#: mod/admin.php:345 msgid "" "This page offers you some numbers to the known part of the federated social " "network your Friendica node is part of. These numbers are not complete but " "only reflect the part of the network your node is aware of." msgstr "Diese Seite präsentiert einige Zahlen zu dem bekannten Teil des föderalen sozialen Netzwerks, von dem deine Friendica Installation ein Teil ist. Diese Zahlen sind nicht absolut und reflektieren nur den Teil des Netzwerks, den dein Knoten kennt." -#: mod/admin.php:337 +#: mod/admin.php:346 msgid "" "The Auto Discovered Contact Directory feature is not enabled, it " "will improve the data displayed here." msgstr "Die Funktion um Automatisch ein Kontaktverzeichnis erstellen ist nicht aktiv. Es wird die hier angezeigten Daten verbessern." -#: mod/admin.php:342 mod/admin.php:373 mod/admin.php:430 mod/admin.php:876 -#: mod/admin.php:1289 mod/admin.php:1404 mod/admin.php:1464 mod/admin.php:1662 -#: mod/admin.php:1712 mod/admin.php:1780 mod/admin.php:1847 +#: mod/admin.php:351 mod/admin.php:382 mod/admin.php:439 mod/admin.php:885 +#: mod/admin.php:1298 mod/admin.php:1413 mod/admin.php:1473 mod/admin.php:1671 +#: mod/admin.php:1721 mod/admin.php:1789 mod/admin.php:1856 msgid "Administration" msgstr "Administration" -#: mod/admin.php:349 +#: mod/admin.php:358 msgid "Currently this node is aware of nodes from the following platforms:" msgstr "Momentan kennt dieser Knoten andere Knoten der folgenden Plattformen:" -#: mod/admin.php:376 +#: mod/admin.php:385 msgid "ID" msgstr "ID" -#: mod/admin.php:377 +#: mod/admin.php:386 msgid "Recipient Name" msgstr "Empfänger Name" -#: mod/admin.php:378 +#: mod/admin.php:387 msgid "Recipient Profile" msgstr "Empfänger Profil" -#: mod/admin.php:380 +#: mod/admin.php:389 msgid "Created" msgstr "Erstellt" -#: mod/admin.php:381 +#: mod/admin.php:390 msgid "Last Tried" msgstr "Zuletzt versucht" -#: mod/admin.php:382 +#: mod/admin.php:391 msgid "" "This page lists the content of the queue for outgoing postings. These are " "postings the initial delivery failed for. They will be resend later and " "eventually deleted if the delivery fails permanently." msgstr "Auf dieser Seite werden die in der Warteschlange eingereihten Beiträge aufgelistet. Bei diesen Beiträgen schlug die erste Zustellung fehl. Es wird später wiederholt versucht die Beiträge zuzustellen, bis sie schließlich gelöscht werden." -#: mod/admin.php:401 mod/admin.php:1243 +#: mod/admin.php:410 mod/admin.php:1252 msgid "Normal Account" msgstr "Normales Konto" -#: mod/admin.php:402 mod/admin.php:1244 +#: mod/admin.php:411 mod/admin.php:1253 msgid "Soapbox Account" msgstr "Marktschreier-Konto" -#: mod/admin.php:403 mod/admin.php:1245 +#: mod/admin.php:412 mod/admin.php:1254 msgid "Community/Celebrity Account" msgstr "Forum/Promi-Konto" -#: mod/admin.php:404 mod/admin.php:1246 +#: mod/admin.php:413 mod/admin.php:1255 msgid "Automatic Friend Account" msgstr "Automatisches Freundekonto" -#: mod/admin.php:405 +#: mod/admin.php:414 msgid "Blog Account" msgstr "Blog-Konto" -#: mod/admin.php:406 +#: mod/admin.php:415 msgid "Private Forum" msgstr "Privates Forum" -#: mod/admin.php:425 +#: mod/admin.php:434 msgid "Message queues" msgstr "Nachrichten-Warteschlangen" -#: mod/admin.php:431 +#: mod/admin.php:440 msgid "Summary" msgstr "Zusammenfassung" -#: mod/admin.php:433 +#: mod/admin.php:442 msgid "Registered users" msgstr "Registrierte Nutzer" -#: mod/admin.php:435 +#: mod/admin.php:444 msgid "Pending registrations" msgstr "Anstehende Anmeldungen" -#: mod/admin.php:436 +#: mod/admin.php:445 msgid "Version" msgstr "Version" -#: mod/admin.php:441 +#: mod/admin.php:450 msgid "Active plugins" msgstr "Aktive Plugins" -#: mod/admin.php:464 +#: mod/admin.php:473 msgid "Can not parse base url. Must have at least ://" msgstr "Die Basis-URL konnte nicht analysiert werden. Sie muss mindestens aus :// bestehen" -#: mod/admin.php:749 +#: mod/admin.php:758 msgid "RINO2 needs mcrypt php extension to work." msgstr "RINO2 benötigt die PHP Extension mcrypt." -#: mod/admin.php:757 +#: mod/admin.php:766 msgid "Site settings updated." msgstr "Seiteneinstellungen aktualisiert." -#: mod/admin.php:785 mod/settings.php:912 +#: mod/admin.php:794 mod/settings.php:912 msgid "No special theme for mobile devices" msgstr "Kein spezielles Theme für mobile Geräte verwenden." -#: mod/admin.php:804 +#: mod/admin.php:813 msgid "No community page" msgstr "Keine Gemeinschaftsseite" -#: mod/admin.php:805 +#: mod/admin.php:814 msgid "Public postings from users of this site" msgstr "Öffentliche Beiträge von Nutzer_innen dieser Seite" -#: mod/admin.php:806 +#: mod/admin.php:815 msgid "Global community page" msgstr "Globale Gemeinschaftsseite" -#: mod/admin.php:812 +#: mod/admin.php:821 msgid "At post arrival" msgstr "Beim Empfang von Nachrichten" -#: mod/admin.php:813 include/contact_selectors.php:56 +#: mod/admin.php:822 include/contact_selectors.php:56 msgid "Frequently" msgstr "immer wieder" -#: mod/admin.php:814 include/contact_selectors.php:57 +#: mod/admin.php:823 include/contact_selectors.php:57 msgid "Hourly" msgstr "Stündlich" -#: mod/admin.php:815 include/contact_selectors.php:58 +#: mod/admin.php:824 include/contact_selectors.php:58 msgid "Twice daily" msgstr "Zweimal täglich" -#: mod/admin.php:816 include/contact_selectors.php:59 +#: mod/admin.php:825 include/contact_selectors.php:59 msgid "Daily" msgstr "Täglich" -#: mod/admin.php:822 +#: mod/admin.php:831 msgid "Users, Global Contacts" msgstr "Nutzer, globale Kontakte" -#: mod/admin.php:823 +#: mod/admin.php:832 msgid "Users, Global Contacts/fallback" msgstr "Nutzer, globale Kontakte / Fallback" -#: mod/admin.php:827 +#: mod/admin.php:836 msgid "One month" msgstr "ein Monat" -#: mod/admin.php:828 +#: mod/admin.php:837 msgid "Three months" msgstr "drei Monate" -#: mod/admin.php:829 +#: mod/admin.php:838 msgid "Half a year" msgstr "ein halbes Jahr" -#: mod/admin.php:830 +#: mod/admin.php:839 msgid "One year" msgstr "ein Jahr" -#: mod/admin.php:835 +#: mod/admin.php:844 msgid "Multi user instance" msgstr "Mehrbenutzer Instanz" -#: mod/admin.php:858 +#: mod/admin.php:867 msgid "Closed" msgstr "Geschlossen" -#: mod/admin.php:859 +#: mod/admin.php:868 msgid "Requires approval" msgstr "Bedarf der Zustimmung" -#: mod/admin.php:860 +#: mod/admin.php:869 msgid "Open" msgstr "Offen" -#: mod/admin.php:864 +#: mod/admin.php:873 msgid "No SSL policy, links will track page SSL state" msgstr "Keine SSL Richtlinie, Links werden das verwendete Protokoll beibehalten" -#: mod/admin.php:865 +#: mod/admin.php:874 msgid "Force all links to use SSL" msgstr "SSL für alle Links erzwingen" -#: mod/admin.php:866 +#: mod/admin.php:875 msgid "Self-signed certificate, use SSL for local links only (discouraged)" msgstr "Selbst-unterzeichnetes Zertifikat, SSL nur für lokale Links verwenden (nicht empfohlen)" -#: mod/admin.php:878 mod/admin.php:1466 mod/admin.php:1714 mod/admin.php:1782 -#: mod/admin.php:1931 mod/settings.php:659 mod/settings.php:769 +#: mod/admin.php:887 mod/admin.php:1475 mod/admin.php:1723 mod/admin.php:1791 +#: mod/admin.php:1940 mod/settings.php:659 mod/settings.php:769 #: mod/settings.php:813 mod/settings.php:882 mod/settings.php:969 #: mod/settings.php:1204 msgid "Save Settings" msgstr "Einstellungen speichern" -#: mod/admin.php:879 mod/register.php:263 +#: mod/admin.php:888 mod/register.php:263 msgid "Registration" msgstr "Registrierung" -#: mod/admin.php:880 +#: mod/admin.php:889 msgid "File upload" msgstr "Datei hochladen" -#: mod/admin.php:881 +#: mod/admin.php:890 msgid "Policies" msgstr "Regeln" -#: mod/admin.php:882 +#: mod/admin.php:891 msgid "Advanced" msgstr "Erweitert" -#: mod/admin.php:883 +#: mod/admin.php:892 msgid "Auto Discovered Contact Directory" msgstr "Automatisch ein Kontaktverzeichnis erstellen" -#: mod/admin.php:884 +#: mod/admin.php:893 msgid "Performance" msgstr "Performance" -#: mod/admin.php:885 +#: mod/admin.php:894 msgid "" "Relocate - WARNING: advanced function. Could make this server unreachable." msgstr "Umsiedeln - WARNUNG: Könnte diesen Server unerreichbar machen." -#: mod/admin.php:888 +#: mod/admin.php:897 msgid "Site name" msgstr "Seitenname" -#: mod/admin.php:889 +#: mod/admin.php:898 msgid "Host name" msgstr "Host Name" -#: mod/admin.php:890 +#: mod/admin.php:899 msgid "Sender Email" msgstr "Absender für Emails" -#: mod/admin.php:890 +#: mod/admin.php:899 msgid "" "The email address your server shall use to send notification emails from." msgstr "Die E-Mail Adresse die dein Server zum Versenden von Benachrichtigungen verwenden soll." -#: mod/admin.php:891 +#: mod/admin.php:900 msgid "Banner/Logo" msgstr "Banner/Logo" -#: mod/admin.php:892 +#: mod/admin.php:901 msgid "Shortcut icon" msgstr "Shortcut Icon" -#: mod/admin.php:892 +#: mod/admin.php:901 msgid "Link to an icon that will be used for browsers." msgstr "Link zu einem Icon, das Browser verwenden werden." -#: mod/admin.php:893 +#: mod/admin.php:902 msgid "Touch icon" msgstr "Touch Icon" -#: mod/admin.php:893 +#: mod/admin.php:902 msgid "Link to an icon that will be used for tablets and mobiles." msgstr "Link zu einem Icon das Tablets und Handies verwenden sollen." -#: mod/admin.php:894 +#: mod/admin.php:903 msgid "Additional Info" msgstr "Zusätzliche Informationen" -#: mod/admin.php:894 +#: mod/admin.php:903 #, php-format msgid "" "For public servers: you can add additional information here that will be " "listed at %s/siteinfo." msgstr "Für öffentliche Server kannst Du hier zusätzliche Informationen angeben, die dann auf %s/siteinfo angezeigt werden." -#: mod/admin.php:895 +#: mod/admin.php:904 msgid "System language" msgstr "Systemsprache" -#: mod/admin.php:896 +#: mod/admin.php:905 msgid "System theme" msgstr "Systemweites Theme" -#: mod/admin.php:896 +#: mod/admin.php:905 msgid "" "Default system theme - may be over-ridden by user profiles - change theme settings" msgstr "Vorgabe für das System-Theme - kann von Benutzerprofilen überschrieben werden - Theme-Einstellungen ändern" -#: mod/admin.php:897 +#: mod/admin.php:906 msgid "Mobile system theme" msgstr "Systemweites mobiles Theme" -#: mod/admin.php:897 +#: mod/admin.php:906 msgid "Theme for mobile devices" msgstr "Thema für mobile Geräte" -#: mod/admin.php:898 +#: mod/admin.php:907 msgid "SSL link policy" msgstr "Regeln für SSL Links" -#: mod/admin.php:898 +#: mod/admin.php:907 msgid "Determines whether generated links should be forced to use SSL" msgstr "Bestimmt, ob generierte Links SSL verwenden müssen" -#: mod/admin.php:899 +#: mod/admin.php:908 msgid "Force SSL" msgstr "Erzwinge SSL" -#: mod/admin.php:899 +#: mod/admin.php:908 msgid "" "Force all Non-SSL requests to SSL - Attention: on some systems it could lead" " to endless loops." msgstr "Erzinge alle Nicht-SSL Anfragen auf SSL - Achtung: auf manchen Systemen verursacht dies eine Endlosschleife." -#: mod/admin.php:900 +#: mod/admin.php:909 msgid "Old style 'Share'" msgstr "Altes \"Teilen\" Element" -#: mod/admin.php:900 +#: mod/admin.php:909 msgid "Deactivates the bbcode element 'share' for repeating items." msgstr "Deaktiviert das BBCode Element \"share\" beim Wiederholen von Beiträgen." -#: mod/admin.php:901 +#: mod/admin.php:910 msgid "Hide help entry from navigation menu" msgstr "Verberge den Menüeintrag für die Hilfe im Navigationsmenü" -#: mod/admin.php:901 +#: mod/admin.php:910 msgid "" "Hides the menu entry for the Help pages from the navigation menu. You can " "still access it calling /help directly." msgstr "Verbirgt den Menüeintrag für die Hilfe-Seiten im Navigationsmenü. Die Seiten können weiterhin über /help aufgerufen werden." -#: mod/admin.php:902 +#: mod/admin.php:911 msgid "Single user instance" msgstr "Ein-Nutzer Instanz" -#: mod/admin.php:902 +#: mod/admin.php:911 msgid "Make this instance multi-user or single-user for the named user" msgstr "Regelt ob es sich bei dieser Instanz um eine ein Personen Installation oder eine Installation mit mehr als einem Nutzer handelt." -#: mod/admin.php:903 +#: mod/admin.php:912 msgid "Maximum image size" msgstr "Maximale Bildgröße" -#: mod/admin.php:903 +#: mod/admin.php:912 msgid "" "Maximum size in bytes of uploaded images. Default is 0, which means no " "limits." msgstr "Maximale Uploadgröße von Bildern in Bytes. Standard ist 0, d.h. ohne Limit." -#: mod/admin.php:904 +#: mod/admin.php:913 msgid "Maximum image length" msgstr "Maximale Bildlänge" -#: mod/admin.php:904 +#: mod/admin.php:913 msgid "" "Maximum length in pixels of the longest side of uploaded images. Default is " "-1, which means no limits." msgstr "Maximale Länge in Pixeln der längsten Seite eines hoch geladenen Bildes. Grundeinstellung ist -1 was keine Einschränkung bedeutet." -#: mod/admin.php:905 +#: mod/admin.php:914 msgid "JPEG image quality" msgstr "Qualität des JPEG Bildes" -#: mod/admin.php:905 +#: mod/admin.php:914 msgid "" "Uploaded JPEGS will be saved at this quality setting [0-100]. Default is " "100, which is full quality." msgstr "Hoch geladene JPEG Bilder werden mit dieser Qualität [0-100] gespeichert. Grundeinstellung ist 100, kein Qualitätsverlust." -#: mod/admin.php:907 +#: mod/admin.php:916 msgid "Register policy" msgstr "Registrierungsmethode" -#: mod/admin.php:908 +#: mod/admin.php:917 msgid "Maximum Daily Registrations" msgstr "Maximum täglicher Registrierungen" -#: mod/admin.php:908 +#: mod/admin.php:917 msgid "" "If registration is permitted above, this sets the maximum number of new user" " registrations to accept per day. If register is set to closed, this " "setting has no effect." msgstr "Wenn die Registrierung weiter oben erlaubt ist, regelt dies die maximale Anzahl von Neuanmeldungen pro Tag. Wenn die Registrierung geschlossen ist, hat diese Einstellung keinen Effekt." -#: mod/admin.php:909 +#: mod/admin.php:918 msgid "Register text" msgstr "Registrierungstext" -#: mod/admin.php:909 +#: mod/admin.php:918 msgid "Will be displayed prominently on the registration page." msgstr "Wird gut sichtbar auf der Registrierungsseite angezeigt." -#: mod/admin.php:910 +#: mod/admin.php:919 msgid "Accounts abandoned after x days" msgstr "Nutzerkonten gelten nach x Tagen als unbenutzt" -#: mod/admin.php:910 +#: mod/admin.php:919 msgid "" "Will not waste system resources polling external sites for abandonded " "accounts. Enter 0 for no time limit." msgstr "Verschwende keine System-Ressourcen auf das Pollen externer Seiten, wenn Konten nicht mehr benutzt werden. 0 eingeben für kein Limit." -#: mod/admin.php:911 +#: mod/admin.php:920 msgid "Allowed friend domains" msgstr "Erlaubte Domains für Kontakte" -#: mod/admin.php:911 +#: mod/admin.php:920 msgid "" "Comma separated list of domains which are allowed to establish friendships " "with this site. Wildcards are accepted. Empty to allow any domains" msgstr "Liste der Domains, die für Freundschaften erlaubt sind, durch Kommas getrennt. Platzhalter werden akzeptiert. Leer lassen, um alle Domains zu erlauben." -#: mod/admin.php:912 +#: mod/admin.php:921 msgid "Allowed email domains" msgstr "Erlaubte Domains für E-Mails" -#: mod/admin.php:912 +#: mod/admin.php:921 msgid "" "Comma separated list of domains which are allowed in email addresses for " "registrations to this site. Wildcards are accepted. Empty to allow any " "domains" msgstr "Liste der Domains, die für E-Mail-Adressen bei der Registrierung erlaubt sind, durch Kommas getrennt. Platzhalter werden akzeptiert. Leer lassen, um alle Domains zu erlauben." -#: mod/admin.php:913 +#: mod/admin.php:922 msgid "Block public" msgstr "Öffentlichen Zugriff blockieren" -#: mod/admin.php:913 +#: mod/admin.php:922 msgid "" "Check to block public access to all otherwise public personal pages on this " "site unless you are currently logged in." msgstr "Klicken, um öffentlichen Zugriff auf sonst öffentliche Profile zu blockieren, wenn man nicht eingeloggt ist." -#: mod/admin.php:914 +#: mod/admin.php:923 msgid "Force publish" msgstr "Erzwinge Veröffentlichung" -#: mod/admin.php:914 +#: mod/admin.php:923 msgid "" "Check to force all profiles on this site to be listed in the site directory." msgstr "Klicken, um Anzeige aller Profile dieses Servers im Verzeichnis zu erzwingen." -#: mod/admin.php:915 +#: mod/admin.php:924 msgid "Global directory URL" msgstr "URL des weltweiten Verzeichnisses" -#: mod/admin.php:915 +#: mod/admin.php:924 msgid "" "URL to the global directory. If this is not set, the global directory is " "completely unavailable to the application." msgstr "URL des weltweiten Verzeichnisses. Wenn diese nicht gesetzt ist, ist das Verzeichnis für die Applikation nicht erreichbar." -#: mod/admin.php:916 +#: mod/admin.php:925 msgid "Allow threaded items" msgstr "Erlaube Threads in Diskussionen" -#: mod/admin.php:916 +#: mod/admin.php:925 msgid "Allow infinite level threading for items on this site." msgstr "Erlaube ein unendliches Level für Threads auf dieser Seite." -#: mod/admin.php:917 +#: mod/admin.php:926 msgid "Private posts by default for new users" msgstr "Private Beiträge als Standard für neue Nutzer" -#: mod/admin.php:917 +#: mod/admin.php:926 msgid "" "Set default post permissions for all new members to the default privacy " "group rather than public." msgstr "Die Standard-Zugriffsrechte für neue Nutzer werden so gesetzt, dass als Voreinstellung in die private Gruppe gepostet wird anstelle von öffentlichen Beiträgen." -#: mod/admin.php:918 +#: mod/admin.php:927 msgid "Don't include post content in email notifications" msgstr "Inhalte von Beiträgen nicht in E-Mail-Benachrichtigungen versenden" -#: mod/admin.php:918 +#: mod/admin.php:927 msgid "" "Don't include the content of a post/comment/private message/etc. in the " "email notifications that are sent out from this site, as a privacy measure." msgstr "Inhalte von Beiträgen/Kommentaren/privaten Nachrichten/usw., zum Datenschutz nicht in E-Mail-Benachrichtigungen einbinden." -#: mod/admin.php:919 +#: mod/admin.php:928 msgid "Disallow public access to addons listed in the apps menu." msgstr "Öffentlichen Zugriff auf Addons im Apps Menü verbieten." -#: mod/admin.php:919 +#: mod/admin.php:928 msgid "" "Checking this box will restrict addons listed in the apps menu to members " "only." msgstr "Wenn ausgewählt werden die im Apps Menü aufgeführten Addons nur angemeldeten Nutzern der Seite zur Verfügung gestellt." -#: mod/admin.php:920 +#: mod/admin.php:929 msgid "Don't embed private images in posts" msgstr "Private Bilder nicht in Beiträgen einbetten." -#: mod/admin.php:920 +#: mod/admin.php:929 msgid "" "Don't replace locally-hosted private photos in posts with an embedded copy " "of the image. This means that contacts who receive posts containing private " @@ -2505,228 +2505,228 @@ msgid "" "while." msgstr "Ersetze lokal gehostete private Fotos in Beiträgen nicht mit einer eingebetteten Kopie des Bildes. Dies bedeutet, dass Kontakte, die Beiträge mit privaten Fotos erhalten sich zunächst auf den jeweiligen Servern authentifizieren müssen bevor die Bilder geladen und angezeigt werden, was eine gewisse Zeit dauert." -#: mod/admin.php:921 +#: mod/admin.php:930 msgid "Allow Users to set remote_self" msgstr "Nutzern erlauben das remote_self Flag zu setzen" -#: mod/admin.php:921 +#: mod/admin.php:930 msgid "" "With checking this, every user is allowed to mark every contact as a " "remote_self in the repair contact dialog. Setting this flag on a contact " "causes mirroring every posting of that contact in the users stream." msgstr "Ist dies ausgewählt kann jeder Nutzer jeden seiner Kontakte als remote_self (entferntes Konto) im Kontakt reparieren Dialog markieren. Nach dem setzten dieses Flags werden alle Top-Level Beiträge dieser Kontakte automatisch in den Stream dieses Nutzers gepostet." -#: mod/admin.php:922 +#: mod/admin.php:931 msgid "Block multiple registrations" msgstr "Unterbinde Mehrfachregistrierung" -#: mod/admin.php:922 +#: mod/admin.php:931 msgid "Disallow users to register additional accounts for use as pages." msgstr "Benutzern nicht erlauben, weitere Konten als zusätzliche Profile anzulegen." -#: mod/admin.php:923 +#: mod/admin.php:932 msgid "OpenID support" msgstr "OpenID Unterstützung" -#: mod/admin.php:923 +#: mod/admin.php:932 msgid "OpenID support for registration and logins." msgstr "OpenID-Unterstützung für Registrierung und Login." -#: mod/admin.php:924 +#: mod/admin.php:933 msgid "Fullname check" msgstr "Namen auf Vollständigkeit überprüfen" -#: mod/admin.php:924 +#: mod/admin.php:933 msgid "" "Force users to register with a space between firstname and lastname in Full " "name, as an antispam measure" msgstr "Leerzeichen zwischen Vor- und Nachname im vollständigen Namen erzwingen, um SPAM zu vermeiden." -#: mod/admin.php:925 +#: mod/admin.php:934 msgid "UTF-8 Regular expressions" msgstr "UTF-8 Reguläre Ausdrücke" -#: mod/admin.php:925 +#: mod/admin.php:934 msgid "Use PHP UTF8 regular expressions" msgstr "PHP UTF8 Ausdrücke verwenden" -#: mod/admin.php:926 +#: mod/admin.php:935 msgid "Community Page Style" msgstr "Art der Gemeinschaftsseite" -#: mod/admin.php:926 +#: mod/admin.php:935 msgid "" "Type of community page to show. 'Global community' shows every public " "posting from an open distributed network that arrived on this server." msgstr "Welche Art der Gemeinschaftsseite soll verwendet werden? Globale Gemeinschaftsseite zeigt alle öffentlichen Beiträge eines offenen dezentralen Netzwerks an die auf diesem Server eintreffen." -#: mod/admin.php:927 +#: mod/admin.php:936 msgid "Posts per user on community page" msgstr "Anzahl der Beiträge pro Benutzer auf der Gemeinschaftsseite" -#: mod/admin.php:927 +#: mod/admin.php:936 msgid "" "The maximum number of posts per user on the community page. (Not valid for " "'Global Community')" msgstr "Die Anzahl der Beiträge die von jedem Nutzer maximal auf der Gemeinschaftsseite angezeigt werden sollen. Dieser Parameter wird nicht für die Globale Gemeinschaftsseite genutzt." -#: mod/admin.php:928 +#: mod/admin.php:937 msgid "Enable OStatus support" msgstr "OStatus Unterstützung aktivieren" -#: mod/admin.php:928 +#: mod/admin.php:937 msgid "" "Provide built-in OStatus (StatusNet, GNU Social etc.) compatibility. All " "communications in OStatus are public, so privacy warnings will be " "occasionally displayed." msgstr "Biete die eingebaute OStatus (iStatusNet, GNU Social, etc.) Unterstützung an. Jede Kommunikation in OStatus ist öffentlich, Privatsphäre Warnungen werden nur bei Bedarf angezeigt." -#: mod/admin.php:929 +#: mod/admin.php:938 msgid "OStatus conversation completion interval" msgstr "Intervall zum Vervollständigen von OStatus Unterhaltungen" -#: mod/admin.php:929 +#: mod/admin.php:938 msgid "" "How often shall the poller check for new entries in OStatus conversations? " "This can be a very ressource task." msgstr "Wie oft soll der Poller checken ob es neue Nachrichten in OStatus Unterhaltungen gibt die geladen werden müssen. Je nach Anzahl der OStatus Kontakte könnte dies ein sehr Ressourcen lastiger Job sein." -#: mod/admin.php:930 +#: mod/admin.php:939 msgid "OStatus support can only be enabled if threading is enabled." msgstr "OStatus Unterstützung kann nur aktiviert werden wenn \"Threading\" aktiviert ist. " -#: mod/admin.php:932 +#: mod/admin.php:941 msgid "" "Diaspora support can't be enabled because Friendica was installed into a sub" " directory." msgstr "Diaspora Unterstützung kann nicht aktiviert werden da Friendica in ein Unterverzeichnis installiert ist." -#: mod/admin.php:933 +#: mod/admin.php:942 msgid "Enable Diaspora support" msgstr "Diaspora Unterstützung aktivieren" -#: mod/admin.php:933 +#: mod/admin.php:942 msgid "Provide built-in Diaspora network compatibility." msgstr "Verwende die eingebaute Diaspora-Verknüpfung." -#: mod/admin.php:934 +#: mod/admin.php:943 msgid "Only allow Friendica contacts" msgstr "Nur Friendica-Kontakte erlauben" -#: mod/admin.php:934 +#: mod/admin.php:943 msgid "" "All contacts must use Friendica protocols. All other built-in communication " "protocols disabled." msgstr "Alle Kontakte müssen das Friendica Protokoll nutzen. Alle anderen Kommunikationsprotokolle werden deaktiviert." -#: mod/admin.php:935 +#: mod/admin.php:944 msgid "Verify SSL" msgstr "SSL Überprüfen" -#: mod/admin.php:935 +#: mod/admin.php:944 msgid "" "If you wish, you can turn on strict certificate checking. This will mean you" " cannot connect (at all) to self-signed SSL sites." msgstr "Wenn gewollt, kann man hier eine strenge Zertifikatkontrolle einstellen. Das bedeutet, dass man zu keinen Seiten mit selbst unterzeichnetem SSL eine Verbindung herstellen kann." -#: mod/admin.php:936 +#: mod/admin.php:945 msgid "Proxy user" msgstr "Proxy Nutzer" -#: mod/admin.php:937 +#: mod/admin.php:946 msgid "Proxy URL" msgstr "Proxy URL" -#: mod/admin.php:938 +#: mod/admin.php:947 msgid "Network timeout" msgstr "Netzwerk Wartezeit" -#: mod/admin.php:938 +#: mod/admin.php:947 msgid "Value is in seconds. Set to 0 for unlimited (not recommended)." msgstr "Der Wert ist in Sekunden. Setze 0 für unbegrenzt (nicht empfohlen)." -#: mod/admin.php:939 +#: mod/admin.php:948 msgid "Delivery interval" msgstr "Zustellungsintervall" -#: mod/admin.php:939 +#: mod/admin.php:948 msgid "" "Delay background delivery processes by this many seconds to reduce system " "load. Recommend: 4-5 for shared hosts, 2-3 for virtual private servers. 0-1 " "for large dedicated servers." msgstr "Verzögere im Hintergrund laufende Auslieferungsprozesse um die angegebene Anzahl an Sekunden, um die Systemlast zu verringern. Empfehlungen: 4-5 für Shared-Hosts, 2-3 für VPS, 0-1 für große dedizierte Server." -#: mod/admin.php:940 +#: mod/admin.php:949 msgid "Poll interval" msgstr "Abfrageintervall" -#: mod/admin.php:940 +#: mod/admin.php:949 msgid "" "Delay background polling processes by this many seconds to reduce system " "load. If 0, use delivery interval." msgstr "Verzögere Hintergrundprozesse um diese Anzahl an Sekunden, um die Systemlast zu reduzieren. Bei 0 Sekunden wird das Auslieferungsintervall verwendet." -#: mod/admin.php:941 +#: mod/admin.php:950 msgid "Maximum Load Average" msgstr "Maximum Load Average" -#: mod/admin.php:941 +#: mod/admin.php:950 msgid "" "Maximum system load before delivery and poll processes are deferred - " "default 50." msgstr "Maximale Systemlast bevor Verteil- und Empfangsprozesse verschoben werden - Standard 50" -#: mod/admin.php:942 +#: mod/admin.php:951 msgid "Maximum Load Average (Frontend)" msgstr "Maximum Load Average (Frontend)" -#: mod/admin.php:942 +#: mod/admin.php:951 msgid "Maximum system load before the frontend quits service - default 50." msgstr "Maximale Systemlast bevor Vordergrundprozesse pausiert werden - Standard 50." -#: mod/admin.php:943 +#: mod/admin.php:952 msgid "Maximum table size for optimization" msgstr "Maximale Tabellengröße zur Optimierung" -#: mod/admin.php:943 +#: mod/admin.php:952 msgid "" "Maximum table size (in MB) for the automatic optimization - default 100 MB. " "Enter -1 to disable it." msgstr "Maximale Tabellengröße (in MB) für die automatische Optimierung - Standard 100 MB. Gib -1 für Deaktivierung ein." -#: mod/admin.php:944 +#: mod/admin.php:953 msgid "Minimum level of fragmentation" msgstr "Minimaler Fragmentationsgrad" -#: mod/admin.php:944 +#: mod/admin.php:953 msgid "" "Minimum fragmenation level to start the automatic optimization - default " "value is 30%." msgstr "Minimales Fragmentationsgrad von Datenbanktabellen um die automatische Optimierung einzuleiten - Standardwert ist 30%" -#: mod/admin.php:946 +#: mod/admin.php:955 msgid "Periodical check of global contacts" msgstr "Regelmäßig globale Kontakte überprüfen" -#: mod/admin.php:946 +#: mod/admin.php:955 msgid "" "If enabled, the global contacts are checked periodically for missing or " "outdated data and the vitality of the contacts and servers." msgstr "Wenn diese Option aktiviert ist, werden die globalen Kontakte regelmäßig auf fehlende oder veraltete Daten sowie auf Erreichbarkeit des Kontakts und des Servers überprüft." -#: mod/admin.php:947 +#: mod/admin.php:956 msgid "Days between requery" msgstr "Tage zwischen erneuten Abfragen" -#: mod/admin.php:947 +#: mod/admin.php:956 msgid "Number of days after which a server is requeried for his contacts." msgstr "Legt das Abfrageintervall fest, nachdem ein Server erneut nach Kontakten abgefragt werden soll." -#: mod/admin.php:948 +#: mod/admin.php:957 msgid "Discover contacts from other servers" msgstr "Neue Kontakte auf anderen Servern entdecken" -#: mod/admin.php:948 +#: mod/admin.php:957 msgid "" "Periodically query other servers for contacts. You can choose between " "'users': the users on the remote system, 'Global Contacts': active contacts " @@ -2736,32 +2736,32 @@ msgid "" "Global Contacts'." msgstr "Regelmäßig andere Server nach potentiellen Kontakten absuchen. Du kannst zwischen 'Nutzern', den tatsächlichen Nutzern des anderen Systems und 'globalen Kontakten', aktiven Kontakten die auf dem System bekannt sind, wählen. Der Fallback-Mechanismus ist für ältere Friendica und Redmatrix Server gedacht, bei denen globale Kontakte noch nicht verfügbar sind. Durch den Fallbackmodus entsteht auf deinem Server eine wesentlich höhere Last, empfohlen wird der Modus 'Nutzer, globale Kontakte'." -#: mod/admin.php:949 +#: mod/admin.php:958 msgid "Timeframe for fetching global contacts" msgstr "Zeitfenster für globale Kontakte" -#: mod/admin.php:949 +#: mod/admin.php:958 msgid "" "When the discovery is activated, this value defines the timeframe for the " "activity of the global contacts that are fetched from other servers." msgstr "Wenn die Entdeckung neuer Kontakte aktiv ist, definiert dieses Zeitfenster den Zeitraum in dem globale Kontakte als aktiv gelten und von anderen Servern importiert werden." -#: mod/admin.php:950 +#: mod/admin.php:959 msgid "Search the local directory" msgstr "Lokales Verzeichnis durchsuchen" -#: mod/admin.php:950 +#: mod/admin.php:959 msgid "" "Search the local directory instead of the global directory. When searching " "locally, every search will be executed on the global directory in the " "background. This improves the search results when the search is repeated." msgstr "Suche im lokalen Verzeichnis anstelle des globalen Verzeichnisses durchführen. Jede Suche wird im Hintergrund auch im globalen Verzeichnis durchgeführt umd die Suchresultate zu verbessern, wenn diese Suche wiederholt wird." -#: mod/admin.php:952 +#: mod/admin.php:961 msgid "Publish server information" msgstr "Server Informationen veröffentlichen" -#: mod/admin.php:952 +#: mod/admin.php:961 msgid "" "If enabled, general server and usage data will be published. The data " "contains the name and version of the server, number of users with public " @@ -2769,205 +2769,205 @@ msgid "" " href='http://the-federation.info/'>the-federation.info for details." msgstr "Wenn aktiviert, werden allgemeine Informationen über den Server und Nutzungsdaten veröffentlicht. Die Daten beinhalten den Namen sowie die Version des Servers, die Anzahl der Nutzer_innen mit öffentlichen Profilen, die Anzahl der Beiträge sowie aktivierte Protokolle und Connectoren. Für Details bitte the-federation.info aufrufen." -#: mod/admin.php:954 +#: mod/admin.php:963 msgid "Use MySQL full text engine" msgstr "Nutze MySQL full text engine" -#: mod/admin.php:954 +#: mod/admin.php:963 msgid "" "Activates the full text engine. Speeds up search - but can only search for " "four and more characters." msgstr "Aktiviert die 'full text engine'. Beschleunigt die Suche - aber es kann nur nach vier oder mehr Zeichen gesucht werden." -#: mod/admin.php:955 +#: mod/admin.php:964 msgid "Suppress Language" msgstr "Sprachinformation unterdrücken" -#: mod/admin.php:955 +#: mod/admin.php:964 msgid "Suppress language information in meta information about a posting." msgstr "Verhindert das Erzeugen der Meta-Information zur Spracherkennung eines Beitrags." -#: mod/admin.php:956 +#: mod/admin.php:965 msgid "Suppress Tags" msgstr "Tags Unterdrücken" -#: mod/admin.php:956 +#: mod/admin.php:965 msgid "Suppress showing a list of hashtags at the end of the posting." msgstr "Unterdrückt die Anzeige von Tags am Ende eines Beitrags." -#: mod/admin.php:957 +#: mod/admin.php:966 msgid "Path to item cache" msgstr "Pfad zum Eintrag Cache" -#: mod/admin.php:957 +#: mod/admin.php:966 msgid "The item caches buffers generated bbcode and external images." msgstr "Im Item-Cache werden externe Bilder und geparster BBCode zwischen gespeichert." -#: mod/admin.php:958 +#: mod/admin.php:967 msgid "Cache duration in seconds" msgstr "Cache-Dauer in Sekunden" -#: mod/admin.php:958 +#: mod/admin.php:967 msgid "" "How long should the cache files be hold? Default value is 86400 seconds (One" " day). To disable the item cache, set the value to -1." msgstr "Wie lange sollen die gecachedten Dateien vorgehalten werden? Grundeinstellung sind 86400 Sekunden (ein Tag). Um den Item Cache zu deaktivieren, setze diesen Wert auf -1." -#: mod/admin.php:959 +#: mod/admin.php:968 msgid "Maximum numbers of comments per post" msgstr "Maximale Anzahl von Kommentaren pro Beitrag" -#: mod/admin.php:959 +#: mod/admin.php:968 msgid "How much comments should be shown for each post? Default value is 100." msgstr "Wie viele Kommentare sollen pro Beitrag angezeigt werden? Standardwert sind 100." -#: mod/admin.php:960 +#: mod/admin.php:969 msgid "Path for lock file" msgstr "Pfad für die Sperrdatei" -#: mod/admin.php:960 +#: mod/admin.php:969 msgid "" "The lock file is used to avoid multiple pollers at one time. Only define a " "folder here." msgstr "Die lock-Datei wird benutzt, damit nicht mehrere poller auf einmal laufen. Definiere hier einen Dateiverzeichnis." -#: mod/admin.php:961 +#: mod/admin.php:970 msgid "Temp path" msgstr "Temp Pfad" -#: mod/admin.php:961 +#: mod/admin.php:970 msgid "" "If you have a restricted system where the webserver can't access the system " "temp path, enter another path here." msgstr "Solltest du ein eingeschränktes System haben, auf dem der Webserver nicht auf das temp Verzeichnis des Systems zugreifen kann, setze hier einen anderen Pfad." -#: mod/admin.php:962 +#: mod/admin.php:971 msgid "Base path to installation" msgstr "Basis-Pfad zur Installation" -#: mod/admin.php:962 +#: mod/admin.php:971 msgid "" "If the system cannot detect the correct path to your installation, enter the" " correct path here. This setting should only be set if you are using a " "restricted system and symbolic links to your webroot." msgstr "Falls das System nicht den korrekten Pfad zu deiner Installation gefunden hat, gib den richtigen Pfad bitte hier ein. Du solltest hier den Pfad nur auf einem eingeschränkten System angeben müssen, bei dem du mit symbolischen Links auf dein Webverzeichnis verweist." -#: mod/admin.php:963 +#: mod/admin.php:972 msgid "Disable picture proxy" msgstr "Bilder Proxy deaktivieren" -#: mod/admin.php:963 +#: mod/admin.php:972 msgid "" "The picture proxy increases performance and privacy. It shouldn't be used on" " systems with very low bandwith." msgstr "Der Proxy für Bilder verbessert die Leistung und Privatsphäre der Nutzer. Er sollte nicht auf Systemen verwendet werden, die nur über begrenzte Bandbreite verfügen." -#: mod/admin.php:964 +#: mod/admin.php:973 msgid "Enable old style pager" msgstr "Den Old-Style Pager aktiviren" -#: mod/admin.php:964 +#: mod/admin.php:973 msgid "" "The old style pager has page numbers but slows down massively the page " "speed." msgstr "Der Old-Style Pager zeigt Seitennummern an, verlangsamt aber auch drastisch das Laden einer Seite." -#: mod/admin.php:965 +#: mod/admin.php:974 msgid "Only search in tags" msgstr "Nur in Tags suchen" -#: mod/admin.php:965 +#: mod/admin.php:974 msgid "On large systems the text search can slow down the system extremely." msgstr "Auf großen Knoten kann die Volltext-Suche das System ausbremsen." -#: mod/admin.php:967 +#: mod/admin.php:976 msgid "New base url" msgstr "Neue Basis-URL" -#: mod/admin.php:967 +#: mod/admin.php:976 msgid "" "Change base url for this server. Sends relocate message to all DFRN contacts" " of all users." msgstr "Ändert die Basis-URL dieses Servers und sendet eine Umzugsmitteilung an alle DFRN Kontakte deiner Nutzer_innen." -#: mod/admin.php:969 +#: mod/admin.php:978 msgid "RINO Encryption" msgstr "RINO Verschlüsselung" -#: mod/admin.php:969 +#: mod/admin.php:978 msgid "Encryption layer between nodes." msgstr "Verschlüsselung zwischen Friendica Instanzen" -#: mod/admin.php:970 +#: mod/admin.php:979 msgid "Embedly API key" msgstr "Embedly API Schlüssel" -#: mod/admin.php:970 +#: mod/admin.php:979 msgid "" "Embedly is used to fetch additional data for " "web pages. This is an optional parameter." msgstr "Embedly wird verwendet um zusätzliche Informationen von Webseiten zu laden. Dies ist ein optionaler Parameter." -#: mod/admin.php:999 +#: mod/admin.php:1008 msgid "Update has been marked successful" msgstr "Update wurde als erfolgreich markiert" -#: mod/admin.php:1007 +#: mod/admin.php:1016 #, php-format msgid "Database structure update %s was successfully applied." msgstr "Das Update %s der Struktur der Datenbank wurde erfolgreich angewandt." -#: mod/admin.php:1010 +#: mod/admin.php:1019 #, php-format msgid "Executing of database structure update %s failed with error: %s" msgstr "Das Update %s der Struktur der Datenbank schlug mit folgender Fehlermeldung fehl: %s" -#: mod/admin.php:1022 +#: mod/admin.php:1031 #, php-format msgid "Executing %s failed with error: %s" msgstr "Die Ausführung von %s schlug fehl. Fehlermeldung: %s" -#: mod/admin.php:1025 +#: mod/admin.php:1034 #, php-format msgid "Update %s was successfully applied." msgstr "Update %s war erfolgreich." -#: mod/admin.php:1029 +#: mod/admin.php:1038 #, php-format msgid "Update %s did not return a status. Unknown if it succeeded." msgstr "Update %s hat keinen Status zurückgegeben. Unbekannter Status." -#: mod/admin.php:1031 +#: mod/admin.php:1040 #, php-format msgid "There was no additional update function %s that needed to be called." msgstr "Es gab keine weitere Update-Funktion, die von %s ausgeführt werden musste." -#: mod/admin.php:1050 +#: mod/admin.php:1059 msgid "No failed updates." msgstr "Keine fehlgeschlagenen Updates." -#: mod/admin.php:1051 +#: mod/admin.php:1060 msgid "Check database structure" msgstr "Datenbank Struktur überprüfen" -#: mod/admin.php:1056 +#: mod/admin.php:1065 msgid "Failed Updates" msgstr "Fehlgeschlagene Updates" -#: mod/admin.php:1057 +#: mod/admin.php:1066 msgid "" "This does not include updates prior to 1139, which did not return a status." msgstr "Ohne Updates vor 1139, da diese keinen Status zurückgegeben haben." -#: mod/admin.php:1058 +#: mod/admin.php:1067 msgid "Mark success (if update was manually applied)" msgstr "Als erfolgreich markieren (falls das Update manuell installiert wurde)" -#: mod/admin.php:1059 +#: mod/admin.php:1068 msgid "Attempt to execute this update step automatically" msgstr "Versuchen, diesen Schritt automatisch auszuführen" -#: mod/admin.php:1091 +#: mod/admin.php:1100 #, php-format msgid "" "\n" @@ -2975,7 +2975,7 @@ msgid "" "\t\t\t\tthe administrator of %2$s has set up an account for you." msgstr "\nHallo %1$s,\n\nauf %2$s wurde ein Account für Dich angelegt." -#: mod/admin.php:1094 +#: mod/admin.php:1103 #, php-format msgid "" "\n" @@ -3005,168 +3005,168 @@ msgid "" "\t\t\tThank you and welcome to %4$s." msgstr "\nNachfolgend die Anmelde-Details:\n\tAdresse der Seite:\t%1$s\n\tBenutzername:\t%2$s\n\tPasswort:\t%3$s\n\nDu kannst Dein Passwort unter \"Einstellungen\" ändern, sobald Du Dich\nangemeldet hast.\n\nBitte nimm Dir ein paar Minuten um die anderen Einstellungen auf dieser\nSeite zu kontrollieren.\n\nEventuell magst Du ja auch einige Informationen über Dich in Deinem\nProfil veröffentlichen, damit andere Leute Dich einfacher finden können.\nBearbeite hierfür einfach Dein Standard-Profil (über die Profil-Seite).\n\nWir empfehlen Dir, Deinen kompletten Namen anzugeben und ein zu Dir\npassendes Profilbild zu wählen, damit Dich alte Bekannte wieder finden.\nAußerdem ist es nützlich, wenn Du auf Deinem Profil Schlüsselwörter\nangibst. Das erleichtert es, Leute zu finden, die Deine Interessen teilen.\n\nWir respektieren Deine Privatsphäre - keine dieser Angaben ist nötig.\nWenn Du neu im Netzwerk bist und noch niemanden kennst, dann können sie\nallerdings dabei helfen, neue und interessante Kontakte zu knüpfen.\n\nNun viel Spaß, gute Begegnungen und willkommen auf %4$s." -#: mod/admin.php:1126 include/user.php:423 +#: mod/admin.php:1135 include/user.php:423 #, php-format msgid "Registration details for %s" msgstr "Details der Registration von %s" -#: mod/admin.php:1138 +#: mod/admin.php:1147 #, php-format msgid "%s user blocked/unblocked" msgid_plural "%s users blocked/unblocked" msgstr[0] "%s Benutzer geblockt/freigegeben" msgstr[1] "%s Benutzer geblockt/freigegeben" -#: mod/admin.php:1145 +#: mod/admin.php:1154 #, php-format msgid "%s user deleted" msgid_plural "%s users deleted" msgstr[0] "%s Nutzer gelöscht" msgstr[1] "%s Nutzer gelöscht" -#: mod/admin.php:1192 +#: mod/admin.php:1201 #, php-format msgid "User '%s' deleted" msgstr "Nutzer '%s' gelöscht" -#: mod/admin.php:1200 +#: mod/admin.php:1209 #, php-format msgid "User '%s' unblocked" msgstr "Nutzer '%s' entsperrt" -#: mod/admin.php:1200 +#: mod/admin.php:1209 #, php-format msgid "User '%s' blocked" msgstr "Nutzer '%s' gesperrt" -#: mod/admin.php:1291 +#: mod/admin.php:1300 msgid "Add User" msgstr "Nutzer hinzufügen" -#: mod/admin.php:1292 +#: mod/admin.php:1301 msgid "select all" msgstr "Alle auswählen" -#: mod/admin.php:1293 +#: mod/admin.php:1302 msgid "User registrations waiting for confirm" msgstr "Neuanmeldungen, die auf Deine Bestätigung warten" -#: mod/admin.php:1294 +#: mod/admin.php:1303 msgid "User waiting for permanent deletion" msgstr "Nutzer wartet auf permanente Löschung" -#: mod/admin.php:1295 +#: mod/admin.php:1304 msgid "Request date" msgstr "Anfragedatum" -#: mod/admin.php:1295 mod/admin.php:1307 mod/admin.php:1308 mod/admin.php:1323 +#: mod/admin.php:1304 mod/admin.php:1316 mod/admin.php:1317 mod/admin.php:1332 #: include/contact_selectors.php:79 include/contact_selectors.php:86 msgid "Email" msgstr "E-Mail" -#: mod/admin.php:1296 +#: mod/admin.php:1305 msgid "No registrations." msgstr "Keine Neuanmeldungen." -#: mod/admin.php:1298 +#: mod/admin.php:1307 msgid "Deny" msgstr "Verwehren" -#: mod/admin.php:1302 +#: mod/admin.php:1311 msgid "Site admin" msgstr "Seitenadministrator" -#: mod/admin.php:1303 +#: mod/admin.php:1312 msgid "Account expired" msgstr "Account ist abgelaufen" -#: mod/admin.php:1306 +#: mod/admin.php:1315 msgid "New User" msgstr "Neuer Nutzer" -#: mod/admin.php:1307 mod/admin.php:1308 +#: mod/admin.php:1316 mod/admin.php:1317 msgid "Register date" msgstr "Anmeldedatum" -#: mod/admin.php:1307 mod/admin.php:1308 +#: mod/admin.php:1316 mod/admin.php:1317 msgid "Last login" msgstr "Letzte Anmeldung" -#: mod/admin.php:1307 mod/admin.php:1308 +#: mod/admin.php:1316 mod/admin.php:1317 msgid "Last item" msgstr "Letzter Beitrag" -#: mod/admin.php:1307 +#: mod/admin.php:1316 msgid "Deleted since" msgstr "Gelöscht seit" -#: mod/admin.php:1308 mod/settings.php:41 +#: mod/admin.php:1317 mod/settings.php:41 msgid "Account" msgstr "Nutzerkonto" -#: mod/admin.php:1310 +#: mod/admin.php:1319 msgid "" "Selected users will be deleted!\\n\\nEverything these users had posted on " "this site will be permanently deleted!\\n\\nAre you sure?" msgstr "Die markierten Nutzer werden gelöscht!\\n\\nAlle Beiträge, die diese Nutzer auf dieser Seite veröffentlicht haben, werden permanent gelöscht!\\n\\nBist Du sicher?" -#: mod/admin.php:1311 +#: mod/admin.php:1320 msgid "" "The user {0} will be deleted!\\n\\nEverything this user has posted on this " "site will be permanently deleted!\\n\\nAre you sure?" msgstr "Der Nutzer {0} wird gelöscht!\\n\\nAlles was dieser Nutzer auf dieser Seite veröffentlicht hat, wird permanent gelöscht!\\n\\nBist Du sicher?" -#: mod/admin.php:1321 +#: mod/admin.php:1330 msgid "Name of the new user." msgstr "Name des neuen Nutzers" -#: mod/admin.php:1322 +#: mod/admin.php:1331 msgid "Nickname" msgstr "Spitzname" -#: mod/admin.php:1322 +#: mod/admin.php:1331 msgid "Nickname of the new user." msgstr "Spitznamen für den neuen Nutzer" -#: mod/admin.php:1323 +#: mod/admin.php:1332 msgid "Email address of the new user." msgstr "Email Adresse des neuen Nutzers" -#: mod/admin.php:1366 +#: mod/admin.php:1375 #, php-format msgid "Plugin %s disabled." msgstr "Plugin %s deaktiviert." -#: mod/admin.php:1370 +#: mod/admin.php:1379 #, php-format msgid "Plugin %s enabled." msgstr "Plugin %s aktiviert." -#: mod/admin.php:1381 mod/admin.php:1617 +#: mod/admin.php:1390 mod/admin.php:1626 msgid "Disable" msgstr "Ausschalten" -#: mod/admin.php:1383 mod/admin.php:1619 +#: mod/admin.php:1392 mod/admin.php:1628 msgid "Enable" msgstr "Einschalten" -#: mod/admin.php:1406 mod/admin.php:1664 +#: mod/admin.php:1415 mod/admin.php:1673 msgid "Toggle" msgstr "Umschalten" -#: mod/admin.php:1414 mod/admin.php:1673 +#: mod/admin.php:1423 mod/admin.php:1682 msgid "Author: " msgstr "Autor:" -#: mod/admin.php:1415 mod/admin.php:1674 +#: mod/admin.php:1424 mod/admin.php:1683 msgid "Maintainer: " msgstr "Betreuer:" -#: mod/admin.php:1467 +#: mod/admin.php:1476 msgid "Reload active plugins" msgstr "Aktive Plugins neu laden" -#: mod/admin.php:1472 +#: mod/admin.php:1481 #, php-format msgid "" "There are currently no plugins available on your node. You can find the " @@ -3174,62 +3174,62 @@ msgid "" "in the open plugin registry at %2$s" msgstr "Es sind derzeit keine Plugins auf diesem Knoten verfügbar. Du findest das offizielle Plugin-Repository unter %1$s und weitere eventuell interessante Plugins im offenen Plugins-Verzeichnis auf %2$s." -#: mod/admin.php:1577 +#: mod/admin.php:1586 msgid "No themes found." msgstr "Keine Themen gefunden." -#: mod/admin.php:1655 +#: mod/admin.php:1664 msgid "Screenshot" msgstr "Bildschirmfoto" -#: mod/admin.php:1715 +#: mod/admin.php:1724 msgid "Reload active themes" msgstr "Aktives Theme neu laden" -#: mod/admin.php:1720 +#: mod/admin.php:1729 #, php-format msgid "No themes found on the system. They should be paced in %1$s" msgstr "Es wurden keine Themes auf dem System gefunden. Diese sollten in %1$s patziert werden." -#: mod/admin.php:1721 +#: mod/admin.php:1730 msgid "[Experimental]" msgstr "[Experimentell]" -#: mod/admin.php:1722 +#: mod/admin.php:1731 msgid "[Unsupported]" msgstr "[Nicht unterstützt]" -#: mod/admin.php:1746 +#: mod/admin.php:1755 msgid "Log settings updated." msgstr "Protokolleinstellungen aktualisiert." -#: mod/admin.php:1783 +#: mod/admin.php:1792 msgid "Clear" msgstr "löschen" -#: mod/admin.php:1788 +#: mod/admin.php:1797 msgid "Enable Debugging" msgstr "Protokoll führen" -#: mod/admin.php:1789 +#: mod/admin.php:1798 msgid "Log file" msgstr "Protokolldatei" -#: mod/admin.php:1789 +#: mod/admin.php:1798 msgid "" "Must be writable by web server. Relative to your Friendica top-level " "directory." msgstr "Webserver muss Schreibrechte besitzen. Abhängig vom Friendica-Installationsverzeichnis." -#: mod/admin.php:1790 +#: mod/admin.php:1799 msgid "Log level" msgstr "Protokoll-Level" -#: mod/admin.php:1793 +#: mod/admin.php:1802 msgid "PHP logging" msgstr "PHP Protokollieren" -#: mod/admin.php:1794 +#: mod/admin.php:1803 msgid "" "To enable logging of PHP errors and warnings you can add the following to " "the .htconfig.php file of your installation. The filename set in the " @@ -3238,20 +3238,20 @@ msgid "" "'display_errors' is to enable these options, set to '0' to disable them." msgstr "Um PHP Warnungen und Fehler zu protokollieren, kannst du die folgenden Zeilen zur .htconfig.php Datei deiner Installation hinzufügen. Den Dateinamen der Log-Datei legst du in der Zeile mit dem 'error_log' fest, Er ist relativ zum Friendica-Stammverzeichnis und muss schreibbar durch den Webserver sein. Eine \"1\" als Option für die Punkte 'log_errors' und 'display_errors' aktiviert die Funktionen zum Protokollieren bzw. Anzeigen der Fehler, eine \"0\" deaktiviert sie." -#: mod/admin.php:1920 mod/admin.php:1921 mod/settings.php:759 +#: mod/admin.php:1929 mod/admin.php:1930 mod/settings.php:759 msgid "Off" msgstr "Aus" -#: mod/admin.php:1920 mod/admin.php:1921 mod/settings.php:759 +#: mod/admin.php:1929 mod/admin.php:1930 mod/settings.php:759 msgid "On" msgstr "An" -#: mod/admin.php:1921 +#: mod/admin.php:1930 #, php-format msgid "Lock feature %s" msgstr "Feature festlegen: %s" -#: mod/admin.php:1929 +#: mod/admin.php:1938 msgid "Manage Additional Features" msgstr "Zusätzliche Features Verwalten" @@ -3529,7 +3529,7 @@ msgstr "l, F j" msgid "Edit event" msgstr "Veranstaltung bearbeiten" -#: mod/events.php:421 include/text.php:1721 include/text.php:1728 +#: mod/events.php:421 include/text.php:1728 include/text.php:1735 msgid "link to source" msgstr "Link zum Originalbeitrag" @@ -3636,15 +3636,15 @@ msgstr[0] "%d Kommentar" msgstr[1] "%d Kommentare" #: mod/content.php:607 object/Item.php:421 object/Item.php:434 -#: include/text.php:1997 +#: include/text.php:2004 msgid "comment" msgid_plural "comments" msgstr[0] "Kommentar" msgstr[1] "Kommentare" -#: mod/content.php:608 boot.php:863 object/Item.php:422 +#: mod/content.php:608 boot.php:870 object/Item.php:422 #: include/contact_widgets.php:242 include/forums.php:110 -#: include/items.php:5184 view/theme/vier/theme.php:264 +#: include/items.php:5188 view/theme/vier/theme.php:264 msgid "show more" msgstr "mehr anzeigen" @@ -3682,7 +3682,7 @@ msgid "This is you" msgstr "Das bist Du" #: mod/content.php:711 mod/photos.php:1629 mod/photos.php:1677 -#: mod/photos.php:1765 boot.php:862 object/Item.php:393 object/Item.php:709 +#: mod/photos.php:1765 boot.php:869 object/Item.php:393 object/Item.php:709 msgid "Comment" msgstr "Kommentar" @@ -4173,16 +4173,16 @@ msgstr "Profilübereinstimmungen" msgid "link" msgstr "Link" -#: mod/community.php:23 +#: mod/community.php:27 msgid "Not available." msgstr "Nicht verfügbar." -#: mod/community.php:32 include/nav.php:136 include/nav.php:138 +#: mod/community.php:36 include/nav.php:136 include/nav.php:138 #: view/theme/diabook/theme.php:129 msgid "Community" msgstr "Gemeinschaft" -#: mod/community.php:62 mod/community.php:71 mod/search.php:228 +#: mod/community.php:66 mod/community.php:75 mod/search.php:228 msgid "No results." msgstr "Keine Ergebnisse." @@ -5109,7 +5109,7 @@ msgstr "Wähle einen Spitznamen für Dein Profil. Dieser muss mit einem Buchstab msgid "Choose a nickname: " msgstr "Spitznamen wählen: " -#: mod/register.php:280 boot.php:1379 include/nav.php:108 +#: mod/register.php:280 boot.php:1405 include/nav.php:108 msgid "Register" msgstr "Registrieren" @@ -6154,60 +6154,60 @@ msgstr "Beitrag nicht verfügbar." msgid "Item was not found." msgstr "Beitrag konnte nicht gefunden werden." -#: boot.php:861 +#: boot.php:868 msgid "Delete this item?" msgstr "Diesen Beitrag löschen?" -#: boot.php:864 +#: boot.php:871 msgid "show fewer" msgstr "weniger anzeigen" -#: boot.php:1266 +#: boot.php:1292 #, php-format msgid "Update %s failed. See error logs." msgstr "Update %s fehlgeschlagen. Bitte Fehlerprotokoll überprüfen." -#: boot.php:1378 +#: boot.php:1404 msgid "Create a New Account" msgstr "Neues Konto erstellen" -#: boot.php:1403 include/nav.php:72 +#: boot.php:1429 include/nav.php:72 msgid "Logout" msgstr "Abmelden" -#: boot.php:1406 +#: boot.php:1432 msgid "Nickname or Email address: " msgstr "Spitzname oder E-Mail-Adresse: " -#: boot.php:1407 +#: boot.php:1433 msgid "Password: " msgstr "Passwort: " -#: boot.php:1408 +#: boot.php:1434 msgid "Remember me" msgstr "Anmeldedaten merken" -#: boot.php:1411 +#: boot.php:1437 msgid "Or login using OpenID: " msgstr "Oder melde Dich mit Deiner OpenID an: " -#: boot.php:1417 +#: boot.php:1443 msgid "Forgot your password?" msgstr "Passwort vergessen?" -#: boot.php:1420 +#: boot.php:1446 msgid "Website Terms of Service" msgstr "Website Nutzungsbedingungen" -#: boot.php:1421 +#: boot.php:1447 msgid "terms of service" msgstr "Nutzungsbedingungen" -#: boot.php:1423 +#: boot.php:1449 msgid "Website Privacy Policy" msgstr "Website Datenschutzerklärung" -#: boot.php:1424 +#: boot.php:1450 msgid "privacy policy" msgstr "Datenschutzerklärung" @@ -6708,12 +6708,12 @@ msgstr "Sekunden" msgid "%1$d %2$s ago" msgstr "%1$d %2$s her" -#: include/datetime.php:474 include/items.php:2477 +#: include/datetime.php:474 include/items.php:2481 #, php-format msgid "%s's birthday" msgstr "%ss Geburtstag" -#: include/datetime.php:475 include/items.php:2478 +#: include/datetime.php:475 include/items.php:2482 #, php-format msgid "Happy Birthday %s" msgstr "Herzlichen Glückwunsch %s" @@ -6852,12 +6852,12 @@ msgid "Only You Can See This" msgstr "Nur Du kannst das sehen" #: include/like.php:167 include/conversation.php:122 -#: include/conversation.php:258 include/text.php:1991 +#: include/conversation.php:258 include/text.php:1998 #: view/theme/diabook/theme.php:463 msgid "event" msgstr "Event" -#: include/like.php:184 include/conversation.php:141 include/diaspora.php:2163 +#: include/like.php:184 include/conversation.php:141 include/diaspora.php:2167 #: view/theme/diabook/theme.php:480 #, php-format msgid "%1$s likes %2$s's %3$s" @@ -7353,31 +7353,31 @@ msgstr "entspannt" msgid "surprised" msgstr "überrascht" -#: include/text.php:1497 +#: include/text.php:1504 msgid "bytes" msgstr "Byte" -#: include/text.php:1529 include/text.php:1541 +#: include/text.php:1536 include/text.php:1548 msgid "Click to open/close" msgstr "Zum öffnen/schließen klicken" -#: include/text.php:1715 +#: include/text.php:1722 msgid "View on separate page" msgstr "Auf separater Seite ansehen" -#: include/text.php:1716 +#: include/text.php:1723 msgid "view on separate page" msgstr "auf separater Seite ansehen" -#: include/text.php:1995 +#: include/text.php:2002 msgid "activity" msgstr "Aktivität" -#: include/text.php:1998 +#: include/text.php:2005 msgid "post" msgstr "Beitrag" -#: include/text.php:2166 +#: include/text.php:2173 msgid "Item filed" msgstr "Beitrag abgelegt" @@ -7806,7 +7806,7 @@ msgstr "\nDie Anmelde-Details sind die folgenden:\n\tAdresse der Seite:\t%3$s\n\ msgid "Sharing notification from Diaspora network" msgstr "Freigabe-Benachrichtigung von Diaspora" -#: include/diaspora.php:2604 +#: include/diaspora.php:2608 msgid "Attachments:" msgstr "Anhänge:" @@ -7818,11 +7818,11 @@ msgstr "(kein Betreff)" msgid "noreply" msgstr "noreply" -#: include/items.php:4903 +#: include/items.php:4907 msgid "Do you really want to delete this item?" msgstr "Möchtest Du wirklich dieses Item löschen?" -#: include/items.php:5178 +#: include/items.php:5182 msgid "Archives" msgstr "Archiv" @@ -8338,11 +8338,11 @@ msgstr "Kompletter Name:\t%1$s\\nURL der Seite:\t%2$s\\nLogin Name:\t%3$s (%4$s) msgid "Please visit %s to approve or reject the request." msgstr "Bitte besuche %s um die Anfrage zu bearbeiten." -#: include/oembed.php:214 +#: include/oembed.php:226 msgid "Embedded content" msgstr "Eingebetteter Inhalt" -#: include/oembed.php:223 +#: include/oembed.php:235 msgid "Embedding disabled" msgstr "Einbettungen deaktiviert" diff --git a/view/de/strings.php b/view/de/strings.php index f3b04b7c3b..d9b8c8b6aa 100644 --- a/view/de/strings.php +++ b/view/de/strings.php @@ -9,7 +9,7 @@ $a->strings["Network:"] = "Netzwerk"; $a->strings["Forum"] = "Forum"; $a->strings["%d contact edited."] = array( 0 => "%d Kontakt bearbeitet.", - 1 => "%d Kontakte bearbeitet", + 1 => "%d Kontakte bearbeitet.", ); $a->strings["Could not access contact record."] = "Konnte nicht auf die Kontaktdaten zugreifen."; $a->strings["Could not locate selected profile."] = "Konnte das ausgewählte Profil nicht finden."; From d768074afd844788e958f0afbd0040cb3243be83 Mon Sep 17 00:00:00 2001 From: Michael Vogel Date: Thu, 21 Jan 2016 13:21:47 +0100 Subject: [PATCH 088/242] Comments from Hubzilla weren't federated properly --- include/diaspora.php | 64 +++++++++++++++++++++++++++++--------------- include/threads.php | 1 + 2 files changed, 44 insertions(+), 21 deletions(-) diff --git a/include/diaspora.php b/include/diaspora.php index 4673cdaf4c..584ec92a49 100644 --- a/include/diaspora.php +++ b/include/diaspora.php @@ -826,6 +826,19 @@ function diaspora_plink($addr, $guid) { return 'https://'.substr($addr,strpos($addr,'@')+1).'/posts/'.$guid; } +function diaspora_repair_signature($signature, $handle = "", $level = 1) { + if (base64_encode(base64_decode(base64_decode($signature))) == base64_decode($signature)) { + $signature = base64_decode($signature); + logger("Repaired double encoded signature from Diaspora/Hubzilla handle ".$handle." - level ".$level, LOGGER_DEBUG); + + // Do a recursive call to be able to fix even multiple levels + if ($level < 10) + $signature = diaspora_repair_signature($signature, $handle, ++$level); + } + + return($signature); +} + function diaspora_post($importer,$xml,$msg) { $a = get_app(); @@ -1475,8 +1488,7 @@ function diaspora_comment($importer,$xml,$msg) { logger('diaspora_comment: top-level owner verification failed.'); return; } - } - else { + } elseif($author_signature) { // If there's no parent_author_signature, then we've received the comment // from the comment creator. In that case, the person is commenting on // our post, so he/she must be a contact of ours and his/her public key @@ -1490,6 +1502,11 @@ function diaspora_comment($importer,$xml,$msg) { } } + if (!$parent_author_signature AND !$author_signature) { + logger("No signature in comment. Comment will be rejected."); + return; + } + // Phew! Everything checks out. Now create an item. // Find the original comment author information. @@ -1565,18 +1582,19 @@ function diaspora_comment($importer,$xml,$msg) { //); //} - if(($parent_item['origin']) && (! $parent_author_signature)) { + // If we are the origin of the parent we store the original signature and notify our followers + if($parent_item['origin']) { + $author_signature_base64 = base64_encode($author_signature); + $author_signature_base64 = diaspora_repair_signature($author_signature_base64, $diaspora_handle); + q("insert into sign (`iid`,`signed_text`,`signature`,`signer`) values (%d,'%s','%s','%s') ", intval($message_id), dbesc($signed_data), - dbesc(base64_encode($author_signature)), + dbesc($author_signature_base64), dbesc($diaspora_handle) ); - // if the message isn't already being relayed, notify others - // the existence of parent_author_signature means the parent_author or owner - // is already relaying. - + // notify others proc_run('php','include/notifier.php','comment-import',$message_id); } @@ -2113,7 +2131,7 @@ function diaspora_like($importer,$xml,$msg) { logger('diaspora_like: top-level owner verification failed.'); return; } - } else { + } elseif($author_signature) { // If there's no parent_author_signature, then we've received the like // from the like creator. In that case, the person is "like"ing // our post, so he/she must be a contact of ours and his/her public key @@ -2129,6 +2147,11 @@ function diaspora_like($importer,$xml,$msg) { } } + if (!$parent_author_signature AND !$author_signature) { + logger("No signature in like. Like will be rejected."); + return; + } + // Phew! Everything checks out. Now create an item. // Find the original comment author information. @@ -2226,21 +2249,21 @@ EOT; // ); //} - if(! $parent_author_signature) { + // If we are the origin of the parent we store the original signature and notify our followers + if($parent_item['origin']) { + $author_signature_base64 = base64_encode($author_signature); + $author_signature_base64 = diaspora_repair_signature($author_signature_base64, $diaspora_handle); + q("insert into sign (`iid`,`signed_text`,`signature`,`signer`) values (%d,'%s','%s','%s') ", intval($message_id), dbesc($signed_data), - dbesc(base64_encode($author_signature)), + dbesc($author_signature_base64), dbesc($diaspora_handle) ); - } - // if the message isn't already being relayed, notify others - // the existence of parent_author_signature means the parent_author or owner - // is already relaying. The parent_item['origin'] indicates the message was created on our system - - if(($parent_item['origin']) && (! $parent_author_signature)) + // notify others proc_run('php','include/notifier.php','comment-import',$message_id); + } return; } @@ -2336,8 +2359,7 @@ function diaspora_signed_retraction($importer,$xml,$msg) { return; } - } - else { + } else { $sig_decode = base64_decode($sig); @@ -2371,7 +2393,7 @@ function diaspora_signed_retraction($importer,$xml,$msg) { intval($r[0]['parent']) ); if(count($p)) { - if(($p[0]['origin']) && (! $parent_author_signature)) { + if($p[0]['origin']) { q("insert into sign (`retract_iid`,`signed_text`,`signature`,`signer`) values (%d,'%s','%s','%s') ", $r[0]['id'], dbesc($signed_data), @@ -2961,7 +2983,7 @@ function diaspora_send_relay($item,$owner,$contact,$public_batch = false) { '$handle' => xmlify($handle) )); - logger('diaspora_send_relay: base message: ' . $msg, LOGGER_DATA); + logger('diaspora_send_relay: base message: ' . $msg, LOGGER_DEBUG); logger('send guid '.$item['guid'], LOGGER_DEBUG); $slap = 'xml=' . urlencode(urlencode(diaspora_msg_build($msg,$owner,$contact,$owner['uprvkey'],$contact['pubkey'],$public_batch))); diff --git a/include/threads.php b/include/threads.php index e542295d7b..0320eaa018 100644 --- a/include/threads.php +++ b/include/threads.php @@ -66,6 +66,7 @@ function add_thread($itemid, $onlyshadow = false) { unset($item[0]['id']); $item[0]['uid'] = 0; + $item[0]['origin'] = 0; $item[0]['contact-id'] = get_contact($item[0]['author-link'], 0); $public_shadow = item_store($item[0], false, false, true); From 54f42cb70663b44de10c12b093ac4aedbe2b34bf Mon Sep 17 00:00:00 2001 From: Michael Vogel Date: Thu, 21 Jan 2016 13:38:30 +0100 Subject: [PATCH 089/242] removed some test code --- include/diaspora.php | 15 +++------------ 1 file changed, 3 insertions(+), 12 deletions(-) diff --git a/include/diaspora.php b/include/diaspora.php index 584ec92a49..b193dffadb 100644 --- a/include/diaspora.php +++ b/include/diaspora.php @@ -1488,7 +1488,8 @@ function diaspora_comment($importer,$xml,$msg) { logger('diaspora_comment: top-level owner verification failed.'); return; } - } elseif($author_signature) { + } + else { // If there's no parent_author_signature, then we've received the comment // from the comment creator. In that case, the person is commenting on // our post, so he/she must be a contact of ours and his/her public key @@ -1502,11 +1503,6 @@ function diaspora_comment($importer,$xml,$msg) { } } - if (!$parent_author_signature AND !$author_signature) { - logger("No signature in comment. Comment will be rejected."); - return; - } - // Phew! Everything checks out. Now create an item. // Find the original comment author information. @@ -2131,7 +2127,7 @@ function diaspora_like($importer,$xml,$msg) { logger('diaspora_like: top-level owner verification failed.'); return; } - } elseif($author_signature) { + } else { // If there's no parent_author_signature, then we've received the like // from the like creator. In that case, the person is "like"ing // our post, so he/she must be a contact of ours and his/her public key @@ -2147,11 +2143,6 @@ function diaspora_like($importer,$xml,$msg) { } } - if (!$parent_author_signature AND !$author_signature) { - logger("No signature in like. Like will be rejected."); - return; - } - // Phew! Everything checks out. Now create an item. // Find the original comment author information. From 03bef2c8f85c0ece9c98df466d8948e1567d2f24 Mon Sep 17 00:00:00 2001 From: rabuzarus Date: Thu, 21 Jan 2016 13:44:38 +0100 Subject: [PATCH 090/242] fix events_reminder popup --- js/main.js | 4 +++- view/templates/events_reminder.tpl | 2 +- 2 files changed, 4 insertions(+), 2 deletions(-) diff --git a/js/main.js b/js/main.js index 2e65ef2316..d1fd3765fb 100644 --- a/js/main.js +++ b/js/main.js @@ -160,7 +160,9 @@ 'inline' : true, 'transition' : 'elastic' }); - + $("a.ajax-popupbox").colorbox({ + 'transition' : 'elastic' + }); /* notifications template */ var notifications_tpl= unescape($("#nav-notifications-template[rel=template]").html()); diff --git a/view/templates/events_reminder.tpl b/view/templates/events_reminder.tpl index 9aceb3f1cb..2fcb1908d7 100644 --- a/view/templates/events_reminder.tpl +++ b/view/templates/events_reminder.tpl @@ -4,7 +4,7 @@ {{/if}} From e00c091540f8b5cf7e320ca9f0fbfeb357438a43 Mon Sep 17 00:00:00 2001 From: Michael Vogel Date: Thu, 21 Jan 2016 13:57:21 +0100 Subject: [PATCH 091/242] Small fix for empty signatures --- include/diaspora.php | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/include/diaspora.php b/include/diaspora.php index b193dffadb..40a126bf06 100644 --- a/include/diaspora.php +++ b/include/diaspora.php @@ -827,6 +827,10 @@ function diaspora_plink($addr, $guid) { } function diaspora_repair_signature($signature, $handle = "", $level = 1) { + + if ($signature == "") + return($signature); + if (base64_encode(base64_decode(base64_decode($signature))) == base64_decode($signature)) { $signature = base64_decode($signature); logger("Repaired double encoded signature from Diaspora/Hubzilla handle ".$handle." - level ".$level, LOGGER_DEBUG); @@ -2974,7 +2978,7 @@ function diaspora_send_relay($item,$owner,$contact,$public_batch = false) { '$handle' => xmlify($handle) )); - logger('diaspora_send_relay: base message: ' . $msg, LOGGER_DEBUG); + logger('diaspora_send_relay: base message: ' . $msg, LOGGER_DATA); logger('send guid '.$item['guid'], LOGGER_DEBUG); $slap = 'xml=' . urlencode(urlencode(diaspora_msg_build($msg,$owner,$contact,$owner['uprvkey'],$contact['pubkey'],$public_batch))); From e1bc0b4ff820c3d98ba2188ca408cc88ed9ba7eb Mon Sep 17 00:00:00 2001 From: Michael Vogel Date: Thu, 21 Jan 2016 16:01:46 +0100 Subject: [PATCH 092/242] Likes are now federated again through Diaspora --- include/diaspora.php | 2 +- include/like.php | 30 +++++++++++++++++++++++++++--- 2 files changed, 28 insertions(+), 4 deletions(-) diff --git a/include/diaspora.php b/include/diaspora.php index 40a126bf06..b72239c4ce 100644 --- a/include/diaspora.php +++ b/include/diaspora.php @@ -2836,7 +2836,7 @@ function diaspora_send_followup($item,$owner,$contact,$public_batch = false) { // sign it if($like) - $signed_text = $item['guid'] . ';' . $target_type . ';' . $parent['guid'] . ';' . $positive . ';' . $myaddr; + $signed_text = $positive . ';' . $item['guid'] . ';' . $target_type . ';' . $parent['guid'] . ';' . $myaddr; else $signed_text = $item['guid'] . ';' . $parent['guid'] . ';' . $text . ';' . $myaddr; diff --git a/include/like.php b/include/like.php index 6aef0cb5b8..646e0727be 100644 --- a/include/like.php +++ b/include/like.php @@ -279,6 +279,9 @@ function store_diaspora_like_retract_sig($activity, $item, $like_item, $contact) $contact_baseurl = substr($contact['url'], $contact_baseurl_start, $contact_baseurl_length); $diaspora_handle = $contact['nick'] . '@' . $contact_baseurl; + // This code could never had worked (the return values form the queries were used in a wrong way. + // Additionally it is needlessly complicated. Either the contact is owner or not. And we have this data already. +/* // Get contact's private key if he's a user of the local Friendica server $r = q("SELECT `contact`.`uid` FROM `contact` WHERE `url` = '%s' AND `self` = 1 LIMIT 1", dbesc($contact['url']) @@ -289,9 +292,15 @@ function store_diaspora_like_retract_sig($activity, $item, $like_item, $contact) $r = q("SELECT prvkey FROM user WHERE uid = %d LIMIT 1", intval($contact_uid) ); +*/ + // Is the contact the owner? Then fetch the private key + if ($contact['self'] AND ($contact['uid'] > 0)) { + $r = q("SELECT prvkey FROM user WHERE uid = %d LIMIT 1", + intval($contact['uid']) + ); - if( $r) - $authorsig = base64_encode(rsa_sign($signed_text,$r['prvkey'],'sha256')); + if($r) + $authorsig = base64_encode(rsa_sign($signed_text,$r[0]['prvkey'],'sha256')); } if(! isset($authorsig)) @@ -329,6 +338,10 @@ function store_diaspora_like_sig($activity, $post_type, $contact, $post_id) { $contact_baseurl = substr($contact['url'], $contact_baseurl_start, $contact_baseurl_length); $diaspora_handle = $contact['nick'] . '@' . $contact_baseurl; + + // This code could never had worked (the return values form the queries were used in a wrong way. + // Additionally it is needlessly complicated. Either the contact is owner or not. And we have this data already. +/* // Get contact's private key if he's a user of the local Friendica server $r = q("SELECT `contact`.`uid` FROM `contact` WHERE `url` = '%s' AND `self` = 1 LIMIT 1", dbesc($contact['url']) @@ -343,6 +356,17 @@ function store_diaspora_like_sig($activity, $post_type, $contact, $post_id) { if( $r) $contact_uprvkey = $r['prvkey']; } +*/ + + // Is the contact the owner? Then fetch the private key + if ($contact['self'] AND ($contact['uid'] > 0)) { + $r = q("SELECT prvkey FROM user WHERE uid = %d LIMIT 1", + intval($contact['uid']) + ); + + if($r) + $contact_uprvkey = $r[0]['prvkey']; + } $r = q("SELECT guid, parent FROM `item` WHERE id = %d LIMIT 1", intval($post_id) @@ -353,7 +377,7 @@ function store_diaspora_like_sig($activity, $post_type, $contact, $post_id) { intval($r[0]['parent']) ); if( $p) { - $signed_text = $r[0]['guid'] . ';Post;' . $p[0]['guid'] . ';true;' . $diaspora_handle; + $signed_text = 'true;'.$r[0]['guid'].';Post;'.$p[0]['guid'].';'.$diaspora_handle; if(isset($contact_uprvkey)) $authorsig = base64_encode(rsa_sign($signed_text,$contact_uprvkey,'sha256')); From 1d502116a8c32e3a4b3e159937f6bc841b80b72a Mon Sep 17 00:00:00 2001 From: Michael Vogel Date: Thu, 21 Jan 2016 19:00:08 +0100 Subject: [PATCH 093/242] Search for GNU Social users in the background --- include/discover_poco.php | 35 +++++++++++++++++++++++++++++++++-- include/socgraph.php | 23 ++++++++++++----------- 2 files changed, 45 insertions(+), 13 deletions(-) diff --git a/include/discover_poco.php b/include/discover_poco.php index 5411e757ad..a8f670334b 100644 --- a/include/discover_poco.php +++ b/include/discover_poco.php @@ -76,9 +76,10 @@ function discover_poco_run(&$argv, &$argc){ update_suggestions(); elseif (($mode == 2) AND get_config('system','poco_completion')) discover_users(); - elseif (($mode == 1) AND ($search != "") and get_config('system','poco_local_search')) + elseif (($mode == 1) AND ($search != "") and get_config('system','poco_local_search')) { discover_directory($search); - elseif (($mode == 0) AND ($search == "") and (get_config('system','poco_discovery') > 0)) { + gs_search_user($search); + } elseif (($mode == 0) AND ($search == "") and (get_config('system','poco_discovery') > 0)) { // Query Friendica and Hubzilla servers for their users poco_discover(); @@ -197,6 +198,36 @@ function discover_directory($search) { Cache::set("dirsearch:".$search, time(), CACHE_DAY); } +/** + * @brief Search for GNU Social user with gstools.org + * + * @param str $search User name + */ +function gs_search_user($search) { + + $a = get_app(); + + $url = "http://gstools.org/api/users_search/".urlencode($search); + + $result = z_fetch_url($url); + if (!$result["success"]) + return false; + + $contacts = json_decode($result["body"]); + + if ($contacts->status == 'ERROR') + return false; + + foreach($contacts->data AS $user) { + $contact = probe_url($user->site_address."/".$user->name); + if ($contact["network"] != NETWORK_PHANTOM) { + $contact["about"] = $user->description; + update_gcontact($contact); + } + } +} + + if (array_search(__file__,get_included_files())===0){ discover_poco_run($_SERVER["argv"],$_SERVER["argc"]); killme(); diff --git a/include/socgraph.php b/include/socgraph.php index 5eaad235b1..4532abb39b 100644 --- a/include/socgraph.php +++ b/include/socgraph.php @@ -1718,18 +1718,19 @@ function gs_fetch_users($server) { $hostname = $statistics->instance_address; } - foreach ($statistics->users AS $nick => $user) { - $profile_url = $server."/".$user->nickname; + if (is_object($statistics->users)) + foreach ($statistics->users AS $nick => $user) { + $profile_url = $server."/".$user->nickname; - $contact = array("url" => $profile_url, - "name" => $user->fullname, - "addr" => $user->nickname."@".$hostname, - "nick" => $user->nickname, - "about" => $user->bio, - "network" => NETWORK_OSTATUS, - "photo" => $a->get_baseurl()."/images/person-175.jpg"); - get_gcontact_id($contact); - } + $contact = array("url" => $profile_url, + "name" => $user->fullname, + "addr" => $user->nickname."@".$hostname, + "nick" => $user->nickname, + "about" => $user->bio, + "network" => NETWORK_OSTATUS, + "photo" => $a->get_baseurl()."/images/person-175.jpg"); + get_gcontact_id($contact); + } } /** From ea9a42259df530d280f4a4331a9fca7737a79de1 Mon Sep 17 00:00:00 2001 From: Michael Vogel Date: Fri, 22 Jan 2016 01:58:36 +0100 Subject: [PATCH 094/242] First version of dfrn.php - unfinished --- include/dfrn.php | 323 +++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 323 insertions(+) create mode 100644 include/dfrn.php diff --git a/include/dfrn.php b/include/dfrn.php new file mode 100644 index 0000000000..4fdc991721 --- /dev/null +++ b/include/dfrn.php @@ -0,0 +1,323 @@ +argc > 2) { + for($x = 2; $x < $a->argc; $x++) { + if($a->argv[$x] == 'converse') + $converse = true; + if($a->argv[$x] == 'starred') + $starred = true; + if($a->argv[$x] === 'category' && $a->argc > ($x + 1) && strlen($a->argv[$x+1])) + $category = $a->argv[$x+1]; + } + } + + + + // default permissions - anonymous user + + $sql_extra = " AND `item`.`allow_cid` = '' AND `item`.`allow_gid` = '' AND `item`.`deny_cid` = '' AND `item`.`deny_gid` = '' "; + + $r = q("SELECT `contact`.*, `user`.`uid` AS `user_uid`, `user`.`nickname`, `user`.`timezone`, `user`.`page-flags` + FROM `contact` INNER JOIN `user` ON `user`.`uid` = `contact`.`uid` + WHERE `contact`.`self` = 1 AND `user`.`nickname` = '%s' LIMIT 1", + dbesc($owner_nick) + ); + + if(! count($r)) + killme(); + + $owner = $r[0]; + $owner_id = $owner['user_uid']; + $owner_nick = $owner['nickname']; + + $birthday = feed_birthday($owner_id,$owner['timezone']); + + $sql_post_table = ""; + $visibility = ""; + + if(! $public_feed) { + + $sql_extra = ''; + switch($direction) { + case (-1): + $sql_extra = sprintf(" AND `issued-id` = '%s' ", dbesc($dfrn_id)); + $my_id = $dfrn_id; + break; + case 0: + $sql_extra = sprintf(" AND `issued-id` = '%s' AND `duplex` = 1 ", dbesc($dfrn_id)); + $my_id = '1:' . $dfrn_id; + break; + case 1: + $sql_extra = sprintf(" AND `dfrn-id` = '%s' AND `duplex` = 1 ", dbesc($dfrn_id)); + $my_id = '0:' . $dfrn_id; + break; + default: + return false; + break; // NOTREACHED + } + + $r = q("SELECT * FROM `contact` WHERE `blocked` = 0 AND `pending` = 0 AND `contact`.`uid` = %d $sql_extra LIMIT 1", + intval($owner_id) + ); + + if(! count($r)) + killme(); + + $contact = $r[0]; + require_once('include/security.php'); + $groups = init_groups_visitor($contact['id']); + + if(count($groups)) { + for($x = 0; $x < count($groups); $x ++) + $groups[$x] = '<' . intval($groups[$x]) . '>' ; + $gs = implode('|', $groups); + } + else + $gs = '<<>>' ; // Impossible to match + + $sql_extra = sprintf(" + AND ( `allow_cid` = '' OR `allow_cid` REGEXP '<%d>' ) + AND ( `deny_cid` = '' OR NOT `deny_cid` REGEXP '<%d>' ) + AND ( `allow_gid` = '' OR `allow_gid` REGEXP '%s' ) + AND ( `deny_gid` = '' OR NOT `deny_gid` REGEXP '%s') + ", + intval($contact['id']), + intval($contact['id']), + dbesc($gs), + dbesc($gs) + ); + } + + if($public_feed) + $sort = 'DESC'; + else + $sort = 'ASC'; + + $date_field = "`changed`"; + $sql_order = "`item`.`parent` ".$sort.", `item`.`created` ASC"; + + if(! strlen($last_update)) + $last_update = 'now -30 days'; + + if(isset($category)) { + $sql_post_table = sprintf("INNER JOIN (SELECT `oid` FROM `term` WHERE `term` = '%s' AND `otype` = %d AND `type` = %d AND `uid` = %d ORDER BY `tid` DESC) AS `term` ON `item`.`id` = `term`.`oid` ", + dbesc(protect_sprintf($category)), intval(TERM_OBJ_POST), intval(TERM_CATEGORY), intval($owner_id)); + //$sql_extra .= file_tag_file_query('item',$category,'category'); + } + + if($public_feed) { + if(! $converse) + $sql_extra .= " AND `contact`.`self` = 1 "; + } + + $check_date = datetime_convert('UTC','UTC',$last_update,'Y-m-d H:i:s'); + + // AND ( `item`.`edited` > '%s' OR `item`.`changed` > '%s' ) + // dbesc($check_date), + + $r = q("SELECT STRAIGHT_JOIN `item`.*, `item`.`id` AS `item_id`, + `contact`.`name`, `contact`.`network`, `contact`.`photo`, `contact`.`url`, + `contact`.`name-date`, `contact`.`uri-date`, `contact`.`avatar-date`, + `contact`.`thumb`, `contact`.`dfrn-id`, `contact`.`self`, + `contact`.`id` AS `contact-id`, `contact`.`uid` AS `contact-uid`, + `sign`.`signed_text`, `sign`.`signature`, `sign`.`signer` + FROM `item` $sql_post_table + INNER JOIN `contact` ON `contact`.`id` = `item`.`contact-id` + AND `contact`.`blocked` = 0 AND `contact`.`pending` = 0 + LEFT JOIN `sign` ON `sign`.`iid` = `item`.`id` + WHERE `item`.`uid` = %d AND `item`.`visible` = 1 and `item`.`moderated` = 0 AND `item`.`parent` != 0 + AND ((`item`.`wall` = 1) $visibility) AND `item`.$date_field > '%s' + $sql_extra + ORDER BY $sql_order LIMIT 0, 300", + intval($owner_id), + dbesc($check_date), + dbesc($sort) + ); + + // Will check further below if this actually returned results. + // We will provide an empty feed if that is the case. + + $items = $r; + + //$feed_template = get_markup_template(($dfrn_id) ? 'atom_feed_dfrn.tpl' : 'atom_feed.tpl'); + + //$atom = ''; + $doc = new DOMDocument('1.0', 'utf-8'); + $doc->formatOutput = true; + + $xpath = new DomXPath($doc); + $xpath->registerNamespace('atom', "http://www.w3.org/2005/Atom"); + $xpath->registerNamespace('thr', "http://purl.org/syndication/thread/1.0"); + $xpath->registerNamespace('georss', "http://www.georss.org/georss"); + $xpath->registerNamespace('activity', "http://activitystrea.ms/spec/1.0/"); + $xpath->registerNamespace('media', "http://purl.org/syndication/atommedia"); + $xpath->registerNamespace('poco', "http://portablecontacts.net/spec/1.0"); + $xpath->registerNamespace('ostatus', "http://ostatus.org/schema/1.0"); + $xpath->registerNamespace('statusnet', "http://status.net/schema/api/1/"); + + $root = ostatus_add_header($doc, $owner); + dfrn_add_header($root, $doc, $xpath, $owner); + + // Todo $hubxml = feed_hublinks(); + + // Todo $salmon = feed_salmonlinks($owner_nick); + + // todo $alternatelink = $owner['url']; + +/* + if(isset($category)) + $alternatelink .= "/category/".$category; + + $atom .= replace_macros($feed_template, array( + '$version' => xmlify(FRIENDICA_VERSION), + '$feed_id' => xmlify($a->get_baseurl() . '/profile/' . $owner_nick), + '$feed_title' => xmlify($owner['name']), + '$feed_updated' => xmlify(datetime_convert('UTC', 'UTC', 'now' , ATOM_TIME)) , + '$hub' => $hubxml, + '$salmon' => $salmon, + '$alternatelink' => xmlify($alternatelink), + '$name' => xmlify($owner['name']), + '$profile_page' => xmlify($owner['url']), + '$photo' => xmlify($owner['photo']), + '$thumb' => xmlify($owner['thumb']), + '$picdate' => xmlify(datetime_convert('UTC','UTC',$owner['avatar-date'] . '+00:00' , ATOM_TIME)) , + '$uridate' => xmlify(datetime_convert('UTC','UTC',$owner['uri-date'] . '+00:00' , ATOM_TIME)) , + '$namdate' => xmlify(datetime_convert('UTC','UTC',$owner['name-date'] . '+00:00' , ATOM_TIME)) , + '$birthday' => ((strlen($birthday)) ? '' . xmlify($birthday) . '' : ''), + '$community' => (($owner['page-flags'] == PAGE_COMMUNITY) ? '1' : '') + )); +*/ + call_hooks('atom_feed', $atom); + + if(! count($items)) { + + call_hooks('atom_feed_end', $atom); + + //$atom .= '' . "\r\n"; + //return $atom; + return(trim($doc->saveXML())); + } + + foreach($items as $item) { + + // prevent private email from leaking. + if($item['network'] === NETWORK_MAIL) + continue; + + // public feeds get html, our own nodes use bbcode + + if($public_feed) { + $type = 'html'; + // catch any email that's in a public conversation and make sure it doesn't leak + if($item['private']) + continue; + } + else { + $type = 'text'; + } + + //$atom .= atom_entry($item,$type,null,$owner,true); + $entry = ostatus_entry($doc, $item, $owner); + dfrn_entry($entry, $doc, $xpath, $item, $owner); + $root->appendChild($entry); + + } + + call_hooks('atom_feed_end', $atom); + + //$atom .= '' . "\r\n"; + + //return $atom; + return(trim($doc->saveXML())); +} + +/** + * @brief Adds the header elements for thr DFRN protocol + * + * We use the XML from OStatus as a base and are adding the DFRN parts to it. + * + * @root Class XML root element + * @doc Class XML document + * @xpath Class XML xpath + * @owner array Owner record + * + */ +function dfrn_add_header(&$root, $doc, $xpath, $owner) { + + $root->setAttribute("xmlns:at", "http://purl.org/atompub/tombstones/1.0"); + $root->setAttribute("xmlns:xmlns:dfrn", "http://purl.org/macgirvin/dfrn/1.0"); + + $attributes = array("href" => "http://creativecommons.org/licenses/by/3.0/", "rel" => "license"); + xml_add_element($doc, $root, "link", "", $attributes); + + xml_replace_element($doc, $root, $xpath, "title", $owner["name"]); + xml_remove_element($root, $xpath, "/atom:feed/subtitle"); + xml_remove_element($root, $xpath, "/atom:feed/logo"); + xml_remove_element($root, $xpath, "/atom:feed/author"); + + $author = dfrn_add_author($doc, $owner); + $root->appendChild($author); +} + +function dfrn_add_author($doc, $owner) { + $a = get_app(); + + $author = $doc->createElement("author"); + + $namdate = datetime_convert('UTC', 'UTC', $owner['name-date'].'+00:00' , ATOM_TIME); + $uridate = datetime_convert('UTC', 'UTC', $owner['uri-date'].'+00:00', ATOM_TIME); + $picdate = datetime_convert('UTC', 'UTC', $owner['avatar-date'].'+00:00', ATOM_TIME); + + $attributes = array("dfrn:updated" => $namdate); + xml_add_element($doc, $author, "name", $owner["name"], $attributes); + + $attributes = array("dfrn:updated" => $namdate); + xml_add_element($doc, $author, "uri", $a->get_baseurl().'/profile/'.$owner["nickname"], $attributes); + + $attributes = array("rel" => "photo", "type" => "image/jpeg", "dfrn:updated" => $picdate, + "media:width" => 175, "media:height" => 175, "href" => $owner['photo']); + xml_add_element($doc, $author, "link", "", $attributes); + + $attributes = array("rel" => "avatar", "type" => "image/jpeg", "dfrn:updated" => $picdate, + "media:width" => 175, "media:height" => 175, "href" => $owner['photo']); + xml_add_element($doc, $author, "link", "", $attributes); + + return $author; +} + +function dfrn_entry($entry, $doc, $xpath, $item, $owner) { + $a = get_app(); + + $author = ostatus_add_author($doc, $owner); + $entry->appendChild($author); + +} + +function xml_replace_element($doc, $parent, $xpath, $element, $value = "", $attributes = array()) { + $old_element = $xpath->query("/atom:feed/".$element)->item(0); + + $element = $doc->createElement($element, xmlify($value)); + + foreach ($attributes AS $key => $value) { + $attribute = $doc->createAttribute($key); + $attribute->value = xmlify($value); + $element->appendChild($attribute); + } + + $parent->replaceChild($element, $old_element); +} + +function xml_remove_element($parent, $xpath, $element) { + $old_element = $xpath->query($element)->item(0); + $parent->removeChild($old_element); +} From 15febca93dd95bdb6d1f9ee714ad680c29297c73 Mon Sep 17 00:00:00 2001 From: Tobias Diekershoff Date: Fri, 22 Jan 2016 07:36:01 +0100 Subject: [PATCH 095/242] Update to the translation docs (email templates and language selection problems in Safari) --- doc/translations.md | 71 ++++++++++++++------------------------------- 1 file changed, 22 insertions(+), 49 deletions(-) diff --git a/doc/translations.md b/doc/translations.md index b874e9ea2e..f0498862a5 100644 --- a/doc/translations.md +++ b/doc/translations.md @@ -4,42 +4,32 @@ Friendica translations Translation Process ------------------- -The strings used in the UI of Friendica is translated at [Transifex] [1] and then -included in the git repository at github. If you want to help with translation -for any language, be it correcting terms or translating friendica to a -currently not supported language, please register an account at transifex.com -and contact the friendica translation team there. +The strings used in the UI of Friendica is translated at [Transifex] [1] and then included in the git repository at github. +If you want to help with translation for any language, be it correcting terms or translating friendica to a currently not supported language, please register an account at transifex.com and contact the friendica translation team there. -Translating friendica is simple. Just use the online tool at transifex. If you -don't want to deal with git & co. that is fine, we check the status of the -translations regularly and import them into the source tree at github so that -others can use them. +Translating friendica is simple. +Just use the online tool at transifex. +If you don't want to deal with git & co. that is fine, we check the status of the translations regularly and import them into the source tree at github so that others can use them. -We do not include every translation from transifex in the source tree to avoid -a scattered and disturbed overall experience. As an uneducated guess we have a -lower limit of 50% translated strings before we include the language (for the -core message.po file, addont translation will be included once all strings of -an addon are translated. This limit is judging only by the amount of translated -strings under the assumption that the most prominent strings for the UI will be -translated first by a translation team. If you feel your translation useable -before this limit, please contact us and we will probably include your teams -work in the source tree. +We do not include every translation from transifex in the source tree to avoid a scattered and disturbed overall experience. +As an uneducated guess we have a lower limit of 50% translated strings before we include the language (for the core message.po file, addont translation will be included once all strings of an addon are translated. +This limit is judging only by the amount of translated strings under the assumption that the most prominent strings for the UI will be translated first by a translation team. +If you feel your translation useable before this limit, please contact us and we will probably include your teams work in the source tree. -If you want to get your work into the source tree yourself, feel free to do so -and contact us with and question that arises. The process is simple and -friendica ships with all the tools necessary. +If you want to help translating, please concentrate on the core messages.po file first. +We will only include translations with a sufficient translated messages.po file. +Translations of addons will only be included, when the core file is included as well. + +If you want to get your work into the source tree yourself, feel free to do so and contact us with and question that arises. +The process is simple and friendica ships with all the tools necessary. The location of the translated files in the source tree is /view/LNG-CODE/ where LNG-CODE is the language code used, e.g. de for German or fr for French. -For the email templates (the *.tpl files) just place them into the directory -and you are done. The translated strings come as a "message.po" file from -transifex which needs to be translated into the PHP file friendica uses. To do -so, place the file in the directory mentioned above and use the "po2php" -utility from the util directory of your friendica installation. +The translated strings come as a "message.po" file from transifex which needs to be translated into the PHP file friendica uses. +To do so, place the file in the directory mentioned above and use the "po2php" utility from the util directory of your friendica installation. -Assuming you want to convert the German localization which is placed in -view/de/message.po you would do the following. +Assuming you want to convert the German localization which is placed in view/de/message.po you would do the following. 1. Navigate at the command prompt to the base directory of your friendica installation @@ -51,11 +41,11 @@ view/de/message.po you would do the following. The output of the script will be placed at view/de/strings.php where froemdoca os expecting it, so you can test your translation mmediately. - + 3. Visit your friendica page to check if it still works in the language you just translated. If not try to find the error, most likely PHP will give you a hint in the log/warnings.about the error. - + For debugging you can also try to "run" the file with PHP. This should not give any output if the file is ok but might give a hint for searching the bug in the file. @@ -69,27 +59,10 @@ view/de/message.po you would do the following. Utilities --------- -Additional to the po2php script there are some more utilities for translation -in the "util" directory of the friendica source tree. If you only want to -translate friendica into another language you wont need any of these tools most -likely but it gives you an idea how the translation process of friendica -works. +Additional to the po2php script there are some more utilities for translation in the "util" directory of the friendica source tree. +If you only want to translate friendica into another language you wont need any of these tools most likely but it gives you an idea how the translation process of friendica works. For further information see the utils/README file. -Known Problems --------------- - -Friendica uses the language setting of the visitors browser to determain the -language for the UI. Most of the time this works, but there are some known -quirks. - -One is that some browsers, like Safari, do the setting to "de-de" but friendica -only has a "de" localisation. A workaround would be to add a symbolic link -from - $friendica/view/de-de -pointing to - $friendica/view/de - [1]: https://www.transifex.com/projects/p/friendica/ From 420e3021f9f65533eb6ea60a9ee3495bad48ca8d Mon Sep 17 00:00:00 2001 From: Tobias Diekershoff Date: Fri, 22 Jan 2016 07:42:03 +0100 Subject: [PATCH 096/242] clarification to the forum docs --- doc/Forums.md | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/doc/Forums.md b/doc/Forums.md index 2eac81a722..54e8e38791 100644 --- a/doc/Forums.md +++ b/doc/Forums.md @@ -53,9 +53,12 @@ Posting to Community forums If you are a member of a community forum, you may post to the forum by including an @-tag in the post mentioning the forum. For example @bicycle would send my post to all members of the group "bicycle" in addition to the normal recipients. -If your post is private you must also explicitly include the group in the post permissions (to allow the forum "contact" to see the post) **and** mention it in a tag (which redistributes the post to the forum members). +If you mention a forum (you are a member of) in a new posting, the posting will be distributed to all members of the forum, regardless of your privacy settings for the posting. +Also, if the forum is a public forum, your posting will be public for the all internet users. +If your post is private you must also explicitly include the group in the post permissions (to allow the forum "contact" to see the post) **and** mention it in a tag (which redistributes the post to the forum members). +Posting privately to a public forum, will result in your posting being displayed on the forum wall, but not on yours. -You may also post to a community forum by posting a "wall-to-wall" post using secure cross-site authentication. +You may also post to a community forum by posting a "wall-to-wall" post using secure cross-site authentication. Comments which are relayed to community forums will be relayed back to the original post creator. Mentioning the forum with an @-tag in a comment does not relay the message, as distribution is controlled entirely by the original post creator. From b02008a6a78dd6c514ca093292fa64032db105e2 Mon Sep 17 00:00:00 2001 From: Tobias Diekershoff Date: Fri, 22 Jan 2016 08:56:53 +0100 Subject: [PATCH 097/242] README.translate updated as well --- README.translate.md | 78 ++++++++++++++------------------------------- 1 file changed, 24 insertions(+), 54 deletions(-) diff --git a/README.translate.md b/README.translate.md index f434063614..f0498862a5 100644 --- a/README.translate.md +++ b/README.translate.md @@ -4,42 +4,32 @@ Friendica translations Translation Process ------------------- -The strings used in the UI of Friendica is translated at [Transifex] [1] and then -included in the git repository at github. If you want to help with translation -for any language, be it correcting terms or translating friendica to a -currently not supported language, please register an account at transifex.com -and contact the friendica translation team there. +The strings used in the UI of Friendica is translated at [Transifex] [1] and then included in the git repository at github. +If you want to help with translation for any language, be it correcting terms or translating friendica to a currently not supported language, please register an account at transifex.com and contact the friendica translation team there. -Translating friendica is simple. Just use the online tool at transifex. If you -don't want to deal with git & co. that is fine, we check the status of the -translations regularly and import them into the source tree at github so that -others can use them. +Translating friendica is simple. +Just use the online tool at transifex. +If you don't want to deal with git & co. that is fine, we check the status of the translations regularly and import them into the source tree at github so that others can use them. -We do not include every translation from transifex in the source tree to avoid -a scattered and disturbed overall experience. As an uneducated guess we have a -lower limit of 50% translated strings before we include the language (for the -core message.po file, addon translation will be included once all strings of -an addon are translated. This limit is judging only by the amount of translated -strings under the assumption that the most prominent strings for the UI will be -translated first by a translation team. If you feel your translation useable -before this limit, please contact us and we will probably include your teams -work in the source tree. +We do not include every translation from transifex in the source tree to avoid a scattered and disturbed overall experience. +As an uneducated guess we have a lower limit of 50% translated strings before we include the language (for the core message.po file, addont translation will be included once all strings of an addon are translated. +This limit is judging only by the amount of translated strings under the assumption that the most prominent strings for the UI will be translated first by a translation team. +If you feel your translation useable before this limit, please contact us and we will probably include your teams work in the source tree. -If you want to get your work into the source tree yourself, feel free to do so -and contact us with and question that arises. The process is simple and -friendica ships with all the tools necessary. +If you want to help translating, please concentrate on the core messages.po file first. +We will only include translations with a sufficient translated messages.po file. +Translations of addons will only be included, when the core file is included as well. + +If you want to get your work into the source tree yourself, feel free to do so and contact us with and question that arises. +The process is simple and friendica ships with all the tools necessary. The location of the translated files in the source tree is /view/LNG-CODE/ where LNG-CODE is the language code used, e.g. de for German or fr for French. -For the email templates (the *.tpl files) just place them into the directory -and you are done. The translated strings come as a "message.po" file from -transifex which needs to be translated into the PHP file friendica uses. To do -so, place the file in the directory mentioned above and use the "po2php" -utility from the util directory of your friendica installation. +The translated strings come as a "message.po" file from transifex which needs to be translated into the PHP file friendica uses. +To do so, place the file in the directory mentioned above and use the "po2php" utility from the util directory of your friendica installation. -Assuming you want to convert the German localization which is placed in -view/de/message.po you would do the following. +Assuming you want to convert the German localization which is placed in view/de/message.po you would do the following. 1. Navigate at the command prompt to the base directory of your friendica installation @@ -47,15 +37,15 @@ view/de/message.po you would do the following. 2. Execute the po2php script, which will place the translation in the strings.php file that is used by friendica. - $> php util/po2php.php view/de/messages.po + $> php util/po2php.php view/de/message.po The output of the script will be placed at view/de/strings.php where - friendica is expecting it, so you can test your translation immediately. - + froemdoca os expecting it, so you can test your translation mmediately. + 3. Visit your friendica page to check if it still works in the language you just translated. If not try to find the error, most likely PHP will give you a hint in the log/warnings.about the error. - + For debugging you can also try to "run" the file with PHP. This should not give any output if the file is ok but might give a hint for searching the bug in the file. @@ -69,30 +59,10 @@ view/de/message.po you would do the following. Utilities --------- -Additional to the po2php script there are some more utilities for translation -in the "util" directory of the friendica source tree. If you only want to -translate friendica into another language you won't need any of these tools most -likely but it gives you an idea how the translation process of friendica -works. +Additional to the po2php script there are some more utilities for translation in the "util" directory of the friendica source tree. +If you only want to translate friendica into another language you wont need any of these tools most likely but it gives you an idea how the translation process of friendica works. For further information see the utils/README file. -Known Problems --------------- - -Friendica uses the language setting of the visitors browser to determain the -language for the UI. Most of the time this works, but there are some known -quirks. - -One is that some browsers, like Safari, do the setting to "de-de" but friendica -only has a "de" localisation. A workaround would be to add a symbolic link -from - $friendica/view/de-de -pointing to - $friendica/view/de - -Links ------ - [1]: https://www.transifex.com/projects/p/friendica/ From 76d588f929443d407a328ad0b1cd6e45f479aa9f Mon Sep 17 00:00:00 2001 From: Tobias Diekershoff Date: Fri, 22 Jan 2016 09:00:12 +0100 Subject: [PATCH 098/242] typos --- README.translate.md | 4 ++-- doc/translations.md | 4 ++-- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/README.translate.md b/README.translate.md index f0498862a5..9984bad2bf 100644 --- a/README.translate.md +++ b/README.translate.md @@ -12,7 +12,7 @@ Just use the online tool at transifex. If you don't want to deal with git & co. that is fine, we check the status of the translations regularly and import them into the source tree at github so that others can use them. We do not include every translation from transifex in the source tree to avoid a scattered and disturbed overall experience. -As an uneducated guess we have a lower limit of 50% translated strings before we include the language (for the core message.po file, addont translation will be included once all strings of an addon are translated. +As an uneducated guess we have a lower limit of 50% translated strings before we include the language (for the core messages.po file, addont translation will be included once all strings of an addon are translated. This limit is judging only by the amount of translated strings under the assumption that the most prominent strings for the UI will be translated first by a translation team. If you feel your translation useable before this limit, please contact us and we will probably include your teams work in the source tree. @@ -40,7 +40,7 @@ Assuming you want to convert the German localization which is placed in view/de/ $> php util/po2php.php view/de/message.po The output of the script will be placed at view/de/strings.php where - froemdoca os expecting it, so you can test your translation mmediately. + froemdoca is expecting it, so you can test your translation immediately. 3. Visit your friendica page to check if it still works in the language you just translated. If not try to find the error, most likely PHP will give diff --git a/doc/translations.md b/doc/translations.md index f0498862a5..9984bad2bf 100644 --- a/doc/translations.md +++ b/doc/translations.md @@ -12,7 +12,7 @@ Just use the online tool at transifex. If you don't want to deal with git & co. that is fine, we check the status of the translations regularly and import them into the source tree at github so that others can use them. We do not include every translation from transifex in the source tree to avoid a scattered and disturbed overall experience. -As an uneducated guess we have a lower limit of 50% translated strings before we include the language (for the core message.po file, addont translation will be included once all strings of an addon are translated. +As an uneducated guess we have a lower limit of 50% translated strings before we include the language (for the core messages.po file, addont translation will be included once all strings of an addon are translated. This limit is judging only by the amount of translated strings under the assumption that the most prominent strings for the UI will be translated first by a translation team. If you feel your translation useable before this limit, please contact us and we will probably include your teams work in the source tree. @@ -40,7 +40,7 @@ Assuming you want to convert the German localization which is placed in view/de/ $> php util/po2php.php view/de/message.po The output of the script will be placed at view/de/strings.php where - froemdoca os expecting it, so you can test your translation mmediately. + froemdoca is expecting it, so you can test your translation immediately. 3. Visit your friendica page to check if it still works in the language you just translated. If not try to find the error, most likely PHP will give From 924bf238df06971f2803153fed82215d7522a795 Mon Sep 17 00:00:00 2001 From: Tobias Diekershoff Date: Fri, 22 Jan 2016 09:02:21 +0100 Subject: [PATCH 099/242] typos --- README.translate.md | 4 ++-- doc/translations.md | 4 ++-- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/README.translate.md b/README.translate.md index 9984bad2bf..728a56ab30 100644 --- a/README.translate.md +++ b/README.translate.md @@ -37,10 +37,10 @@ Assuming you want to convert the German localization which is placed in view/de/ 2. Execute the po2php script, which will place the translation in the strings.php file that is used by friendica. - $> php util/po2php.php view/de/message.po + $> php util/po2php.php view/de/messages.po The output of the script will be placed at view/de/strings.php where - froemdoca is expecting it, so you can test your translation immediately. + friendica is expecting it, so you can test your translation immediately. 3. Visit your friendica page to check if it still works in the language you just translated. If not try to find the error, most likely PHP will give diff --git a/doc/translations.md b/doc/translations.md index 9984bad2bf..728a56ab30 100644 --- a/doc/translations.md +++ b/doc/translations.md @@ -37,10 +37,10 @@ Assuming you want to convert the German localization which is placed in view/de/ 2. Execute the po2php script, which will place the translation in the strings.php file that is used by friendica. - $> php util/po2php.php view/de/message.po + $> php util/po2php.php view/de/messages.po The output of the script will be placed at view/de/strings.php where - froemdoca is expecting it, so you can test your translation immediately. + friendica is expecting it, so you can test your translation immediately. 3. Visit your friendica page to check if it still works in the language you just translated. If not try to find the error, most likely PHP will give From c66b4387bf87874f18c52a94d719c118c58c2c7c Mon Sep 17 00:00:00 2001 From: Michael Vogel Date: Fri, 22 Jan 2016 20:26:11 +0100 Subject: [PATCH 100/242] dfrn functions could now work/Removed unused code --- include/Contact.php | 10 +- include/cron.php | 1 - include/delivery.php | 1 - include/dfrn.php | 426 +++++++++++++++++++++++++++++++++---------- include/expire.php | 1 - include/items.php | 70 +------ include/onepoll.php | 1 - mod/dfrn_notify.php | 3 +- 8 files changed, 340 insertions(+), 173 deletions(-) diff --git a/include/Contact.php b/include/Contact.php index 93d6237cbf..f80cb80e2f 100644 --- a/include/Contact.php +++ b/include/Contact.php @@ -208,15 +208,15 @@ function get_contact_details_by_url($url, $uid = -1) { } // Fetching further contact data from the contact table - $r = q("SELECT `id`, `uid`, `url`, `network`, `name`, `nick`, `addr`, `location`, `about`, `keywords`, `gender`, `photo`, `addr`, `forum`, `prv`, `bd` FROM `contact` WHERE `nurl` = '%s' AND `uid` = %d AND `network` = '%s'", + $r = q("SELECT `id`, `uid`, `url`, `network`, `name`, `nick`, `addr`, `location`, `about`, `keywords`, `gender`, `photo`, `thumb`, `addr`, `forum`, `prv`, `bd`, `self` FROM `contact` WHERE `nurl` = '%s' AND `uid` = %d AND `network` IN ('%s', '')", dbesc(normalise_link($url)), intval($uid), dbesc($profile["network"])); if (!count($r) AND !isset($profile)) - $r = q("SELECT `id`, `uid`, `url`, `network`, `name`, `nick`, `addr`, `location`, `about`, `keywords`, `gender`, `photo`, `addr`, `forum`, `prv`, `bd` FROM `contact` WHERE `nurl` = '%s' AND `uid` = %d", + $r = q("SELECT `id`, `uid`, `url`, `network`, `name`, `nick`, `addr`, `location`, `about`, `keywords`, `gender`, `photo`, `thumb`, `addr`, `forum`, `prv`, `bd`, `self` FROM `contact` WHERE `nurl` = '%s' AND `uid` = %d", dbesc(normalise_link($url)), intval($uid)); if (!count($r) AND !isset($profile)) - $r = q("SELECT `id`, `uid`, `url`, `network`, `name`, `nick`, `addr`, `location`, `about`, `keywords`, `gender`, `photo`, `addr`, `forum`, `prv`, `bd` FROM `contact` WHERE `nurl` = '%s' AND `uid` = 0", + $r = q("SELECT `id`, `uid`, `url`, `network`, `name`, `nick`, `addr`, `location`, `about`, `keywords`, `gender`, `photo`, `thumb`, `addr`, `forum`, `prv`, `bd` FROM `contact` WHERE `nurl` = '%s' AND `uid` = 0", dbesc(normalise_link($url))); if ($r) { @@ -228,7 +228,7 @@ function get_contact_details_by_url($url, $uid = -1) { $profile["nick"] = $r[0]["nick"]; if (!isset($profile["addr"]) AND $r[0]["addr"]) $profile["addr"] = $r[0]["addr"]; - if (!isset($profile["photo"]) AND $r[0]["photo"]) + if ((!isset($profile["photo"]) OR $r[0]["self"]) AND $r[0]["photo"]) $profile["photo"] = $r[0]["photo"]; if (!isset($profile["location"]) AND $r[0]["location"]) $profile["location"] = $r[0]["location"]; @@ -246,6 +246,8 @@ function get_contact_details_by_url($url, $uid = -1) { $profile["addr"] = $r[0]["addr"]; if (!isset($profile["bd"]) AND $r[0]["bd"]) $profile["bd"] = $r[0]["bd"]; + if (isset($r[0]["thumb"])) + $profile["thumb"] = $r[0]["thumb"]; if ($r[0]["uid"] == 0) $profile["cid"] = 0; else diff --git a/include/cron.php b/include/cron.php index bf3243cb60..d8ebf7de62 100644 --- a/include/cron.php +++ b/include/cron.php @@ -30,7 +30,6 @@ function cron_run(&$argv, &$argc){ require_once('include/session.php'); require_once('include/datetime.php'); - require_once('library/simplepie/simplepie.inc'); require_once('include/items.php'); require_once('include/Contact.php'); require_once('include/email.php'); diff --git a/include/delivery.php b/include/delivery.php index a888733619..0007b96aed 100644 --- a/include/delivery.php +++ b/include/delivery.php @@ -458,7 +458,6 @@ function delivery_run(&$argv, &$argc){ if (($x[0]['page-flags'] == PAGE_SOAPBOX) AND $top_level) break; - require_once('library/simplepie/simplepie.inc'); logger('mod-delivery: local delivery'); local_delivery($x[0],$atom); break; diff --git a/include/dfrn.php b/include/dfrn.php index 4fdc991721..775455b833 100644 --- a/include/dfrn.php +++ b/include/dfrn.php @@ -2,6 +2,24 @@ require_once('include/items.php'); +function dfrn_entries($items,$owner) { + + $doc = new DOMDocument('1.0', 'utf-8'); + $doc->formatOutput = true; + + $root = dfrn_add_header($doc, $owner, "dfrn:owner"); + + if(! count($items)) + return trim($doc->saveXML()); + + foreach($items as $item) { + $entry = dfrn_entry($doc, "text", $item, $owner, $item["entry:comment-allow"], $item["entry:cid"]); + $root->appendChild($entry); + } + + return(trim($doc->saveXML())); +} + function dfrn_feed(&$a, $dfrn_id, $owner_nick, $last_update, $direction = 0) { @@ -40,8 +58,6 @@ function dfrn_feed(&$a, $dfrn_id, $owner_nick, $last_update, $direction = 0) { $owner_id = $owner['user_uid']; $owner_nick = $owner['nickname']; - $birthday = feed_birthday($owner_id,$owner['timezone']); - $sql_post_table = ""; $visibility = ""; @@ -149,63 +165,25 @@ function dfrn_feed(&$a, $dfrn_id, $owner_nick, $last_update, $direction = 0) { $items = $r; - //$feed_template = get_markup_template(($dfrn_id) ? 'atom_feed_dfrn.tpl' : 'atom_feed.tpl'); - - //$atom = ''; $doc = new DOMDocument('1.0', 'utf-8'); $doc->formatOutput = true; - $xpath = new DomXPath($doc); - $xpath->registerNamespace('atom', "http://www.w3.org/2005/Atom"); - $xpath->registerNamespace('thr', "http://purl.org/syndication/thread/1.0"); - $xpath->registerNamespace('georss', "http://www.georss.org/georss"); - $xpath->registerNamespace('activity', "http://activitystrea.ms/spec/1.0/"); - $xpath->registerNamespace('media', "http://purl.org/syndication/atommedia"); - $xpath->registerNamespace('poco', "http://portablecontacts.net/spec/1.0"); - $xpath->registerNamespace('ostatus', "http://ostatus.org/schema/1.0"); - $xpath->registerNamespace('statusnet', "http://status.net/schema/api/1/"); + $alternatelink = $owner['url']; - $root = ostatus_add_header($doc, $owner); - dfrn_add_header($root, $doc, $xpath, $owner); - - // Todo $hubxml = feed_hublinks(); - - // Todo $salmon = feed_salmonlinks($owner_nick); - - // todo $alternatelink = $owner['url']; - -/* if(isset($category)) $alternatelink .= "/category/".$category; - $atom .= replace_macros($feed_template, array( - '$version' => xmlify(FRIENDICA_VERSION), - '$feed_id' => xmlify($a->get_baseurl() . '/profile/' . $owner_nick), - '$feed_title' => xmlify($owner['name']), - '$feed_updated' => xmlify(datetime_convert('UTC', 'UTC', 'now' , ATOM_TIME)) , - '$hub' => $hubxml, - '$salmon' => $salmon, - '$alternatelink' => xmlify($alternatelink), - '$name' => xmlify($owner['name']), - '$profile_page' => xmlify($owner['url']), - '$photo' => xmlify($owner['photo']), - '$thumb' => xmlify($owner['thumb']), - '$picdate' => xmlify(datetime_convert('UTC','UTC',$owner['avatar-date'] . '+00:00' , ATOM_TIME)) , - '$uridate' => xmlify(datetime_convert('UTC','UTC',$owner['uri-date'] . '+00:00' , ATOM_TIME)) , - '$namdate' => xmlify(datetime_convert('UTC','UTC',$owner['name-date'] . '+00:00' , ATOM_TIME)) , - '$birthday' => ((strlen($birthday)) ? '' . xmlify($birthday) . '' : ''), - '$community' => (($owner['page-flags'] == PAGE_COMMUNITY) ? '1' : '') - )); -*/ - call_hooks('atom_feed', $atom); + $root = dfrn_add_header($doc, $owner, "author", $alternatelink); + + // This hook can't work anymore + // call_hooks('atom_feed', $atom); if(! count($items)) { + $atom = trim($doc->saveXML()); call_hooks('atom_feed_end', $atom); - //$atom .= '' . "\r\n"; - //return $atom; - return(trim($doc->saveXML())); + return $atom; } foreach($items as $item) { @@ -226,19 +204,16 @@ function dfrn_feed(&$a, $dfrn_id, $owner_nick, $last_update, $direction = 0) { $type = 'text'; } - //$atom .= atom_entry($item,$type,null,$owner,true); - $entry = ostatus_entry($doc, $item, $owner); - dfrn_entry($entry, $doc, $xpath, $item, $owner); + $entry = dfrn_entry($doc, $type, $item, $owner, true); $root->appendChild($entry); } + $atom = trim($doc->saveXML()); + call_hooks('atom_feed_end', $atom); - //$atom .= '' . "\r\n"; - - //return $atom; - return(trim($doc->saveXML())); + return $atom; } /** @@ -246,33 +221,68 @@ function dfrn_feed(&$a, $dfrn_id, $owner_nick, $last_update, $direction = 0) { * * We use the XML from OStatus as a base and are adding the DFRN parts to it. * - * @root Class XML root element * @doc Class XML document - * @xpath Class XML xpath * @owner array Owner record * + * @return Class XML root object */ -function dfrn_add_header(&$root, $doc, $xpath, $owner) { - - $root->setAttribute("xmlns:at", "http://purl.org/atompub/tombstones/1.0"); - $root->setAttribute("xmlns:xmlns:dfrn", "http://purl.org/macgirvin/dfrn/1.0"); - - $attributes = array("href" => "http://creativecommons.org/licenses/by/3.0/", "rel" => "license"); - xml_add_element($doc, $root, "link", "", $attributes); - - xml_replace_element($doc, $root, $xpath, "title", $owner["name"]); - xml_remove_element($root, $xpath, "/atom:feed/subtitle"); - xml_remove_element($root, $xpath, "/atom:feed/logo"); - xml_remove_element($root, $xpath, "/atom:feed/author"); - - $author = dfrn_add_author($doc, $owner); - $root->appendChild($author); -} - -function dfrn_add_author($doc, $owner) { +function dfrn_add_header($doc, $owner, $authorelement, $alternatelink = "") { $a = get_app(); - $author = $doc->createElement("author"); + if ($alternatelink == "") + $alternatelink = $owner['url']; + + $root = $doc->createElementNS(NS_ATOM, 'feed'); + $doc->appendChild($root); + + $root->setAttribute("xmlns:thr", NS_THR); + $root->setAttribute("xmlns:at", "http://purl.org/atompub/tombstones/1.0"); + $root->setAttribute("xmlns:media", NS_MEDIA); + $root->setAttribute("xmlns:dfrn", "http://purl.org/macgirvin/dfrn/1.0"); + $root->setAttribute("xmlns:activity", NS_ACTIVITY); + $root->setAttribute("xmlns:georss", NS_GEORSS); + $root->setAttribute("xmlns:poco", NS_POCO); + $root->setAttribute("xmlns:ostatus", NS_OSTATUS); + $root->setAttribute("xmlns:statusnet", NS_STATUSNET); + + xml_add_element($doc, $root, "id", $a->get_baseurl()."/profile/".$owner["nick"]); + xml_add_element($doc, $root, "title", $owner["name"]); + + $attributes = array("uri" => "https://friendi.ca", "version" => FRIENDICA_VERSION."-".DB_UPDATE_VERSION); + xml_add_element($doc, $root, "generator", FRIENDICA_PLATFORM, $attributes); + + $attributes = array("rel" => "license", "href" => "http://creativecommons.org/licenses/by/3.0/"); + xml_add_element($doc, $root, "link", "", $attributes); + + $attributes = array("rel" => "alternate", "type" => "text/html", "href" => $alternatelink); + xml_add_element($doc, $root, "link", "", $attributes); + + ostatus_hublinks($doc, $root); + + $attributes = array("rel" => "salmon", "href" => $a->get_baseurl()."/salmon/".$owner["nick"]); + xml_add_element($doc, $root, "link", "", $attributes); + + $attributes = array("rel" => "http://salmon-protocol.org/ns/salmon-replies", "href" => $a->get_baseurl()."/salmon/".$owner["nick"]); + xml_add_element($doc, $root, "link", "", $attributes); + + $attributes = array("rel" => "http://salmon-protocol.org/ns/salmon-mention", "href" => $a->get_baseurl()."/salmon/".$owner["nick"]); + xml_add_element($doc, $root, "link", "", $attributes); + + if ($owner['page-flags'] == PAGE_COMMUNITY) + xml_add_element($doc, $root, "dfrn:community", 1); + + xml_add_element($doc, $root, "updated", datetime_convert("UTC", "UTC", "now", ATOM_TIME)); + + $author = dfrn_add_author($doc, $owner, $authorelement); + $root->appendChild($author); + + return $root; +} + +function dfrn_add_author($doc, $owner, $authorelement) { + $a = get_app(); + + $author = $doc->createElement($authorelement); $namdate = datetime_convert('UTC', 'UTC', $owner['name-date'].'+00:00' , ATOM_TIME); $uridate = datetime_convert('UTC', 'UTC', $owner['uri-date'].'+00:00', ATOM_TIME); @@ -292,32 +302,256 @@ function dfrn_add_author($doc, $owner) { "media:width" => 175, "media:height" => 175, "href" => $owner['photo']); xml_add_element($doc, $author, "link", "", $attributes); + $birthday = feed_birthday($owner['user_uid'], $owner['timezone']); + + if ($birthday) + xml_add_element($doc, $author, "dfrn:birthday", $birthday); + return $author; } -function dfrn_entry($entry, $doc, $xpath, $item, $owner) { +function dfrn_add_entry_author($doc, $element, $contact_url, $item) { $a = get_app(); - $author = ostatus_add_author($doc, $owner); + $contact = get_contact_details_by_url($contact_url, $item["uid"]); + + $r = q("SELECT `profile`.`about`, `profile`.`name`, `profile`.`homepage`, `contact`.`nick`, `contact`.`location` FROM `profile` + INNER JOIN `contact` ON `contact`.`uid` = `profile`.`uid` + INNER JOIN `user` ON `user`.`uid` = `profile`.`uid` + WHERE `contact`.`self` AND `profile`.`is-default` AND NOT `user`.`hidewall` AND `contact`.`nurl`='%s'", + dbesc(normalise_link($contact_url))); + if ($r) + $profile = $r[0]; + + $author = $doc->createElement($element); + xml_add_element($doc, $author, "name", $contact["name"]); + xml_add_element($doc, $author, "uri", $contact["url"]); + + /// @Todo + /// - Check real image type and image size + /// - Check which of these boths elements we really use + $attributes = array( + "rel" => "photo", + "type" => "image/jpeg", + "media:width" => 80, + "media:height" => 80, + "href" => $contact["photo"]); + xml_add_element($doc, $author, "link", "", $attributes); + + $attributes = array( + "rel" => "avatar", + "type" => "image/jpeg", + "media:width" => 80, + "media:height" => 80, + "href" => $contact["photo"]); + xml_add_element($doc, $author, "link", "", $attributes); + + // Only show contact details when it is a user from our system and we are allowed to + if ($profile) { + xml_add_element($doc, $author, "poco:preferredUsername", $profile["nick"]); + xml_add_element($doc, $author, "poco:displayName", $profile["name"]); + xml_add_element($doc, $author, "poco:note", $profile["about"]); + + if (trim($contact["location"]) != "") { + $element = $doc->createElement("poco:address"); + xml_add_element($doc, $element, "poco:formatted", $profile["location"]); + $author->appendChild($element); + } + + if (trim($profile["homepage"]) != "") { + $urls = $doc->createElement("poco:urls"); + xml_add_element($doc, $urls, "poco:type", "homepage"); + xml_add_element($doc, $urls, "poco:value", $profile["homepage"]); + xml_add_element($doc, $urls, "poco:primary", "true"); + $author->appendChild($urls); + } + } + + return $author; +} + +function dfrn_create_activity($doc, $element, $activity) { + + if($activity) { + $entry = $doc->createElement($element); + + $r = parse_xml_string($activity, false); + if(!$r) + return false; + if($r->type) + xml_add_element($doc, $entry, "activity:object-type", $r->type); + if($r->id) + xml_add_element($doc, $entry, "id", $r->id); + if($r->title) + xml_add_element($doc, $entry, "title", $r->title); + if($r->link) { + if(substr($r->link,0,1) === '<') { + if(strstr($r->link,'&') && (! strstr($r->link,'&'))) + $r->link = str_replace('&','&', $r->link); + + $r->link = preg_replace('/\/','',$r->link); + + $data = parse_xml_string($r->link, false); + foreach ($data->attributes() AS $parameter => $value) + $attributes[$parameter] = $value; + } else + $attributes = array("rel" => "alternate", "type" => "text/html", "href" => $r->link); + + xml_add_element($doc, $entry, "link", "", $attributes); + } + if($r->content) + xml_add_element($doc, $entry, "content", bbcode($r->content), array("type" => "html")); + + return $entry; + } + + return false; +} + +function dfrn_get_attachment($doc, $root, $item) { + $arr = explode('[/attach],',$item['attach']); + if(count($arr)) { + foreach($arr as $r) { + $matches = false; + $cnt = preg_match('|\[attach\]href=\"(.*?)\" length=\"(.*?)\" type=\"(.*?)\" title=\"(.*?)\"|',$r,$matches); + if($cnt) { + $attributes = array("rel" => "enclosure", + "href" => $matches[1], + "type" => $matches[3]); + + if(intval($matches[2])) + $attributes["length"] = intval($matches[2]); + + if(trim($matches[4]) != "") + $attributes["title"] = trim($matches[4]); + + xml_add_element($doc, $root, "link", "", $attributes); + } + } + } +} + +function dfrn_entry($doc, $type, $item, $owner, $comment = false, $cid = 0) { + $a = get_app(); + + $mentioned = array(); + + if(!$item['parent']) + return; + + $entry = $doc->createElement("entry"); + + if($item['deleted']) { + $attributes = array("ref" => $item['uri'], "when" => datetime_convert('UTC','UTC',$item['edited'] . '+00:00',ATOM_TIME)); + xml_add_element($doc, $entry, "at:deleted-entry", "", $attributes); + return $entry; + } + + if($item['allow_cid'] || $item['allow_gid'] || $item['deny_cid'] || $item['deny_gid']) + $body = fix_private_photos($item['body'],$owner['uid'],$item,$cid); + else + $body = $item['body']; + + if ($type == 'html') { + $htmlbody = $body; + + if ($item['title'] != "") + $htmlbody = "[b]".$item['title']."[/b]\n\n".$htmlbody; + + $htmlbody = bbcode($htmlbody, false, false, 7); + } + + $author = dfrn_add_entry_author($doc, "author", $item["author-link"], $item); $entry->appendChild($author); -} - -function xml_replace_element($doc, $parent, $xpath, $element, $value = "", $attributes = array()) { - $old_element = $xpath->query("/atom:feed/".$element)->item(0); - - $element = $doc->createElement($element, xmlify($value)); - - foreach ($attributes AS $key => $value) { - $attribute = $doc->createAttribute($key); - $attribute->value = xmlify($value); - $element->appendChild($attribute); - } - - $parent->replaceChild($element, $old_element); -} - -function xml_remove_element($parent, $xpath, $element) { - $old_element = $xpath->query($element)->item(0); - $parent->removeChild($old_element); + $dfrnowner = dfrn_add_entry_author($doc, "dfrn:owner", $item["owner-link"], $item); + $entry->appendChild($dfrnowner); + + if(($item['parent'] != $item['id']) || ($item['parent-uri'] !== $item['uri']) || (($item['thr-parent'] !== '') && ($item['thr-parent'] !== $item['uri']))) { + $parent = q("SELECT `guid` FROM `item` WHERE `id` = %d", intval($item["parent"])); + $parent_item = (($item['thr-parent']) ? $item['thr-parent'] : $item['parent-uri']); + $attributes = array("ref" => $parent_item, "type" => "text/html", "href" => $a->get_baseurl().'/display/'.$parent[0]['guid']); + xml_add_element($doc, $entry, "thr:in-reply-to", "", $attributes); + } + + xml_add_element($doc, $entry, "id", $item["uri"]); + xml_add_element($doc, $entry, "title", $item["title"]); + + xml_add_element($doc, $entry, "published", datetime_convert("UTC","UTC",$item["created"]."+00:00",ATOM_TIME)); + xml_add_element($doc, $entry, "updated", datetime_convert("UTC","UTC",$item["edited"]."+00:00",ATOM_TIME)); + + xml_add_element($doc, $entry, "dfrn:env", base64url_encode($body, true)); + xml_add_element($doc, $entry, "content", (($type === 'html') ? $htmlbody : $body), array("type" => $type)); + + xml_add_element($doc, $entry, "link", "", array("rel" => "alternate", "type" => "text/html", + "href" => $a->get_baseurl()."/display/".$item["guid"])); + + if ($comment) + xml_add_element($doc, $entry, "dfrn:comment-allow", intval($item['last-child'])); + + if($item['location']) + xml_add_element($doc, $entry, "dfrn:location", $item['location']); + + if($item['coord']) + xml_add_element($doc, $entry, "georss:point", $item['coord']); + + if(($item['private']) || strlen($item['allow_cid']) || strlen($item['allow_gid']) || strlen($item['deny_cid']) || strlen($item['deny_gid'])) + xml_add_element($doc, $entry, "dfrn:private", (($item['private']) ? $item['private'] : 1)); + + if($item['extid']) + xml_add_element($doc, $entry, "dfrn:extid", $item['extid']); + + if($item['bookmark']) + xml_add_element($doc, $entry, "dfrn:bookmark", "true"); + + if($item['app']) + xml_add_element($doc, $entry, "statusnet:notice_info", "", array("local_id" => $item['id'], "source" => $item['app'])); + + xml_add_element($doc, $entry, "dfrn:diaspora_guid", $item["guid"]); + + if($item['signed_text']) { + $sign = base64_encode(json_encode(array('signed_text' => $item['signed_text'],'signature' => $item['signature'],'signer' => $item['signer']))); + xml_add_element($doc, $entry, "dfrn:diaspora_signature", $sign); + } + + xml_add_element($doc, $entry, "activity:verb", construct_verb($item)); + + $actobj = dfrn_create_activity($doc, "activity:object", $item['object']); + if ($actobj) + $entry->appendChild($actobj); + + $actarg = dfrn_create_activity($doc, "activity:target", $item['target']); + if ($actarg) + $entry->appendChild($actarg); + + $tags = item_getfeedtags($item); + + if(count($tags)) { + foreach($tags as $t) + if (($type != 'html') OR ($t[0] != "@")) + xml_add_element($doc, $entry, "category", "", array("scheme" => "X-DFRN:".$t[0].":".$t[1], "term" => $t[2])); + } + + if(count($tags)) + foreach($tags as $t) + if ($t[0] == "@") + $mentioned[$t[1]] = $t[1]; + + foreach ($mentioned AS $mention) { + $r = q("SELECT `forum`, `prv` FROM `contact` WHERE `uid` = %d AND `nurl` = '%s'", + intval($owner["uid"]), + dbesc(normalise_link($mention))); + if ($r[0]["forum"] OR $r[0]["prv"]) + xml_add_element($doc, $entry, "link", "", array("rel" => "mentioned", + "ostatus:object-type" => ACTIVITY_OBJ_GROUP, + "href" => $mention)); + else + xml_add_element($doc, $entry, "link", "", array("rel" => "mentioned", + "ostatus:object-type" => ACTIVITY_OBJ_PERSON, + "href" => $mention)); + } + + dfrn_get_attachment($doc, $entry, $item); + + return $entry; } diff --git a/include/expire.php b/include/expire.php index 3086804216..873c594e84 100644 --- a/include/expire.php +++ b/include/expire.php @@ -18,7 +18,6 @@ function expire_run(&$argv, &$argc){ require_once('include/session.php'); require_once('include/datetime.php'); - require_once('library/simplepie/simplepie.inc'); require_once('include/items.php'); require_once('include/Contact.php'); diff --git a/include/items.php b/include/items.php index 7931b8c3d4..8afee31adb 100644 --- a/include/items.php +++ b/include/items.php @@ -455,17 +455,6 @@ function get_atom_elements($feed, $item, $contact = array()) { $res['body'] = unxmlify($item->get_content()); $res['plink'] = unxmlify($item->get_link(0)); - if (isset($contact["network"]) AND ($contact["network"] == NETWORK_FEED) AND strstr($res['plink'], ".app.net/")) { - logger("get_atom_elements: detected app.net posting: ".print_r($res, true), LOGGER_DEBUG); - $res['title'] = ""; - $res['body'] = nl2br($res['body']); - } - - // removing the content of the title if its identically to the body - // This helps with auto generated titles e.g. from tumblr - if (title_is_body($res["title"], $res["body"])) - $res['title'] = ""; - if($res['plink']) $base_url = implode('/', array_slice(explode('/',$res['plink']),0,3)); else @@ -843,62 +832,6 @@ function get_atom_elements($feed, $item, $contact = array()) { $res['target'] .= '' . "\n"; } - // This is some experimental stuff. By now retweets are shown with "RT:" - // But: There is data so that the message could be shown similar to native retweets - // There is some better way to parse this array - but it didn't worked for me. - $child = $item->feed->data["child"][SIMPLEPIE_NAMESPACE_ATOM_10]["feed"][0]["child"][SIMPLEPIE_NAMESPACE_ATOM_10]["entry"][0]["child"]["http://activitystrea.ms/spec/1.0/"][object][0]["child"]; - if (is_array($child)) { - logger('get_atom_elements: Looking for status.net repeated message'); - - $message = $child["http://activitystrea.ms/spec/1.0/"]["object"][0]["child"][SIMPLEPIE_NAMESPACE_ATOM_10]["content"][0]["data"]; - $orig_id = ostatus_convert_href($child["http://activitystrea.ms/spec/1.0/"]["object"][0]["child"][SIMPLEPIE_NAMESPACE_ATOM_10]["id"][0]["data"]); - $author = $child[SIMPLEPIE_NAMESPACE_ATOM_10]["author"][0]["child"][SIMPLEPIE_NAMESPACE_ATOM_10]; - $uri = $author["uri"][0]["data"]; - $name = $author["name"][0]["data"]; - $avatar = @array_shift($author["link"][2]["attribs"]); - $avatar = $avatar["href"]; - - if (($name != "") and ($uri != "") and ($avatar != "") and ($message != "")) { - logger('get_atom_elements: fixing sender of repeated message. '.$orig_id, LOGGER_DEBUG); - - if (!intval(get_config('system','wall-to-wall_share'))) { - $prefix = share_header($name, $uri, $avatar, "", "", $orig_link); - - $res["body"] = $prefix.html2bbcode($message)."[/share]"; - } else { - $res["owner-name"] = $res["author-name"]; - $res["owner-link"] = $res["author-link"]; - $res["owner-avatar"] = $res["author-avatar"]; - - $res["author-name"] = $name; - $res["author-link"] = $uri; - $res["author-avatar"] = $avatar; - - $res["body"] = html2bbcode($message); - } - } - } - - if (isset($contact["network"]) AND ($contact["network"] == NETWORK_FEED) AND $contact['fetch_further_information']) { - $preview = ""; - - // Handle enclosures and treat them as preview picture - if (isset($attach)) - foreach ($attach AS $attachment) - if ($attachment->type == "image/jpeg") - $preview = $attachment->link; - - $res["body"] = $res["title"].add_page_info($res['plink'], false, $preview, ($contact['fetch_further_information'] == 2), $contact['ffi_keyword_blacklist']); - $res["tag"] = add_page_keywords($res['plink'], false, $preview, ($contact['fetch_further_information'] == 2), $contact['ffi_keyword_blacklist']); - $res["title"] = ""; - $res["object-type"] = ACTIVITY_OBJ_BOOKMARK; - unset($res["attach"]); - } elseif (isset($contact["network"]) AND ($contact["network"] == NETWORK_OSTATUS)) - $res["body"] = add_page_info_to_body($res["body"]); - elseif (isset($contact["network"]) AND ($contact["network"] == NETWORK_FEED) AND strstr($res['plink'], ".app.net/")) { - $res["body"] = add_page_info_to_body($res["body"]); - } - $arr = array('feed' => $feed, 'item' => $item, 'result' => $res); call_hooks('parse_atom', $arr); @@ -3038,6 +2971,9 @@ function item_is_remote_self($contact, &$datarray) { } function local_delivery($importer,$data) { + + require_once('library/simplepie/simplepie.inc'); + $a = get_app(); logger(__function__, LOGGER_TRACE); diff --git a/include/onepoll.php b/include/onepoll.php index 516f1dfd4d..c262e110fe 100644 --- a/include/onepoll.php +++ b/include/onepoll.php @@ -27,7 +27,6 @@ function onepoll_run(&$argv, &$argc){ require_once('include/session.php'); require_once('include/datetime.php'); - require_once('library/simplepie/simplepie.inc'); require_once('include/items.php'); require_once('include/Contact.php'); require_once('include/email.php'); diff --git a/mod/dfrn_notify.php b/mod/dfrn_notify.php index fcc5726548..4aa777b550 100644 --- a/mod/dfrn_notify.php +++ b/mod/dfrn_notify.php @@ -1,6 +1,5 @@ Date: Sat, 23 Jan 2016 01:07:51 +0100 Subject: [PATCH 101/242] Added documentation, completed the functions --- include/dfrn.php | 217 +++++++++++++++++++++++++++++++++++++++++++---- 1 file changed, 200 insertions(+), 17 deletions(-) diff --git a/include/dfrn.php b/include/dfrn.php index 775455b833..758e03398f 100644 --- a/include/dfrn.php +++ b/include/dfrn.php @@ -1,13 +1,21 @@ formatOutput = true; - $root = dfrn_add_header($doc, $owner, "dfrn:owner"); + $root = dfrn_add_header($doc, $owner, "dfrn:owner", "", false); if(! count($items)) return trim($doc->saveXML()); @@ -20,9 +28,19 @@ function dfrn_entries($items,$owner) { return(trim($doc->saveXML())); } +/** + * @brief Adds the header elements for the DFRN protocol + * + * @param App $a + * @param string $dfrn_id + * @param string $owner_nick Owner nick name + * @param string $last_update Date of the last update + * @param int $direction + * + * @return string DFRN feed entries + */ function dfrn_feed(&$a, $dfrn_id, $owner_nick, $last_update, $direction = 0) { - $sitefeed = ((strlen($owner_nick)) ? false : true); // not yet implemented, need to rewrite huge chunks of following logic $public_feed = (($dfrn_id) ? false : true); $starred = false; // not yet implemented, possible security issues @@ -173,7 +191,7 @@ function dfrn_feed(&$a, $dfrn_id, $owner_nick, $last_update, $direction = 0) { if(isset($category)) $alternatelink .= "/category/".$category; - $root = dfrn_add_header($doc, $owner, "author", $alternatelink); + $root = dfrn_add_header($doc, $owner, "author", $alternatelink, true); // This hook can't work anymore // call_hooks('atom_feed', $atom); @@ -217,16 +235,130 @@ function dfrn_feed(&$a, $dfrn_id, $owner_nick, $last_update, $direction = 0) { } /** - * @brief Adds the header elements for thr DFRN protocol + * @brief Create XML text for DFRN mail * - * We use the XML from OStatus as a base and are adding the DFRN parts to it. + * @param array $item message elements + * @param array $owner Owner record * - * @doc Class XML document - * @owner array Owner record - * - * @return Class XML root object + * @return string DFRN mail */ -function dfrn_add_header($doc, $owner, $authorelement, $alternatelink = "") { +function dfrn_mail($item, $owner) { + $doc = new DOMDocument('1.0', 'utf-8'); + $doc->formatOutput = true; + + $root = dfrn_add_header($doc, $owner, "dfrn:owner", "", false); + + $mail = $doc->createElement("dfrn:mail"); + $sender = $doc->createElement("dfrn:sender"); + + xml_add_element($doc, $sender, "dfrn:name", $owner['name']); + xml_add_element($doc, $sender, "dfrn:uri", $owner['url']); + xml_add_element($doc, $sender, "dfrn:avatar", $owner['thumb']); + + $mail->appendChild($sender); + + xml_add_element($doc, $mail, "dfrn:id", $item['uri']); + xml_add_element($doc, $mail, "dfrn:in-reply-to", $item['parent-uri']); + xml_add_element($doc, $mail, "dfrn:sentdate", datetime_convert('UTC', 'UTC', $item['created'] . '+00:00' , ATOM_TIME)); + xml_add_element($doc, $mail, "dfrn:subject", $item['title']); + xml_add_element($doc, $mail, "dfrn:content", $item['body']); + + $root->appendChild($mail); + + return(trim($doc->saveXML())); +} + +/** + * @brief Create XML text for DFRN suggestions + * + * @param array $item suggestion elements + * @param array $owner Owner record + * + * @return string DFRN suggestions + */ +function dfrn_fsuggest($item, $owner) { + $doc = new DOMDocument('1.0', 'utf-8'); + $doc->formatOutput = true; + + $root = dfrn_add_header($doc, $owner, "dfrn:owner", "", false); + + $suggest = $doc->createElement("dfrn:suggest"); + + xml_add_element($doc, $suggest, "dfrn:url", $item['url']); + xml_add_element($doc, $suggest, "dfrn:name", $item['name']); + xml_add_element($doc, $suggest, "dfrn:photo", $item['photo']); + xml_add_element($doc, $suggest, "dfrn:request", $item['request']); + xml_add_element($doc, $suggest, "dfrn:note", $item['note']); + + $root->appendChild($suggest); + + return(trim($doc->saveXML())); +} + +/** + * @brief Create XML text for DFRN relocations + * + * @param array $owner Owner record + * @param int $uid User ID + * + * @return string DFRN relocations + */ +function dfrn_relocate($owner, $uid) { + + $a = get_app(); + + /* get site pubkey. this could be a new installation with no site keys*/ + $pubkey = get_config('system','site_pubkey'); + if(! $pubkey) { + $res = new_keypair(1024); + set_config('system','site_prvkey', $res['prvkey']); + set_config('system','site_pubkey', $res['pubkey']); + } + + $rp = q("SELECT `resource-id` , `scale`, type FROM `photo` + WHERE `profile` = 1 AND `uid` = %d ORDER BY scale;", $uid); + $photos = array(); + $ext = Photo::supportedTypes(); + foreach($rp as $p){ + $photos[$p['scale']] = $a->get_baseurl().'/photo/'.$p['resource-id'].'-'.$p['scale'].'.'.$ext[$p['type']]; + } + unset($rp, $ext); + + $doc = new DOMDocument('1.0', 'utf-8'); + $doc->formatOutput = true; + + $root = dfrn_add_header($doc, $owner, "dfrn:owner", "", false); + + $relocate = $doc->createElement("dfrn:relocate"); + + xml_add_element($doc, $relocate, "dfrn:url", $owner['url']); + xml_add_element($doc, $relocate, "dfrn:name", $owner['name']); + xml_add_element($doc, $relocate, "dfrn:photo", $photos[4]); + xml_add_element($doc, $relocate, "dfrn:thumb", $photos[5]); + xml_add_element($doc, $relocate, "dfrn:micro", $photos[6]); + xml_add_element($doc, $relocate, "dfrn:request", $owner['request']); + xml_add_element($doc, $relocate, "dfrn:confirm", $owner['confirm']); + xml_add_element($doc, $relocate, "dfrn:notify", $owner['notify']); + xml_add_element($doc, $relocate, "dfrn:poll", $owner['poll']); + xml_add_element($doc, $relocate, "dfrn:sitepubkey", get_config('system','site_pubkey')); + + $root->appendChild($relocate); + + return(trim($doc->saveXML())); +} + +/** + * @brief Adds the header elements for the DFRN protocol + * + * @param object $doc XML document + * @param array $owner Owner record + * @param string $authorelement Element name for the author + * @param string $alternatelink link to profile or category + * @param bool $public Is it a header for public posts? + * + * @return object XML root object + */ +function dfrn_add_header($doc, $owner, $authorelement, $alternatelink = "", $public = false) { $a = get_app(); if ($alternatelink == "") @@ -259,14 +391,16 @@ function dfrn_add_header($doc, $owner, $authorelement, $alternatelink = "") { ostatus_hublinks($doc, $root); - $attributes = array("rel" => "salmon", "href" => $a->get_baseurl()."/salmon/".$owner["nick"]); - xml_add_element($doc, $root, "link", "", $attributes); + if ($public) { + $attributes = array("rel" => "salmon", "href" => $a->get_baseurl()."/salmon/".$owner["nick"]); + xml_add_element($doc, $root, "link", "", $attributes); - $attributes = array("rel" => "http://salmon-protocol.org/ns/salmon-replies", "href" => $a->get_baseurl()."/salmon/".$owner["nick"]); - xml_add_element($doc, $root, "link", "", $attributes); + $attributes = array("rel" => "http://salmon-protocol.org/ns/salmon-replies", "href" => $a->get_baseurl()."/salmon/".$owner["nick"]); + xml_add_element($doc, $root, "link", "", $attributes); - $attributes = array("rel" => "http://salmon-protocol.org/ns/salmon-mention", "href" => $a->get_baseurl()."/salmon/".$owner["nick"]); - xml_add_element($doc, $root, "link", "", $attributes); + $attributes = array("rel" => "http://salmon-protocol.org/ns/salmon-mention", "href" => $a->get_baseurl()."/salmon/".$owner["nick"]); + xml_add_element($doc, $root, "link", "", $attributes); + } if ($owner['page-flags'] == PAGE_COMMUNITY) xml_add_element($doc, $root, "dfrn:community", 1); @@ -279,6 +413,15 @@ function dfrn_add_header($doc, $owner, $authorelement, $alternatelink = "") { return $root; } +/** + * @brief Adds the author elements for the DFRN protocol + * + * @param object $doc XML document + * @param array $owner Owner record + * @param string $authorelement Element name for the author + * + * @return object XML author object + */ function dfrn_add_author($doc, $owner, $authorelement) { $a = get_app(); @@ -310,6 +453,16 @@ function dfrn_add_author($doc, $owner, $authorelement) { return $author; } +/** + * @brief Adds the author elements for the item entries of the DFRN protocol + * + * @param object $doc XML document + * @param string $element Element name for the author + * @param string $contact_url Link of the contact + * @param array $items Item elements + * + * @return object XML author object + */ function dfrn_add_entry_author($doc, $element, $contact_url, $item) { $a = get_app(); @@ -370,6 +523,15 @@ function dfrn_add_entry_author($doc, $element, $contact_url, $item) { return $author; } +/** + * @brief Adds the activity elements + * + * @param object $doc XML document + * @param string $element Element name for the activity + * @param string $activity activity value + * + * @return object XML activity object + */ function dfrn_create_activity($doc, $element, $activity) { if($activity) { @@ -408,6 +570,15 @@ function dfrn_create_activity($doc, $element, $activity) { return false; } +/** + * @brief Adds the attachments elements + * + * @param object $doc XML document + * @param object $root XML root + * @param array $item Item element + * + * @return object XML attachment object + */ function dfrn_get_attachment($doc, $root, $item) { $arr = explode('[/attach],',$item['attach']); if(count($arr)) { @@ -431,6 +602,18 @@ function dfrn_get_attachment($doc, $root, $item) { } } +/** + * @brief Adds the header elements for the DFRN protocol + * + * @param object $doc XML document + * @param string $type "text" or "html" + * @param array $item Item element + * @param array $owner Owner record + * @param bool $comment Trigger the sending of the "comment" element + * @param int $cid + * + * @return object XML entry object + */ function dfrn_entry($doc, $type, $item, $owner, $comment = false, $cid = 0) { $a = get_app(); From 444b417de0e6a71ed6057bf9836a2ab21fb0b770 Mon Sep 17 00:00:00 2001 From: Michael Vogel Date: Sat, 23 Jan 2016 02:44:30 +0100 Subject: [PATCH 102/242] New routines are now enabled --- include/delivery.php | 54 +++++++++++++++++++++++++++++++++++++++++--- include/dfrn.php | 14 ++++++++---- include/ostatus.php | 6 ++++- mod/dfrn_poll.php | 10 ++++---- 4 files changed, 70 insertions(+), 14 deletions(-) diff --git a/include/delivery.php b/include/delivery.php index 0007b96aed..482a759498 100644 --- a/include/delivery.php +++ b/include/delivery.php @@ -5,6 +5,7 @@ require_once('include/html2plain.php'); require_once("include/Scrape.php"); require_once('include/diaspora.php'); require_once("include/ostatus.php"); +require_once("include/dfrn.php"); function delivery_run(&$argv, &$argc){ global $a, $db; @@ -278,6 +279,53 @@ function delivery_run(&$argv, &$argc){ case NETWORK_DFRN: logger('notifier: '.$target_item["guid"].' dfrndelivery: ' . $contact['name']); + if ($mail) { + $item["body"] = $body; + $atom = dfrn_mail($item, $owner); + } elseif ($fsuggest) { + $atom = dfrn_fsuggest($item, $owner); + // q("DELETE FROM `fsuggest` WHERE `id` = %d LIMIT 1", intval($item['id']) + } elseif ($relocate) + $atom = dfrn_relocate($owner, $uid); + elseif($followup) { + $msgitems = array(); + foreach($items as $item) { // there is only one item + if(!$item['parent']) + continue; + if($item['id'] == $item_id) { + logger('followup: item: ' . print_r($item,true), LOGGER_DATA); + $msgitems[] = $item; + } + } + $atom = dfrn_entries($msgitems,$owner); + } else { + $msgitems = array(); + foreach($items as $item) { + if(!$item['parent']) + continue; + + // private emails may be in included in public conversations. Filter them. + if(($public_message) && $item['private']) + continue; + + $item_contact = get_item_contact($item,$icontacts); + if(!$item_contact) + continue; + + if($normal_mode) { + if($item_id == $item['id'] || $item['id'] == $item['parent']) { + $item["entry:comment-allow"] = true; + $item["entry:cid"] = (($top_level) ? $contact['id'] : 0); + $msgitems[] = $item; + } + } else { + $item["entry:comment-allow"] = true; + $msgitems[] = $item; + } + } + $atom = dfrn_entries($msgitems,$owner); + } +/* $feed_template = get_markup_template('atom_feed.tpl'); $mail_template = get_markup_template('atom_mail.tpl'); @@ -345,7 +393,7 @@ function delivery_run(&$argv, &$argc){ $sugg_template = get_markup_template('atom_relocate.tpl'); - /* get site pubkey. this could be a new installation with no site keys*/ + // get site pubkey. this could be a new installation with no site keys $pubkey = get_config('system','site_pubkey'); if(! $pubkey) { $res = new_keypair(1024); @@ -408,8 +456,8 @@ function delivery_run(&$argv, &$argc){ } $atom .= '' . "\r\n"; - - logger('notifier: '.$contact["url"].' '.$target_item["guid"].' entry: '.$atom, LOGGER_DEBUG); +*/ + logger('notifier entry: '.$contact["url"].' '.$target_item["guid"].' entry: '.$atom, LOGGER_DEBUG); logger('notifier: ' . $atom, LOGGER_DATA); $basepath = implode('/', array_slice(explode('/',$contact['url']),0,3)); diff --git a/include/dfrn.php b/include/dfrn.php index 758e03398f..cf1adfa248 100644 --- a/include/dfrn.php +++ b/include/dfrn.php @@ -191,7 +191,12 @@ function dfrn_feed(&$a, $dfrn_id, $owner_nick, $last_update, $direction = 0) { if(isset($category)) $alternatelink .= "/category/".$category; - $root = dfrn_add_header($doc, $owner, "author", $alternatelink, true); + if ($public_feed) + $author = "dfrn:owner"; + else + $author = "author"; + + $root = dfrn_add_header($doc, $owner, $author, $alternatelink, true); // This hook can't work anymore // call_hooks('atom_feed', $atom); @@ -622,14 +627,13 @@ function dfrn_entry($doc, $type, $item, $owner, $comment = false, $cid = 0) { if(!$item['parent']) return; - $entry = $doc->createElement("entry"); - if($item['deleted']) { $attributes = array("ref" => $item['uri'], "when" => datetime_convert('UTC','UTC',$item['edited'] . '+00:00',ATOM_TIME)); - xml_add_element($doc, $entry, "at:deleted-entry", "", $attributes); - return $entry; + return xml_create_element($doc, "at:deleted-entry", "", $attributes); } + $entry = $doc->createElement("entry"); + if($item['allow_cid'] || $item['allow_gid'] || $item['deny_cid'] || $item['deny_gid']) $body = fix_private_photos($item['body'],$owner['uid'],$item,$cid); else diff --git a/include/ostatus.php b/include/ostatus.php index b7799fa9df..b127d41e41 100644 --- a/include/ostatus.php +++ b/include/ostatus.php @@ -1121,7 +1121,7 @@ function get_reshared_guid($item) { return $guid; } -function xml_add_element($doc, $parent, $element, $value = "", $attributes = array()) { +function xml_create_element($doc, $element, $value = "", $attributes = array()) { $element = $doc->createElement($element, xmlify($value)); foreach ($attributes AS $key => $value) { @@ -1129,7 +1129,11 @@ function xml_add_element($doc, $parent, $element, $value = "", $attributes = arr $attribute->value = xmlify($value); $element->appendChild($attribute); } + return $element; +} +function xml_add_element($doc, $parent, $element, $value = "", $attributes = array()) { + $element = xml_create_element($doc, $element, $value, $attributes); $parent->appendChild($element); } diff --git a/mod/dfrn_poll.php b/mod/dfrn_poll.php index d6a07186ac..e6ebc5d519 100644 --- a/mod/dfrn_poll.php +++ b/mod/dfrn_poll.php @@ -1,9 +1,7 @@ argv[1], $last_update, $direction); + //$o = get_feed_for($a,$dfrn_id, $a->argv[1], $last_update, $direction); + $o = dfrn_feed($a,$dfrn_id, $a->argv[1], $last_update, $direction); echo $o; killme(); From 39099b56d137bd2cae209f3c0b00f79202f4f869 Mon Sep 17 00:00:00 2001 From: Tobias Diekershoff Date: Sat, 23 Jan 2016 08:01:54 +0100 Subject: [PATCH 103/242] a total number count would be nice --- mod/admin.php | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/mod/admin.php b/mod/admin.php index e9e6323680..7f9000807b 100644 --- a/mod/admin.php +++ b/mod/admin.php @@ -271,6 +271,7 @@ function admin_page_federation(&$a) { // displayed on the stats page. $platforms = array('Friendica', 'Diaspora', '%%red%%', 'Hubzilla', 'GNU Social', 'StatusNet'); $counts = array(); + $total = 0; foreach ($platforms as $p) { // get a total count for the platform, the name and version of the @@ -278,6 +279,7 @@ function admin_page_federation(&$a) { $c = q('SELECT count(*) AS total, platform, network, version FROM gserver WHERE platform LIKE "%s" AND last_contact > last_failure ORDER BY version ASC;', $p); + $total = $total + $c[0]['total']; // what versions for that platform do we know at all? // again only the active nodes @@ -355,7 +357,7 @@ function admin_page_federation(&$a) { '$autoactive' => get_config('system', 'poco_completion'), '$counts' => $counts, '$version' => FRIENDICA_VERSION, - '$legendtext' => t('Currently this node is aware of nodes from the following platforms:'), + '$legendtext' => sprintf(t('Currently this node is aware of %d nodes from the following platforms:'), $total), '$baseurl' => $a->get_baseurl(), )); } From 61cebdb75eb4170df175b85f33092c0ee6159e10 Mon Sep 17 00:00:00 2001 From: Michael Vogel Date: Sat, 23 Jan 2016 12:39:37 +0100 Subject: [PATCH 104/242] Workaround for the case when items are stored without a contact id --- include/items.php | 21 ++++++++++++++++++++- 1 file changed, 20 insertions(+), 1 deletion(-) diff --git a/include/items.php b/include/items.php index 76ff6e8b0c..f17e0c05ad 100644 --- a/include/items.php +++ b/include/items.php @@ -14,6 +14,7 @@ require_once('include/socgraph.php'); require_once('include/plaintext.php'); require_once('include/ostatus.php'); require_once('include/feed.php'); +require_once('include/Contact.php'); require_once('mod/share.php'); require_once('library/defuse/php-encryption-1.2.1/Crypto.php'); @@ -1334,6 +1335,24 @@ function item_store($arr,$force_parent = false, $notify = false, $dontcache = fa logger("item_store: Set network to ".$arr["network"]." for ".$arr["uri"], LOGGER_DEBUG); } + // The contact-id should be set before "item_store" was called - but there seems to be some issues + if ($arr["contact-id"] == 0) { + // First we are looking for a suitable contact that matches with the author of the post + $arr["contact-id"] = get_contact($arr['author-link'], $uid); + + // If not present then maybe the owner was found + if ($arr["contact-id"] == 0) + $arr["contact-id"] = get_contact($arr['owner-link'], $uid); + + // Still missing? Then use the "self" contact of the current user + if ($arr["contact-id"] == 0) { + $r = q("SELECT `id` FROM `contact` WHERE `self` AND `uid` = %d", intval($uid)); + if ($r) + $arr["contact-id"] = $r[0]["id"]; + } + logger("Contact-id was missing for post ".$arr["guid"]." - now set to ".$arr["contact-id"], LOGGER_DEBUG); + } + if ($arr["gcontact-id"] == 0) $arr["gcontact-id"] = get_gcontact_id(array("url" => $arr['author-link'], "network" => $arr['network'], "photo" => $arr['author-avatar'], "name" => $arr['author-name'])); @@ -1610,7 +1629,7 @@ function item_store($arr,$force_parent = false, $notify = false, $dontcache = fa if($dsprsig) { - // Friendica servers lower than 3.4.3-2 had double encoded the signature ... + // Friendica servers lower than 3.4.3-2 had double encoded the signature ... // We can check for this condition when we decode and encode the stuff again. if (base64_encode(base64_decode(base64_decode($dsprsig->signature))) == base64_decode($dsprsig->signature)) { $dsprsig->signature = base64_decode($dsprsig->signature); From 2bb3c1aec897f5db242918ffb364820198ed217b Mon Sep 17 00:00:00 2001 From: Michael Vogel Date: Sat, 23 Jan 2016 13:18:18 +0100 Subject: [PATCH 105/242] DFRN: Mails had an empty body --- include/delivery.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/include/delivery.php b/include/delivery.php index 482a759498..c78a213402 100644 --- a/include/delivery.php +++ b/include/delivery.php @@ -280,7 +280,7 @@ function delivery_run(&$argv, &$argc){ logger('notifier: '.$target_item["guid"].' dfrndelivery: ' . $contact['name']); if ($mail) { - $item["body"] = $body; + $item['body'] = fix_private_photos($item['body'],$owner['uid'],null,$message[0]['contact-id']); $atom = dfrn_mail($item, $owner); } elseif ($fsuggest) { $atom = dfrn_fsuggest($item, $owner); From b76dc8b129eeee465f1c288b1c4e6d726a0a0c9e Mon Sep 17 00:00:00 2001 From: Michael Vogel Date: Sat, 23 Jan 2016 22:05:27 +0100 Subject: [PATCH 106/242] Frequently repair of database entries --- include/cron.php | 21 +++++++++++++++++++++ 1 file changed, 21 insertions(+) diff --git a/include/cron.php b/include/cron.php index bf3243cb60..71af5d826f 100644 --- a/include/cron.php +++ b/include/cron.php @@ -164,6 +164,9 @@ function cron_run(&$argv, &$argc){ // Repair missing Diaspora values in contacts cron_repair_diaspora($a); + // Repair entries in the database + cron_repair_database(); + $manual_id = 0; $generation = 0; $force = false; @@ -417,6 +420,24 @@ function cron_repair_diaspora(&$a) { } } +/** + * @brief Do some repairs in database entries + * + */ +function cron_repair_database() { + + // Set the parent if it wasn't set. (Shouldn't happen - but does sometimes) + // This call is very "cheap" so we can do it at any time without a problem + q("UPDATE `item` INNER JOIN `item` AS `parent` ON `parent`.`uri` = `item`.`parent-uri` AND `parent`.`uid` = `item`.`uid` SET `item`.`parent` = `parent`.`id` WHERE `item`.`parent` = 0"); + + /// @todo + // - remove duplicated contacts with uid=0 (We could do this at the place where the contacts are stored) + // - remove thread entries without item + // - remove sign entries without item + // - remove children when parent got lost + // - set contact-id in item when not present +} + if (array_search(__file__,get_included_files())===0){ cron_run($_SERVER["argv"],$_SERVER["argc"]); killme(); From 60470cfafad212e00ef19aacd2e3e8bb2e8f084e Mon Sep 17 00:00:00 2001 From: Michael Vogel Date: Sat, 23 Jan 2016 22:36:15 +0100 Subject: [PATCH 107/242] New handling for filling the gcontact table / duplicate prevention --- include/gprobe.php | 19 ++-- include/socgraph.php | 201 ++++++++++++------------------------------- 2 files changed, 61 insertions(+), 159 deletions(-) diff --git a/include/gprobe.php b/include/gprobe.php index 84292f263a..dfa9137d7d 100644 --- a/include/gprobe.php +++ b/include/gprobe.php @@ -33,7 +33,7 @@ function gprobe_run(&$argv, &$argc){ $url = hex2bin($argv[1]); - $r = q("select * from gcontact where nurl = '%s' limit 1", + $r = q("SELECT `id`, `url`, `network` FROM `gcontact` WHERE `nurl` = '%s' ORDER BY `id` LIMIT 1", dbesc(normalise_link($url)) ); @@ -58,21 +58,16 @@ function gprobe_run(&$argv, &$argc){ if (is_null($result)) Cache::set("gprobe:".$urlparts["host"],serialize($arr)); - if(count($arr) && x($arr,'network') && $arr['network'] === NETWORK_DFRN) { - q("insert into `gcontact` (`name`,`url`,`nurl`,`photo`) - values ( '%s', '%s', '%s', '%s') ", - dbesc($arr['name']), - dbesc($arr['url']), - dbesc(normalise_link($arr['url'])), - dbesc($arr['photo']) - ); - } - $r = q("select * from gcontact where nurl = '%s' limit 1", + if (!in_array($result["network"], array(NETWORK_FEED, NETWORK_PHANTOM))) + update_gcontact($arr); + + $r = q("SELECT `id`, `url`, `network` FROM `gcontact` WHERE `nurl` = '%s' ORDER BY `id` LIMIT 1", dbesc(normalise_link($url)) ); } if(count($r)) - poco_load(0,0,$r[0]['id'], str_replace('/profile/','/poco/',$r[0]['url'])); + if ($r[0]["network"] == NETWORK_DFRN) + poco_load(0,0,$r[0]['id'], str_replace('/profile/','/poco/',$r[0]['url'])); logger("gprobe end for ".normalise_link($url), LOGGER_DEBUG); return; diff --git a/include/socgraph.php b/include/socgraph.php index 4532abb39b..c545343393 100644 --- a/include/socgraph.php +++ b/include/socgraph.php @@ -289,93 +289,25 @@ function poco_check($profile_url, $name, $network, $profile_photo, $about, $loca poco_check_server($server_url, $network); - if(count($x)) { - $gcid = $x[0]['id']; + $gcontact = array("url" => $profile_url, + "addr" => $addr, + "alias" => $alias, + "name" => $name, + "network" => $network, + "photo" => $profile_photo, + "about" => $about, + "location" => $location, + "gender" => $gender, + "keywords" => $keywords, + "server_url" => $server_url, + "connect" => $connect_url, + "notify" => $notify, + "updated" => $updated, + "generation" => $generation); - if (($location == "") AND ($x[0]['location'] != "")) - $location = $x[0]['location']; + $gcid = update_gcontact($gcontact); - if (($about == "") AND ($x[0]['about'] != "")) - $about = $x[0]['about']; - - if (($gender == "") AND ($x[0]['gender'] != "")) - $gender = $x[0]['gender']; - - if (($keywords == "") AND ($x[0]['keywords'] != "")) - $keywords = $x[0]['keywords']; - - if (($addr == "") AND ($x[0]['addr'] != "")) - $addr = $x[0]['addr']; - - if (($alias == "") AND ($x[0]['alias'] != "")) - $alias = $x[0]['alias']; - - if (($notify == "") AND ($x[0]['notify'] != "")) - $notify = $x[0]['notify']; - - if (($generation == 0) AND ($x[0]['generation'] > 0)) - $generation = $x[0]['generation']; - - if($x[0]['name'] != $name || $x[0]['photo'] != $profile_photo || $x[0]['updated'] < $updated) { - q("UPDATE `gcontact` SET `name` = '%s', `addr` = '%s', `network` = '%s', `photo` = '%s', `connect` = '%s', `url` = '%s', `server_url` = '%s', - `updated` = '%s', `location` = '%s', `about` = '%s', `keywords` = '%s', `gender` = '%s', `generation` = %d, - `alias` = '$s', `notify` = '%s' - WHERE (`generation` >= %d OR `generation` = 0) AND `nurl` = '%s'", - dbesc($name), - dbesc($addr), - dbesc($network), - dbesc($profile_photo), - dbesc($connect_url), - dbesc($profile_url), - dbesc($server_url), - dbesc($updated), - dbesc($location), - dbesc($about), - dbesc($keywords), - dbesc($gender), - dbesc($alias), - dbesc($notify), - intval($generation), - intval($generation), - dbesc(normalise_link($profile_url)) - ); - } - } else { - // Maybe another process had inserted the entry after the first check, so it again - $x = q("SELECT `id` FROM `gcontact` WHERE `nurl` = '%s' LIMIT 1", - dbesc(normalise_link($profile_url)) - ); - if(!$x) { - q("INSERT INTO `gcontact` (`name`, `nick`, `addr`, `network`, `url`, `nurl`, `photo`, `connect`, `server_url`, `created`, `updated`, `location`, `about`, `keywords`, `gender`, `alias`, `notify`, `generation`) - VALUES ('%s', '%s', '%s', '%s', '%s', '%s', '%s', '%s', '%s', '%s', '%s', '%s', '%s', '%s', '%s', '%s', '%s', %d)", - dbesc($name), - dbesc($nick), - dbesc($addr), - dbesc($network), - dbesc($profile_url), - dbesc(normalise_link($profile_url)), - dbesc($profile_photo), - dbesc($connect_url), - dbesc($server_url), - dbesc(datetime_convert()), - dbesc($updated), - dbesc($location), - dbesc($about), - dbesc($keywords), - dbesc($gender), - dbesc($alias), - dbesc($notify), - intval($generation) - ); - $x = q("SELECT `id` FROM `gcontact` WHERE `nurl` = '%s' LIMIT 1", - dbesc(normalise_link($profile_url)) - ); - } - if(count($x)) - $gcid = $x[0]['id']; - } - - if(! $gcid) + if(!$gcid) return $gcid; $r = q("SELECT * FROM `glink` WHERE `cid` = %d AND `uid` = %d AND `gcid` = %d AND `zcid` = %d LIMIT 1", @@ -402,13 +334,6 @@ function poco_check($profile_url, $name, $network, $profile_photo, $about, $loca ); } - // For unknown reasons there are sometimes duplicates - //q("DELETE FROM `gcontact` WHERE `nurl` = '%s' AND `id` != %d AND - // NOT EXISTS (SELECT `gcid` FROM `glink` WHERE `gcid` = `gcontact`.`id`)", - // dbesc(normalise_link($profile_url)), - // intval($gcid) - //); - return $gcid; } @@ -1540,7 +1465,7 @@ function get_gcontact_id($contact) { if ($contact["network"] == NETWORK_STATUSNET) $contact["network"] = NETWORK_OSTATUS; - $r = q("SELECT `id` FROM `gcontact` WHERE `nurl` = '%s' LIMIT 1", + $r = q("SELECT `id` FROM `gcontact` WHERE `nurl` = '%s' ORDER BY `id` LIMIT 2", dbesc(normalise_link($contact["url"]))); if ($r) @@ -1562,13 +1487,18 @@ function get_gcontact_id($contact) { intval($contact["generation"]) ); - $r = q("SELECT `id` FROM `gcontact` WHERE `nurl` = '%s' LIMIT 1", + $r = q("SELECT `id` FROM `gcontact` WHERE `nurl` = '%s' ORDER BY `id` LIMIT 2", dbesc(normalise_link($contact["url"]))); if ($r) $gcontact_id = $r[0]["id"]; } + if ((count($r) > 1) AND ($gcontact_id > 0) AND ($contact["url"] != "")) + q("DELETE FROM `gcontact` WHERE `nurl` = '%s' AND `id` != %d", + dbesc(normalise_link($contact["url"])), + intval($gcontact_id)); + return $gcontact_id; } @@ -1587,78 +1517,55 @@ function update_gcontact($contact) { if (!$gcontact_id) return false; - $r = q("SELECT `name`, `nick`, `photo`, `location`, `about`, `addr`, `generation`, `birthday`, `gender`, `keywords`, `hide`, `nsfw`, `network`, `alias`, `notify`, `url` + $r = q("SELECT `name`, `nick`, `photo`, `location`, `about`, `addr`, `generation`, `birthday`, `gender`, `keywords`, + `hide`, `nsfw`, `network`, `alias`, `notify`, `server_url`, `connect`, `updated`, `url` FROM `gcontact` WHERE `id` = %d LIMIT 1", intval($gcontact_id)); - if ($contact["generation"] == 0) - $contact["generation"] = $r[0]["generation"]; + // Get all field names + $fields = array(); + foreach ($r[0] AS $field => $data) + $fields[$field] = $data; - if ($contact["photo"] == "") - $contact["photo"] = $r[0]["photo"]; + unset($fields["url"]); + unset($fields["updated"]); - if ($contact["name"] == "") - $contact["name"] = $r[0]["name"]; - - if ($contact["nick"] == "") - $contact["nick"] = $r[0]["nick"]; - - if ($contact["addr"] == "") - $contact["addr"] = $r[0]["addr"]; - - if ($contact["location"] =="") - $contact["location"] = $r[0]["location"]; - - if ($contact["about"] =="") - $contact["about"] = $r[0]["about"]; - - if ($contact["birthday"] =="") - $contact["birthday"] = $r[0]["birthday"]; - - if ($contact["gender"] =="") - $contact["gender"] = $r[0]["gender"]; - - if ($contact["keywords"] =="") - $contact["keywords"] = $r[0]["keywords"]; - - if (!isset($contact["hide"])) - $contact["hide"] = $r[0]["hide"]; - - if (!isset($contact["nsfw"])) - $contact["nsfw"] = $r[0]["nsfw"]; - - if ($contact["network"] =="") - $contact["network"] = $r[0]["network"]; - - if ($contact["alias"] =="") - $contact["alias"] = $r[0]["alias"]; - - if ($contact["url"] =="") - $contact["url"] = $r[0]["url"]; - - if ($contact["notify"] =="") - $contact["notify"] = $r[0]["notify"]; + // assign all unassigned fields from the database entry + foreach ($fields AS $field => $data) + if (!isset($contact[$field])) + $contact[$field] = $r[0][$field]; if ($contact["network"] == NETWORK_STATUSNET) $contact["network"] = NETWORK_OSTATUS; - if (($contact["photo"] != $r[0]["photo"]) OR ($contact["name"] != $r[0]["name"]) OR ($contact["nick"] != $r[0]["nick"]) OR ($contact["addr"] != $r[0]["addr"]) OR - ($contact["birthday"] != $r[0]["birthday"]) OR ($contact["gender"] != $r[0]["gender"]) OR ($contact["keywords"] != $r[0]["keywords"]) OR - ($contact["hide"] != $r[0]["hide"]) OR ($contact["nsfw"] != $r[0]["nsfw"]) OR ($contact["network"] != $r[0]["network"]) OR - ($contact["alias"] != $r[0]["alias"]) OR ($contact["notify"] != $r[0]["notify"]) OR ($contact["url"] != $r[0]["url"]) OR - ($contact["location"] != $r[0]["location"]) OR ($contact["about"] != $r[0]["about"]) OR ($contact["generation"] < $r[0]["generation"])) { + if (!isset($contact["updated"])) + $contact["updated"] = datetime_convert(); + // Check if any field changed + $update = false; + unset($fields["generation"]); + + foreach ($fields AS $field => $data) + if ($contact[$field] != $r[0][$field]) + $update = true; + + if ($contact["generation"] < $r[0]["generation"]) + $update = true; + + if ($update) { q("UPDATE `gcontact` SET `photo` = '%s', `name` = '%s', `nick` = '%s', `addr` = '%s', `network` = '%s', `birthday` = '%s', `gender` = '%s', `keywords` = %d, `hide` = %d, `nsfw` = %d, `alias` = '%s', `notify` = '%s', `url` = '%s', - `location` = '%s', `about` = '%s', `generation` = %d, `updated` = '%s' + `location` = '%s', `about` = '%s', `generation` = %d, `updated` = '%s', + `server_url` = '%s', `connect` = '%s' WHERE `nurl` = '%s' AND (`generation` = 0 OR `generation` >= %d)", dbesc($contact["photo"]), dbesc($contact["name"]), dbesc($contact["nick"]), dbesc($contact["addr"]), dbesc($contact["network"]), dbesc($contact["birthday"]), dbesc($contact["gender"]), dbesc($contact["keywords"]), intval($contact["hide"]), intval($contact["nsfw"]), dbesc($contact["alias"]), dbesc($contact["notify"]), dbesc($contact["url"]), dbesc($contact["location"]), dbesc($contact["about"]), - intval($contact["generation"]), dbesc(datetime_convert()), + intval($contact["generation"]), dbesc($contact["updated"]), + dbesc($contact["server_url"]), dbesc($contact["connect"]), dbesc(normalise_link($contact["url"])), intval($contact["generation"])); } From 44091aa631d484d2cab3d24220dd98110f1a372f Mon Sep 17 00:00:00 2001 From: Michael Vogel Date: Sun, 24 Jan 2016 00:11:16 +0100 Subject: [PATCH 108/242] Removed unused functions --- include/delivery.php | 2 +- include/items.php | 519 ------------------------------------------- include/text.php | 77 ------- 3 files changed, 1 insertion(+), 597 deletions(-) diff --git a/include/delivery.php b/include/delivery.php index c78a213402..957681ead5 100644 --- a/include/delivery.php +++ b/include/delivery.php @@ -265,7 +265,7 @@ function delivery_run(&$argv, &$argc){ if(count($r)) $contact = $r[0]; - $hubxml = feed_hublinks(); + //$hubxml = feed_hublinks(); if($contact['self']) continue; diff --git a/include/items.php b/include/items.php index b8fa1dd815..6d3cd2b7c7 100644 --- a/include/items.php +++ b/include/items.php @@ -19,300 +19,12 @@ require_once('mod/share.php'); require_once('library/defuse/php-encryption-1.2.1/Crypto.php'); - -function get_feed_for(&$a, $dfrn_id, $owner_nick, $last_update, $direction = 0) { - - - $sitefeed = ((strlen($owner_nick)) ? false : true); // not yet implemented, need to rewrite huge chunks of following logic - $public_feed = (($dfrn_id) ? false : true); - $starred = false; // not yet implemented, possible security issues - $converse = false; - - if($public_feed && $a->argc > 2) { - for($x = 2; $x < $a->argc; $x++) { - if($a->argv[$x] == 'converse') - $converse = true; - if($a->argv[$x] == 'starred') - $starred = true; - if($a->argv[$x] === 'category' && $a->argc > ($x + 1) && strlen($a->argv[$x+1])) - $category = $a->argv[$x+1]; - } - } - - - - // default permissions - anonymous user - - $sql_extra = " AND `item`.`allow_cid` = '' AND `item`.`allow_gid` = '' AND `item`.`deny_cid` = '' AND `item`.`deny_gid` = '' "; - - $r = q("SELECT `contact`.*, `user`.`uid` AS `user_uid`, `user`.`nickname`, `user`.`timezone`, `user`.`page-flags` - FROM `contact` INNER JOIN `user` ON `user`.`uid` = `contact`.`uid` - WHERE `contact`.`self` = 1 AND `user`.`nickname` = '%s' LIMIT 1", - dbesc($owner_nick) - ); - - if(! count($r)) - killme(); - - $owner = $r[0]; - $owner_id = $owner['user_uid']; - $owner_nick = $owner['nickname']; - - $birthday = feed_birthday($owner_id,$owner['timezone']); - - $sql_post_table = ""; - $visibility = ""; - - if(! $public_feed) { - - $sql_extra = ''; - switch($direction) { - case (-1): - $sql_extra = sprintf(" AND `issued-id` = '%s' ", dbesc($dfrn_id)); - $my_id = $dfrn_id; - break; - case 0: - $sql_extra = sprintf(" AND `issued-id` = '%s' AND `duplex` = 1 ", dbesc($dfrn_id)); - $my_id = '1:' . $dfrn_id; - break; - case 1: - $sql_extra = sprintf(" AND `dfrn-id` = '%s' AND `duplex` = 1 ", dbesc($dfrn_id)); - $my_id = '0:' . $dfrn_id; - break; - default: - return false; - break; // NOTREACHED - } - - $r = q("SELECT * FROM `contact` WHERE `blocked` = 0 AND `pending` = 0 AND `contact`.`uid` = %d $sql_extra LIMIT 1", - intval($owner_id) - ); - - if(! count($r)) - killme(); - - $contact = $r[0]; - require_once('include/security.php'); - $groups = init_groups_visitor($contact['id']); - - if(count($groups)) { - for($x = 0; $x < count($groups); $x ++) - $groups[$x] = '<' . intval($groups[$x]) . '>' ; - $gs = implode('|', $groups); - } - else - $gs = '<<>>' ; // Impossible to match - - $sql_extra = sprintf(" - AND ( `allow_cid` = '' OR `allow_cid` REGEXP '<%d>' ) - AND ( `deny_cid` = '' OR NOT `deny_cid` REGEXP '<%d>' ) - AND ( `allow_gid` = '' OR `allow_gid` REGEXP '%s' ) - AND ( `deny_gid` = '' OR NOT `deny_gid` REGEXP '%s') - ", - intval($contact['id']), - intval($contact['id']), - dbesc($gs), - dbesc($gs) - ); - } - - if($public_feed) - $sort = 'DESC'; - else - $sort = 'ASC'; - - $date_field = "`changed`"; - $sql_order = "`item`.`parent` ".$sort.", `item`.`created` ASC"; - - if(! strlen($last_update)) - $last_update = 'now -30 days'; - - if(isset($category)) { - $sql_post_table = sprintf("INNER JOIN (SELECT `oid` FROM `term` WHERE `term` = '%s' AND `otype` = %d AND `type` = %d AND `uid` = %d ORDER BY `tid` DESC) AS `term` ON `item`.`id` = `term`.`oid` ", - dbesc(protect_sprintf($category)), intval(TERM_OBJ_POST), intval(TERM_CATEGORY), intval($owner_id)); - //$sql_extra .= file_tag_file_query('item',$category,'category'); - } - - if($public_feed) { - if(! $converse) - $sql_extra .= " AND `contact`.`self` = 1 "; - } - - $check_date = datetime_convert('UTC','UTC',$last_update,'Y-m-d H:i:s'); - - // AND ( `item`.`edited` > '%s' OR `item`.`changed` > '%s' ) - // dbesc($check_date), - - $r = q("SELECT STRAIGHT_JOIN `item`.*, `item`.`id` AS `item_id`, - `contact`.`name`, `contact`.`network`, `contact`.`photo`, `contact`.`url`, - `contact`.`name-date`, `contact`.`uri-date`, `contact`.`avatar-date`, - `contact`.`thumb`, `contact`.`dfrn-id`, `contact`.`self`, - `contact`.`id` AS `contact-id`, `contact`.`uid` AS `contact-uid`, - `sign`.`signed_text`, `sign`.`signature`, `sign`.`signer` - FROM `item` $sql_post_table - INNER JOIN `contact` ON `contact`.`id` = `item`.`contact-id` - AND `contact`.`blocked` = 0 AND `contact`.`pending` = 0 - LEFT JOIN `sign` ON `sign`.`iid` = `item`.`id` - WHERE `item`.`uid` = %d AND `item`.`visible` = 1 and `item`.`moderated` = 0 AND `item`.`parent` != 0 - AND ((`item`.`wall` = 1) $visibility) AND `item`.$date_field > '%s' - $sql_extra - ORDER BY $sql_order LIMIT 0, 300", - intval($owner_id), - dbesc($check_date), - dbesc($sort) - ); - - // Will check further below if this actually returned results. - // We will provide an empty feed if that is the case. - - $items = $r; - - $feed_template = get_markup_template(($dfrn_id) ? 'atom_feed_dfrn.tpl' : 'atom_feed.tpl'); - - $atom = ''; - - $hubxml = feed_hublinks(); - - $salmon = feed_salmonlinks($owner_nick); - - $alternatelink = $owner['url']; - - if(isset($category)) - $alternatelink .= "/category/".$category; - - $atom .= replace_macros($feed_template, array( - '$version' => xmlify(FRIENDICA_VERSION), - '$feed_id' => xmlify($a->get_baseurl() . '/profile/' . $owner_nick), - '$feed_title' => xmlify($owner['name']), - '$feed_updated' => xmlify(datetime_convert('UTC', 'UTC', 'now' , ATOM_TIME)) , - '$hub' => $hubxml, - '$salmon' => $salmon, - '$alternatelink' => xmlify($alternatelink), - '$name' => xmlify($owner['name']), - '$profile_page' => xmlify($owner['url']), - '$photo' => xmlify($owner['photo']), - '$thumb' => xmlify($owner['thumb']), - '$picdate' => xmlify(datetime_convert('UTC','UTC',$owner['avatar-date'] . '+00:00' , ATOM_TIME)) , - '$uridate' => xmlify(datetime_convert('UTC','UTC',$owner['uri-date'] . '+00:00' , ATOM_TIME)) , - '$namdate' => xmlify(datetime_convert('UTC','UTC',$owner['name-date'] . '+00:00' , ATOM_TIME)) , - '$birthday' => ((strlen($birthday)) ? '' . xmlify($birthday) . '' : ''), - '$community' => (($owner['page-flags'] == PAGE_COMMUNITY) ? '1' : '') - )); - - call_hooks('atom_feed', $atom); - - if(! count($items)) { - - call_hooks('atom_feed_end', $atom); - - $atom .= '' . "\r\n"; - return $atom; - } - - foreach($items as $item) { - - // prevent private email from leaking. - if($item['network'] === NETWORK_MAIL) - continue; - - // public feeds get html, our own nodes use bbcode - - if($public_feed) { - $type = 'html'; - // catch any email that's in a public conversation and make sure it doesn't leak - if($item['private']) - continue; - } - else { - $type = 'text'; - } - - $atom .= atom_entry($item,$type,null,$owner,true); - } - - call_hooks('atom_feed_end', $atom); - - $atom .= '' . "\r\n"; - - return $atom; -} - - function construct_verb($item) { if($item['verb']) return $item['verb']; return ACTIVITY_POST; } -function construct_activity_object($item) { - - if($item['object']) { - $o = '' . "\r\n"; - $r = parse_xml_string($item['object'],false); - - - if(! $r) - return ''; - if($r->type) - $o .= '' . xmlify($r->type) . '' . "\r\n"; - if($r->id) - $o .= '' . xmlify($r->id) . '' . "\r\n"; - if($r->title) - $o .= '' . xmlify($r->title) . '' . "\r\n"; - if($r->link) { - if(substr($r->link,0,1) === '<') { - // patch up some facebook "like" activity objects that got stored incorrectly - // for a couple of months prior to 9-Jun-2011 and generated bad XML. - // we can probably remove this hack here and in the following function in a few months time. - if(strstr($r->link,'&') && (! strstr($r->link,'&'))) - $r->link = str_replace('&','&', $r->link); - $r->link = preg_replace('/\/','',$r->link); - $o .= $r->link; - } - else - $o .= '' . "\r\n"; - } - if($r->content) - $o .= '' . xmlify(bbcode($r->content)) . '' . "\r\n"; - $o .= '' . "\r\n"; - return $o; - } - - return ''; -} - -function construct_activity_target($item) { - - if($item['target']) { - $o = '' . "\r\n"; - $r = parse_xml_string($item['target'],false); - if(! $r) - return ''; - if($r->type) - $o .= '' . xmlify($r->type) . '' . "\r\n"; - if($r->id) - $o .= '' . xmlify($r->id) . '' . "\r\n"; - if($r->title) - $o .= '' . xmlify($r->title) . '' . "\r\n"; - if($r->link) { - if(substr($r->link,0,1) === '<') { - if(strstr($r->link,'&') && (! strstr($r->link,'&'))) - $r->link = str_replace('&','&', $r->link); - $r->link = preg_replace('/\/','',$r->link); - $o .= $r->link; - } - else - $o .= '' . "\r\n"; - } - if($r->content) - $o .= '' . xmlify(bbcode($r->content)) . '' . "\r\n"; - $o .= '' . "\r\n"; - return $o; - } - - return ''; -} - /* limit_body_size() * * The purpose of this function is to apply system message length limits to @@ -431,8 +143,6 @@ function title_is_body($title, $body) { return($title == $body); } - - function get_atom_elements($feed, $item, $contact = array()) { require_once('library/HTMLPurifier.auto.php'); @@ -4266,7 +3976,6 @@ function lose_sharer($importer,$contact,$datarray,$item) { } } - function subscribe_to_hub($url,$importer,$contact,$hubmode = 'subscribe') { $a = get_app(); @@ -4309,189 +4018,6 @@ function subscribe_to_hub($url,$importer,$contact,$hubmode = 'subscribe') { } - -function atom_author($tag,$name,$uri,$h,$w,$photo,$geo) { - $o = ''; - if(! $tag) - return $o; - $name = xmlify($name); - $uri = xmlify($uri); - $h = intval($h); - $w = intval($w); - $photo = xmlify($photo); - - - $o .= "<$tag>\r\n"; - $o .= "\t$name\r\n"; - $o .= "\t$uri\r\n"; - $o .= "\t".'' . "\r\n"; - $o .= "\t".'' . "\r\n"; - - if ($tag == "author") { - - if($geo) - $o .= ''.xmlify($geo).''."\r\n"; - - $r = q("SELECT `profile`.`locality`, `profile`.`region`, `profile`.`country-name`, - `profile`.`name`, `profile`.`pub_keywords`, `profile`.`about`, - `profile`.`homepage`,`contact`.`nick` FROM `profile` - INNER JOIN `contact` ON `contact`.`uid` = `profile`.`uid` - INNER JOIN `user` ON `user`.`uid` = `profile`.`uid` - WHERE `profile`.`is-default` AND `contact`.`self` AND - NOT `user`.`hidewall` AND `contact`.`nurl`='%s'", - dbesc(normalise_link($uri))); - if ($r) { - $location = ''; - if($r[0]['locality']) - $location .= $r[0]['locality']; - if($r[0]['region']) { - if($location) - $location .= ', '; - $location .= $r[0]['region']; - } - if($r[0]['country-name']) { - if($location) - $location .= ', '; - $location .= $r[0]['country-name']; - } - - $o .= "\t".xmlify($r[0]["nick"])."\r\n"; - $o .= "\t".xmlify($r[0]["name"])."\r\n"; - $o .= "\t".xmlify(bbcode($r[0]["about"]))."\r\n"; - $o .= "\t\r\n"; - $o .= "\t\t".xmlify($location)."\r\n"; - $o .= "\t\r\n"; - $o .= "\t\r\n"; - $o .= "\thomepage\r\n"; - $o .= "\t\t".xmlify($r[0]["homepage"])."\r\n"; - $o .= "\t\ttrue\r\n"; - $o .= "\t\r\n"; - } - } - - call_hooks('atom_author', $o); - - $o .= "\r\n"; - return $o; -} - -function atom_entry($item,$type,$author,$owner,$comment = false,$cid = 0) { - - $a = get_app(); - - if(! $item['parent']) - return; - - if($item['deleted']) - return '' . "\r\n"; - - - if($item['allow_cid'] || $item['allow_gid'] || $item['deny_cid'] || $item['deny_gid']) - $body = fix_private_photos($item['body'],$owner['uid'],$item,$cid); - else - $body = $item['body']; - - - $o = "\r\n\r\n\r\n"; - - if(is_array($author)) - $o .= atom_author('author',$author['name'],$author['url'],80,80,$author['thumb'], $item['coord']); - else - $o .= atom_author('author',(($item['author-name']) ? $item['author-name'] : $item['name']),(($item['author-link']) ? $item['author-link'] : $item['url']),80,80,(($item['author-avatar']) ? $item['author-avatar'] : $item['thumb']), $item['coord']); - if(strlen($item['owner-name'])) - $o .= atom_author('dfrn:owner',$item['owner-name'],$item['owner-link'],80,80,$item['owner-avatar'], $item['coord']); - - if(($item['parent'] != $item['id']) || ($item['parent-uri'] !== $item['uri']) || (($item['thr-parent'] !== '') && ($item['thr-parent'] !== $item['uri']))) { - $parent = q("SELECT `guid` FROM `item` WHERE `id` = %d", intval($item["parent"])); - $parent_item = (($item['thr-parent']) ? $item['thr-parent'] : $item['parent-uri']); - $o .= ''."\r\n"; - } - - $htmlbody = $body; - - if ($item['title'] != "") - $htmlbody = "[b]".$item['title']."[/b]\n\n".$htmlbody; - - $htmlbody = bbcode($htmlbody, false, false, 7); - - $o .= '' . xmlify($item['uri']) . '' . "\r\n"; - $o .= '' . xmlify($item['title']) . '' . "\r\n"; - $o .= '' . xmlify(datetime_convert('UTC','UTC',$item['created'] . '+00:00',ATOM_TIME)) . '' . "\r\n"; - $o .= '' . xmlify(datetime_convert('UTC','UTC',$item['edited'] . '+00:00',ATOM_TIME)) . '' . "\r\n"; - $o .= '' . base64url_encode($body, true) . '' . "\r\n"; - $o .= '' . xmlify((($type === 'html') ? $htmlbody : $body)) . '' . "\r\n"; - $o .= ''."\r\n"; - - $o .= ''."\r\n"; - - if($comment) - $o .= '' . intval($item['last-child']) . '' . "\r\n"; - - if($item['location']) { - $o .= '' . xmlify($item['location']) . '' . "\r\n"; - $o .= '' . xmlify($item['location']) . '' . "\r\n"; - } - - if($item['coord']) - $o .= '' . xmlify($item['coord']) . '' . "\r\n"; - - if(($item['private']) || strlen($item['allow_cid']) || strlen($item['allow_gid']) || strlen($item['deny_cid']) || strlen($item['deny_gid'])) - $o .= '' . (($item['private']) ? $item['private'] : 1) . '' . "\r\n"; - - if($item['extid']) - $o .= '' . xmlify($item['extid']) . '' . "\r\n"; - if($item['bookmark']) - $o .= 'true' . "\r\n"; - - if($item['app']) - $o .= '' . "\r\n"; - - if($item['guid']) - $o .= '' . $item['guid'] . '' . "\r\n"; - - if($item['signed_text']) { - $sign = base64_encode(json_encode(array('signed_text' => $item['signed_text'],'signature' => $item['signature'],'signer' => $item['signer']))); - $o .= '' . xmlify($sign) . '' . "\r\n"; - } - - $verb = construct_verb($item); - $o .= '' . xmlify($verb) . '' . "\r\n"; - $actobj = construct_activity_object($item); - if(strlen($actobj)) - $o .= $actobj; - $actarg = construct_activity_target($item); - if(strlen($actarg)) - $o .= $actarg; - - $tags = item_getfeedtags($item); - if(count($tags)) { - foreach($tags as $t) - if (($type != 'html') OR ($t[0] != "@")) - $o .= '' . "\r\n"; - } - - /// @TODO - /// To support these elements, the API needs to be enhanced - /// $o .= ''."\r\n"; - /// $o .= "\t".''."\r\n"; - /// $o .= "\t".''."\r\n"; - - // Deactivated since it was meant only for OStatus - //$o .= item_get_attachment($item); - - $o .= item_getfeedattach($item); - - $mentioned = get_mentions($item); - if($mentioned) - $o .= $mentioned; - - call_hooks('atom_entry', $o); - - $o .= '' . "\r\n"; - - return $o; -} - function fix_private_photos($s, $uid, $item = null, $cid = 0) { if(get_config('system','disable_embedded')) @@ -4595,7 +4121,6 @@ function fix_private_photos($s, $uid, $item = null, $cid = 0) { return($new_body); } - function has_permissions($obj) { if(($obj['allow_cid'] != '') || ($obj['allow_gid'] != '') || ($obj['deny_cid'] != '') || ($obj['deny_gid'] != '')) return true; @@ -4656,50 +4181,6 @@ function item_getfeedtags($item) { return $ret; } -function item_get_attachment($item) { - $o = ""; - $siteinfo = get_attached_data($item["body"]); - - switch($siteinfo["type"]) { - case 'link': - $o = ''."\r\n"; - break; - case 'photo': - $imgdata = get_photo_info($siteinfo["image"]); - $o = ''."\r\n"; - break; - case 'video': - $o = ''."\r\n"; - break; - default: - break; - } - - return $o; -} - -function item_getfeedattach($item) { - $ret = ''; - $arr = explode('[/attach],',$item['attach']); - if(count($arr)) { - foreach($arr as $r) { - $matches = false; - $cnt = preg_match('|\[attach\]href=\"(.*?)\" length=\"(.*?)\" type=\"(.*?)\" title=\"(.*?)\"|',$r,$matches); - if($cnt) { - $ret .= '' . "\r\n"; - $o .= "\t\t" . '' . "\r\n"; - } - } - - if (!$item['private']) { - $o .= "\t\t".''."\r\n"; - $o .= "\t\t".''."\r\n"; - } - - return $o; -}} - if(! function_exists('contact_block')) { /** * Get html for contact block. @@ -1657,54 +1628,6 @@ function get_cats_and_terms($item) { return array($categories, $folders); } - - -if(! function_exists('feed_hublinks')) { -/** - * return atom link elements for all of our hubs - * @return string hub link xml elements - */ -function feed_hublinks() { - $a = get_app(); - $hub = get_config('system','huburl'); - - $hubxml = ''; - if(strlen($hub)) { - $hubs = explode(',', $hub); - if(count($hubs)) { - foreach($hubs as $h) { - $h = trim($h); - if(! strlen($h)) - continue; - if ($h === '[internal]') - $h = z_root() . '/pubsubhubbub'; - $hubxml .= '' . "\n" ; - } - } - } - return $hubxml; -}} - - -if(! function_exists('feed_salmonlinks')) { -/** - * return atom link elements for salmon endpoints - * @param string $nick user nickname - * @return string salmon link xml elements - */ -function feed_salmonlinks($nick) { - - $a = get_app(); - - $salmon = '' . "\n" ; - - // old style links that status.net still needed as of 12/2010 - - $salmon .= ' ' . "\n" ; - $salmon .= ' ' . "\n" ; - return $salmon; -}} - if(! function_exists('get_plink')) { /** * get private link for item From 74ed37aa87417c6fa1bd0e04ab9981dc802916f7 Mon Sep 17 00:00:00 2001 From: Michael Vogel Date: Sun, 24 Jan 2016 00:21:58 +0100 Subject: [PATCH 109/242] Some more removed code --- include/delivery.php | 135 +------------------------------------------ mod/dfrn_poll.php | 2 - 2 files changed, 1 insertion(+), 136 deletions(-) diff --git a/include/delivery.php b/include/delivery.php index 957681ead5..d046005994 100644 --- a/include/delivery.php +++ b/include/delivery.php @@ -265,8 +265,6 @@ function delivery_run(&$argv, &$argc){ if(count($r)) $contact = $r[0]; - //$hubxml = feed_hublinks(); - if($contact['self']) continue; @@ -284,7 +282,7 @@ function delivery_run(&$argv, &$argc){ $atom = dfrn_mail($item, $owner); } elseif ($fsuggest) { $atom = dfrn_fsuggest($item, $owner); - // q("DELETE FROM `fsuggest` WHERE `id` = %d LIMIT 1", intval($item['id']) + q("DELETE FROM `fsuggest` WHERE `id` = %d LIMIT 1", intval($item['id'])); } elseif ($relocate) $atom = dfrn_relocate($owner, $uid); elseif($followup) { @@ -325,138 +323,7 @@ function delivery_run(&$argv, &$argc){ } $atom = dfrn_entries($msgitems,$owner); } -/* - $feed_template = get_markup_template('atom_feed.tpl'); - $mail_template = get_markup_template('atom_mail.tpl'); - $atom = ''; - - - $birthday = feed_birthday($owner['uid'],$owner['timezone']); - - if(strlen($birthday)) - $birthday = '' . xmlify($birthday) . ''; - - $atom .= replace_macros($feed_template, array( - '$version' => xmlify(FRIENDICA_VERSION), - '$feed_id' => xmlify($a->get_baseurl() . '/profile/' . $owner['nickname'] ), - '$feed_title' => xmlify($owner['name']), - '$feed_updated' => xmlify(datetime_convert('UTC', 'UTC', $updated . '+00:00' , ATOM_TIME)) , - '$hub' => $hubxml, - '$salmon' => '', // private feed, we don't use salmon here - '$name' => xmlify($owner['name']), - '$profile_page' => xmlify($owner['url']), - '$photo' => xmlify($owner['photo']), - '$thumb' => xmlify($owner['thumb']), - '$picdate' => xmlify(datetime_convert('UTC','UTC',$owner['avatar-date'] . '+00:00' , ATOM_TIME)) , - '$uridate' => xmlify(datetime_convert('UTC','UTC',$owner['uri-date'] . '+00:00' , ATOM_TIME)) , - '$namdate' => xmlify(datetime_convert('UTC','UTC',$owner['name-date'] . '+00:00' , ATOM_TIME)) , - '$birthday' => $birthday, - '$community' => (($owner['page-flags'] == PAGE_COMMUNITY) ? '1' : '') - )); - - if($mail) { - $public_message = false; // mail is not public - - $body = fix_private_photos($item['body'],$owner['uid'],null,$message[0]['contact-id']); - - $atom .= replace_macros($mail_template, array( - '$name' => xmlify($owner['name']), - '$profile_page' => xmlify($owner['url']), - '$thumb' => xmlify($owner['thumb']), - '$item_id' => xmlify($item['uri']), - '$subject' => xmlify($item['title']), - '$created' => xmlify(datetime_convert('UTC', 'UTC', $item['created'] . '+00:00' , ATOM_TIME)), - '$content' => xmlify($body), - '$parent_id' => xmlify($item['parent-uri']) - )); - } elseif($fsuggest) { - $public_message = false; // suggestions are not public - - $sugg_template = get_markup_template('atom_suggest.tpl'); - - $atom .= replace_macros($sugg_template, array( - '$name' => xmlify($item['name']), - '$url' => xmlify($item['url']), - '$photo' => xmlify($item['photo']), - '$request' => xmlify($item['request']), - '$note' => xmlify($item['note']) - )); - - // We don't need this any more - - q("DELETE FROM `fsuggest` WHERE `id` = %d LIMIT 1", - intval($item['id']) - ); - } elseif($relocate) { - $public_message = false; // suggestions are not public - - $sugg_template = get_markup_template('atom_relocate.tpl'); - - // get site pubkey. this could be a new installation with no site keys - $pubkey = get_config('system','site_pubkey'); - if(! $pubkey) { - $res = new_keypair(1024); - set_config('system','site_prvkey', $res['prvkey']); - set_config('system','site_pubkey', $res['pubkey']); - } - - $rp = q("SELECT `resource-id` , `scale`, type FROM `photo` - WHERE `profile` = 1 AND `uid` = %d ORDER BY scale;", $uid); - $photos = array(); - $ext = Photo::supportedTypes(); - foreach($rp as $p){ - $photos[$p['scale']] = $a->get_baseurl().'/photo/'.$p['resource-id'].'-'.$p['scale'].'.'.$ext[$p['type']]; - } - unset($rp, $ext); - - $atom .= replace_macros($sugg_template, array( - '$name' => xmlify($owner['name']), - '$photo' => xmlify($photos[4]), - '$thumb' => xmlify($photos[5]), - '$micro' => xmlify($photos[6]), - '$url' => xmlify($owner['url']), - '$request' => xmlify($owner['request']), - '$confirm' => xmlify($owner['confirm']), - '$notify' => xmlify($owner['notify']), - '$poll' => xmlify($owner['poll']), - '$sitepubkey' => xmlify(get_config('system','site_pubkey')), - //'$pubkey' => xmlify($owner['pubkey']), - //'$prvkey' => xmlify($owner['prvkey']), - )); - unset($photos); - } elseif($followup) { - foreach($items as $item) { // there is only one item - if(! $item['parent']) - continue; - if($item['id'] == $item_id) { - logger('followup: item: ' . print_r($item,true), LOGGER_DATA); - $atom .= atom_entry($item,'text',null,$owner,false); - } - } - } else { - foreach($items as $item) { - if(! $item['parent']) - continue; - - // private emails may be in included in public conversations. Filter them. - if(($public_message) && $item['private'] == 1) - continue; - - $item_contact = get_item_contact($item,$icontacts); - if(! $item_contact) - continue; - - if($normal_mode) { - if($item_id == $item['id'] || $item['id'] == $item['parent']) - $atom .= atom_entry($item,'text',null,$owner,true,(($top_level) ? $contact['id'] : 0)); - } else - $atom .= atom_entry($item,'text',null,$owner,true); - } - } - - $atom .= '' . "\r\n"; -*/ logger('notifier entry: '.$contact["url"].' '.$target_item["guid"].' entry: '.$atom, LOGGER_DEBUG); logger('notifier: ' . $atom, LOGGER_DATA); diff --git a/mod/dfrn_poll.php b/mod/dfrn_poll.php index e6ebc5d519..658a248c62 100644 --- a/mod/dfrn_poll.php +++ b/mod/dfrn_poll.php @@ -44,7 +44,6 @@ function dfrn_poll_init(&$a) { logger('dfrn_poll: public feed request from ' . $_SERVER['REMOTE_ADDR'] . ' for ' . $user); header("Content-type: application/atom+xml"); - //echo get_feed_for($a, '', $user,$last_update); echo dfrn_feed($a, '', $user,$last_update); killme(); } @@ -372,7 +371,6 @@ function dfrn_poll_post(&$a) { } header("Content-type: application/atom+xml"); - //$o = get_feed_for($a,$dfrn_id, $a->argv[1], $last_update, $direction); $o = dfrn_feed($a,$dfrn_id, $a->argv[1], $last_update, $direction); echo $o; killme(); From 275f7b26604af74aa57f7a4a758735e6bc2ab928 Mon Sep 17 00:00:00 2001 From: Michael Vogel Date: Sun, 24 Jan 2016 02:53:21 +0100 Subject: [PATCH 110/242] The worker now kills processes that run longer than 3 hours --- include/poller.php | 41 ++++++++++++++++++++++++++++++----------- 1 file changed, 30 insertions(+), 11 deletions(-) diff --git a/include/poller.php b/include/poller.php index c681bfb389..190f3fb1ad 100644 --- a/include/poller.php +++ b/include/poller.php @@ -39,8 +39,10 @@ function poller_run(&$argv, &$argc){ } // Checking the number of workers - if (poller_too_much_workers(1)) + if (poller_too_much_workers(1)) { + poller_kill_stale_workers(); return; + } if(($argc <= 1) OR ($argv[1] != "no_cron")) { // Run the cron job that calls all other jobs @@ -50,16 +52,7 @@ function poller_run(&$argv, &$argc){ proc_run("php","include/cronhooks.php"); // Cleaning dead processes - $r = q("SELECT DISTINCT(`pid`) FROM `workerqueue` WHERE `executed` != '0000-00-00 00:00:00'"); - foreach($r AS $pid) - if (!posix_kill($pid["pid"], 0)) - q("UPDATE `workerqueue` SET `executed` = '0000-00-00 00:00:00', `pid` = 0 WHERE `pid` = %d", - intval($pid["pid"])); - else { - /// @TODO Kill long running processes - /// But: Update processes (like the database update) mustn't be killed - } - + poller_kill_stale_workers(); } else // Sleep four seconds before checking for running processes again to avoid having too many workers sleep(4); @@ -124,6 +117,32 @@ function poller_run(&$argv, &$argc){ } +/** + * @brief fix the queue entry if the worker process died + * + */ +function poller_kill_stale_workers() { + $r = q("SELECT `pid`, `executed` FROM `workerqueue` WHERE `executed` != '0000-00-00 00:00:00'"); + foreach($r AS $pid) + if (!posix_kill($pid["pid"], 0)) + q("UPDATE `workerqueue` SET `executed` = '0000-00-00 00:00:00', `pid` = 0 WHERE `pid` = %d", + intval($pid["pid"])); + else { + // Kill long running processes + $duration = (time() - strtotime($pid["executed"])) / 60; + if ($duration > 180) { + logger("Worker process ".$pid["pid"]." took more than 3 hours. It will be killed now."); + posix_kill($pid["pid"], SIGTERM); + + // Question: If a process is stale: Should we remove it or should we reschedule it? + // By now we rescheduling it. It's maybe not the wisest decision? + q("UPDATE `workerqueue` SET `executed` = '0000-00-00 00:00:00', `pid` = 0 WHERE `pid` = %d", + intval($pid["pid"])); + } else + logger("Worker process ".$pid["pid"]." now runs for ".round($duration)." minutes. That's okay.", LOGGER_DEBUG); + } +} + function poller_too_much_workers($stage) { $queues = get_config("system", "worker_queues"); From 3108406c9f325d5569f8ac7a26319a7e6c2dce13 Mon Sep 17 00:00:00 2001 From: Tobias Diekershoff Date: Sun, 24 Jan 2016 06:52:09 +0100 Subject: [PATCH 111/242] Update to the strings --- util/messages.po | 631 ++++++++++++++++++++++++----------------------- 1 file changed, 316 insertions(+), 315 deletions(-) diff --git a/util/messages.po b/util/messages.po index 498a5bc5bc..46a9913f45 100644 --- a/util/messages.po +++ b/util/messages.po @@ -8,7 +8,7 @@ msgid "" msgstr "" "Project-Id-Version: \n" "Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2016-01-20 17:52+0100\n" +"POT-Creation-Date: 2016-01-24 06:49+0100\n" "PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n" "Last-Translator: FULL NAME \n" "Language-Team: LANGUAGE \n" @@ -70,7 +70,7 @@ msgstr "" #: mod/api.php:31 mod/notes.php:22 mod/poke.php:149 mod/repair_ostatus.php:9 #: mod/invite.php:15 mod/invite.php:101 mod/photos.php:171 mod/photos.php:1105 #: mod/regmod.php:110 mod/uimport.php:23 mod/attach.php:33 -#: include/items.php:5077 index.php:383 +#: include/items.php:5096 index.php:383 msgid "Permission denied." msgstr "" @@ -109,7 +109,7 @@ msgstr "" #: mod/settings.php:1171 mod/settings.php:1172 mod/settings.php:1173 #: mod/settings.php:1174 mod/dfrn_request.php:857 mod/register.php:238 #: mod/suggest.php:29 mod/profiles.php:658 mod/profiles.php:661 -#: mod/profiles.php:687 mod/api.php:105 include/items.php:4909 +#: mod/profiles.php:687 mod/api.php:105 include/items.php:4928 msgid "Yes" msgstr "" @@ -118,7 +118,7 @@ msgstr "" #: mod/fbrowser.php:128 mod/settings.php:660 mod/settings.php:686 #: mod/dfrn_request.php:871 mod/suggest.php:32 mod/editpost.php:148 #: mod/photos.php:247 mod/photos.php:336 include/conversation.php:1220 -#: include/items.php:4912 +#: include/items.php:4931 msgid "Cancel" msgstr "" @@ -145,7 +145,7 @@ msgstr "" msgid "Private communications are not available for this contact." msgstr "" -#: mod/contacts.php:544 mod/admin.php:820 +#: mod/contacts.php:544 mod/admin.php:822 msgid "Never" msgstr "" @@ -174,7 +174,7 @@ msgstr "" msgid "Fetch further information for feeds" msgstr "" -#: mod/contacts.php:571 mod/admin.php:829 +#: mod/contacts.php:571 mod/admin.php:831 msgid "Disabled" msgstr "" @@ -265,12 +265,12 @@ msgid "Connect/Follow" msgstr "" #: mod/contacts.php:615 mod/contacts.php:806 mod/contacts.php:865 -#: mod/admin.php:1310 +#: mod/admin.php:1312 msgid "Unblock" msgstr "" #: mod/contacts.php:615 mod/contacts.php:806 mod/contacts.php:865 -#: mod/admin.php:1309 +#: mod/admin.php:1311 msgid "Block" msgstr "" @@ -428,7 +428,7 @@ msgstr "" msgid "Unarchive" msgstr "" -#: mod/contacts.php:809 mod/group.php:171 mod/admin.php:1308 +#: mod/contacts.php:809 mod/group.php:171 mod/admin.php:1310 #: mod/content.php:440 mod/content.php:743 mod/settings.php:722 #: mod/photos.php:1723 object/Item.php:134 include/conversation.php:635 msgid "Delete" @@ -547,8 +547,8 @@ msgid "All Contacts (with secure profile access)" msgstr "" #: mod/display.php:82 mod/display.php:291 mod/display.php:513 -#: mod/viewsrc.php:15 mod/admin.php:234 mod/admin.php:1363 mod/admin.php:1597 -#: mod/notice.php:15 include/items.php:4868 +#: mod/viewsrc.php:15 mod/admin.php:234 mod/admin.php:1365 mod/admin.php:1599 +#: mod/notice.php:15 include/items.php:4887 msgid "Item not found." msgstr "" @@ -597,7 +597,7 @@ msgid "" "join." msgstr "" -#: mod/newmember.php:22 mod/admin.php:1416 mod/admin.php:1674 +#: mod/newmember.php:22 mod/admin.php:1418 mod/admin.php:1676 #: mod/settings.php:109 include/nav.php:182 view/theme/diabook/theme.php:544 #: view/theme/diabook/theme.php:648 msgid "Settings" @@ -842,15 +842,15 @@ msgstr "" #: mod/subthread.php:87 mod/tagger.php:62 include/like.php:165 #: include/conversation.php:130 include/conversation.php:266 -#: include/text.php:2000 include/diaspora.php:2151 +#: include/text.php:2000 include/diaspora.php:2169 #: view/theme/diabook/theme.php:471 msgid "photo" msgstr "" #: mod/subthread.php:87 mod/tagger.php:62 include/like.php:165 -#: include/like.php:325 include/conversation.php:125 +#: include/like.php:334 include/conversation.php:125 #: include/conversation.php:134 include/conversation.php:261 -#: include/conversation.php:270 include/diaspora.php:2151 +#: include/conversation.php:270 include/diaspora.php:2169 #: view/theme/diabook/theme.php:466 view/theme/diabook/theme.php:475 msgid "status" msgstr "" @@ -1161,7 +1161,7 @@ msgstr "" msgid "Unable to update your contact profile details on our system" msgstr "" -#: mod/dfrn_confirm.php:753 mod/dfrn_request.php:741 include/items.php:4280 +#: mod/dfrn_confirm.php:753 mod/dfrn_request.php:741 include/items.php:4299 msgid "[Name Withheld]" msgstr "" @@ -1392,7 +1392,7 @@ msgstr "" msgid "System" msgstr "" -#: mod/notifications.php:87 mod/admin.php:388 include/nav.php:154 +#: mod/notifications.php:87 mod/admin.php:390 include/nav.php:154 msgid "Network" msgstr "" @@ -1438,7 +1438,7 @@ msgstr "" msgid "if applicable" msgstr "" -#: mod/notifications.php:176 mod/notifications.php:257 mod/admin.php:1306 +#: mod/notifications.php:176 mod/notifications.php:257 mod/admin.php:1308 msgid "Approve" msgstr "" @@ -1795,8 +1795,8 @@ msgstr "" msgid "Refetch contact data" msgstr "" -#: mod/crepair.php:170 mod/admin.php:1304 mod/admin.php:1316 mod/admin.php:1317 -#: mod/admin.php:1330 mod/settings.php:661 mod/settings.php:687 +#: mod/crepair.php:170 mod/admin.php:1306 mod/admin.php:1318 mod/admin.php:1319 +#: mod/admin.php:1332 mod/settings.php:661 mod/settings.php:687 msgid "Name" msgstr "" @@ -1902,19 +1902,19 @@ msgstr "" msgid "Theme settings updated." msgstr "" -#: mod/admin.php:156 mod/admin.php:886 +#: mod/admin.php:156 mod/admin.php:888 msgid "Site" msgstr "" -#: mod/admin.php:157 mod/admin.php:830 mod/admin.php:1299 mod/admin.php:1314 +#: mod/admin.php:157 mod/admin.php:832 mod/admin.php:1301 mod/admin.php:1316 msgid "Users" msgstr "" -#: mod/admin.php:158 mod/admin.php:1414 mod/admin.php:1474 mod/settings.php:72 +#: mod/admin.php:158 mod/admin.php:1416 mod/admin.php:1476 mod/settings.php:72 msgid "Plugins" msgstr "" -#: mod/admin.php:159 mod/admin.php:1672 mod/admin.php:1722 +#: mod/admin.php:159 mod/admin.php:1674 mod/admin.php:1724 msgid "Themes" msgstr "" @@ -1926,19 +1926,19 @@ msgstr "" msgid "DB updates" msgstr "" -#: mod/admin.php:162 mod/admin.php:383 +#: mod/admin.php:162 mod/admin.php:385 msgid "Inspect Queue" msgstr "" -#: mod/admin.php:163 mod/admin.php:352 +#: mod/admin.php:163 mod/admin.php:354 msgid "Federation Statistics" msgstr "" -#: mod/admin.php:177 mod/admin.php:188 mod/admin.php:1790 +#: mod/admin.php:177 mod/admin.php:188 mod/admin.php:1792 msgid "Logs" msgstr "" -#: mod/admin.php:178 mod/admin.php:1857 +#: mod/admin.php:178 mod/admin.php:1859 msgid "View Logs" msgstr "" @@ -1966,738 +1966,739 @@ msgstr "" msgid "User registrations waiting for confirmation" msgstr "" -#: mod/admin.php:345 +#: mod/admin.php:347 msgid "" "This page offers you some numbers to the known part of the federated social " "network your Friendica node is part of. These numbers are not complete but " "only reflect the part of the network your node is aware of." msgstr "" -#: mod/admin.php:346 +#: mod/admin.php:348 msgid "" "The Auto Discovered Contact Directory feature is not enabled, it " "will improve the data displayed here." msgstr "" -#: mod/admin.php:351 mod/admin.php:382 mod/admin.php:439 mod/admin.php:885 -#: mod/admin.php:1298 mod/admin.php:1413 mod/admin.php:1473 mod/admin.php:1671 -#: mod/admin.php:1721 mod/admin.php:1789 mod/admin.php:1856 +#: mod/admin.php:353 mod/admin.php:384 mod/admin.php:441 mod/admin.php:887 +#: mod/admin.php:1300 mod/admin.php:1415 mod/admin.php:1475 mod/admin.php:1673 +#: mod/admin.php:1723 mod/admin.php:1791 mod/admin.php:1858 msgid "Administration" msgstr "" -#: mod/admin.php:358 -msgid "Currently this node is aware of nodes from the following platforms:" -msgstr "" - -#: mod/admin.php:385 -msgid "ID" -msgstr "" - -#: mod/admin.php:386 -msgid "Recipient Name" +#: mod/admin.php:360 +#, php-format +msgid "Currently this node is aware of %d nodes from the following platforms:" msgstr "" #: mod/admin.php:387 -msgid "Recipient Profile" +msgid "ID" +msgstr "" + +#: mod/admin.php:388 +msgid "Recipient Name" msgstr "" #: mod/admin.php:389 -msgid "Created" -msgstr "" - -#: mod/admin.php:390 -msgid "Last Tried" +msgid "Recipient Profile" msgstr "" #: mod/admin.php:391 +msgid "Created" +msgstr "" + +#: mod/admin.php:392 +msgid "Last Tried" +msgstr "" + +#: mod/admin.php:393 msgid "" "This page lists the content of the queue for outgoing postings. These are " "postings the initial delivery failed for. They will be resend later and " "eventually deleted if the delivery fails permanently." msgstr "" -#: mod/admin.php:410 mod/admin.php:1252 +#: mod/admin.php:412 mod/admin.php:1254 msgid "Normal Account" msgstr "" -#: mod/admin.php:411 mod/admin.php:1253 +#: mod/admin.php:413 mod/admin.php:1255 msgid "Soapbox Account" msgstr "" -#: mod/admin.php:412 mod/admin.php:1254 +#: mod/admin.php:414 mod/admin.php:1256 msgid "Community/Celebrity Account" msgstr "" -#: mod/admin.php:413 mod/admin.php:1255 +#: mod/admin.php:415 mod/admin.php:1257 msgid "Automatic Friend Account" msgstr "" -#: mod/admin.php:414 +#: mod/admin.php:416 msgid "Blog Account" msgstr "" -#: mod/admin.php:415 +#: mod/admin.php:417 msgid "Private Forum" msgstr "" -#: mod/admin.php:434 +#: mod/admin.php:436 msgid "Message queues" msgstr "" -#: mod/admin.php:440 +#: mod/admin.php:442 msgid "Summary" msgstr "" -#: mod/admin.php:442 +#: mod/admin.php:444 msgid "Registered users" msgstr "" -#: mod/admin.php:444 +#: mod/admin.php:446 msgid "Pending registrations" msgstr "" -#: mod/admin.php:445 +#: mod/admin.php:447 msgid "Version" msgstr "" -#: mod/admin.php:450 +#: mod/admin.php:452 msgid "Active plugins" msgstr "" -#: mod/admin.php:473 +#: mod/admin.php:475 msgid "Can not parse base url. Must have at least ://" msgstr "" -#: mod/admin.php:758 +#: mod/admin.php:760 msgid "RINO2 needs mcrypt php extension to work." msgstr "" -#: mod/admin.php:766 +#: mod/admin.php:768 msgid "Site settings updated." msgstr "" -#: mod/admin.php:794 mod/settings.php:912 +#: mod/admin.php:796 mod/settings.php:912 msgid "No special theme for mobile devices" msgstr "" -#: mod/admin.php:813 +#: mod/admin.php:815 msgid "No community page" msgstr "" -#: mod/admin.php:814 +#: mod/admin.php:816 msgid "Public postings from users of this site" msgstr "" -#: mod/admin.php:815 +#: mod/admin.php:817 msgid "Global community page" msgstr "" -#: mod/admin.php:821 +#: mod/admin.php:823 msgid "At post arrival" msgstr "" -#: mod/admin.php:822 include/contact_selectors.php:56 +#: mod/admin.php:824 include/contact_selectors.php:56 msgid "Frequently" msgstr "" -#: mod/admin.php:823 include/contact_selectors.php:57 +#: mod/admin.php:825 include/contact_selectors.php:57 msgid "Hourly" msgstr "" -#: mod/admin.php:824 include/contact_selectors.php:58 +#: mod/admin.php:826 include/contact_selectors.php:58 msgid "Twice daily" msgstr "" -#: mod/admin.php:825 include/contact_selectors.php:59 +#: mod/admin.php:827 include/contact_selectors.php:59 msgid "Daily" msgstr "" -#: mod/admin.php:831 +#: mod/admin.php:833 msgid "Users, Global Contacts" msgstr "" -#: mod/admin.php:832 +#: mod/admin.php:834 msgid "Users, Global Contacts/fallback" msgstr "" -#: mod/admin.php:836 +#: mod/admin.php:838 msgid "One month" msgstr "" -#: mod/admin.php:837 +#: mod/admin.php:839 msgid "Three months" msgstr "" -#: mod/admin.php:838 +#: mod/admin.php:840 msgid "Half a year" msgstr "" -#: mod/admin.php:839 +#: mod/admin.php:841 msgid "One year" msgstr "" -#: mod/admin.php:844 +#: mod/admin.php:846 msgid "Multi user instance" msgstr "" -#: mod/admin.php:867 +#: mod/admin.php:869 msgid "Closed" msgstr "" -#: mod/admin.php:868 +#: mod/admin.php:870 msgid "Requires approval" msgstr "" -#: mod/admin.php:869 +#: mod/admin.php:871 msgid "Open" msgstr "" -#: mod/admin.php:873 +#: mod/admin.php:875 msgid "No SSL policy, links will track page SSL state" msgstr "" -#: mod/admin.php:874 +#: mod/admin.php:876 msgid "Force all links to use SSL" msgstr "" -#: mod/admin.php:875 +#: mod/admin.php:877 msgid "Self-signed certificate, use SSL for local links only (discouraged)" msgstr "" -#: mod/admin.php:887 mod/admin.php:1475 mod/admin.php:1723 mod/admin.php:1791 -#: mod/admin.php:1940 mod/settings.php:659 mod/settings.php:769 +#: mod/admin.php:889 mod/admin.php:1477 mod/admin.php:1725 mod/admin.php:1793 +#: mod/admin.php:1942 mod/settings.php:659 mod/settings.php:769 #: mod/settings.php:813 mod/settings.php:882 mod/settings.php:969 #: mod/settings.php:1204 msgid "Save Settings" msgstr "" -#: mod/admin.php:888 mod/register.php:263 +#: mod/admin.php:890 mod/register.php:263 msgid "Registration" msgstr "" -#: mod/admin.php:889 +#: mod/admin.php:891 msgid "File upload" msgstr "" -#: mod/admin.php:890 +#: mod/admin.php:892 msgid "Policies" msgstr "" -#: mod/admin.php:891 +#: mod/admin.php:893 msgid "Advanced" msgstr "" -#: mod/admin.php:892 +#: mod/admin.php:894 msgid "Auto Discovered Contact Directory" msgstr "" -#: mod/admin.php:893 +#: mod/admin.php:895 msgid "Performance" msgstr "" -#: mod/admin.php:894 +#: mod/admin.php:896 msgid "" "Relocate - WARNING: advanced function. Could make this server unreachable." msgstr "" -#: mod/admin.php:897 +#: mod/admin.php:899 msgid "Site name" msgstr "" -#: mod/admin.php:898 +#: mod/admin.php:900 msgid "Host name" msgstr "" -#: mod/admin.php:899 +#: mod/admin.php:901 msgid "Sender Email" msgstr "" -#: mod/admin.php:899 +#: mod/admin.php:901 msgid "" "The email address your server shall use to send notification emails from." msgstr "" -#: mod/admin.php:900 +#: mod/admin.php:902 msgid "Banner/Logo" msgstr "" -#: mod/admin.php:901 +#: mod/admin.php:903 msgid "Shortcut icon" msgstr "" -#: mod/admin.php:901 +#: mod/admin.php:903 msgid "Link to an icon that will be used for browsers." msgstr "" -#: mod/admin.php:902 +#: mod/admin.php:904 msgid "Touch icon" msgstr "" -#: mod/admin.php:902 +#: mod/admin.php:904 msgid "Link to an icon that will be used for tablets and mobiles." msgstr "" -#: mod/admin.php:903 +#: mod/admin.php:905 msgid "Additional Info" msgstr "" -#: mod/admin.php:903 +#: mod/admin.php:905 #, php-format msgid "" "For public servers: you can add additional information here that will be " "listed at %s/siteinfo." msgstr "" -#: mod/admin.php:904 +#: mod/admin.php:906 msgid "System language" msgstr "" -#: mod/admin.php:905 +#: mod/admin.php:907 msgid "System theme" msgstr "" -#: mod/admin.php:905 +#: mod/admin.php:907 msgid "" "Default system theme - may be over-ridden by user profiles - change theme settings" msgstr "" -#: mod/admin.php:906 +#: mod/admin.php:908 msgid "Mobile system theme" msgstr "" -#: mod/admin.php:906 +#: mod/admin.php:908 msgid "Theme for mobile devices" msgstr "" -#: mod/admin.php:907 +#: mod/admin.php:909 msgid "SSL link policy" msgstr "" -#: mod/admin.php:907 +#: mod/admin.php:909 msgid "Determines whether generated links should be forced to use SSL" msgstr "" -#: mod/admin.php:908 +#: mod/admin.php:910 msgid "Force SSL" msgstr "" -#: mod/admin.php:908 +#: mod/admin.php:910 msgid "" "Force all Non-SSL requests to SSL - Attention: on some systems it could lead " "to endless loops." msgstr "" -#: mod/admin.php:909 +#: mod/admin.php:911 msgid "Old style 'Share'" msgstr "" -#: mod/admin.php:909 +#: mod/admin.php:911 msgid "Deactivates the bbcode element 'share' for repeating items." msgstr "" -#: mod/admin.php:910 +#: mod/admin.php:912 msgid "Hide help entry from navigation menu" msgstr "" -#: mod/admin.php:910 +#: mod/admin.php:912 msgid "" "Hides the menu entry for the Help pages from the navigation menu. You can " "still access it calling /help directly." msgstr "" -#: mod/admin.php:911 +#: mod/admin.php:913 msgid "Single user instance" msgstr "" -#: mod/admin.php:911 +#: mod/admin.php:913 msgid "Make this instance multi-user or single-user for the named user" msgstr "" -#: mod/admin.php:912 +#: mod/admin.php:914 msgid "Maximum image size" msgstr "" -#: mod/admin.php:912 +#: mod/admin.php:914 msgid "" "Maximum size in bytes of uploaded images. Default is 0, which means no " "limits." msgstr "" -#: mod/admin.php:913 +#: mod/admin.php:915 msgid "Maximum image length" msgstr "" -#: mod/admin.php:913 +#: mod/admin.php:915 msgid "" "Maximum length in pixels of the longest side of uploaded images. Default is " "-1, which means no limits." msgstr "" -#: mod/admin.php:914 +#: mod/admin.php:916 msgid "JPEG image quality" msgstr "" -#: mod/admin.php:914 +#: mod/admin.php:916 msgid "" "Uploaded JPEGS will be saved at this quality setting [0-100]. Default is " "100, which is full quality." msgstr "" -#: mod/admin.php:916 +#: mod/admin.php:918 msgid "Register policy" msgstr "" -#: mod/admin.php:917 +#: mod/admin.php:919 msgid "Maximum Daily Registrations" msgstr "" -#: mod/admin.php:917 +#: mod/admin.php:919 msgid "" "If registration is permitted above, this sets the maximum number of new user " "registrations to accept per day. If register is set to closed, this setting " "has no effect." msgstr "" -#: mod/admin.php:918 +#: mod/admin.php:920 msgid "Register text" msgstr "" -#: mod/admin.php:918 +#: mod/admin.php:920 msgid "Will be displayed prominently on the registration page." msgstr "" -#: mod/admin.php:919 +#: mod/admin.php:921 msgid "Accounts abandoned after x days" msgstr "" -#: mod/admin.php:919 +#: mod/admin.php:921 msgid "" "Will not waste system resources polling external sites for abandonded " "accounts. Enter 0 for no time limit." msgstr "" -#: mod/admin.php:920 +#: mod/admin.php:922 msgid "Allowed friend domains" msgstr "" -#: mod/admin.php:920 +#: mod/admin.php:922 msgid "" "Comma separated list of domains which are allowed to establish friendships " "with this site. Wildcards are accepted. Empty to allow any domains" msgstr "" -#: mod/admin.php:921 +#: mod/admin.php:923 msgid "Allowed email domains" msgstr "" -#: mod/admin.php:921 +#: mod/admin.php:923 msgid "" "Comma separated list of domains which are allowed in email addresses for " "registrations to this site. Wildcards are accepted. Empty to allow any " "domains" msgstr "" -#: mod/admin.php:922 +#: mod/admin.php:924 msgid "Block public" msgstr "" -#: mod/admin.php:922 +#: mod/admin.php:924 msgid "" "Check to block public access to all otherwise public personal pages on this " "site unless you are currently logged in." msgstr "" -#: mod/admin.php:923 +#: mod/admin.php:925 msgid "Force publish" msgstr "" -#: mod/admin.php:923 +#: mod/admin.php:925 msgid "" "Check to force all profiles on this site to be listed in the site directory." msgstr "" -#: mod/admin.php:924 +#: mod/admin.php:926 msgid "Global directory URL" msgstr "" -#: mod/admin.php:924 +#: mod/admin.php:926 msgid "" "URL to the global directory. If this is not set, the global directory is " "completely unavailable to the application." msgstr "" -#: mod/admin.php:925 +#: mod/admin.php:927 msgid "Allow threaded items" msgstr "" -#: mod/admin.php:925 +#: mod/admin.php:927 msgid "Allow infinite level threading for items on this site." msgstr "" -#: mod/admin.php:926 +#: mod/admin.php:928 msgid "Private posts by default for new users" msgstr "" -#: mod/admin.php:926 +#: mod/admin.php:928 msgid "" "Set default post permissions for all new members to the default privacy " "group rather than public." msgstr "" -#: mod/admin.php:927 +#: mod/admin.php:929 msgid "Don't include post content in email notifications" msgstr "" -#: mod/admin.php:927 +#: mod/admin.php:929 msgid "" "Don't include the content of a post/comment/private message/etc. in the " "email notifications that are sent out from this site, as a privacy measure." msgstr "" -#: mod/admin.php:928 +#: mod/admin.php:930 msgid "Disallow public access to addons listed in the apps menu." msgstr "" -#: mod/admin.php:928 +#: mod/admin.php:930 msgid "" "Checking this box will restrict addons listed in the apps menu to members " "only." msgstr "" -#: mod/admin.php:929 +#: mod/admin.php:931 msgid "Don't embed private images in posts" msgstr "" -#: mod/admin.php:929 +#: mod/admin.php:931 msgid "" "Don't replace locally-hosted private photos in posts with an embedded copy " "of the image. This means that contacts who receive posts containing private " "photos will have to authenticate and load each image, which may take a while." msgstr "" -#: mod/admin.php:930 +#: mod/admin.php:932 msgid "Allow Users to set remote_self" msgstr "" -#: mod/admin.php:930 +#: mod/admin.php:932 msgid "" "With checking this, every user is allowed to mark every contact as a " "remote_self in the repair contact dialog. Setting this flag on a contact " "causes mirroring every posting of that contact in the users stream." msgstr "" -#: mod/admin.php:931 +#: mod/admin.php:933 msgid "Block multiple registrations" msgstr "" -#: mod/admin.php:931 +#: mod/admin.php:933 msgid "Disallow users to register additional accounts for use as pages." msgstr "" -#: mod/admin.php:932 +#: mod/admin.php:934 msgid "OpenID support" msgstr "" -#: mod/admin.php:932 +#: mod/admin.php:934 msgid "OpenID support for registration and logins." msgstr "" -#: mod/admin.php:933 +#: mod/admin.php:935 msgid "Fullname check" msgstr "" -#: mod/admin.php:933 +#: mod/admin.php:935 msgid "" "Force users to register with a space between firstname and lastname in Full " "name, as an antispam measure" msgstr "" -#: mod/admin.php:934 +#: mod/admin.php:936 msgid "UTF-8 Regular expressions" msgstr "" -#: mod/admin.php:934 +#: mod/admin.php:936 msgid "Use PHP UTF8 regular expressions" msgstr "" -#: mod/admin.php:935 +#: mod/admin.php:937 msgid "Community Page Style" msgstr "" -#: mod/admin.php:935 +#: mod/admin.php:937 msgid "" "Type of community page to show. 'Global community' shows every public " "posting from an open distributed network that arrived on this server." msgstr "" -#: mod/admin.php:936 +#: mod/admin.php:938 msgid "Posts per user on community page" msgstr "" -#: mod/admin.php:936 +#: mod/admin.php:938 msgid "" "The maximum number of posts per user on the community page. (Not valid for " "'Global Community')" msgstr "" -#: mod/admin.php:937 +#: mod/admin.php:939 msgid "Enable OStatus support" msgstr "" -#: mod/admin.php:937 +#: mod/admin.php:939 msgid "" "Provide built-in OStatus (StatusNet, GNU Social etc.) compatibility. All " "communications in OStatus are public, so privacy warnings will be " "occasionally displayed." msgstr "" -#: mod/admin.php:938 +#: mod/admin.php:940 msgid "OStatus conversation completion interval" msgstr "" -#: mod/admin.php:938 +#: mod/admin.php:940 msgid "" "How often shall the poller check for new entries in OStatus conversations? " "This can be a very ressource task." msgstr "" -#: mod/admin.php:939 +#: mod/admin.php:941 msgid "OStatus support can only be enabled if threading is enabled." msgstr "" -#: mod/admin.php:941 +#: mod/admin.php:943 msgid "" "Diaspora support can't be enabled because Friendica was installed into a sub " "directory." msgstr "" -#: mod/admin.php:942 +#: mod/admin.php:944 msgid "Enable Diaspora support" msgstr "" -#: mod/admin.php:942 +#: mod/admin.php:944 msgid "Provide built-in Diaspora network compatibility." msgstr "" -#: mod/admin.php:943 +#: mod/admin.php:945 msgid "Only allow Friendica contacts" msgstr "" -#: mod/admin.php:943 +#: mod/admin.php:945 msgid "" "All contacts must use Friendica protocols. All other built-in communication " "protocols disabled." msgstr "" -#: mod/admin.php:944 +#: mod/admin.php:946 msgid "Verify SSL" msgstr "" -#: mod/admin.php:944 +#: mod/admin.php:946 msgid "" "If you wish, you can turn on strict certificate checking. This will mean you " "cannot connect (at all) to self-signed SSL sites." msgstr "" -#: mod/admin.php:945 +#: mod/admin.php:947 msgid "Proxy user" msgstr "" -#: mod/admin.php:946 +#: mod/admin.php:948 msgid "Proxy URL" msgstr "" -#: mod/admin.php:947 +#: mod/admin.php:949 msgid "Network timeout" msgstr "" -#: mod/admin.php:947 +#: mod/admin.php:949 msgid "Value is in seconds. Set to 0 for unlimited (not recommended)." msgstr "" -#: mod/admin.php:948 +#: mod/admin.php:950 msgid "Delivery interval" msgstr "" -#: mod/admin.php:948 +#: mod/admin.php:950 msgid "" "Delay background delivery processes by this many seconds to reduce system " "load. Recommend: 4-5 for shared hosts, 2-3 for virtual private servers. 0-1 " "for large dedicated servers." msgstr "" -#: mod/admin.php:949 +#: mod/admin.php:951 msgid "Poll interval" msgstr "" -#: mod/admin.php:949 +#: mod/admin.php:951 msgid "" "Delay background polling processes by this many seconds to reduce system " "load. If 0, use delivery interval." msgstr "" -#: mod/admin.php:950 +#: mod/admin.php:952 msgid "Maximum Load Average" msgstr "" -#: mod/admin.php:950 +#: mod/admin.php:952 msgid "" "Maximum system load before delivery and poll processes are deferred - " "default 50." msgstr "" -#: mod/admin.php:951 +#: mod/admin.php:953 msgid "Maximum Load Average (Frontend)" msgstr "" -#: mod/admin.php:951 +#: mod/admin.php:953 msgid "Maximum system load before the frontend quits service - default 50." msgstr "" -#: mod/admin.php:952 +#: mod/admin.php:954 msgid "Maximum table size for optimization" msgstr "" -#: mod/admin.php:952 +#: mod/admin.php:954 msgid "" "Maximum table size (in MB) for the automatic optimization - default 100 MB. " "Enter -1 to disable it." msgstr "" -#: mod/admin.php:953 +#: mod/admin.php:955 msgid "Minimum level of fragmentation" msgstr "" -#: mod/admin.php:953 +#: mod/admin.php:955 msgid "" "Minimum fragmenation level to start the automatic optimization - default " "value is 30%." msgstr "" -#: mod/admin.php:955 +#: mod/admin.php:957 msgid "Periodical check of global contacts" msgstr "" -#: mod/admin.php:955 +#: mod/admin.php:957 msgid "" "If enabled, the global contacts are checked periodically for missing or " "outdated data and the vitality of the contacts and servers." msgstr "" -#: mod/admin.php:956 +#: mod/admin.php:958 msgid "Days between requery" msgstr "" -#: mod/admin.php:956 +#: mod/admin.php:958 msgid "Number of days after which a server is requeried for his contacts." msgstr "" -#: mod/admin.php:957 +#: mod/admin.php:959 msgid "Discover contacts from other servers" msgstr "" -#: mod/admin.php:957 +#: mod/admin.php:959 msgid "" "Periodically query other servers for contacts. You can choose between " "'users': the users on the remote system, 'Global Contacts': active contacts " @@ -2707,32 +2708,32 @@ msgid "" "Global Contacts'." msgstr "" -#: mod/admin.php:958 +#: mod/admin.php:960 msgid "Timeframe for fetching global contacts" msgstr "" -#: mod/admin.php:958 +#: mod/admin.php:960 msgid "" "When the discovery is activated, this value defines the timeframe for the " "activity of the global contacts that are fetched from other servers." msgstr "" -#: mod/admin.php:959 +#: mod/admin.php:961 msgid "Search the local directory" msgstr "" -#: mod/admin.php:959 +#: mod/admin.php:961 msgid "" "Search the local directory instead of the global directory. When searching " "locally, every search will be executed on the global directory in the " "background. This improves the search results when the search is repeated." msgstr "" -#: mod/admin.php:961 +#: mod/admin.php:963 msgid "Publish server information" msgstr "" -#: mod/admin.php:961 +#: mod/admin.php:963 msgid "" "If enabled, general server and usage data will be published. The data " "contains the name and version of the server, number of users with public " @@ -2740,204 +2741,204 @@ msgid "" "href='http://the-federation.info/'>the-federation.info for details." msgstr "" -#: mod/admin.php:963 +#: mod/admin.php:965 msgid "Use MySQL full text engine" msgstr "" -#: mod/admin.php:963 +#: mod/admin.php:965 msgid "" "Activates the full text engine. Speeds up search - but can only search for " "four and more characters." msgstr "" -#: mod/admin.php:964 +#: mod/admin.php:966 msgid "Suppress Language" msgstr "" -#: mod/admin.php:964 +#: mod/admin.php:966 msgid "Suppress language information in meta information about a posting." msgstr "" -#: mod/admin.php:965 +#: mod/admin.php:967 msgid "Suppress Tags" msgstr "" -#: mod/admin.php:965 +#: mod/admin.php:967 msgid "Suppress showing a list of hashtags at the end of the posting." msgstr "" -#: mod/admin.php:966 +#: mod/admin.php:968 msgid "Path to item cache" msgstr "" -#: mod/admin.php:966 +#: mod/admin.php:968 msgid "The item caches buffers generated bbcode and external images." msgstr "" -#: mod/admin.php:967 +#: mod/admin.php:969 msgid "Cache duration in seconds" msgstr "" -#: mod/admin.php:967 +#: mod/admin.php:969 msgid "" "How long should the cache files be hold? Default value is 86400 seconds (One " "day). To disable the item cache, set the value to -1." msgstr "" -#: mod/admin.php:968 +#: mod/admin.php:970 msgid "Maximum numbers of comments per post" msgstr "" -#: mod/admin.php:968 +#: mod/admin.php:970 msgid "How much comments should be shown for each post? Default value is 100." msgstr "" -#: mod/admin.php:969 +#: mod/admin.php:971 msgid "Path for lock file" msgstr "" -#: mod/admin.php:969 +#: mod/admin.php:971 msgid "" "The lock file is used to avoid multiple pollers at one time. Only define a " "folder here." msgstr "" -#: mod/admin.php:970 +#: mod/admin.php:972 msgid "Temp path" msgstr "" -#: mod/admin.php:970 +#: mod/admin.php:972 msgid "" "If you have a restricted system where the webserver can't access the system " "temp path, enter another path here." msgstr "" -#: mod/admin.php:971 +#: mod/admin.php:973 msgid "Base path to installation" msgstr "" -#: mod/admin.php:971 +#: mod/admin.php:973 msgid "" "If the system cannot detect the correct path to your installation, enter the " "correct path here. This setting should only be set if you are using a " "restricted system and symbolic links to your webroot." msgstr "" -#: mod/admin.php:972 +#: mod/admin.php:974 msgid "Disable picture proxy" msgstr "" -#: mod/admin.php:972 +#: mod/admin.php:974 msgid "" "The picture proxy increases performance and privacy. It shouldn't be used on " "systems with very low bandwith." msgstr "" -#: mod/admin.php:973 +#: mod/admin.php:975 msgid "Enable old style pager" msgstr "" -#: mod/admin.php:973 +#: mod/admin.php:975 msgid "" "The old style pager has page numbers but slows down massively the page speed." msgstr "" -#: mod/admin.php:974 +#: mod/admin.php:976 msgid "Only search in tags" msgstr "" -#: mod/admin.php:974 +#: mod/admin.php:976 msgid "On large systems the text search can slow down the system extremely." msgstr "" -#: mod/admin.php:976 +#: mod/admin.php:978 msgid "New base url" msgstr "" -#: mod/admin.php:976 +#: mod/admin.php:978 msgid "" "Change base url for this server. Sends relocate message to all DFRN contacts " "of all users." msgstr "" -#: mod/admin.php:978 +#: mod/admin.php:980 msgid "RINO Encryption" msgstr "" -#: mod/admin.php:978 +#: mod/admin.php:980 msgid "Encryption layer between nodes." msgstr "" -#: mod/admin.php:979 +#: mod/admin.php:981 msgid "Embedly API key" msgstr "" -#: mod/admin.php:979 +#: mod/admin.php:981 msgid "" "Embedly is used to fetch additional data for " "web pages. This is an optional parameter." msgstr "" -#: mod/admin.php:1008 +#: mod/admin.php:1010 msgid "Update has been marked successful" msgstr "" -#: mod/admin.php:1016 +#: mod/admin.php:1018 #, php-format msgid "Database structure update %s was successfully applied." msgstr "" -#: mod/admin.php:1019 +#: mod/admin.php:1021 #, php-format msgid "Executing of database structure update %s failed with error: %s" msgstr "" -#: mod/admin.php:1031 +#: mod/admin.php:1033 #, php-format msgid "Executing %s failed with error: %s" msgstr "" -#: mod/admin.php:1034 +#: mod/admin.php:1036 #, php-format msgid "Update %s was successfully applied." msgstr "" -#: mod/admin.php:1038 +#: mod/admin.php:1040 #, php-format msgid "Update %s did not return a status. Unknown if it succeeded." msgstr "" -#: mod/admin.php:1040 +#: mod/admin.php:1042 #, php-format msgid "There was no additional update function %s that needed to be called." msgstr "" -#: mod/admin.php:1059 +#: mod/admin.php:1061 msgid "No failed updates." msgstr "" -#: mod/admin.php:1060 +#: mod/admin.php:1062 msgid "Check database structure" msgstr "" -#: mod/admin.php:1065 +#: mod/admin.php:1067 msgid "Failed Updates" msgstr "" -#: mod/admin.php:1066 +#: mod/admin.php:1068 msgid "" "This does not include updates prior to 1139, which did not return a status." msgstr "" -#: mod/admin.php:1067 +#: mod/admin.php:1069 msgid "Mark success (if update was manually applied)" msgstr "" -#: mod/admin.php:1068 +#: mod/admin.php:1070 msgid "Attempt to execute this update step automatically" msgstr "" -#: mod/admin.php:1100 +#: mod/admin.php:1102 #, php-format msgid "" "\n" @@ -2945,7 +2946,7 @@ msgid "" "\t\t\t\tthe administrator of %2$s has set up an account for you." msgstr "" -#: mod/admin.php:1103 +#: mod/admin.php:1105 #, php-format msgid "" "\n" @@ -2981,168 +2982,168 @@ msgid "" "\t\t\tThank you and welcome to %4$s." msgstr "" -#: mod/admin.php:1135 include/user.php:423 +#: mod/admin.php:1137 include/user.php:423 #, php-format msgid "Registration details for %s" msgstr "" -#: mod/admin.php:1147 +#: mod/admin.php:1149 #, php-format msgid "%s user blocked/unblocked" msgid_plural "%s users blocked/unblocked" msgstr[0] "" msgstr[1] "" -#: mod/admin.php:1154 +#: mod/admin.php:1156 #, php-format msgid "%s user deleted" msgid_plural "%s users deleted" msgstr[0] "" msgstr[1] "" -#: mod/admin.php:1201 +#: mod/admin.php:1203 #, php-format msgid "User '%s' deleted" msgstr "" -#: mod/admin.php:1209 +#: mod/admin.php:1211 #, php-format msgid "User '%s' unblocked" msgstr "" -#: mod/admin.php:1209 +#: mod/admin.php:1211 #, php-format msgid "User '%s' blocked" msgstr "" -#: mod/admin.php:1300 +#: mod/admin.php:1302 msgid "Add User" msgstr "" -#: mod/admin.php:1301 +#: mod/admin.php:1303 msgid "select all" msgstr "" -#: mod/admin.php:1302 +#: mod/admin.php:1304 msgid "User registrations waiting for confirm" msgstr "" -#: mod/admin.php:1303 +#: mod/admin.php:1305 msgid "User waiting for permanent deletion" msgstr "" -#: mod/admin.php:1304 +#: mod/admin.php:1306 msgid "Request date" msgstr "" -#: mod/admin.php:1304 mod/admin.php:1316 mod/admin.php:1317 mod/admin.php:1332 +#: mod/admin.php:1306 mod/admin.php:1318 mod/admin.php:1319 mod/admin.php:1334 #: include/contact_selectors.php:79 include/contact_selectors.php:86 msgid "Email" msgstr "" -#: mod/admin.php:1305 +#: mod/admin.php:1307 msgid "No registrations." msgstr "" -#: mod/admin.php:1307 +#: mod/admin.php:1309 msgid "Deny" msgstr "" -#: mod/admin.php:1311 +#: mod/admin.php:1313 msgid "Site admin" msgstr "" -#: mod/admin.php:1312 +#: mod/admin.php:1314 msgid "Account expired" msgstr "" -#: mod/admin.php:1315 +#: mod/admin.php:1317 msgid "New User" msgstr "" -#: mod/admin.php:1316 mod/admin.php:1317 +#: mod/admin.php:1318 mod/admin.php:1319 msgid "Register date" msgstr "" -#: mod/admin.php:1316 mod/admin.php:1317 +#: mod/admin.php:1318 mod/admin.php:1319 msgid "Last login" msgstr "" -#: mod/admin.php:1316 mod/admin.php:1317 +#: mod/admin.php:1318 mod/admin.php:1319 msgid "Last item" msgstr "" -#: mod/admin.php:1316 +#: mod/admin.php:1318 msgid "Deleted since" msgstr "" -#: mod/admin.php:1317 mod/settings.php:41 +#: mod/admin.php:1319 mod/settings.php:41 msgid "Account" msgstr "" -#: mod/admin.php:1319 +#: mod/admin.php:1321 msgid "" "Selected users will be deleted!\\n\\nEverything these users had posted on " "this site will be permanently deleted!\\n\\nAre you sure?" msgstr "" -#: mod/admin.php:1320 +#: mod/admin.php:1322 msgid "" "The user {0} will be deleted!\\n\\nEverything this user has posted on this " "site will be permanently deleted!\\n\\nAre you sure?" msgstr "" -#: mod/admin.php:1330 +#: mod/admin.php:1332 msgid "Name of the new user." msgstr "" -#: mod/admin.php:1331 +#: mod/admin.php:1333 msgid "Nickname" msgstr "" -#: mod/admin.php:1331 +#: mod/admin.php:1333 msgid "Nickname of the new user." msgstr "" -#: mod/admin.php:1332 +#: mod/admin.php:1334 msgid "Email address of the new user." msgstr "" -#: mod/admin.php:1375 +#: mod/admin.php:1377 #, php-format msgid "Plugin %s disabled." msgstr "" -#: mod/admin.php:1379 +#: mod/admin.php:1381 #, php-format msgid "Plugin %s enabled." msgstr "" -#: mod/admin.php:1390 mod/admin.php:1626 +#: mod/admin.php:1392 mod/admin.php:1628 msgid "Disable" msgstr "" -#: mod/admin.php:1392 mod/admin.php:1628 +#: mod/admin.php:1394 mod/admin.php:1630 msgid "Enable" msgstr "" -#: mod/admin.php:1415 mod/admin.php:1673 +#: mod/admin.php:1417 mod/admin.php:1675 msgid "Toggle" msgstr "" -#: mod/admin.php:1423 mod/admin.php:1682 +#: mod/admin.php:1425 mod/admin.php:1684 msgid "Author: " msgstr "" -#: mod/admin.php:1424 mod/admin.php:1683 +#: mod/admin.php:1426 mod/admin.php:1685 msgid "Maintainer: " msgstr "" -#: mod/admin.php:1476 +#: mod/admin.php:1478 msgid "Reload active plugins" msgstr "" -#: mod/admin.php:1481 +#: mod/admin.php:1483 #, php-format msgid "" "There are currently no plugins available on your node. You can find the " @@ -3150,62 +3151,62 @@ msgid "" "in the open plugin registry at %2$s" msgstr "" -#: mod/admin.php:1586 +#: mod/admin.php:1588 msgid "No themes found." msgstr "" -#: mod/admin.php:1664 +#: mod/admin.php:1666 msgid "Screenshot" msgstr "" -#: mod/admin.php:1724 +#: mod/admin.php:1726 msgid "Reload active themes" msgstr "" -#: mod/admin.php:1729 +#: mod/admin.php:1731 #, php-format msgid "No themes found on the system. They should be paced in %1$s" msgstr "" -#: mod/admin.php:1730 +#: mod/admin.php:1732 msgid "[Experimental]" msgstr "" -#: mod/admin.php:1731 +#: mod/admin.php:1733 msgid "[Unsupported]" msgstr "" -#: mod/admin.php:1755 +#: mod/admin.php:1757 msgid "Log settings updated." msgstr "" -#: mod/admin.php:1792 +#: mod/admin.php:1794 msgid "Clear" msgstr "" -#: mod/admin.php:1797 +#: mod/admin.php:1799 msgid "Enable Debugging" msgstr "" -#: mod/admin.php:1798 +#: mod/admin.php:1800 msgid "Log file" msgstr "" -#: mod/admin.php:1798 +#: mod/admin.php:1800 msgid "" "Must be writable by web server. Relative to your Friendica top-level " "directory." msgstr "" -#: mod/admin.php:1799 +#: mod/admin.php:1801 msgid "Log level" msgstr "" -#: mod/admin.php:1802 +#: mod/admin.php:1804 msgid "PHP logging" msgstr "" -#: mod/admin.php:1803 +#: mod/admin.php:1805 msgid "" "To enable logging of PHP errors and warnings you can add the following to " "the .htconfig.php file of your installation. The filename set in the " @@ -3214,20 +3215,20 @@ msgid "" "'display_errors' is to enable these options, set to '0' to disable them." msgstr "" -#: mod/admin.php:1929 mod/admin.php:1930 mod/settings.php:759 +#: mod/admin.php:1931 mod/admin.php:1932 mod/settings.php:759 msgid "Off" msgstr "" -#: mod/admin.php:1929 mod/admin.php:1930 mod/settings.php:759 +#: mod/admin.php:1931 mod/admin.php:1932 mod/settings.php:759 msgid "On" msgstr "" -#: mod/admin.php:1930 +#: mod/admin.php:1932 #, php-format msgid "Lock feature %s" msgstr "" -#: mod/admin.php:1938 +#: mod/admin.php:1940 msgid "Manage Additional Features" msgstr "" @@ -3620,7 +3621,7 @@ msgstr[1] "" #: mod/content.php:608 boot.php:870 object/Item.php:422 #: include/contact_widgets.php:242 include/forums.php:110 -#: include/items.php:5188 view/theme/vier/theme.php:264 +#: include/items.php:5207 view/theme/vier/theme.php:264 msgid "show more" msgstr "" @@ -6681,12 +6682,12 @@ msgstr "" msgid "%1$d %2$s ago" msgstr "" -#: include/datetime.php:474 include/items.php:2481 +#: include/datetime.php:474 include/items.php:2500 #, php-format msgid "%s's birthday" msgstr "" -#: include/datetime.php:475 include/items.php:2482 +#: include/datetime.php:475 include/items.php:2501 #, php-format msgid "Happy Birthday %s" msgstr "" @@ -6830,7 +6831,7 @@ msgstr "" msgid "event" msgstr "" -#: include/like.php:184 include/conversation.php:141 include/diaspora.php:2167 +#: include/like.php:184 include/conversation.php:141 include/diaspora.php:2185 #: view/theme/diabook/theme.php:480 #, php-format msgid "%1$s likes %2$s's %3$s" @@ -7784,7 +7785,7 @@ msgstr "" msgid "Sharing notification from Diaspora network" msgstr "" -#: include/diaspora.php:2608 +#: include/diaspora.php:2625 msgid "Attachments:" msgstr "" @@ -7796,11 +7797,11 @@ msgstr "" msgid "noreply" msgstr "" -#: include/items.php:4907 +#: include/items.php:4926 msgid "Do you really want to delete this item?" msgstr "" -#: include/items.php:5182 +#: include/items.php:5201 msgid "Archives" msgstr "" From 47a936eaa3cd9338e40091526ee0981fe6158f47 Mon Sep 17 00:00:00 2001 From: Tobias Diekershoff Date: Sun, 24 Jan 2016 07:42:25 +0100 Subject: [PATCH 112/242] groups vs forums and mentioning those --- doc/Tags-and-Mentions.md | 14 +++++++++++--- 1 file changed, 11 insertions(+), 3 deletions(-) diff --git a/doc/Tags-and-Mentions.md b/doc/Tags-and-Mentions.md index 5501d0d580..409c9c7395 100644 --- a/doc/Tags-and-Mentions.md +++ b/doc/Tags-and-Mentions.md @@ -21,11 +21,19 @@ You can tag a person on a different network or one that is **not in your social * @mike@macgirvin.com - This is called a "remote mention" and can only be an email-style locator, not a web URL. -Unless their system blocks unsolicited "mentions", the person tagged will likely receive a "Mention" post/activity or become a direct participant in the conversation in the case of public posts. Please note that Friendica blocks incoming "mentions" from people with no relationship to you. This is a spam prevention measure. +Unless their system blocks unsolicited "mentions", the person tagged will likely receive a "Mention" post/activity or become a direct participant in the conversation in the case of public posts. +Please note that Friendica blocks incoming "mentions" from people with no relationship to you. +This is a spam prevention measure. -Remote mentions are delivered using the OStatus protocol. This protocol is used by Friendica and GNU Social and several other systems, but is not currently implemented in Diaspora. +Remote mentions are delivered using the OStatus protocol. +This protocol is used by Friendica and GNU Social and several other systems, but is not currently implemented in Diaspora. -Friendica makes no distinction between people and groups for the purpose of tagging. (Some other networks use !group to indicate a group.) +Friendica makes no distinction between people and forums for the purpose of tagging. +(Some other networks use !forum to indicate a forum.) + +If you sort your contacts into groups, you cannot @-mention these groups. +But you can select the group in the access control when creating a new posting, to allow (or disallow) a certain group of people to see the posting. +See [Groups and Privacy](help/Groups-and-Privacy) for more details about grouping your contacts. **Topical Tags** From 41dacf4b372ecc72f180ca6f3bf13d1e12a2e692 Mon Sep 17 00:00:00 2001 From: Michael Vogel Date: Sun, 24 Jan 2016 07:57:36 +0100 Subject: [PATCH 113/242] To-Do bullets can now be listed in doxygen --- include/cron.php | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/include/cron.php b/include/cron.php index 71af5d826f..2f276013b2 100644 --- a/include/cron.php +++ b/include/cron.php @@ -431,11 +431,11 @@ function cron_repair_database() { q("UPDATE `item` INNER JOIN `item` AS `parent` ON `parent`.`uri` = `item`.`parent-uri` AND `parent`.`uid` = `item`.`uid` SET `item`.`parent` = `parent`.`id` WHERE `item`.`parent` = 0"); /// @todo - // - remove duplicated contacts with uid=0 (We could do this at the place where the contacts are stored) - // - remove thread entries without item - // - remove sign entries without item - // - remove children when parent got lost - // - set contact-id in item when not present + /// - remove duplicated contacts with uid=0 (We could do this at the place where the contacts are stored) + /// - remove thread entries without item + /// - remove sign entries without item + /// - remove children when parent got lost + /// - set contact-id in item when not present } if (array_search(__file__,get_included_files())===0){ From f38f1806c1cfb2b0f3c6219c65711c3e2f6caa22 Mon Sep 17 00:00:00 2001 From: Michael Vogel Date: Sun, 24 Jan 2016 08:22:09 +0100 Subject: [PATCH 114/242] We don't need these templates anymore --- view/templates/atom_feed.tpl | 31 ------------------------------- view/templates/atom_feed_dfrn.tpl | 31 ------------------------------- view/templates/atom_mail.tpl | 18 ------------------ view/templates/atom_relocate.tpl | 18 ------------------ view/templates/atom_suggest.tpl | 12 ------------ 5 files changed, 110 deletions(-) delete mode 100644 view/templates/atom_feed.tpl delete mode 100644 view/templates/atom_feed_dfrn.tpl delete mode 100644 view/templates/atom_mail.tpl delete mode 100644 view/templates/atom_relocate.tpl delete mode 100644 view/templates/atom_suggest.tpl diff --git a/view/templates/atom_feed.tpl b/view/templates/atom_feed.tpl deleted file mode 100644 index 7070f4c5e3..0000000000 --- a/view/templates/atom_feed.tpl +++ /dev/null @@ -1,31 +0,0 @@ - - - - - {{$feed_id}} - {{$feed_title}} - Friendica - - - {{$hub}} - {{$salmon}} - {{$community}} - - {{$feed_updated}} - - - {{$name}} - {{$profile_page}} - - - {{$birthday}} - diff --git a/view/templates/atom_feed_dfrn.tpl b/view/templates/atom_feed_dfrn.tpl deleted file mode 100644 index 2b1c16fb39..0000000000 --- a/view/templates/atom_feed_dfrn.tpl +++ /dev/null @@ -1,31 +0,0 @@ - - - - - {{$feed_id}} - {{$feed_title}} - Friendica - - - {{$hub}} - {{$salmon}} - {{$community}} - - {{$feed_updated}} - - - {{$name}} - {{$profile_page}} - - - {{$birthday}} - diff --git a/view/templates/atom_mail.tpl b/view/templates/atom_mail.tpl deleted file mode 100644 index e18e476556..0000000000 --- a/view/templates/atom_mail.tpl +++ /dev/null @@ -1,18 +0,0 @@ - - - - - - {{$name}} - {{$profile_page}} - {{$thumb}} - - - {{$item_id}} - {{$parent_id}} - {{$created}} - {{$subject}} - {{$content}} - - - diff --git a/view/templates/atom_relocate.tpl b/view/templates/atom_relocate.tpl deleted file mode 100644 index e6418fcb2a..0000000000 --- a/view/templates/atom_relocate.tpl +++ /dev/null @@ -1,18 +0,0 @@ - - - - - {{$url}} - {{$name}} - {{$photo}} - {{$thumb}} - {{$micro}} - {{$request}} - {{$confirm}} - {{$notify}} - {{$poll}} - {{$sitepubkey}} - - - - diff --git a/view/templates/atom_suggest.tpl b/view/templates/atom_suggest.tpl deleted file mode 100644 index afc1d6629a..0000000000 --- a/view/templates/atom_suggest.tpl +++ /dev/null @@ -1,12 +0,0 @@ - - - - - {{$url}} - {{$name}} - {{$photo}} - {{$request}} - {{$note}} - - - From c1f2b3a55ec90d2cbaaa61ccd7dcf386ca52c6a5 Mon Sep 17 00:00:00 2001 From: Michael Vogel Date: Sun, 24 Jan 2016 10:34:39 +0100 Subject: [PATCH 115/242] Improved documentation --- include/dfrn.php | 20 ++++++++++++-------- 1 file changed, 12 insertions(+), 8 deletions(-) diff --git a/include/dfrn.php b/include/dfrn.php index cf1adfa248..c7e338712e 100644 --- a/include/dfrn.php +++ b/include/dfrn.php @@ -3,7 +3,9 @@ require_once('include/items.php'); require_once('include/ostatus.php'); /** - * @brief Adds the header elements for the DFRN protocol + * @brief Generates the atom entries for delivery.php + * + * This function is used whenever content is transmitted via DFRN. * * @param array $items Item elements * @param array $owner Owner record @@ -29,7 +31,9 @@ function dfrn_entries($items,$owner) { } /** - * @brief Adds the header elements for the DFRN protocol + * @brief Generate an atom feed for the given user + * + * This function is called when another server is pulling data from the user feed. * * @param App $a * @param string $dfrn_id @@ -240,7 +244,7 @@ function dfrn_feed(&$a, $dfrn_id, $owner_nick, $last_update, $direction = 0) { } /** - * @brief Create XML text for DFRN mail + * @brief Create XML text for DFRN mails * * @param array $item message elements * @param array $owner Owner record @@ -274,7 +278,7 @@ function dfrn_mail($item, $owner) { } /** - * @brief Create XML text for DFRN suggestions + * @brief Create XML text for DFRN friend suggestions * * @param array $item suggestion elements * @param array $owner Owner record @@ -419,7 +423,7 @@ function dfrn_add_header($doc, $owner, $authorelement, $alternatelink = "", $pub } /** - * @brief Adds the author elements for the DFRN protocol + * @brief Adds the author element in the header for the DFRN protocol * * @param object $doc XML document * @param array $owner Owner record @@ -459,7 +463,7 @@ function dfrn_add_author($doc, $owner, $authorelement) { } /** - * @brief Adds the author elements for the item entries of the DFRN protocol + * @brief Adds the author elements in the "entry" elements of the DFRN protocol * * @param object $doc XML document * @param string $element Element name for the author @@ -576,7 +580,7 @@ function dfrn_create_activity($doc, $element, $activity) { } /** - * @brief Adds the attachments elements + * @brief Adds the elements for attachments * * @param object $doc XML document * @param object $root XML root @@ -608,7 +612,7 @@ function dfrn_get_attachment($doc, $root, $item) { } /** - * @brief Adds the header elements for the DFRN protocol + * @brief Adds the "entry" elements for the DFRN protocol * * @param object $doc XML document * @param string $type "text" or "html" From 937196d6ee3235fbfba6ff199fe9c8699d816b24 Mon Sep 17 00:00:00 2001 From: Michael Vogel Date: Sun, 24 Jan 2016 14:30:57 +0100 Subject: [PATCH 116/242] Poco fields now moved to the header, function to create formatted location string --- include/Contact.php | 30 +++++++++++ include/dfrn.php | 107 ++++++++++++++++++++++++++----------- include/profile_update.php | 15 +----- mod/profiles.php | 18 +------ 4 files changed, 109 insertions(+), 61 deletions(-) diff --git a/include/Contact.php b/include/Contact.php index f80cb80e2f..831a99c950 100644 --- a/include/Contact.php +++ b/include/Contact.php @@ -664,4 +664,34 @@ function posts_from_contact($a, $contact_id) { return $o; } + +/** + * @brief Returns a formatted location string from the given profile array + * + * @param array $profile Profile array (Generated from the "profile" table) + * + * @return string Location string + */ +function formatted_location($profile) { + $location = ''; + + if($profile['locality']) + $location .= $profile['locality']; + + if($profile['region'] AND ($profile['locality'] != $profile['region'])) { + if($location) + $location .= ', '; + + $location .= $profile['region']; + } + + if($profile['country-name']) { + if($location) + $location .= ', '; + + $location .= $profile['country-name']; + } + + return $location; +} ?> diff --git a/include/dfrn.php b/include/dfrn.php index c7e338712e..feb535417c 100644 --- a/include/dfrn.php +++ b/include/dfrn.php @@ -1,5 +1,6 @@ appendChild($author); return $root; @@ -431,7 +432,7 @@ function dfrn_add_header($doc, $owner, $authorelement, $alternatelink = "", $pub * * @return object XML author object */ -function dfrn_add_author($doc, $owner, $authorelement) { +function dfrn_add_author($doc, $owner, $authorelement, $public) { $a = get_app(); $author = $doc->createElement($authorelement); @@ -459,6 +460,77 @@ function dfrn_add_author($doc, $owner, $authorelement) { if ($birthday) xml_add_element($doc, $author, "dfrn:birthday", $birthday); + // The following fields will only be generated if this isn't for a public feed + if ($public) + return $author; + + // Only show contact details when we are allowed to + $r = q("SELECT `profile`.`about`, `profile`.`name`, `profile`.`homepage`, `user`.`nickname`, `user`.`timezone`, + `profile`.`locality`, `profile`.`region`, `profile`.`country-name`, `profile`.`pub_keywords`, `profile`.`dob` + FROM `profile` + INNER JOIN `user` ON `user`.`uid` = `profile`.`uid` + WHERE `profile`.`is-default` AND NOT `user`.`hidewall` AND `user`.`uid` = %d", + intval($owner['user_uid'])); + if ($r) { + $profile = $r[0]; + xml_add_element($doc, $author, "poco:displayName", $profile["name"]); + xml_add_element($doc, $author, "poco:updated", $namdate); + + if (trim($profile["dob"]) != "0000-00-00") + xml_add_element($doc, $author, "poco:birthday", "0000-".date("m-d", strtotime($profile["dob"]))); + + xml_add_element($doc, $author, "poco:note", $profile["about"]); + xml_add_element($doc, $author, "poco:preferredUsername", $profile["nickname"]); + + $savetz = date_default_timezone_get(); + date_default_timezone_set($profile["timezone"]); + xml_add_element($doc, $author, "poco:utcOffset", date("P")); + date_default_timezone_set($savetz); + + if (trim($profile["homepage"]) != "") { + $urls = $doc->createElement("poco:urls"); + xml_add_element($doc, $urls, "poco:type", "homepage"); + xml_add_element($doc, $urls, "poco:value", $profile["homepage"]); + xml_add_element($doc, $urls, "poco:primary", "true"); + $author->appendChild($urls); + } + + if (trim($profile["pub_keywords"]) != "") { + $keywords = explode(",", $profile["pub_keywords"]); + + foreach ($keywords AS $keyword) + xml_add_element($doc, $author, "poco:tags", trim($keyword)); + + } + + /// @todo When we are having the XMPP address in the profile we should propagate it here + $xmpp = ""; + if (trim($xmpp) != "") { + $ims = $doc->createElement("poco:ims"); + xml_add_element($doc, $ims, "poco:type", "xmpp"); + xml_add_element($doc, $ims, "poco:value", $xmpp); + xml_add_element($doc, $ims, "poco:primary", "true"); + $author->appendChild($ims); + } + + if (trim($profile["locality"].$profile["region"].$profile["country-name"]) != "") { + $element = $doc->createElement("poco:address"); + + xml_add_element($doc, $element, "poco:formatted", formatted_location($profile)); + + if (trim($profile["locality"]) != "") + xml_add_element($doc, $element, "poco:locality", $profile["locality"]); + + if (trim($profile["region"]) != "") + xml_add_element($doc, $element, "poco:region", $profile["region"]); + + if (trim($profile["country-name"]) != "") + xml_add_element($doc, $element, "poco:country", $profile["country-name"]); + + $author->appendChild($element); + } + } + return $author; } @@ -477,21 +549,13 @@ function dfrn_add_entry_author($doc, $element, $contact_url, $item) { $contact = get_contact_details_by_url($contact_url, $item["uid"]); - $r = q("SELECT `profile`.`about`, `profile`.`name`, `profile`.`homepage`, `contact`.`nick`, `contact`.`location` FROM `profile` - INNER JOIN `contact` ON `contact`.`uid` = `profile`.`uid` - INNER JOIN `user` ON `user`.`uid` = `profile`.`uid` - WHERE `contact`.`self` AND `profile`.`is-default` AND NOT `user`.`hidewall` AND `contact`.`nurl`='%s'", - dbesc(normalise_link($contact_url))); - if ($r) - $profile = $r[0]; - $author = $doc->createElement($element); xml_add_element($doc, $author, "name", $contact["name"]); xml_add_element($doc, $author, "uri", $contact["url"]); /// @Todo /// - Check real image type and image size - /// - Check which of these boths elements we really use + /// - Check which of these boths elements we should use $attributes = array( "rel" => "photo", "type" => "image/jpeg", @@ -508,27 +572,6 @@ function dfrn_add_entry_author($doc, $element, $contact_url, $item) { "href" => $contact["photo"]); xml_add_element($doc, $author, "link", "", $attributes); - // Only show contact details when it is a user from our system and we are allowed to - if ($profile) { - xml_add_element($doc, $author, "poco:preferredUsername", $profile["nick"]); - xml_add_element($doc, $author, "poco:displayName", $profile["name"]); - xml_add_element($doc, $author, "poco:note", $profile["about"]); - - if (trim($contact["location"]) != "") { - $element = $doc->createElement("poco:address"); - xml_add_element($doc, $element, "poco:formatted", $profile["location"]); - $author->appendChild($element); - } - - if (trim($profile["homepage"]) != "") { - $urls = $doc->createElement("poco:urls"); - xml_add_element($doc, $urls, "poco:type", "homepage"); - xml_add_element($doc, $urls, "poco:value", $profile["homepage"]); - xml_add_element($doc, $urls, "poco:primary", "true"); - $author->appendChild($urls); - } - } - return $author; } diff --git a/include/profile_update.php b/include/profile_update.php index 0fcf3617fb..7cc72cc866 100644 --- a/include/profile_update.php +++ b/include/profile_update.php @@ -3,6 +3,7 @@ require_once('include/datetime.php'); require_once('include/diaspora.php'); require_once('include/queue_fn.php'); +require_once('include/Contact.php'); function profile_change() { @@ -53,19 +54,7 @@ function profile_change() { $about = xmlify($profile['about']); require_once('include/bbcode.php'); $about = xmlify(strip_tags(bbcode($about))); - $location = ''; - if($profile['locality']) - $location .= $profile['locality']; - if($profile['region']) { - if($location) - $location .= ', '; - $location .= $profile['region']; - } - if($profile['country-name']) { - if($location) - $location .= ', '; - $location .= $profile['country-name']; - } + $location = formatted_location($profile); $location = xmlify($location); $tags = ''; if($profile['pub_keywords']) { diff --git a/mod/profiles.php b/mod/profiles.php index 3ba57c8831..5c372de8ee 100644 --- a/mod/profiles.php +++ b/mod/profiles.php @@ -1,5 +1,5 @@ $locality, "region" => $region, "country-name" => $country_name)); $r = q("UPDATE `contact` SET `about` = '%s', `location` = '%s', `keywords` = '%s', `gender` = '%s' WHERE `self` = 1 AND `uid` = %d", dbesc($about), From ca64c7f7cd4ae382983e7dad58dcc2189cdf7af2 Mon Sep 17 00:00:00 2001 From: Michael Vogel Date: Sun, 24 Jan 2016 17:40:31 +0100 Subject: [PATCH 117/242] Remove duplicated contacts with uid=0 --- include/Contact.php | 15 +++++++++------ 1 file changed, 9 insertions(+), 6 deletions(-) diff --git a/include/Contact.php b/include/Contact.php index 93d6237cbf..f4befd0238 100644 --- a/include/Contact.php +++ b/include/Contact.php @@ -410,12 +410,12 @@ function get_contact($url, $uid = 0) { return 0; } - $contact = q("SELECT `id`, `avatar-date` FROM `contact` WHERE `nurl` = '%s' AND `uid` = %d", + $contact = q("SELECT `id`, `avatar-date` FROM `contact` WHERE `nurl` = '%s' AND `uid` = %d ORDER BY `id` LIMIT 2", dbesc(normalise_link($url)), intval($uid)); if (!$contact) - $contact = q("SELECT `id`, `avatar-date` FROM `contact` WHERE `alias` IN ('%s', '%s') AND `uid` = %d", + $contact = q("SELECT `id`, `avatar-date` FROM `contact` WHERE `alias` IN ('%s', '%s') AND `uid` = %d ORDER BY `id` LIMIT 1", dbesc($url), dbesc(normalise_link($url)), intval($uid)); @@ -439,9 +439,7 @@ function get_contact($url, $uid = 0) { if (!in_array($data["network"], array(NETWORK_DFRN, NETWORK_OSTATUS, NETWORK_DIASPORA))) return 0; - // tempory programming. Can be deleted after 2015-02-07 - if (($data["alias"] == "") AND (normalise_link($data["url"]) != normalise_link($url))) - $data["alias"] = normalise_link($url); + $url = $data["url"]; if ($contactid == 0) { q("INSERT INTO `contact` (`uid`, `created`, `url`, `nurl`, `addr`, `alias`, `notify`, `poll`, @@ -470,7 +468,7 @@ function get_contact($url, $uid = 0) { dbesc($data["poco"]) ); - $contact = q("SELECT `id` FROM `contact` WHERE `nurl` = '%s' AND `uid` = %d", + $contact = q("SELECT `id` FROM `contact` WHERE `nurl` = '%s' AND `uid` = %d ORDER BY `id` LIMIT 2", dbesc(normalise_link($data["url"])), intval($uid)); if (!$contact) @@ -479,6 +477,11 @@ function get_contact($url, $uid = 0) { $contactid = $contact[0]["id"]; } + if ((count($contact) > 1) AND ($uid == 0) AND ($contactid != 0) AND ($url != "")) + q("DELETE FROM `contact` WHERE `nurl` = '%s' AND `id` != %d", + dbesc(normalise_link($url)), + intval($contactid)); + require_once("Photo.php"); $photos = import_profile_photo($data["photo"],$uid,$contactid); From 16b3758deba06bae906e3e13b3de3934d2438eac Mon Sep 17 00:00:00 2001 From: Michael Vogel Date: Sun, 24 Jan 2016 17:42:47 +0100 Subject: [PATCH 118/242] Removed to do bullet point --- include/cron.php | 1 - 1 file changed, 1 deletion(-) diff --git a/include/cron.php b/include/cron.php index 2f276013b2..fe4fa46cdf 100644 --- a/include/cron.php +++ b/include/cron.php @@ -431,7 +431,6 @@ function cron_repair_database() { q("UPDATE `item` INNER JOIN `item` AS `parent` ON `parent`.`uri` = `item`.`parent-uri` AND `parent`.`uid` = `item`.`uid` SET `item`.`parent` = `parent`.`id` WHERE `item`.`parent` = 0"); /// @todo - /// - remove duplicated contacts with uid=0 (We could do this at the place where the contacts are stored) /// - remove thread entries without item /// - remove sign entries without item /// - remove children when parent got lost From b409132f8608397deb07daa6ecc64134345ed6ff Mon Sep 17 00:00:00 2001 From: Michael Vogel Date: Sun, 24 Jan 2016 17:56:34 +0100 Subject: [PATCH 119/242] Avoid a warning if a user hadn't subscribed to any forum. --- include/forums.php | 3 +++ 1 file changed, 3 insertions(+) diff --git a/include/forums.php b/include/forums.php index 995a29cad1..952d09a494 100644 --- a/include/forums.php +++ b/include/forums.php @@ -42,6 +42,9 @@ function get_forumlist($uid, $showhidden = true, $lastitem, $showprivate = false intval($uid) ); + if (!$contacts) + return($forumlist); + foreach($contacts as $contact) { $forumlist[] = array( 'url' => $contact['url'], From acd7e816ebb5ee0f721290f644a6c2718368c00a Mon Sep 17 00:00:00 2001 From: Michael Vogel Date: Mon, 25 Jan 2016 01:06:46 +0100 Subject: [PATCH 120/242] Added documentation --- include/dfrn.php | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/include/dfrn.php b/include/dfrn.php index feb535417c..c6b7f59378 100644 --- a/include/dfrn.php +++ b/include/dfrn.php @@ -37,10 +37,10 @@ function dfrn_entries($items,$owner) { * This function is called when another server is pulling data from the user feed. * * @param App $a - * @param string $dfrn_id + * @param string $dfrn_id DFRN ID from the requesting party * @param string $owner_nick Owner nick name * @param string $last_update Date of the last update - * @param int $direction + * @param int $direction Can be -1, 0 or 1. * * @return string DFRN feed entries */ @@ -662,7 +662,7 @@ function dfrn_get_attachment($doc, $root, $item) { * @param array $item Item element * @param array $owner Owner record * @param bool $comment Trigger the sending of the "comment" element - * @param int $cid + * @param int $cid Contact ID of the recipient * * @return object XML entry object */ From ffd8f1234e828d89b0e735cb77e43559cd2e807f Mon Sep 17 00:00:00 2001 From: Michael Vogel Date: Mon, 25 Jan 2016 01:15:10 +0100 Subject: [PATCH 121/242] Some more documentation --- include/dfrn.php | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/include/dfrn.php b/include/dfrn.php index c6b7f59378..a6b09242d6 100644 --- a/include/dfrn.php +++ b/include/dfrn.php @@ -720,6 +720,8 @@ function dfrn_entry($doc, $type, $item, $owner, $comment = false, $cid = 0) { xml_add_element($doc, $entry, "link", "", array("rel" => "alternate", "type" => "text/html", "href" => $a->get_baseurl()."/display/".$item["guid"])); + // "comment-allow" is some old fashioned stuff for old Friendica versions. + // It is included in the rewritten code for completeness if ($comment) xml_add_element($doc, $entry, "dfrn:comment-allow", intval($item['last-child'])); @@ -743,6 +745,8 @@ function dfrn_entry($doc, $type, $item, $owner, $comment = false, $cid = 0) { xml_add_element($doc, $entry, "dfrn:diaspora_guid", $item["guid"]); + // The signed text contains the content in Markdown, the sender handle and the signatur for the content + // It is needed for relayed comments to Diaspora. if($item['signed_text']) { $sign = base64_encode(json_encode(array('signed_text' => $item['signed_text'],'signature' => $item['signature'],'signer' => $item['signer']))); xml_add_element($doc, $entry, "dfrn:diaspora_signature", $sign); From 2aa0c6d00d926ccfaa3b7c04a5a11d4febfca5fe Mon Sep 17 00:00:00 2001 From: Matthew Exon Date: Sun, 3 Jan 2016 06:49:35 +0100 Subject: [PATCH 122/242] Only proxy URLs using HTTP or HTTPS --- mod/proxy.php | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/mod/proxy.php b/mod/proxy.php index c6bf653021..abcaf49127 100644 --- a/mod/proxy.php +++ b/mod/proxy.php @@ -238,6 +238,10 @@ function proxy_url($url, $writemode = false, $size = "") { $a = get_app(); + if (substr($url, 0, strlen('http')) !== 'http') { + return($url); + } + // Only continue if it isn't a local image and the isn't deactivated if (proxy_is_local_image($url)) { $url = str_replace(normalise_link($a->get_baseurl())."/", $a->get_baseurl()."/", $url); From 677903b3166d7db136411f3c599ab984decf5cc6 Mon Sep 17 00:00:00 2001 From: Matthew Exon Date: Sun, 3 Jan 2016 06:59:54 +0100 Subject: [PATCH 123/242] Report errors during cURL fetch --- include/network.php | 3 +++ 1 file changed, 3 insertions(+) diff --git a/include/network.php b/include/network.php index 611f00632f..cc267966e8 100644 --- a/include/network.php +++ b/include/network.php @@ -116,6 +116,9 @@ function z_fetch_url($url,$binary = false, &$redirects = 0, $opts=array()) { // if it throws any errors. $s = @curl_exec($ch); + if (curl_errno($ch) !== CURLE_OK) { + logger('fetch_url error fetching '.$url.': '.curl_error($ch), LOGGER_NORMAL); + } $base = $s; $curl_info = @curl_getinfo($ch); From 4007876b847e711d25f08b6e6e8cc624ee21c794 Mon Sep 17 00:00:00 2001 From: Matthew Exon Date: Mon, 25 Jan 2016 03:34:53 +0100 Subject: [PATCH 124/242] Use more cookies to allow processing of the NYT feed Conflicts: include/Scrape.php --- include/Scrape.php | 8 ++++++-- include/onepoll.php | 4 +++- 2 files changed, 9 insertions(+), 3 deletions(-) diff --git a/include/Scrape.php b/include/Scrape.php index 9cc7086157..7329489817 100644 --- a/include/Scrape.php +++ b/include/Scrape.php @@ -235,7 +235,9 @@ function scrape_feed($url) { $a = get_app(); $ret = array(); - $s = fetch_url($url); + $cookiejar = tempnam('/tmp', 'cookiejar-scrape-feed-'); + $s = fetch_url($url, false, $redirects, 0, Null, $cookiejar); + unlink($cookiejar); $headers = $a->get_curl_headers(); $code = $a->get_curl_code(); @@ -662,7 +664,9 @@ function probe_url($url, $mode = PROBE_NORMAL, $level = 1) { $vcard['photo'] = $feedret['photo']; require_once('library/simplepie/simplepie.inc'); $feed = new SimplePie(); - $xml = fetch_url($poll); + $cookiejar = tempnam('/tmp', 'cookiejar-scrape-feed-'); + $xml = fetch_url($poll, false, $redirects, 0, Null, $cookiejar); + unlink($cookiejar); logger('probe_url: fetch feed: ' . $poll . ' returns: ' . $xml, LOGGER_DATA); $a = get_app(); diff --git a/include/onepoll.php b/include/onepoll.php index 516f1dfd4d..5ebafb353e 100644 --- a/include/onepoll.php +++ b/include/onepoll.php @@ -335,7 +335,9 @@ function onepoll_run(&$argv, &$argc){ if($contact['rel'] == CONTACT_IS_FOLLOWER || $contact['blocked'] || $contact['readonly']) return; - $xml = fetch_url($contact['poll']); + $cookiejar = tempnam('/tmp', 'cookiejar-onepoll-'); + $xml = fetch_url($contact['poll'], false, $redirects, 0, Null, $cookiejar); + unlink($cookiejar); } elseif($contact['network'] === NETWORK_MAIL || $contact['network'] === NETWORK_MAIL2) { From d395959e4188e28974c833d1ed8fe5b4eb4fb906 Mon Sep 17 00:00:00 2001 From: Tobias Diekershoff Date: Mon, 25 Jan 2016 07:13:29 +0100 Subject: [PATCH 125/242] DE update to the strings --- view/de/messages.po | 619 ++++++++++++++++++++++---------------------- view/de/strings.php | 2 +- 2 files changed, 311 insertions(+), 310 deletions(-) diff --git a/view/de/messages.po b/view/de/messages.po index e8b8532e9b..9840156ca4 100644 --- a/view/de/messages.po +++ b/view/de/messages.po @@ -32,8 +32,8 @@ msgid "" msgstr "" "Project-Id-Version: friendica\n" "Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2016-01-20 17:52+0100\n" -"PO-Revision-Date: 2016-01-21 10:53+0000\n" +"POT-Creation-Date: 2016-01-24 06:49+0100\n" +"PO-Revision-Date: 2016-01-24 13:15+0000\n" "Last-Translator: bavatar \n" "Language-Team: German (http://www.transifex.com/Friendica/friendica/language/de/)\n" "MIME-Version: 1.0\n" @@ -95,7 +95,7 @@ msgstr "Aktualisierung der Kontaktdaten fehlgeschlagen." #: mod/api.php:26 mod/api.php:31 mod/notes.php:22 mod/poke.php:149 #: mod/repair_ostatus.php:9 mod/invite.php:15 mod/invite.php:101 #: mod/photos.php:171 mod/photos.php:1105 mod/regmod.php:110 -#: mod/uimport.php:23 mod/attach.php:33 include/items.php:5077 index.php:383 +#: mod/uimport.php:23 mod/attach.php:33 include/items.php:5096 index.php:383 msgid "Permission denied." msgstr "Zugriff verweigert." @@ -134,7 +134,7 @@ msgstr "Möchtest Du wirklich diesen Kontakt löschen?" #: mod/settings.php:1171 mod/settings.php:1172 mod/settings.php:1173 #: mod/settings.php:1174 mod/dfrn_request.php:857 mod/register.php:238 #: mod/suggest.php:29 mod/profiles.php:658 mod/profiles.php:661 -#: mod/profiles.php:687 mod/api.php:105 include/items.php:4909 +#: mod/profiles.php:687 mod/api.php:105 include/items.php:4928 msgid "Yes" msgstr "Ja" @@ -143,7 +143,7 @@ msgstr "Ja" #: mod/fbrowser.php:128 mod/settings.php:660 mod/settings.php:686 #: mod/dfrn_request.php:871 mod/suggest.php:32 mod/editpost.php:148 #: mod/photos.php:247 mod/photos.php:336 include/conversation.php:1220 -#: include/items.php:4912 +#: include/items.php:4931 msgid "Cancel" msgstr "Abbrechen" @@ -170,7 +170,7 @@ msgstr "%s teilt mit Dir" msgid "Private communications are not available for this contact." msgstr "Private Kommunikation ist für diesen Kontakt nicht verfügbar." -#: mod/contacts.php:544 mod/admin.php:820 +#: mod/contacts.php:544 mod/admin.php:822 msgid "Never" msgstr "Niemals" @@ -199,7 +199,7 @@ msgstr "Verbindungen mit diesem Kontakt verloren!" msgid "Fetch further information for feeds" msgstr "Weitere Informationen zu Feeds holen" -#: mod/contacts.php:571 mod/admin.php:829 +#: mod/contacts.php:571 mod/admin.php:831 msgid "Disabled" msgstr "Deaktiviert" @@ -290,12 +290,12 @@ msgid "Connect/Follow" msgstr "Verbinden/Folgen" #: mod/contacts.php:615 mod/contacts.php:806 mod/contacts.php:865 -#: mod/admin.php:1310 +#: mod/admin.php:1312 msgid "Unblock" msgstr "Entsperren" #: mod/contacts.php:615 mod/contacts.php:806 mod/contacts.php:865 -#: mod/admin.php:1309 +#: mod/admin.php:1311 msgid "Block" msgstr "Sperren" @@ -454,7 +454,7 @@ msgstr "Archivieren" msgid "Unarchive" msgstr "Aus Archiv zurückholen" -#: mod/contacts.php:809 mod/group.php:171 mod/admin.php:1308 +#: mod/contacts.php:809 mod/group.php:171 mod/admin.php:1310 #: mod/content.php:440 mod/content.php:743 mod/settings.php:722 #: mod/photos.php:1723 object/Item.php:134 include/conversation.php:635 msgid "Delete" @@ -573,8 +573,8 @@ msgid "All Contacts (with secure profile access)" msgstr "Alle Kontakte (mit gesichertem Profilzugriff)" #: mod/display.php:82 mod/display.php:291 mod/display.php:513 -#: mod/viewsrc.php:15 mod/admin.php:234 mod/admin.php:1363 mod/admin.php:1597 -#: mod/notice.php:15 include/items.php:4868 +#: mod/viewsrc.php:15 mod/admin.php:234 mod/admin.php:1365 mod/admin.php:1599 +#: mod/notice.php:15 include/items.php:4887 msgid "Item not found." msgstr "Beitrag nicht gefunden." @@ -623,7 +623,7 @@ msgid "" " join." msgstr "Auf der Quick Start Seite findest Du eine kurze Einleitung in die einzelnen Funktionen Deines Profils und die Netzwerk-Reiter, wo Du interessante Foren findest und neue Kontakte knüpfst." -#: mod/newmember.php:22 mod/admin.php:1416 mod/admin.php:1674 +#: mod/newmember.php:22 mod/admin.php:1418 mod/admin.php:1676 #: mod/settings.php:109 include/nav.php:182 view/theme/diabook/theme.php:544 #: view/theme/diabook/theme.php:648 msgid "Settings" @@ -868,15 +868,15 @@ msgstr "Hochladen des Bildes gescheitert." #: mod/subthread.php:87 mod/tagger.php:62 include/like.php:165 #: include/conversation.php:130 include/conversation.php:266 -#: include/text.php:2000 include/diaspora.php:2151 +#: include/text.php:2000 include/diaspora.php:2169 #: view/theme/diabook/theme.php:471 msgid "photo" msgstr "Foto" #: mod/subthread.php:87 mod/tagger.php:62 include/like.php:165 -#: include/like.php:325 include/conversation.php:125 +#: include/like.php:334 include/conversation.php:125 #: include/conversation.php:134 include/conversation.php:261 -#: include/conversation.php:270 include/diaspora.php:2151 +#: include/conversation.php:270 include/diaspora.php:2169 #: view/theme/diabook/theme.php:466 view/theme/diabook/theme.php:475 msgid "status" msgstr "Status" @@ -1190,7 +1190,7 @@ msgstr "Deine Kontaktreferenzen konnten nicht in unserem System gespeichert werd msgid "Unable to update your contact profile details on our system" msgstr "Die Updates für Dein Profil konnten nicht gespeichert werden" -#: mod/dfrn_confirm.php:753 mod/dfrn_request.php:741 include/items.php:4280 +#: mod/dfrn_confirm.php:753 mod/dfrn_request.php:741 include/items.php:4299 msgid "[Name Withheld]" msgstr "[Name unterdrückt]" @@ -1418,7 +1418,7 @@ msgstr "Verwerfen" msgid "System" msgstr "System" -#: mod/notifications.php:87 mod/admin.php:388 include/nav.php:154 +#: mod/notifications.php:87 mod/admin.php:390 include/nav.php:154 msgid "Network" msgstr "Netzwerk" @@ -1464,7 +1464,7 @@ msgstr "Neue-Kontakt Nachricht senden" msgid "if applicable" msgstr "falls anwendbar" -#: mod/notifications.php:176 mod/notifications.php:257 mod/admin.php:1306 +#: mod/notifications.php:176 mod/notifications.php:257 mod/admin.php:1308 msgid "Approve" msgstr "Genehmigen" @@ -1821,8 +1821,8 @@ msgstr "Zurück zum Kontakteditor" msgid "Refetch contact data" msgstr "Kontaktdaten neu laden" -#: mod/crepair.php:170 mod/admin.php:1304 mod/admin.php:1316 -#: mod/admin.php:1317 mod/admin.php:1330 mod/settings.php:661 +#: mod/crepair.php:170 mod/admin.php:1306 mod/admin.php:1318 +#: mod/admin.php:1319 mod/admin.php:1332 mod/settings.php:661 #: mod/settings.php:687 msgid "Name" msgstr "Name" @@ -1930,19 +1930,19 @@ msgstr "Kontakte, die keiner Gruppe zugewiesen sind" msgid "Theme settings updated." msgstr "Themeneinstellungen aktualisiert." -#: mod/admin.php:156 mod/admin.php:886 +#: mod/admin.php:156 mod/admin.php:888 msgid "Site" msgstr "Seite" -#: mod/admin.php:157 mod/admin.php:830 mod/admin.php:1299 mod/admin.php:1314 +#: mod/admin.php:157 mod/admin.php:832 mod/admin.php:1301 mod/admin.php:1316 msgid "Users" msgstr "Nutzer" -#: mod/admin.php:158 mod/admin.php:1414 mod/admin.php:1474 mod/settings.php:72 +#: mod/admin.php:158 mod/admin.php:1416 mod/admin.php:1476 mod/settings.php:72 msgid "Plugins" msgstr "Plugins" -#: mod/admin.php:159 mod/admin.php:1672 mod/admin.php:1722 +#: mod/admin.php:159 mod/admin.php:1674 mod/admin.php:1724 msgid "Themes" msgstr "Themen" @@ -1954,19 +1954,19 @@ msgstr "Zusätzliche Features" msgid "DB updates" msgstr "DB Updates" -#: mod/admin.php:162 mod/admin.php:383 +#: mod/admin.php:162 mod/admin.php:385 msgid "Inspect Queue" msgstr "Warteschlange Inspizieren" -#: mod/admin.php:163 mod/admin.php:352 +#: mod/admin.php:163 mod/admin.php:354 msgid "Federation Statistics" msgstr "Federation Statistik" -#: mod/admin.php:177 mod/admin.php:188 mod/admin.php:1790 +#: mod/admin.php:177 mod/admin.php:188 mod/admin.php:1792 msgid "Logs" msgstr "Protokolle" -#: mod/admin.php:178 mod/admin.php:1857 +#: mod/admin.php:178 mod/admin.php:1859 msgid "View Logs" msgstr "Protokolle anzeigen" @@ -1994,510 +1994,511 @@ msgstr "Diagnose" msgid "User registrations waiting for confirmation" msgstr "Nutzeranmeldungen die auf Bestätigung warten" -#: mod/admin.php:345 +#: mod/admin.php:347 msgid "" "This page offers you some numbers to the known part of the federated social " "network your Friendica node is part of. These numbers are not complete but " "only reflect the part of the network your node is aware of." msgstr "Diese Seite präsentiert einige Zahlen zu dem bekannten Teil des föderalen sozialen Netzwerks, von dem deine Friendica Installation ein Teil ist. Diese Zahlen sind nicht absolut und reflektieren nur den Teil des Netzwerks, den dein Knoten kennt." -#: mod/admin.php:346 +#: mod/admin.php:348 msgid "" "The Auto Discovered Contact Directory feature is not enabled, it " "will improve the data displayed here." msgstr "Die Funktion um Automatisch ein Kontaktverzeichnis erstellen ist nicht aktiv. Es wird die hier angezeigten Daten verbessern." -#: mod/admin.php:351 mod/admin.php:382 mod/admin.php:439 mod/admin.php:885 -#: mod/admin.php:1298 mod/admin.php:1413 mod/admin.php:1473 mod/admin.php:1671 -#: mod/admin.php:1721 mod/admin.php:1789 mod/admin.php:1856 +#: mod/admin.php:353 mod/admin.php:384 mod/admin.php:441 mod/admin.php:887 +#: mod/admin.php:1300 mod/admin.php:1415 mod/admin.php:1475 mod/admin.php:1673 +#: mod/admin.php:1723 mod/admin.php:1791 mod/admin.php:1858 msgid "Administration" msgstr "Administration" -#: mod/admin.php:358 -msgid "Currently this node is aware of nodes from the following platforms:" -msgstr "Momentan kennt dieser Knoten andere Knoten der folgenden Plattformen:" +#: mod/admin.php:360 +#, php-format +msgid "Currently this node is aware of %d nodes from the following platforms:" +msgstr "Momentan kennt dieser Knoten %d andere Knoten der folgenden Plattformen:" -#: mod/admin.php:385 +#: mod/admin.php:387 msgid "ID" msgstr "ID" -#: mod/admin.php:386 +#: mod/admin.php:388 msgid "Recipient Name" msgstr "Empfänger Name" -#: mod/admin.php:387 +#: mod/admin.php:389 msgid "Recipient Profile" msgstr "Empfänger Profil" -#: mod/admin.php:389 +#: mod/admin.php:391 msgid "Created" msgstr "Erstellt" -#: mod/admin.php:390 +#: mod/admin.php:392 msgid "Last Tried" msgstr "Zuletzt versucht" -#: mod/admin.php:391 +#: mod/admin.php:393 msgid "" "This page lists the content of the queue for outgoing postings. These are " "postings the initial delivery failed for. They will be resend later and " "eventually deleted if the delivery fails permanently." msgstr "Auf dieser Seite werden die in der Warteschlange eingereihten Beiträge aufgelistet. Bei diesen Beiträgen schlug die erste Zustellung fehl. Es wird später wiederholt versucht die Beiträge zuzustellen, bis sie schließlich gelöscht werden." -#: mod/admin.php:410 mod/admin.php:1252 +#: mod/admin.php:412 mod/admin.php:1254 msgid "Normal Account" msgstr "Normales Konto" -#: mod/admin.php:411 mod/admin.php:1253 +#: mod/admin.php:413 mod/admin.php:1255 msgid "Soapbox Account" msgstr "Marktschreier-Konto" -#: mod/admin.php:412 mod/admin.php:1254 +#: mod/admin.php:414 mod/admin.php:1256 msgid "Community/Celebrity Account" msgstr "Forum/Promi-Konto" -#: mod/admin.php:413 mod/admin.php:1255 +#: mod/admin.php:415 mod/admin.php:1257 msgid "Automatic Friend Account" msgstr "Automatisches Freundekonto" -#: mod/admin.php:414 +#: mod/admin.php:416 msgid "Blog Account" msgstr "Blog-Konto" -#: mod/admin.php:415 +#: mod/admin.php:417 msgid "Private Forum" msgstr "Privates Forum" -#: mod/admin.php:434 +#: mod/admin.php:436 msgid "Message queues" msgstr "Nachrichten-Warteschlangen" -#: mod/admin.php:440 +#: mod/admin.php:442 msgid "Summary" msgstr "Zusammenfassung" -#: mod/admin.php:442 +#: mod/admin.php:444 msgid "Registered users" msgstr "Registrierte Nutzer" -#: mod/admin.php:444 +#: mod/admin.php:446 msgid "Pending registrations" msgstr "Anstehende Anmeldungen" -#: mod/admin.php:445 +#: mod/admin.php:447 msgid "Version" msgstr "Version" -#: mod/admin.php:450 +#: mod/admin.php:452 msgid "Active plugins" msgstr "Aktive Plugins" -#: mod/admin.php:473 +#: mod/admin.php:475 msgid "Can not parse base url. Must have at least ://" msgstr "Die Basis-URL konnte nicht analysiert werden. Sie muss mindestens aus :// bestehen" -#: mod/admin.php:758 +#: mod/admin.php:760 msgid "RINO2 needs mcrypt php extension to work." msgstr "RINO2 benötigt die PHP Extension mcrypt." -#: mod/admin.php:766 +#: mod/admin.php:768 msgid "Site settings updated." msgstr "Seiteneinstellungen aktualisiert." -#: mod/admin.php:794 mod/settings.php:912 +#: mod/admin.php:796 mod/settings.php:912 msgid "No special theme for mobile devices" msgstr "Kein spezielles Theme für mobile Geräte verwenden." -#: mod/admin.php:813 +#: mod/admin.php:815 msgid "No community page" msgstr "Keine Gemeinschaftsseite" -#: mod/admin.php:814 +#: mod/admin.php:816 msgid "Public postings from users of this site" msgstr "Öffentliche Beiträge von Nutzer_innen dieser Seite" -#: mod/admin.php:815 +#: mod/admin.php:817 msgid "Global community page" msgstr "Globale Gemeinschaftsseite" -#: mod/admin.php:821 +#: mod/admin.php:823 msgid "At post arrival" msgstr "Beim Empfang von Nachrichten" -#: mod/admin.php:822 include/contact_selectors.php:56 +#: mod/admin.php:824 include/contact_selectors.php:56 msgid "Frequently" msgstr "immer wieder" -#: mod/admin.php:823 include/contact_selectors.php:57 +#: mod/admin.php:825 include/contact_selectors.php:57 msgid "Hourly" msgstr "Stündlich" -#: mod/admin.php:824 include/contact_selectors.php:58 +#: mod/admin.php:826 include/contact_selectors.php:58 msgid "Twice daily" msgstr "Zweimal täglich" -#: mod/admin.php:825 include/contact_selectors.php:59 +#: mod/admin.php:827 include/contact_selectors.php:59 msgid "Daily" msgstr "Täglich" -#: mod/admin.php:831 +#: mod/admin.php:833 msgid "Users, Global Contacts" msgstr "Nutzer, globale Kontakte" -#: mod/admin.php:832 +#: mod/admin.php:834 msgid "Users, Global Contacts/fallback" msgstr "Nutzer, globale Kontakte / Fallback" -#: mod/admin.php:836 +#: mod/admin.php:838 msgid "One month" msgstr "ein Monat" -#: mod/admin.php:837 +#: mod/admin.php:839 msgid "Three months" msgstr "drei Monate" -#: mod/admin.php:838 +#: mod/admin.php:840 msgid "Half a year" msgstr "ein halbes Jahr" -#: mod/admin.php:839 +#: mod/admin.php:841 msgid "One year" msgstr "ein Jahr" -#: mod/admin.php:844 +#: mod/admin.php:846 msgid "Multi user instance" msgstr "Mehrbenutzer Instanz" -#: mod/admin.php:867 +#: mod/admin.php:869 msgid "Closed" msgstr "Geschlossen" -#: mod/admin.php:868 +#: mod/admin.php:870 msgid "Requires approval" msgstr "Bedarf der Zustimmung" -#: mod/admin.php:869 +#: mod/admin.php:871 msgid "Open" msgstr "Offen" -#: mod/admin.php:873 +#: mod/admin.php:875 msgid "No SSL policy, links will track page SSL state" msgstr "Keine SSL Richtlinie, Links werden das verwendete Protokoll beibehalten" -#: mod/admin.php:874 +#: mod/admin.php:876 msgid "Force all links to use SSL" msgstr "SSL für alle Links erzwingen" -#: mod/admin.php:875 +#: mod/admin.php:877 msgid "Self-signed certificate, use SSL for local links only (discouraged)" msgstr "Selbst-unterzeichnetes Zertifikat, SSL nur für lokale Links verwenden (nicht empfohlen)" -#: mod/admin.php:887 mod/admin.php:1475 mod/admin.php:1723 mod/admin.php:1791 -#: mod/admin.php:1940 mod/settings.php:659 mod/settings.php:769 +#: mod/admin.php:889 mod/admin.php:1477 mod/admin.php:1725 mod/admin.php:1793 +#: mod/admin.php:1942 mod/settings.php:659 mod/settings.php:769 #: mod/settings.php:813 mod/settings.php:882 mod/settings.php:969 #: mod/settings.php:1204 msgid "Save Settings" msgstr "Einstellungen speichern" -#: mod/admin.php:888 mod/register.php:263 +#: mod/admin.php:890 mod/register.php:263 msgid "Registration" msgstr "Registrierung" -#: mod/admin.php:889 +#: mod/admin.php:891 msgid "File upload" msgstr "Datei hochladen" -#: mod/admin.php:890 +#: mod/admin.php:892 msgid "Policies" msgstr "Regeln" -#: mod/admin.php:891 +#: mod/admin.php:893 msgid "Advanced" msgstr "Erweitert" -#: mod/admin.php:892 +#: mod/admin.php:894 msgid "Auto Discovered Contact Directory" msgstr "Automatisch ein Kontaktverzeichnis erstellen" -#: mod/admin.php:893 +#: mod/admin.php:895 msgid "Performance" msgstr "Performance" -#: mod/admin.php:894 +#: mod/admin.php:896 msgid "" "Relocate - WARNING: advanced function. Could make this server unreachable." msgstr "Umsiedeln - WARNUNG: Könnte diesen Server unerreichbar machen." -#: mod/admin.php:897 +#: mod/admin.php:899 msgid "Site name" msgstr "Seitenname" -#: mod/admin.php:898 +#: mod/admin.php:900 msgid "Host name" msgstr "Host Name" -#: mod/admin.php:899 +#: mod/admin.php:901 msgid "Sender Email" msgstr "Absender für Emails" -#: mod/admin.php:899 +#: mod/admin.php:901 msgid "" "The email address your server shall use to send notification emails from." msgstr "Die E-Mail Adresse die dein Server zum Versenden von Benachrichtigungen verwenden soll." -#: mod/admin.php:900 +#: mod/admin.php:902 msgid "Banner/Logo" msgstr "Banner/Logo" -#: mod/admin.php:901 +#: mod/admin.php:903 msgid "Shortcut icon" msgstr "Shortcut Icon" -#: mod/admin.php:901 +#: mod/admin.php:903 msgid "Link to an icon that will be used for browsers." msgstr "Link zu einem Icon, das Browser verwenden werden." -#: mod/admin.php:902 +#: mod/admin.php:904 msgid "Touch icon" msgstr "Touch Icon" -#: mod/admin.php:902 +#: mod/admin.php:904 msgid "Link to an icon that will be used for tablets and mobiles." msgstr "Link zu einem Icon das Tablets und Handies verwenden sollen." -#: mod/admin.php:903 +#: mod/admin.php:905 msgid "Additional Info" msgstr "Zusätzliche Informationen" -#: mod/admin.php:903 +#: mod/admin.php:905 #, php-format msgid "" "For public servers: you can add additional information here that will be " "listed at %s/siteinfo." msgstr "Für öffentliche Server kannst Du hier zusätzliche Informationen angeben, die dann auf %s/siteinfo angezeigt werden." -#: mod/admin.php:904 +#: mod/admin.php:906 msgid "System language" msgstr "Systemsprache" -#: mod/admin.php:905 +#: mod/admin.php:907 msgid "System theme" msgstr "Systemweites Theme" -#: mod/admin.php:905 +#: mod/admin.php:907 msgid "" "Default system theme - may be over-ridden by user profiles - change theme settings" msgstr "Vorgabe für das System-Theme - kann von Benutzerprofilen überschrieben werden - Theme-Einstellungen ändern" -#: mod/admin.php:906 +#: mod/admin.php:908 msgid "Mobile system theme" msgstr "Systemweites mobiles Theme" -#: mod/admin.php:906 +#: mod/admin.php:908 msgid "Theme for mobile devices" msgstr "Thema für mobile Geräte" -#: mod/admin.php:907 +#: mod/admin.php:909 msgid "SSL link policy" msgstr "Regeln für SSL Links" -#: mod/admin.php:907 +#: mod/admin.php:909 msgid "Determines whether generated links should be forced to use SSL" msgstr "Bestimmt, ob generierte Links SSL verwenden müssen" -#: mod/admin.php:908 +#: mod/admin.php:910 msgid "Force SSL" msgstr "Erzwinge SSL" -#: mod/admin.php:908 +#: mod/admin.php:910 msgid "" "Force all Non-SSL requests to SSL - Attention: on some systems it could lead" " to endless loops." msgstr "Erzinge alle Nicht-SSL Anfragen auf SSL - Achtung: auf manchen Systemen verursacht dies eine Endlosschleife." -#: mod/admin.php:909 +#: mod/admin.php:911 msgid "Old style 'Share'" msgstr "Altes \"Teilen\" Element" -#: mod/admin.php:909 +#: mod/admin.php:911 msgid "Deactivates the bbcode element 'share' for repeating items." msgstr "Deaktiviert das BBCode Element \"share\" beim Wiederholen von Beiträgen." -#: mod/admin.php:910 +#: mod/admin.php:912 msgid "Hide help entry from navigation menu" msgstr "Verberge den Menüeintrag für die Hilfe im Navigationsmenü" -#: mod/admin.php:910 +#: mod/admin.php:912 msgid "" "Hides the menu entry for the Help pages from the navigation menu. You can " "still access it calling /help directly." msgstr "Verbirgt den Menüeintrag für die Hilfe-Seiten im Navigationsmenü. Die Seiten können weiterhin über /help aufgerufen werden." -#: mod/admin.php:911 +#: mod/admin.php:913 msgid "Single user instance" msgstr "Ein-Nutzer Instanz" -#: mod/admin.php:911 +#: mod/admin.php:913 msgid "Make this instance multi-user or single-user for the named user" msgstr "Regelt ob es sich bei dieser Instanz um eine ein Personen Installation oder eine Installation mit mehr als einem Nutzer handelt." -#: mod/admin.php:912 +#: mod/admin.php:914 msgid "Maximum image size" msgstr "Maximale Bildgröße" -#: mod/admin.php:912 +#: mod/admin.php:914 msgid "" "Maximum size in bytes of uploaded images. Default is 0, which means no " "limits." msgstr "Maximale Uploadgröße von Bildern in Bytes. Standard ist 0, d.h. ohne Limit." -#: mod/admin.php:913 +#: mod/admin.php:915 msgid "Maximum image length" msgstr "Maximale Bildlänge" -#: mod/admin.php:913 +#: mod/admin.php:915 msgid "" "Maximum length in pixels of the longest side of uploaded images. Default is " "-1, which means no limits." msgstr "Maximale Länge in Pixeln der längsten Seite eines hoch geladenen Bildes. Grundeinstellung ist -1 was keine Einschränkung bedeutet." -#: mod/admin.php:914 +#: mod/admin.php:916 msgid "JPEG image quality" msgstr "Qualität des JPEG Bildes" -#: mod/admin.php:914 +#: mod/admin.php:916 msgid "" "Uploaded JPEGS will be saved at this quality setting [0-100]. Default is " "100, which is full quality." msgstr "Hoch geladene JPEG Bilder werden mit dieser Qualität [0-100] gespeichert. Grundeinstellung ist 100, kein Qualitätsverlust." -#: mod/admin.php:916 +#: mod/admin.php:918 msgid "Register policy" msgstr "Registrierungsmethode" -#: mod/admin.php:917 +#: mod/admin.php:919 msgid "Maximum Daily Registrations" msgstr "Maximum täglicher Registrierungen" -#: mod/admin.php:917 +#: mod/admin.php:919 msgid "" "If registration is permitted above, this sets the maximum number of new user" " registrations to accept per day. If register is set to closed, this " "setting has no effect." msgstr "Wenn die Registrierung weiter oben erlaubt ist, regelt dies die maximale Anzahl von Neuanmeldungen pro Tag. Wenn die Registrierung geschlossen ist, hat diese Einstellung keinen Effekt." -#: mod/admin.php:918 +#: mod/admin.php:920 msgid "Register text" msgstr "Registrierungstext" -#: mod/admin.php:918 +#: mod/admin.php:920 msgid "Will be displayed prominently on the registration page." msgstr "Wird gut sichtbar auf der Registrierungsseite angezeigt." -#: mod/admin.php:919 +#: mod/admin.php:921 msgid "Accounts abandoned after x days" msgstr "Nutzerkonten gelten nach x Tagen als unbenutzt" -#: mod/admin.php:919 +#: mod/admin.php:921 msgid "" "Will not waste system resources polling external sites for abandonded " "accounts. Enter 0 for no time limit." msgstr "Verschwende keine System-Ressourcen auf das Pollen externer Seiten, wenn Konten nicht mehr benutzt werden. 0 eingeben für kein Limit." -#: mod/admin.php:920 +#: mod/admin.php:922 msgid "Allowed friend domains" msgstr "Erlaubte Domains für Kontakte" -#: mod/admin.php:920 +#: mod/admin.php:922 msgid "" "Comma separated list of domains which are allowed to establish friendships " "with this site. Wildcards are accepted. Empty to allow any domains" msgstr "Liste der Domains, die für Freundschaften erlaubt sind, durch Kommas getrennt. Platzhalter werden akzeptiert. Leer lassen, um alle Domains zu erlauben." -#: mod/admin.php:921 +#: mod/admin.php:923 msgid "Allowed email domains" msgstr "Erlaubte Domains für E-Mails" -#: mod/admin.php:921 +#: mod/admin.php:923 msgid "" "Comma separated list of domains which are allowed in email addresses for " "registrations to this site. Wildcards are accepted. Empty to allow any " "domains" msgstr "Liste der Domains, die für E-Mail-Adressen bei der Registrierung erlaubt sind, durch Kommas getrennt. Platzhalter werden akzeptiert. Leer lassen, um alle Domains zu erlauben." -#: mod/admin.php:922 +#: mod/admin.php:924 msgid "Block public" msgstr "Öffentlichen Zugriff blockieren" -#: mod/admin.php:922 +#: mod/admin.php:924 msgid "" "Check to block public access to all otherwise public personal pages on this " "site unless you are currently logged in." msgstr "Klicken, um öffentlichen Zugriff auf sonst öffentliche Profile zu blockieren, wenn man nicht eingeloggt ist." -#: mod/admin.php:923 +#: mod/admin.php:925 msgid "Force publish" msgstr "Erzwinge Veröffentlichung" -#: mod/admin.php:923 +#: mod/admin.php:925 msgid "" "Check to force all profiles on this site to be listed in the site directory." msgstr "Klicken, um Anzeige aller Profile dieses Servers im Verzeichnis zu erzwingen." -#: mod/admin.php:924 +#: mod/admin.php:926 msgid "Global directory URL" msgstr "URL des weltweiten Verzeichnisses" -#: mod/admin.php:924 +#: mod/admin.php:926 msgid "" "URL to the global directory. If this is not set, the global directory is " "completely unavailable to the application." msgstr "URL des weltweiten Verzeichnisses. Wenn diese nicht gesetzt ist, ist das Verzeichnis für die Applikation nicht erreichbar." -#: mod/admin.php:925 +#: mod/admin.php:927 msgid "Allow threaded items" msgstr "Erlaube Threads in Diskussionen" -#: mod/admin.php:925 +#: mod/admin.php:927 msgid "Allow infinite level threading for items on this site." msgstr "Erlaube ein unendliches Level für Threads auf dieser Seite." -#: mod/admin.php:926 +#: mod/admin.php:928 msgid "Private posts by default for new users" msgstr "Private Beiträge als Standard für neue Nutzer" -#: mod/admin.php:926 +#: mod/admin.php:928 msgid "" "Set default post permissions for all new members to the default privacy " "group rather than public." msgstr "Die Standard-Zugriffsrechte für neue Nutzer werden so gesetzt, dass als Voreinstellung in die private Gruppe gepostet wird anstelle von öffentlichen Beiträgen." -#: mod/admin.php:927 +#: mod/admin.php:929 msgid "Don't include post content in email notifications" msgstr "Inhalte von Beiträgen nicht in E-Mail-Benachrichtigungen versenden" -#: mod/admin.php:927 +#: mod/admin.php:929 msgid "" "Don't include the content of a post/comment/private message/etc. in the " "email notifications that are sent out from this site, as a privacy measure." msgstr "Inhalte von Beiträgen/Kommentaren/privaten Nachrichten/usw., zum Datenschutz nicht in E-Mail-Benachrichtigungen einbinden." -#: mod/admin.php:928 +#: mod/admin.php:930 msgid "Disallow public access to addons listed in the apps menu." msgstr "Öffentlichen Zugriff auf Addons im Apps Menü verbieten." -#: mod/admin.php:928 +#: mod/admin.php:930 msgid "" "Checking this box will restrict addons listed in the apps menu to members " "only." msgstr "Wenn ausgewählt werden die im Apps Menü aufgeführten Addons nur angemeldeten Nutzern der Seite zur Verfügung gestellt." -#: mod/admin.php:929 +#: mod/admin.php:931 msgid "Don't embed private images in posts" msgstr "Private Bilder nicht in Beiträgen einbetten." -#: mod/admin.php:929 +#: mod/admin.php:931 msgid "" "Don't replace locally-hosted private photos in posts with an embedded copy " "of the image. This means that contacts who receive posts containing private " @@ -2505,228 +2506,228 @@ msgid "" "while." msgstr "Ersetze lokal gehostete private Fotos in Beiträgen nicht mit einer eingebetteten Kopie des Bildes. Dies bedeutet, dass Kontakte, die Beiträge mit privaten Fotos erhalten sich zunächst auf den jeweiligen Servern authentifizieren müssen bevor die Bilder geladen und angezeigt werden, was eine gewisse Zeit dauert." -#: mod/admin.php:930 +#: mod/admin.php:932 msgid "Allow Users to set remote_self" msgstr "Nutzern erlauben das remote_self Flag zu setzen" -#: mod/admin.php:930 +#: mod/admin.php:932 msgid "" "With checking this, every user is allowed to mark every contact as a " "remote_self in the repair contact dialog. Setting this flag on a contact " "causes mirroring every posting of that contact in the users stream." msgstr "Ist dies ausgewählt kann jeder Nutzer jeden seiner Kontakte als remote_self (entferntes Konto) im Kontakt reparieren Dialog markieren. Nach dem setzten dieses Flags werden alle Top-Level Beiträge dieser Kontakte automatisch in den Stream dieses Nutzers gepostet." -#: mod/admin.php:931 +#: mod/admin.php:933 msgid "Block multiple registrations" msgstr "Unterbinde Mehrfachregistrierung" -#: mod/admin.php:931 +#: mod/admin.php:933 msgid "Disallow users to register additional accounts for use as pages." msgstr "Benutzern nicht erlauben, weitere Konten als zusätzliche Profile anzulegen." -#: mod/admin.php:932 +#: mod/admin.php:934 msgid "OpenID support" msgstr "OpenID Unterstützung" -#: mod/admin.php:932 +#: mod/admin.php:934 msgid "OpenID support for registration and logins." msgstr "OpenID-Unterstützung für Registrierung und Login." -#: mod/admin.php:933 +#: mod/admin.php:935 msgid "Fullname check" msgstr "Namen auf Vollständigkeit überprüfen" -#: mod/admin.php:933 +#: mod/admin.php:935 msgid "" "Force users to register with a space between firstname and lastname in Full " "name, as an antispam measure" msgstr "Leerzeichen zwischen Vor- und Nachname im vollständigen Namen erzwingen, um SPAM zu vermeiden." -#: mod/admin.php:934 +#: mod/admin.php:936 msgid "UTF-8 Regular expressions" msgstr "UTF-8 Reguläre Ausdrücke" -#: mod/admin.php:934 +#: mod/admin.php:936 msgid "Use PHP UTF8 regular expressions" msgstr "PHP UTF8 Ausdrücke verwenden" -#: mod/admin.php:935 +#: mod/admin.php:937 msgid "Community Page Style" msgstr "Art der Gemeinschaftsseite" -#: mod/admin.php:935 +#: mod/admin.php:937 msgid "" "Type of community page to show. 'Global community' shows every public " "posting from an open distributed network that arrived on this server." msgstr "Welche Art der Gemeinschaftsseite soll verwendet werden? Globale Gemeinschaftsseite zeigt alle öffentlichen Beiträge eines offenen dezentralen Netzwerks an die auf diesem Server eintreffen." -#: mod/admin.php:936 +#: mod/admin.php:938 msgid "Posts per user on community page" msgstr "Anzahl der Beiträge pro Benutzer auf der Gemeinschaftsseite" -#: mod/admin.php:936 +#: mod/admin.php:938 msgid "" "The maximum number of posts per user on the community page. (Not valid for " "'Global Community')" msgstr "Die Anzahl der Beiträge die von jedem Nutzer maximal auf der Gemeinschaftsseite angezeigt werden sollen. Dieser Parameter wird nicht für die Globale Gemeinschaftsseite genutzt." -#: mod/admin.php:937 +#: mod/admin.php:939 msgid "Enable OStatus support" msgstr "OStatus Unterstützung aktivieren" -#: mod/admin.php:937 +#: mod/admin.php:939 msgid "" "Provide built-in OStatus (StatusNet, GNU Social etc.) compatibility. All " "communications in OStatus are public, so privacy warnings will be " "occasionally displayed." msgstr "Biete die eingebaute OStatus (iStatusNet, GNU Social, etc.) Unterstützung an. Jede Kommunikation in OStatus ist öffentlich, Privatsphäre Warnungen werden nur bei Bedarf angezeigt." -#: mod/admin.php:938 +#: mod/admin.php:940 msgid "OStatus conversation completion interval" msgstr "Intervall zum Vervollständigen von OStatus Unterhaltungen" -#: mod/admin.php:938 +#: mod/admin.php:940 msgid "" "How often shall the poller check for new entries in OStatus conversations? " "This can be a very ressource task." msgstr "Wie oft soll der Poller checken ob es neue Nachrichten in OStatus Unterhaltungen gibt die geladen werden müssen. Je nach Anzahl der OStatus Kontakte könnte dies ein sehr Ressourcen lastiger Job sein." -#: mod/admin.php:939 +#: mod/admin.php:941 msgid "OStatus support can only be enabled if threading is enabled." msgstr "OStatus Unterstützung kann nur aktiviert werden wenn \"Threading\" aktiviert ist. " -#: mod/admin.php:941 +#: mod/admin.php:943 msgid "" "Diaspora support can't be enabled because Friendica was installed into a sub" " directory." msgstr "Diaspora Unterstützung kann nicht aktiviert werden da Friendica in ein Unterverzeichnis installiert ist." -#: mod/admin.php:942 +#: mod/admin.php:944 msgid "Enable Diaspora support" msgstr "Diaspora Unterstützung aktivieren" -#: mod/admin.php:942 +#: mod/admin.php:944 msgid "Provide built-in Diaspora network compatibility." msgstr "Verwende die eingebaute Diaspora-Verknüpfung." -#: mod/admin.php:943 +#: mod/admin.php:945 msgid "Only allow Friendica contacts" msgstr "Nur Friendica-Kontakte erlauben" -#: mod/admin.php:943 +#: mod/admin.php:945 msgid "" "All contacts must use Friendica protocols. All other built-in communication " "protocols disabled." msgstr "Alle Kontakte müssen das Friendica Protokoll nutzen. Alle anderen Kommunikationsprotokolle werden deaktiviert." -#: mod/admin.php:944 +#: mod/admin.php:946 msgid "Verify SSL" msgstr "SSL Überprüfen" -#: mod/admin.php:944 +#: mod/admin.php:946 msgid "" "If you wish, you can turn on strict certificate checking. This will mean you" " cannot connect (at all) to self-signed SSL sites." msgstr "Wenn gewollt, kann man hier eine strenge Zertifikatkontrolle einstellen. Das bedeutet, dass man zu keinen Seiten mit selbst unterzeichnetem SSL eine Verbindung herstellen kann." -#: mod/admin.php:945 +#: mod/admin.php:947 msgid "Proxy user" msgstr "Proxy Nutzer" -#: mod/admin.php:946 +#: mod/admin.php:948 msgid "Proxy URL" msgstr "Proxy URL" -#: mod/admin.php:947 +#: mod/admin.php:949 msgid "Network timeout" msgstr "Netzwerk Wartezeit" -#: mod/admin.php:947 +#: mod/admin.php:949 msgid "Value is in seconds. Set to 0 for unlimited (not recommended)." msgstr "Der Wert ist in Sekunden. Setze 0 für unbegrenzt (nicht empfohlen)." -#: mod/admin.php:948 +#: mod/admin.php:950 msgid "Delivery interval" msgstr "Zustellungsintervall" -#: mod/admin.php:948 +#: mod/admin.php:950 msgid "" "Delay background delivery processes by this many seconds to reduce system " "load. Recommend: 4-5 for shared hosts, 2-3 for virtual private servers. 0-1 " "for large dedicated servers." msgstr "Verzögere im Hintergrund laufende Auslieferungsprozesse um die angegebene Anzahl an Sekunden, um die Systemlast zu verringern. Empfehlungen: 4-5 für Shared-Hosts, 2-3 für VPS, 0-1 für große dedizierte Server." -#: mod/admin.php:949 +#: mod/admin.php:951 msgid "Poll interval" msgstr "Abfrageintervall" -#: mod/admin.php:949 +#: mod/admin.php:951 msgid "" "Delay background polling processes by this many seconds to reduce system " "load. If 0, use delivery interval." msgstr "Verzögere Hintergrundprozesse um diese Anzahl an Sekunden, um die Systemlast zu reduzieren. Bei 0 Sekunden wird das Auslieferungsintervall verwendet." -#: mod/admin.php:950 +#: mod/admin.php:952 msgid "Maximum Load Average" msgstr "Maximum Load Average" -#: mod/admin.php:950 +#: mod/admin.php:952 msgid "" "Maximum system load before delivery and poll processes are deferred - " "default 50." msgstr "Maximale Systemlast bevor Verteil- und Empfangsprozesse verschoben werden - Standard 50" -#: mod/admin.php:951 +#: mod/admin.php:953 msgid "Maximum Load Average (Frontend)" msgstr "Maximum Load Average (Frontend)" -#: mod/admin.php:951 +#: mod/admin.php:953 msgid "Maximum system load before the frontend quits service - default 50." msgstr "Maximale Systemlast bevor Vordergrundprozesse pausiert werden - Standard 50." -#: mod/admin.php:952 +#: mod/admin.php:954 msgid "Maximum table size for optimization" msgstr "Maximale Tabellengröße zur Optimierung" -#: mod/admin.php:952 +#: mod/admin.php:954 msgid "" "Maximum table size (in MB) for the automatic optimization - default 100 MB. " "Enter -1 to disable it." msgstr "Maximale Tabellengröße (in MB) für die automatische Optimierung - Standard 100 MB. Gib -1 für Deaktivierung ein." -#: mod/admin.php:953 +#: mod/admin.php:955 msgid "Minimum level of fragmentation" msgstr "Minimaler Fragmentationsgrad" -#: mod/admin.php:953 +#: mod/admin.php:955 msgid "" "Minimum fragmenation level to start the automatic optimization - default " "value is 30%." msgstr "Minimales Fragmentationsgrad von Datenbanktabellen um die automatische Optimierung einzuleiten - Standardwert ist 30%" -#: mod/admin.php:955 +#: mod/admin.php:957 msgid "Periodical check of global contacts" msgstr "Regelmäßig globale Kontakte überprüfen" -#: mod/admin.php:955 +#: mod/admin.php:957 msgid "" "If enabled, the global contacts are checked periodically for missing or " "outdated data and the vitality of the contacts and servers." msgstr "Wenn diese Option aktiviert ist, werden die globalen Kontakte regelmäßig auf fehlende oder veraltete Daten sowie auf Erreichbarkeit des Kontakts und des Servers überprüft." -#: mod/admin.php:956 +#: mod/admin.php:958 msgid "Days between requery" msgstr "Tage zwischen erneuten Abfragen" -#: mod/admin.php:956 +#: mod/admin.php:958 msgid "Number of days after which a server is requeried for his contacts." msgstr "Legt das Abfrageintervall fest, nachdem ein Server erneut nach Kontakten abgefragt werden soll." -#: mod/admin.php:957 +#: mod/admin.php:959 msgid "Discover contacts from other servers" msgstr "Neue Kontakte auf anderen Servern entdecken" -#: mod/admin.php:957 +#: mod/admin.php:959 msgid "" "Periodically query other servers for contacts. You can choose between " "'users': the users on the remote system, 'Global Contacts': active contacts " @@ -2736,32 +2737,32 @@ msgid "" "Global Contacts'." msgstr "Regelmäßig andere Server nach potentiellen Kontakten absuchen. Du kannst zwischen 'Nutzern', den tatsächlichen Nutzern des anderen Systems und 'globalen Kontakten', aktiven Kontakten die auf dem System bekannt sind, wählen. Der Fallback-Mechanismus ist für ältere Friendica und Redmatrix Server gedacht, bei denen globale Kontakte noch nicht verfügbar sind. Durch den Fallbackmodus entsteht auf deinem Server eine wesentlich höhere Last, empfohlen wird der Modus 'Nutzer, globale Kontakte'." -#: mod/admin.php:958 +#: mod/admin.php:960 msgid "Timeframe for fetching global contacts" msgstr "Zeitfenster für globale Kontakte" -#: mod/admin.php:958 +#: mod/admin.php:960 msgid "" "When the discovery is activated, this value defines the timeframe for the " "activity of the global contacts that are fetched from other servers." msgstr "Wenn die Entdeckung neuer Kontakte aktiv ist, definiert dieses Zeitfenster den Zeitraum in dem globale Kontakte als aktiv gelten und von anderen Servern importiert werden." -#: mod/admin.php:959 +#: mod/admin.php:961 msgid "Search the local directory" msgstr "Lokales Verzeichnis durchsuchen" -#: mod/admin.php:959 +#: mod/admin.php:961 msgid "" "Search the local directory instead of the global directory. When searching " "locally, every search will be executed on the global directory in the " "background. This improves the search results when the search is repeated." msgstr "Suche im lokalen Verzeichnis anstelle des globalen Verzeichnisses durchführen. Jede Suche wird im Hintergrund auch im globalen Verzeichnis durchgeführt umd die Suchresultate zu verbessern, wenn diese Suche wiederholt wird." -#: mod/admin.php:961 +#: mod/admin.php:963 msgid "Publish server information" msgstr "Server Informationen veröffentlichen" -#: mod/admin.php:961 +#: mod/admin.php:963 msgid "" "If enabled, general server and usage data will be published. The data " "contains the name and version of the server, number of users with public " @@ -2769,205 +2770,205 @@ msgid "" " href='http://the-federation.info/'>the-federation.info for details." msgstr "Wenn aktiviert, werden allgemeine Informationen über den Server und Nutzungsdaten veröffentlicht. Die Daten beinhalten den Namen sowie die Version des Servers, die Anzahl der Nutzer_innen mit öffentlichen Profilen, die Anzahl der Beiträge sowie aktivierte Protokolle und Connectoren. Für Details bitte the-federation.info aufrufen." -#: mod/admin.php:963 +#: mod/admin.php:965 msgid "Use MySQL full text engine" msgstr "Nutze MySQL full text engine" -#: mod/admin.php:963 +#: mod/admin.php:965 msgid "" "Activates the full text engine. Speeds up search - but can only search for " "four and more characters." msgstr "Aktiviert die 'full text engine'. Beschleunigt die Suche - aber es kann nur nach vier oder mehr Zeichen gesucht werden." -#: mod/admin.php:964 +#: mod/admin.php:966 msgid "Suppress Language" msgstr "Sprachinformation unterdrücken" -#: mod/admin.php:964 +#: mod/admin.php:966 msgid "Suppress language information in meta information about a posting." msgstr "Verhindert das Erzeugen der Meta-Information zur Spracherkennung eines Beitrags." -#: mod/admin.php:965 +#: mod/admin.php:967 msgid "Suppress Tags" msgstr "Tags Unterdrücken" -#: mod/admin.php:965 +#: mod/admin.php:967 msgid "Suppress showing a list of hashtags at the end of the posting." msgstr "Unterdrückt die Anzeige von Tags am Ende eines Beitrags." -#: mod/admin.php:966 +#: mod/admin.php:968 msgid "Path to item cache" msgstr "Pfad zum Eintrag Cache" -#: mod/admin.php:966 +#: mod/admin.php:968 msgid "The item caches buffers generated bbcode and external images." msgstr "Im Item-Cache werden externe Bilder und geparster BBCode zwischen gespeichert." -#: mod/admin.php:967 +#: mod/admin.php:969 msgid "Cache duration in seconds" msgstr "Cache-Dauer in Sekunden" -#: mod/admin.php:967 +#: mod/admin.php:969 msgid "" "How long should the cache files be hold? Default value is 86400 seconds (One" " day). To disable the item cache, set the value to -1." msgstr "Wie lange sollen die gecachedten Dateien vorgehalten werden? Grundeinstellung sind 86400 Sekunden (ein Tag). Um den Item Cache zu deaktivieren, setze diesen Wert auf -1." -#: mod/admin.php:968 +#: mod/admin.php:970 msgid "Maximum numbers of comments per post" msgstr "Maximale Anzahl von Kommentaren pro Beitrag" -#: mod/admin.php:968 +#: mod/admin.php:970 msgid "How much comments should be shown for each post? Default value is 100." msgstr "Wie viele Kommentare sollen pro Beitrag angezeigt werden? Standardwert sind 100." -#: mod/admin.php:969 +#: mod/admin.php:971 msgid "Path for lock file" msgstr "Pfad für die Sperrdatei" -#: mod/admin.php:969 +#: mod/admin.php:971 msgid "" "The lock file is used to avoid multiple pollers at one time. Only define a " "folder here." msgstr "Die lock-Datei wird benutzt, damit nicht mehrere poller auf einmal laufen. Definiere hier einen Dateiverzeichnis." -#: mod/admin.php:970 +#: mod/admin.php:972 msgid "Temp path" msgstr "Temp Pfad" -#: mod/admin.php:970 +#: mod/admin.php:972 msgid "" "If you have a restricted system where the webserver can't access the system " "temp path, enter another path here." msgstr "Solltest du ein eingeschränktes System haben, auf dem der Webserver nicht auf das temp Verzeichnis des Systems zugreifen kann, setze hier einen anderen Pfad." -#: mod/admin.php:971 +#: mod/admin.php:973 msgid "Base path to installation" msgstr "Basis-Pfad zur Installation" -#: mod/admin.php:971 +#: mod/admin.php:973 msgid "" "If the system cannot detect the correct path to your installation, enter the" " correct path here. This setting should only be set if you are using a " "restricted system and symbolic links to your webroot." msgstr "Falls das System nicht den korrekten Pfad zu deiner Installation gefunden hat, gib den richtigen Pfad bitte hier ein. Du solltest hier den Pfad nur auf einem eingeschränkten System angeben müssen, bei dem du mit symbolischen Links auf dein Webverzeichnis verweist." -#: mod/admin.php:972 +#: mod/admin.php:974 msgid "Disable picture proxy" msgstr "Bilder Proxy deaktivieren" -#: mod/admin.php:972 +#: mod/admin.php:974 msgid "" "The picture proxy increases performance and privacy. It shouldn't be used on" " systems with very low bandwith." msgstr "Der Proxy für Bilder verbessert die Leistung und Privatsphäre der Nutzer. Er sollte nicht auf Systemen verwendet werden, die nur über begrenzte Bandbreite verfügen." -#: mod/admin.php:973 +#: mod/admin.php:975 msgid "Enable old style pager" msgstr "Den Old-Style Pager aktiviren" -#: mod/admin.php:973 +#: mod/admin.php:975 msgid "" "The old style pager has page numbers but slows down massively the page " "speed." msgstr "Der Old-Style Pager zeigt Seitennummern an, verlangsamt aber auch drastisch das Laden einer Seite." -#: mod/admin.php:974 +#: mod/admin.php:976 msgid "Only search in tags" msgstr "Nur in Tags suchen" -#: mod/admin.php:974 +#: mod/admin.php:976 msgid "On large systems the text search can slow down the system extremely." msgstr "Auf großen Knoten kann die Volltext-Suche das System ausbremsen." -#: mod/admin.php:976 +#: mod/admin.php:978 msgid "New base url" msgstr "Neue Basis-URL" -#: mod/admin.php:976 +#: mod/admin.php:978 msgid "" "Change base url for this server. Sends relocate message to all DFRN contacts" " of all users." msgstr "Ändert die Basis-URL dieses Servers und sendet eine Umzugsmitteilung an alle DFRN Kontakte deiner Nutzer_innen." -#: mod/admin.php:978 +#: mod/admin.php:980 msgid "RINO Encryption" msgstr "RINO Verschlüsselung" -#: mod/admin.php:978 +#: mod/admin.php:980 msgid "Encryption layer between nodes." msgstr "Verschlüsselung zwischen Friendica Instanzen" -#: mod/admin.php:979 +#: mod/admin.php:981 msgid "Embedly API key" msgstr "Embedly API Schlüssel" -#: mod/admin.php:979 +#: mod/admin.php:981 msgid "" "Embedly is used to fetch additional data for " "web pages. This is an optional parameter." msgstr "Embedly wird verwendet um zusätzliche Informationen von Webseiten zu laden. Dies ist ein optionaler Parameter." -#: mod/admin.php:1008 +#: mod/admin.php:1010 msgid "Update has been marked successful" msgstr "Update wurde als erfolgreich markiert" -#: mod/admin.php:1016 +#: mod/admin.php:1018 #, php-format msgid "Database structure update %s was successfully applied." msgstr "Das Update %s der Struktur der Datenbank wurde erfolgreich angewandt." -#: mod/admin.php:1019 +#: mod/admin.php:1021 #, php-format msgid "Executing of database structure update %s failed with error: %s" msgstr "Das Update %s der Struktur der Datenbank schlug mit folgender Fehlermeldung fehl: %s" -#: mod/admin.php:1031 +#: mod/admin.php:1033 #, php-format msgid "Executing %s failed with error: %s" msgstr "Die Ausführung von %s schlug fehl. Fehlermeldung: %s" -#: mod/admin.php:1034 +#: mod/admin.php:1036 #, php-format msgid "Update %s was successfully applied." msgstr "Update %s war erfolgreich." -#: mod/admin.php:1038 +#: mod/admin.php:1040 #, php-format msgid "Update %s did not return a status. Unknown if it succeeded." msgstr "Update %s hat keinen Status zurückgegeben. Unbekannter Status." -#: mod/admin.php:1040 +#: mod/admin.php:1042 #, php-format msgid "There was no additional update function %s that needed to be called." msgstr "Es gab keine weitere Update-Funktion, die von %s ausgeführt werden musste." -#: mod/admin.php:1059 +#: mod/admin.php:1061 msgid "No failed updates." msgstr "Keine fehlgeschlagenen Updates." -#: mod/admin.php:1060 +#: mod/admin.php:1062 msgid "Check database structure" msgstr "Datenbank Struktur überprüfen" -#: mod/admin.php:1065 +#: mod/admin.php:1067 msgid "Failed Updates" msgstr "Fehlgeschlagene Updates" -#: mod/admin.php:1066 +#: mod/admin.php:1068 msgid "" "This does not include updates prior to 1139, which did not return a status." msgstr "Ohne Updates vor 1139, da diese keinen Status zurückgegeben haben." -#: mod/admin.php:1067 +#: mod/admin.php:1069 msgid "Mark success (if update was manually applied)" msgstr "Als erfolgreich markieren (falls das Update manuell installiert wurde)" -#: mod/admin.php:1068 +#: mod/admin.php:1070 msgid "Attempt to execute this update step automatically" msgstr "Versuchen, diesen Schritt automatisch auszuführen" -#: mod/admin.php:1100 +#: mod/admin.php:1102 #, php-format msgid "" "\n" @@ -2975,7 +2976,7 @@ msgid "" "\t\t\t\tthe administrator of %2$s has set up an account for you." msgstr "\nHallo %1$s,\n\nauf %2$s wurde ein Account für Dich angelegt." -#: mod/admin.php:1103 +#: mod/admin.php:1105 #, php-format msgid "" "\n" @@ -3005,168 +3006,168 @@ msgid "" "\t\t\tThank you and welcome to %4$s." msgstr "\nNachfolgend die Anmelde-Details:\n\tAdresse der Seite:\t%1$s\n\tBenutzername:\t%2$s\n\tPasswort:\t%3$s\n\nDu kannst Dein Passwort unter \"Einstellungen\" ändern, sobald Du Dich\nangemeldet hast.\n\nBitte nimm Dir ein paar Minuten um die anderen Einstellungen auf dieser\nSeite zu kontrollieren.\n\nEventuell magst Du ja auch einige Informationen über Dich in Deinem\nProfil veröffentlichen, damit andere Leute Dich einfacher finden können.\nBearbeite hierfür einfach Dein Standard-Profil (über die Profil-Seite).\n\nWir empfehlen Dir, Deinen kompletten Namen anzugeben und ein zu Dir\npassendes Profilbild zu wählen, damit Dich alte Bekannte wieder finden.\nAußerdem ist es nützlich, wenn Du auf Deinem Profil Schlüsselwörter\nangibst. Das erleichtert es, Leute zu finden, die Deine Interessen teilen.\n\nWir respektieren Deine Privatsphäre - keine dieser Angaben ist nötig.\nWenn Du neu im Netzwerk bist und noch niemanden kennst, dann können sie\nallerdings dabei helfen, neue und interessante Kontakte zu knüpfen.\n\nNun viel Spaß, gute Begegnungen und willkommen auf %4$s." -#: mod/admin.php:1135 include/user.php:423 +#: mod/admin.php:1137 include/user.php:423 #, php-format msgid "Registration details for %s" msgstr "Details der Registration von %s" -#: mod/admin.php:1147 +#: mod/admin.php:1149 #, php-format msgid "%s user blocked/unblocked" msgid_plural "%s users blocked/unblocked" msgstr[0] "%s Benutzer geblockt/freigegeben" msgstr[1] "%s Benutzer geblockt/freigegeben" -#: mod/admin.php:1154 +#: mod/admin.php:1156 #, php-format msgid "%s user deleted" msgid_plural "%s users deleted" msgstr[0] "%s Nutzer gelöscht" msgstr[1] "%s Nutzer gelöscht" -#: mod/admin.php:1201 +#: mod/admin.php:1203 #, php-format msgid "User '%s' deleted" msgstr "Nutzer '%s' gelöscht" -#: mod/admin.php:1209 +#: mod/admin.php:1211 #, php-format msgid "User '%s' unblocked" msgstr "Nutzer '%s' entsperrt" -#: mod/admin.php:1209 +#: mod/admin.php:1211 #, php-format msgid "User '%s' blocked" msgstr "Nutzer '%s' gesperrt" -#: mod/admin.php:1300 +#: mod/admin.php:1302 msgid "Add User" msgstr "Nutzer hinzufügen" -#: mod/admin.php:1301 +#: mod/admin.php:1303 msgid "select all" msgstr "Alle auswählen" -#: mod/admin.php:1302 +#: mod/admin.php:1304 msgid "User registrations waiting for confirm" msgstr "Neuanmeldungen, die auf Deine Bestätigung warten" -#: mod/admin.php:1303 +#: mod/admin.php:1305 msgid "User waiting for permanent deletion" msgstr "Nutzer wartet auf permanente Löschung" -#: mod/admin.php:1304 +#: mod/admin.php:1306 msgid "Request date" msgstr "Anfragedatum" -#: mod/admin.php:1304 mod/admin.php:1316 mod/admin.php:1317 mod/admin.php:1332 +#: mod/admin.php:1306 mod/admin.php:1318 mod/admin.php:1319 mod/admin.php:1334 #: include/contact_selectors.php:79 include/contact_selectors.php:86 msgid "Email" msgstr "E-Mail" -#: mod/admin.php:1305 +#: mod/admin.php:1307 msgid "No registrations." msgstr "Keine Neuanmeldungen." -#: mod/admin.php:1307 +#: mod/admin.php:1309 msgid "Deny" msgstr "Verwehren" -#: mod/admin.php:1311 +#: mod/admin.php:1313 msgid "Site admin" msgstr "Seitenadministrator" -#: mod/admin.php:1312 +#: mod/admin.php:1314 msgid "Account expired" msgstr "Account ist abgelaufen" -#: mod/admin.php:1315 +#: mod/admin.php:1317 msgid "New User" msgstr "Neuer Nutzer" -#: mod/admin.php:1316 mod/admin.php:1317 +#: mod/admin.php:1318 mod/admin.php:1319 msgid "Register date" msgstr "Anmeldedatum" -#: mod/admin.php:1316 mod/admin.php:1317 +#: mod/admin.php:1318 mod/admin.php:1319 msgid "Last login" msgstr "Letzte Anmeldung" -#: mod/admin.php:1316 mod/admin.php:1317 +#: mod/admin.php:1318 mod/admin.php:1319 msgid "Last item" msgstr "Letzter Beitrag" -#: mod/admin.php:1316 +#: mod/admin.php:1318 msgid "Deleted since" msgstr "Gelöscht seit" -#: mod/admin.php:1317 mod/settings.php:41 +#: mod/admin.php:1319 mod/settings.php:41 msgid "Account" msgstr "Nutzerkonto" -#: mod/admin.php:1319 +#: mod/admin.php:1321 msgid "" "Selected users will be deleted!\\n\\nEverything these users had posted on " "this site will be permanently deleted!\\n\\nAre you sure?" msgstr "Die markierten Nutzer werden gelöscht!\\n\\nAlle Beiträge, die diese Nutzer auf dieser Seite veröffentlicht haben, werden permanent gelöscht!\\n\\nBist Du sicher?" -#: mod/admin.php:1320 +#: mod/admin.php:1322 msgid "" "The user {0} will be deleted!\\n\\nEverything this user has posted on this " "site will be permanently deleted!\\n\\nAre you sure?" msgstr "Der Nutzer {0} wird gelöscht!\\n\\nAlles was dieser Nutzer auf dieser Seite veröffentlicht hat, wird permanent gelöscht!\\n\\nBist Du sicher?" -#: mod/admin.php:1330 +#: mod/admin.php:1332 msgid "Name of the new user." msgstr "Name des neuen Nutzers" -#: mod/admin.php:1331 +#: mod/admin.php:1333 msgid "Nickname" msgstr "Spitzname" -#: mod/admin.php:1331 +#: mod/admin.php:1333 msgid "Nickname of the new user." msgstr "Spitznamen für den neuen Nutzer" -#: mod/admin.php:1332 +#: mod/admin.php:1334 msgid "Email address of the new user." msgstr "Email Adresse des neuen Nutzers" -#: mod/admin.php:1375 +#: mod/admin.php:1377 #, php-format msgid "Plugin %s disabled." msgstr "Plugin %s deaktiviert." -#: mod/admin.php:1379 +#: mod/admin.php:1381 #, php-format msgid "Plugin %s enabled." msgstr "Plugin %s aktiviert." -#: mod/admin.php:1390 mod/admin.php:1626 +#: mod/admin.php:1392 mod/admin.php:1628 msgid "Disable" msgstr "Ausschalten" -#: mod/admin.php:1392 mod/admin.php:1628 +#: mod/admin.php:1394 mod/admin.php:1630 msgid "Enable" msgstr "Einschalten" -#: mod/admin.php:1415 mod/admin.php:1673 +#: mod/admin.php:1417 mod/admin.php:1675 msgid "Toggle" msgstr "Umschalten" -#: mod/admin.php:1423 mod/admin.php:1682 +#: mod/admin.php:1425 mod/admin.php:1684 msgid "Author: " msgstr "Autor:" -#: mod/admin.php:1424 mod/admin.php:1683 +#: mod/admin.php:1426 mod/admin.php:1685 msgid "Maintainer: " msgstr "Betreuer:" -#: mod/admin.php:1476 +#: mod/admin.php:1478 msgid "Reload active plugins" msgstr "Aktive Plugins neu laden" -#: mod/admin.php:1481 +#: mod/admin.php:1483 #, php-format msgid "" "There are currently no plugins available on your node. You can find the " @@ -3174,62 +3175,62 @@ msgid "" "in the open plugin registry at %2$s" msgstr "Es sind derzeit keine Plugins auf diesem Knoten verfügbar. Du findest das offizielle Plugin-Repository unter %1$s und weitere eventuell interessante Plugins im offenen Plugins-Verzeichnis auf %2$s." -#: mod/admin.php:1586 +#: mod/admin.php:1588 msgid "No themes found." msgstr "Keine Themen gefunden." -#: mod/admin.php:1664 +#: mod/admin.php:1666 msgid "Screenshot" msgstr "Bildschirmfoto" -#: mod/admin.php:1724 +#: mod/admin.php:1726 msgid "Reload active themes" msgstr "Aktives Theme neu laden" -#: mod/admin.php:1729 +#: mod/admin.php:1731 #, php-format msgid "No themes found on the system. They should be paced in %1$s" msgstr "Es wurden keine Themes auf dem System gefunden. Diese sollten in %1$s patziert werden." -#: mod/admin.php:1730 +#: mod/admin.php:1732 msgid "[Experimental]" msgstr "[Experimentell]" -#: mod/admin.php:1731 +#: mod/admin.php:1733 msgid "[Unsupported]" msgstr "[Nicht unterstützt]" -#: mod/admin.php:1755 +#: mod/admin.php:1757 msgid "Log settings updated." msgstr "Protokolleinstellungen aktualisiert." -#: mod/admin.php:1792 +#: mod/admin.php:1794 msgid "Clear" msgstr "löschen" -#: mod/admin.php:1797 +#: mod/admin.php:1799 msgid "Enable Debugging" msgstr "Protokoll führen" -#: mod/admin.php:1798 +#: mod/admin.php:1800 msgid "Log file" msgstr "Protokolldatei" -#: mod/admin.php:1798 +#: mod/admin.php:1800 msgid "" "Must be writable by web server. Relative to your Friendica top-level " "directory." msgstr "Webserver muss Schreibrechte besitzen. Abhängig vom Friendica-Installationsverzeichnis." -#: mod/admin.php:1799 +#: mod/admin.php:1801 msgid "Log level" msgstr "Protokoll-Level" -#: mod/admin.php:1802 +#: mod/admin.php:1804 msgid "PHP logging" msgstr "PHP Protokollieren" -#: mod/admin.php:1803 +#: mod/admin.php:1805 msgid "" "To enable logging of PHP errors and warnings you can add the following to " "the .htconfig.php file of your installation. The filename set in the " @@ -3238,20 +3239,20 @@ msgid "" "'display_errors' is to enable these options, set to '0' to disable them." msgstr "Um PHP Warnungen und Fehler zu protokollieren, kannst du die folgenden Zeilen zur .htconfig.php Datei deiner Installation hinzufügen. Den Dateinamen der Log-Datei legst du in der Zeile mit dem 'error_log' fest, Er ist relativ zum Friendica-Stammverzeichnis und muss schreibbar durch den Webserver sein. Eine \"1\" als Option für die Punkte 'log_errors' und 'display_errors' aktiviert die Funktionen zum Protokollieren bzw. Anzeigen der Fehler, eine \"0\" deaktiviert sie." -#: mod/admin.php:1929 mod/admin.php:1930 mod/settings.php:759 +#: mod/admin.php:1931 mod/admin.php:1932 mod/settings.php:759 msgid "Off" msgstr "Aus" -#: mod/admin.php:1929 mod/admin.php:1930 mod/settings.php:759 +#: mod/admin.php:1931 mod/admin.php:1932 mod/settings.php:759 msgid "On" msgstr "An" -#: mod/admin.php:1930 +#: mod/admin.php:1932 #, php-format msgid "Lock feature %s" msgstr "Feature festlegen: %s" -#: mod/admin.php:1938 +#: mod/admin.php:1940 msgid "Manage Additional Features" msgstr "Zusätzliche Features Verwalten" @@ -3644,7 +3645,7 @@ msgstr[1] "Kommentare" #: mod/content.php:608 boot.php:870 object/Item.php:422 #: include/contact_widgets.php:242 include/forums.php:110 -#: include/items.php:5188 view/theme/vier/theme.php:264 +#: include/items.php:5207 view/theme/vier/theme.php:264 msgid "show more" msgstr "mehr anzeigen" @@ -6708,12 +6709,12 @@ msgstr "Sekunden" msgid "%1$d %2$s ago" msgstr "%1$d %2$s her" -#: include/datetime.php:474 include/items.php:2481 +#: include/datetime.php:474 include/items.php:2500 #, php-format msgid "%s's birthday" msgstr "%ss Geburtstag" -#: include/datetime.php:475 include/items.php:2482 +#: include/datetime.php:475 include/items.php:2501 #, php-format msgid "Happy Birthday %s" msgstr "Herzlichen Glückwunsch %s" @@ -6857,7 +6858,7 @@ msgstr "Nur Du kannst das sehen" msgid "event" msgstr "Event" -#: include/like.php:184 include/conversation.php:141 include/diaspora.php:2167 +#: include/like.php:184 include/conversation.php:141 include/diaspora.php:2185 #: view/theme/diabook/theme.php:480 #, php-format msgid "%1$s likes %2$s's %3$s" @@ -7806,7 +7807,7 @@ msgstr "\nDie Anmelde-Details sind die folgenden:\n\tAdresse der Seite:\t%3$s\n\ msgid "Sharing notification from Diaspora network" msgstr "Freigabe-Benachrichtigung von Diaspora" -#: include/diaspora.php:2608 +#: include/diaspora.php:2625 msgid "Attachments:" msgstr "Anhänge:" @@ -7818,11 +7819,11 @@ msgstr "(kein Betreff)" msgid "noreply" msgstr "noreply" -#: include/items.php:4907 +#: include/items.php:4926 msgid "Do you really want to delete this item?" msgstr "Möchtest Du wirklich dieses Item löschen?" -#: include/items.php:5182 +#: include/items.php:5201 msgid "Archives" msgstr "Archiv" diff --git a/view/de/strings.php b/view/de/strings.php index d9b8c8b6aa..1a1fc07830 100644 --- a/view/de/strings.php +++ b/view/de/strings.php @@ -431,7 +431,7 @@ $a->strings["User registrations waiting for confirmation"] = "Nutzeranmeldungen $a->strings["This page offers you some numbers to the known part of the federated social network your Friendica node is part of. These numbers are not complete but only reflect the part of the network your node is aware of."] = "Diese Seite präsentiert einige Zahlen zu dem bekannten Teil des föderalen sozialen Netzwerks, von dem deine Friendica Installation ein Teil ist. Diese Zahlen sind nicht absolut und reflektieren nur den Teil des Netzwerks, den dein Knoten kennt."; $a->strings["The Auto Discovered Contact Directory feature is not enabled, it will improve the data displayed here."] = "Die Funktion um Automatisch ein Kontaktverzeichnis erstellen ist nicht aktiv. Es wird die hier angezeigten Daten verbessern."; $a->strings["Administration"] = "Administration"; -$a->strings["Currently this node is aware of nodes from the following platforms:"] = "Momentan kennt dieser Knoten andere Knoten der folgenden Plattformen:"; +$a->strings["Currently this node is aware of %d nodes from the following platforms:"] = "Momentan kennt dieser Knoten %d andere Knoten der folgenden Plattformen:"; $a->strings["ID"] = "ID"; $a->strings["Recipient Name"] = "Empfänger Name"; $a->strings["Recipient Profile"] = "Empfänger Profil"; From 3ada0093f9c09489a765810ebc9b1cc4a2886a33 Mon Sep 17 00:00:00 2001 From: Matthew Exon Date: Mon, 25 Jan 2016 07:41:56 +0100 Subject: [PATCH 126/242] Note the final URL used to retrieve content after all redirects --- boot.php | 9 +++++++++ include/network.php | 7 ++++++- 2 files changed, 15 insertions(+), 1 deletion(-) diff --git a/boot.php b/boot.php index 2242ba476d..9ee0c98df7 100644 --- a/boot.php +++ b/boot.php @@ -526,6 +526,7 @@ class App { private $curl_code; private $curl_content_type; private $curl_headers; + private $curl_redirect_url; private $cached_profile_image; private $cached_profile_picdate; @@ -909,6 +910,14 @@ class App { return $this->curl_headers; } + function set_curl_redirect_url($url) { + $this->curl_redirect_url = $url; + } + + function get_curl_redirect_url() { + return $this->curl_redirect_url; + } + function get_cached_avatar_image($avatar_image){ return $avatar_image; diff --git a/include/network.php b/include/network.php index cc267966e8..1fd3792753 100644 --- a/include/network.php +++ b/include/network.php @@ -136,6 +136,10 @@ function z_fetch_url($url,$binary = false, &$redirects = 0, $opts=array()) { $base = substr($base,strlen($chunk)); } + $a->set_curl_code($http_code); + $a->set_curl_content_type($curl_info['content_type']); + $a->set_curl_headers($header); + if($http_code == 301 || $http_code == 302 || $http_code == 303 || $http_code == 307) { $new_location_info = @parse_url($curl_info["redirect_url"]); $old_location_info = @parse_url($curl_info["url"]); @@ -154,16 +158,17 @@ function z_fetch_url($url,$binary = false, &$redirects = 0, $opts=array()) { if (filter_var($newurl, FILTER_VALIDATE_URL)) { $redirects++; @curl_close($ch); + $a->set_curl_redirect_url($newurl); return z_fetch_url($newurl,$binary, $redirects, $opts); } } + $a->set_curl_redirect_url($url); $a->set_curl_code($http_code); $a->set_curl_content_type($curl_info['content_type']); $body = substr($s,strlen($header)); - $a->set_curl_headers($header); From c7691ce68d72f75409b289e99b18778096153bcc Mon Sep 17 00:00:00 2001 From: Tobias Diekershoff Date: Mon, 25 Jan 2016 09:58:58 +0100 Subject: [PATCH 127/242] OStatus clarification --- doc/Tags-and-Mentions.md | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/doc/Tags-and-Mentions.md b/doc/Tags-and-Mentions.md index 409c9c7395..eac2c97f84 100644 --- a/doc/Tags-and-Mentions.md +++ b/doc/Tags-and-Mentions.md @@ -22,11 +22,14 @@ You can tag a person on a different network or one that is **not in your social * @mike@macgirvin.com - This is called a "remote mention" and can only be an email-style locator, not a web URL. Unless their system blocks unsolicited "mentions", the person tagged will likely receive a "Mention" post/activity or become a direct participant in the conversation in the case of public posts. -Please note that Friendica blocks incoming "mentions" from people with no relationship to you. +Friendica blocks incoming “mentions” from people with no relationship to you. +The exception is an ongiong conversation started from a contact of both you and the 3rd person or a conversation in a forum where you are a member of. This is a spam prevention measure. Remote mentions are delivered using the OStatus protocol. This protocol is used by Friendica and GNU Social and several other systems, but is not currently implemented in Diaspora. +As the OStatus protocol allows this Friendica user can be @-mentioned by users from platforms using this protocol in conversations if the "Enable OStatus support" is activated on the Friendica node. +These @-mentions wont be blocked, even if there is no relationship between the sender and the receiver of the message. Friendica makes no distinction between people and forums for the purpose of tagging. (Some other networks use !forum to indicate a forum.) From 0ae83e41a294b31df76feebdd9aabb80bec059b8 Mon Sep 17 00:00:00 2001 From: Matthew Exon Date: Mon, 25 Jan 2016 10:32:31 +0100 Subject: [PATCH 128/242] Use get_temppath() instead of hard-coded '/tmp' to store cookiejar --- include/Scrape.php | 4 ++-- include/onepoll.php | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/include/Scrape.php b/include/Scrape.php index 7329489817..ca6489b16a 100644 --- a/include/Scrape.php +++ b/include/Scrape.php @@ -235,7 +235,7 @@ function scrape_feed($url) { $a = get_app(); $ret = array(); - $cookiejar = tempnam('/tmp', 'cookiejar-scrape-feed-'); + $cookiejar = tempnam(get_temppath(), 'cookiejar-scrape-feed-'); $s = fetch_url($url, false, $redirects, 0, Null, $cookiejar); unlink($cookiejar); @@ -664,7 +664,7 @@ function probe_url($url, $mode = PROBE_NORMAL, $level = 1) { $vcard['photo'] = $feedret['photo']; require_once('library/simplepie/simplepie.inc'); $feed = new SimplePie(); - $cookiejar = tempnam('/tmp', 'cookiejar-scrape-feed-'); + $cookiejar = tempnam(get_temppath(), 'cookiejar-scrape-feed-'); $xml = fetch_url($poll, false, $redirects, 0, Null, $cookiejar); unlink($cookiejar); diff --git a/include/onepoll.php b/include/onepoll.php index 5ebafb353e..a9ca195332 100644 --- a/include/onepoll.php +++ b/include/onepoll.php @@ -335,7 +335,7 @@ function onepoll_run(&$argv, &$argc){ if($contact['rel'] == CONTACT_IS_FOLLOWER || $contact['blocked'] || $contact['readonly']) return; - $cookiejar = tempnam('/tmp', 'cookiejar-onepoll-'); + $cookiejar = tempnam(get_temppath(), 'cookiejar-onepoll-'); $xml = fetch_url($contact['poll'], false, $redirects, 0, Null, $cookiejar); unlink($cookiejar); } From 77c6020dc2205d701fdf609288868be19f8673e5 Mon Sep 17 00:00:00 2001 From: Michael Vogel Date: Mon, 25 Jan 2016 10:38:38 +0100 Subject: [PATCH 129/242] Removed useless get_app function call --- include/dfrn.php | 1 - 1 file changed, 1 deletion(-) diff --git a/include/dfrn.php b/include/dfrn.php index a6b09242d6..a951e11fc9 100644 --- a/include/dfrn.php +++ b/include/dfrn.php @@ -545,7 +545,6 @@ function dfrn_add_author($doc, $owner, $authorelement, $public) { * @return object XML author object */ function dfrn_add_entry_author($doc, $element, $contact_url, $item) { - $a = get_app(); $contact = get_contact_details_by_url($contact_url, $item["uid"]); From 930da0aa44632e852f41008ff00cfc883cb1c17e Mon Sep 17 00:00:00 2001 From: Matthew Exon Date: Mon, 25 Jan 2016 11:05:17 +0100 Subject: [PATCH 130/242] Return redirect_url as part of the return array from z_fetch_url instead of via global state --- include/network.php | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/include/network.php b/include/network.php index 1fd3792753..86d5eda622 100644 --- a/include/network.php +++ b/include/network.php @@ -158,13 +158,11 @@ function z_fetch_url($url,$binary = false, &$redirects = 0, $opts=array()) { if (filter_var($newurl, FILTER_VALIDATE_URL)) { $redirects++; @curl_close($ch); - $a->set_curl_redirect_url($newurl); return z_fetch_url($newurl,$binary, $redirects, $opts); } } - $a->set_curl_redirect_url($url); $a->set_curl_code($http_code); $a->set_curl_content_type($curl_info['content_type']); @@ -175,6 +173,7 @@ function z_fetch_url($url,$binary = false, &$redirects = 0, $opts=array()) { $rc = intval($http_code); $ret['return_code'] = $rc; $ret['success'] = (($rc >= 200 && $rc <= 299) ? true : false); + $ret['redirect_url'] = $url; if(! $ret['success']) { $ret['error'] = curl_error($ch); $ret['debug'] = $curl_info; From cfd40896de0aa29511dccf0adfce958453be3940 Mon Sep 17 00:00:00 2001 From: Matthew Exon Date: Mon, 25 Jan 2016 11:06:10 +0100 Subject: [PATCH 131/242] Remove global state for redirect_url --- boot.php | 9 --------- 1 file changed, 9 deletions(-) diff --git a/boot.php b/boot.php index 9ee0c98df7..2242ba476d 100644 --- a/boot.php +++ b/boot.php @@ -526,7 +526,6 @@ class App { private $curl_code; private $curl_content_type; private $curl_headers; - private $curl_redirect_url; private $cached_profile_image; private $cached_profile_picdate; @@ -910,14 +909,6 @@ class App { return $this->curl_headers; } - function set_curl_redirect_url($url) { - $this->curl_redirect_url = $url; - } - - function get_curl_redirect_url() { - return $this->curl_redirect_url; - } - function get_cached_avatar_image($avatar_image){ return $avatar_image; From 4ff8c9e3a1f3e81ecec7fdeca2a92c1738c57b78 Mon Sep 17 00:00:00 2001 From: Matthew Exon Date: Mon, 25 Jan 2016 11:38:36 +0100 Subject: [PATCH 132/242] Document new redirect_url return value --- include/network.php | 1 + 1 file changed, 1 insertion(+) diff --git a/include/network.php b/include/network.php index 86d5eda622..c6379e407b 100644 --- a/include/network.php +++ b/include/network.php @@ -42,6 +42,7 @@ if(!function_exists('z_fetch_url')){ * @return array an assoziative array with: * * \e int \b return_code => HTTP return code or 0 if timeout or failure * * \e boolean \b success => boolean true (if HTTP 2xx result) or false + * * \e string \b redirect_url => in case of redirect, content was finally retrieved from this URL * * \e string \b header => HTTP headers * * \e string \b body => fetched content */ From 62de6be495214e4b12a92a1877711768f4a1d992 Mon Sep 17 00:00:00 2001 From: Michael Vogel Date: Mon, 25 Jan 2016 15:20:58 +0100 Subject: [PATCH 133/242] Switched to static methods for DFRN --- boot.php | 8 + include/Contact.php | 4 +- include/delivery.php | 12 +- include/dfrn.php | 1598 ++++++++++++++++++++++++------------------ include/items.php | 236 ------- include/queue.php | 3 +- mod/dfrn_poll.php | 4 +- 7 files changed, 934 insertions(+), 931 deletions(-) diff --git a/boot.php b/boot.php index 2242ba476d..955b89e56c 100644 --- a/boot.php +++ b/boot.php @@ -530,6 +530,8 @@ class App { private $cached_profile_image; private $cached_profile_picdate; + private static $a; + /** * @brief App constructor. */ @@ -710,6 +712,8 @@ class App { } } + self::$a = $this; + } function get_basepath() { @@ -734,6 +738,10 @@ class App { function get_baseurl($ssl = false) { + // Is the function called statically? + if (!is_object($this)) + return(self::$a->get_baseurl($ssl)); + $scheme = $this->scheme; if((x($this->config,'system')) && (x($this->config['system'],'ssl_policy'))) { diff --git a/include/Contact.php b/include/Contact.php index 831a99c950..d9703d61e4 100644 --- a/include/Contact.php +++ b/include/Contact.php @@ -132,8 +132,8 @@ function terminate_friendship($user,$self,$contact) { diaspora_unshare($user,$contact); } elseif($contact['network'] === NETWORK_DFRN) { - require_once('include/items.php'); - dfrn_deliver($user,$contact,'placeholder', 1); + require_once('include/dfrn.php'); + dfrn::deliver($user,$contact,'placeholder', 1); } } diff --git a/include/delivery.php b/include/delivery.php index d046005994..5ef942dd06 100644 --- a/include/delivery.php +++ b/include/delivery.php @@ -279,12 +279,12 @@ function delivery_run(&$argv, &$argc){ if ($mail) { $item['body'] = fix_private_photos($item['body'],$owner['uid'],null,$message[0]['contact-id']); - $atom = dfrn_mail($item, $owner); + $atom = dfrn::mail($item, $owner); } elseif ($fsuggest) { - $atom = dfrn_fsuggest($item, $owner); + $atom = dfrn::fsuggest($item, $owner); q("DELETE FROM `fsuggest` WHERE `id` = %d LIMIT 1", intval($item['id'])); } elseif ($relocate) - $atom = dfrn_relocate($owner, $uid); + $atom = dfrn::relocate($owner, $uid); elseif($followup) { $msgitems = array(); foreach($items as $item) { // there is only one item @@ -295,7 +295,7 @@ function delivery_run(&$argv, &$argc){ $msgitems[] = $item; } } - $atom = dfrn_entries($msgitems,$owner); + $atom = dfrn::entries($msgitems,$owner); } else { $msgitems = array(); foreach($items as $item) { @@ -321,7 +321,7 @@ function delivery_run(&$argv, &$argc){ $msgitems[] = $item; } } - $atom = dfrn_entries($msgitems,$owner); + $atom = dfrn::entries($msgitems,$owner); } logger('notifier entry: '.$contact["url"].' '.$target_item["guid"].' entry: '.$atom, LOGGER_DEBUG); @@ -380,7 +380,7 @@ function delivery_run(&$argv, &$argc){ } if(! was_recently_delayed($contact['id'])) - $deliver_status = dfrn_deliver($owner,$contact,$atom); + $deliver_status = dfrn::deliver($owner,$contact,$atom); else $deliver_status = (-1); diff --git a/include/dfrn.php b/include/dfrn.php index a951e11fc9..885e03a91b 100644 --- a/include/dfrn.php +++ b/include/dfrn.php @@ -3,210 +3,240 @@ require_once('include/items.php'); require_once('include/Contact.php'); require_once('include/ostatus.php'); -/** - * @brief Generates the atom entries for delivery.php - * - * This function is used whenever content is transmitted via DFRN. - * - * @param array $items Item elements - * @param array $owner Owner record - * - * @return string DFRN entries - */ -function dfrn_entries($items,$owner) { +class dfrn { - $doc = new DOMDocument('1.0', 'utf-8'); - $doc->formatOutput = true; + /** + * @brief Generates the atom entries for delivery.php + * + * This function is used whenever content is transmitted via DFRN. + * + * @param array $items Item elements + * @param array $owner Owner record + * + * @return string DFRN entries + */ + function entries($items,$owner) { - $root = dfrn_add_header($doc, $owner, "dfrn:owner", "", false); + $doc = new DOMDocument('1.0', 'utf-8'); + $doc->formatOutput = true; - if(! count($items)) - return trim($doc->saveXML()); + $root = self::add_header($doc, $owner, "dfrn:owner", "", false); - foreach($items as $item) { - $entry = dfrn_entry($doc, "text", $item, $owner, $item["entry:comment-allow"], $item["entry:cid"]); - $root->appendChild($entry); - } + if(! count($items)) + return trim($doc->saveXML()); - return(trim($doc->saveXML())); -} - -/** - * @brief Generate an atom feed for the given user - * - * This function is called when another server is pulling data from the user feed. - * - * @param App $a - * @param string $dfrn_id DFRN ID from the requesting party - * @param string $owner_nick Owner nick name - * @param string $last_update Date of the last update - * @param int $direction Can be -1, 0 or 1. - * - * @return string DFRN feed entries - */ -function dfrn_feed(&$a, $dfrn_id, $owner_nick, $last_update, $direction = 0) { - - $sitefeed = ((strlen($owner_nick)) ? false : true); // not yet implemented, need to rewrite huge chunks of following logic - $public_feed = (($dfrn_id) ? false : true); - $starred = false; // not yet implemented, possible security issues - $converse = false; - - if($public_feed && $a->argc > 2) { - for($x = 2; $x < $a->argc; $x++) { - if($a->argv[$x] == 'converse') - $converse = true; - if($a->argv[$x] == 'starred') - $starred = true; - if($a->argv[$x] === 'category' && $a->argc > ($x + 1) && strlen($a->argv[$x+1])) - $category = $a->argv[$x+1]; - } - } - - - - // default permissions - anonymous user - - $sql_extra = " AND `item`.`allow_cid` = '' AND `item`.`allow_gid` = '' AND `item`.`deny_cid` = '' AND `item`.`deny_gid` = '' "; - - $r = q("SELECT `contact`.*, `user`.`uid` AS `user_uid`, `user`.`nickname`, `user`.`timezone`, `user`.`page-flags` - FROM `contact` INNER JOIN `user` ON `user`.`uid` = `contact`.`uid` - WHERE `contact`.`self` = 1 AND `user`.`nickname` = '%s' LIMIT 1", - dbesc($owner_nick) - ); - - if(! count($r)) - killme(); - - $owner = $r[0]; - $owner_id = $owner['user_uid']; - $owner_nick = $owner['nickname']; - - $sql_post_table = ""; - $visibility = ""; - - if(! $public_feed) { - - $sql_extra = ''; - switch($direction) { - case (-1): - $sql_extra = sprintf(" AND `issued-id` = '%s' ", dbesc($dfrn_id)); - $my_id = $dfrn_id; - break; - case 0: - $sql_extra = sprintf(" AND `issued-id` = '%s' AND `duplex` = 1 ", dbesc($dfrn_id)); - $my_id = '1:' . $dfrn_id; - break; - case 1: - $sql_extra = sprintf(" AND `dfrn-id` = '%s' AND `duplex` = 1 ", dbesc($dfrn_id)); - $my_id = '0:' . $dfrn_id; - break; - default: - return false; - break; // NOTREACHED + foreach($items as $item) { + $entry = self::entry($doc, "text", $item, $owner, $item["entry:comment-allow"], $item["entry:cid"]); + $root->appendChild($entry); } - $r = q("SELECT * FROM `contact` WHERE `blocked` = 0 AND `pending` = 0 AND `contact`.`uid` = %d $sql_extra LIMIT 1", - intval($owner_id) + return(trim($doc->saveXML())); + } + + /** + * @brief Generate an atom feed for the given user + * + * This function is called when another server is pulling data from the user feed. + * + * @param string $dfrn_id DFRN ID from the requesting party + * @param string $owner_nick Owner nick name + * @param string $last_update Date of the last update + * @param int $direction Can be -1, 0 or 1. + * + * @return string DFRN feed entries + */ + function feed($dfrn_id, $owner_nick, $last_update, $direction = 0) { + + $a = get_app(); + + $sitefeed = ((strlen($owner_nick)) ? false : true); // not yet implemented, need to rewrite huge chunks of following logic + $public_feed = (($dfrn_id) ? false : true); + $starred = false; // not yet implemented, possible security issues + $converse = false; + + if($public_feed && $a->argc > 2) { + for($x = 2; $x < $a->argc; $x++) { + if($a->argv[$x] == 'converse') + $converse = true; + if($a->argv[$x] == 'starred') + $starred = true; + if($a->argv[$x] === 'category' && $a->argc > ($x + 1) && strlen($a->argv[$x+1])) + $category = $a->argv[$x+1]; + } + } + + + + // default permissions - anonymous user + + $sql_extra = " AND `item`.`allow_cid` = '' AND `item`.`allow_gid` = '' AND `item`.`deny_cid` = '' AND `item`.`deny_gid` = '' "; + + $r = q("SELECT `contact`.*, `user`.`uid` AS `user_uid`, `user`.`nickname`, `user`.`timezone`, `user`.`page-flags` + FROM `contact` INNER JOIN `user` ON `user`.`uid` = `contact`.`uid` + WHERE `contact`.`self` = 1 AND `user`.`nickname` = '%s' LIMIT 1", + dbesc($owner_nick) ); if(! count($r)) killme(); - $contact = $r[0]; - require_once('include/security.php'); - $groups = init_groups_visitor($contact['id']); + $owner = $r[0]; + $owner_id = $owner['user_uid']; + $owner_nick = $owner['nickname']; - if(count($groups)) { - for($x = 0; $x < count($groups); $x ++) - $groups[$x] = '<' . intval($groups[$x]) . '>' ; - $gs = implode('|', $groups); + $sql_post_table = ""; + $visibility = ""; + + if(! $public_feed) { + + $sql_extra = ''; + switch($direction) { + case (-1): + $sql_extra = sprintf(" AND `issued-id` = '%s' ", dbesc($dfrn_id)); + $my_id = $dfrn_id; + break; + case 0: + $sql_extra = sprintf(" AND `issued-id` = '%s' AND `duplex` = 1 ", dbesc($dfrn_id)); + $my_id = '1:' . $dfrn_id; + break; + case 1: + $sql_extra = sprintf(" AND `dfrn-id` = '%s' AND `duplex` = 1 ", dbesc($dfrn_id)); + $my_id = '0:' . $dfrn_id; + break; + default: + return false; + break; // NOTREACHED + } + + $r = q("SELECT * FROM `contact` WHERE `blocked` = 0 AND `pending` = 0 AND `contact`.`uid` = %d $sql_extra LIMIT 1", + intval($owner_id) + ); + + if(! count($r)) + killme(); + + $contact = $r[0]; + require_once('include/security.php'); + $groups = init_groups_visitor($contact['id']); + + if(count($groups)) { + for($x = 0; $x < count($groups); $x ++) + $groups[$x] = '<' . intval($groups[$x]) . '>' ; + $gs = implode('|', $groups); + } else + $gs = '<<>>' ; // Impossible to match + + $sql_extra = sprintf(" + AND ( `allow_cid` = '' OR `allow_cid` REGEXP '<%d>' ) + AND ( `deny_cid` = '' OR NOT `deny_cid` REGEXP '<%d>' ) + AND ( `allow_gid` = '' OR `allow_gid` REGEXP '%s' ) + AND ( `deny_gid` = '' OR NOT `deny_gid` REGEXP '%s') + ", + intval($contact['id']), + intval($contact['id']), + dbesc($gs), + dbesc($gs) + ); } + + if($public_feed) + $sort = 'DESC'; else - $gs = '<<>>' ; // Impossible to match + $sort = 'ASC'; - $sql_extra = sprintf(" - AND ( `allow_cid` = '' OR `allow_cid` REGEXP '<%d>' ) - AND ( `deny_cid` = '' OR NOT `deny_cid` REGEXP '<%d>' ) - AND ( `allow_gid` = '' OR `allow_gid` REGEXP '%s' ) - AND ( `deny_gid` = '' OR NOT `deny_gid` REGEXP '%s') - ", - intval($contact['id']), - intval($contact['id']), - dbesc($gs), - dbesc($gs) + $date_field = "`changed`"; + $sql_order = "`item`.`parent` ".$sort.", `item`.`created` ASC"; + + if(! strlen($last_update)) + $last_update = 'now -30 days'; + + if(isset($category)) { + $sql_post_table = sprintf("INNER JOIN (SELECT `oid` FROM `term` WHERE `term` = '%s' AND `otype` = %d AND `type` = %d AND `uid` = %d ORDER BY `tid` DESC) AS `term` ON `item`.`id` = `term`.`oid` ", + dbesc(protect_sprintf($category)), intval(TERM_OBJ_POST), intval(TERM_CATEGORY), intval($owner_id)); + //$sql_extra .= file_tag_file_query('item',$category,'category'); + } + + if($public_feed) { + if(! $converse) + $sql_extra .= " AND `contact`.`self` = 1 "; + } + + $check_date = datetime_convert('UTC','UTC',$last_update,'Y-m-d H:i:s'); + + // AND ( `item`.`edited` > '%s' OR `item`.`changed` > '%s' ) + // dbesc($check_date), + + $r = q("SELECT STRAIGHT_JOIN `item`.*, `item`.`id` AS `item_id`, + `contact`.`name`, `contact`.`network`, `contact`.`photo`, `contact`.`url`, + `contact`.`name-date`, `contact`.`uri-date`, `contact`.`avatar-date`, + `contact`.`thumb`, `contact`.`dfrn-id`, `contact`.`self`, + `contact`.`id` AS `contact-id`, `contact`.`uid` AS `contact-uid`, + `sign`.`signed_text`, `sign`.`signature`, `sign`.`signer` + FROM `item` $sql_post_table + INNER JOIN `contact` ON `contact`.`id` = `item`.`contact-id` + AND `contact`.`blocked` = 0 AND `contact`.`pending` = 0 + LEFT JOIN `sign` ON `sign`.`iid` = `item`.`id` + WHERE `item`.`uid` = %d AND `item`.`visible` = 1 and `item`.`moderated` = 0 AND `item`.`parent` != 0 + AND ((`item`.`wall` = 1) $visibility) AND `item`.$date_field > '%s' + $sql_extra + ORDER BY $sql_order LIMIT 0, 300", + intval($owner_id), + dbesc($check_date), + dbesc($sort) ); - } - if($public_feed) - $sort = 'DESC'; - else - $sort = 'ASC'; + // Will check further below if this actually returned results. + // We will provide an empty feed if that is the case. - $date_field = "`changed`"; - $sql_order = "`item`.`parent` ".$sort.", `item`.`created` ASC"; + $items = $r; - if(! strlen($last_update)) - $last_update = 'now -30 days'; + $doc = new DOMDocument('1.0', 'utf-8'); + $doc->formatOutput = true; - if(isset($category)) { - $sql_post_table = sprintf("INNER JOIN (SELECT `oid` FROM `term` WHERE `term` = '%s' AND `otype` = %d AND `type` = %d AND `uid` = %d ORDER BY `tid` DESC) AS `term` ON `item`.`id` = `term`.`oid` ", - dbesc(protect_sprintf($category)), intval(TERM_OBJ_POST), intval(TERM_CATEGORY), intval($owner_id)); - //$sql_extra .= file_tag_file_query('item',$category,'category'); - } + $alternatelink = $owner['url']; - if($public_feed) { - if(! $converse) - $sql_extra .= " AND `contact`.`self` = 1 "; - } + if(isset($category)) + $alternatelink .= "/category/".$category; - $check_date = datetime_convert('UTC','UTC',$last_update,'Y-m-d H:i:s'); + if ($public_feed) + $author = "dfrn:owner"; + else + $author = "author"; - // AND ( `item`.`edited` > '%s' OR `item`.`changed` > '%s' ) - // dbesc($check_date), + $root = self::add_header($doc, $owner, $author, $alternatelink, true); - $r = q("SELECT STRAIGHT_JOIN `item`.*, `item`.`id` AS `item_id`, - `contact`.`name`, `contact`.`network`, `contact`.`photo`, `contact`.`url`, - `contact`.`name-date`, `contact`.`uri-date`, `contact`.`avatar-date`, - `contact`.`thumb`, `contact`.`dfrn-id`, `contact`.`self`, - `contact`.`id` AS `contact-id`, `contact`.`uid` AS `contact-uid`, - `sign`.`signed_text`, `sign`.`signature`, `sign`.`signer` - FROM `item` $sql_post_table - INNER JOIN `contact` ON `contact`.`id` = `item`.`contact-id` - AND `contact`.`blocked` = 0 AND `contact`.`pending` = 0 - LEFT JOIN `sign` ON `sign`.`iid` = `item`.`id` - WHERE `item`.`uid` = %d AND `item`.`visible` = 1 and `item`.`moderated` = 0 AND `item`.`parent` != 0 - AND ((`item`.`wall` = 1) $visibility) AND `item`.$date_field > '%s' - $sql_extra - ORDER BY $sql_order LIMIT 0, 300", - intval($owner_id), - dbesc($check_date), - dbesc($sort) - ); + // This hook can't work anymore + // call_hooks('atom_feed', $atom); - // Will check further below if this actually returned results. - // We will provide an empty feed if that is the case. + if(! count($items)) { + $atom = trim($doc->saveXML()); - $items = $r; + call_hooks('atom_feed_end', $atom); - $doc = new DOMDocument('1.0', 'utf-8'); - $doc->formatOutput = true; + return $atom; + } - $alternatelink = $owner['url']; + foreach($items as $item) { - if(isset($category)) - $alternatelink .= "/category/".$category; + // prevent private email from leaking. + if($item['network'] === NETWORK_MAIL) + continue; - if ($public_feed) - $author = "dfrn:owner"; - else - $author = "author"; + // public feeds get html, our own nodes use bbcode - $root = dfrn_add_header($doc, $owner, $author, $alternatelink, true); + if($public_feed) { + $type = 'html'; + // catch any email that's in a public conversation and make sure it doesn't leak + if($item['private']) + continue; + } else + $type = 'text'; - // This hook can't work anymore - // call_hooks('atom_feed', $atom); + $entry = self::entry($doc, $type, $item, $owner, true); + $root->appendChild($entry); + + } - if(! count($items)) { $atom = trim($doc->saveXML()); call_hooks('atom_feed_end', $atom); @@ -214,581 +244,781 @@ function dfrn_feed(&$a, $dfrn_id, $owner_nick, $last_update, $direction = 0) { return $atom; } - foreach($items as $item) { + /** + * @brief Create XML text for DFRN mails + * + * @param array $item message elements + * @param array $owner Owner record + * + * @return string DFRN mail + */ + function mail($item, $owner) { + $doc = new DOMDocument('1.0', 'utf-8'); + $doc->formatOutput = true; - // prevent private email from leaking. - if($item['network'] === NETWORK_MAIL) - continue; + $root = self::add_header($doc, $owner, "dfrn:owner", "", false); - // public feeds get html, our own nodes use bbcode + $mail = $doc->createElement("dfrn:mail"); + $sender = $doc->createElement("dfrn:sender"); - if($public_feed) { - $type = 'html'; - // catch any email that's in a public conversation and make sure it doesn't leak - if($item['private']) - continue; - } - else { - $type = 'text'; + xml_add_element($doc, $sender, "dfrn:name", $owner['name']); + xml_add_element($doc, $sender, "dfrn:uri", $owner['url']); + xml_add_element($doc, $sender, "dfrn:avatar", $owner['thumb']); + + $mail->appendChild($sender); + + xml_add_element($doc, $mail, "dfrn:id", $item['uri']); + xml_add_element($doc, $mail, "dfrn:in-reply-to", $item['parent-uri']); + xml_add_element($doc, $mail, "dfrn:sentdate", datetime_convert('UTC', 'UTC', $item['created'] . '+00:00' , ATOM_TIME)); + xml_add_element($doc, $mail, "dfrn:subject", $item['title']); + xml_add_element($doc, $mail, "dfrn:content", $item['body']); + + $root->appendChild($mail); + + return(trim($doc->saveXML())); + } + + /** + * @brief Create XML text for DFRN friend suggestions + * + * @param array $item suggestion elements + * @param array $owner Owner record + * + * @return string DFRN suggestions + */ + function fsuggest($item, $owner) { + $doc = new DOMDocument('1.0', 'utf-8'); + $doc->formatOutput = true; + + $root = self::add_header($doc, $owner, "dfrn:owner", "", false); + + $suggest = $doc->createElement("dfrn:suggest"); + + xml_add_element($doc, $suggest, "dfrn:url", $item['url']); + xml_add_element($doc, $suggest, "dfrn:name", $item['name']); + xml_add_element($doc, $suggest, "dfrn:photo", $item['photo']); + xml_add_element($doc, $suggest, "dfrn:request", $item['request']); + xml_add_element($doc, $suggest, "dfrn:note", $item['note']); + + $root->appendChild($suggest); + + return(trim($doc->saveXML())); + } + + /** + * @brief Create XML text for DFRN relocations + * + * @param array $owner Owner record + * @param int $uid User ID + * + * @return string DFRN relocations + */ + function relocate($owner, $uid) { + + /* get site pubkey. this could be a new installation with no site keys*/ + $pubkey = get_config('system','site_pubkey'); + if(! $pubkey) { + $res = new_keypair(1024); + set_config('system','site_prvkey', $res['prvkey']); + set_config('system','site_pubkey', $res['pubkey']); } - $entry = dfrn_entry($doc, $type, $item, $owner, true); - $root->appendChild($entry); + $rp = q("SELECT `resource-id` , `scale`, type FROM `photo` + WHERE `profile` = 1 AND `uid` = %d ORDER BY scale;", $uid); + $photos = array(); + $ext = Photo::supportedTypes(); + foreach($rp as $p) + $photos[$p['scale']] = app::get_baseurl().'/photo/'.$p['resource-id'].'-'.$p['scale'].'.'.$ext[$p['type']]; + + unset($rp, $ext); + + $doc = new DOMDocument('1.0', 'utf-8'); + $doc->formatOutput = true; + + $root = self::add_header($doc, $owner, "dfrn:owner", "", false); + + $relocate = $doc->createElement("dfrn:relocate"); + + xml_add_element($doc, $relocate, "dfrn:url", $owner['url']); + xml_add_element($doc, $relocate, "dfrn:name", $owner['name']); + xml_add_element($doc, $relocate, "dfrn:photo", $photos[4]); + xml_add_element($doc, $relocate, "dfrn:thumb", $photos[5]); + xml_add_element($doc, $relocate, "dfrn:micro", $photos[6]); + xml_add_element($doc, $relocate, "dfrn:request", $owner['request']); + xml_add_element($doc, $relocate, "dfrn:confirm", $owner['confirm']); + xml_add_element($doc, $relocate, "dfrn:notify", $owner['notify']); + xml_add_element($doc, $relocate, "dfrn:poll", $owner['poll']); + xml_add_element($doc, $relocate, "dfrn:sitepubkey", get_config('system','site_pubkey')); + + $root->appendChild($relocate); + + return(trim($doc->saveXML())); } - $atom = trim($doc->saveXML()); + /** + * @brief Adds the header elements for the DFRN protocol + * + * @param object $doc XML document + * @param array $owner Owner record + * @param string $authorelement Element name for the author + * @param string $alternatelink link to profile or category + * @param bool $public Is it a header for public posts? + * + * @return object XML root object + */ + private function add_header($doc, $owner, $authorelement, $alternatelink = "", $public = false) { - call_hooks('atom_feed_end', $atom); + if ($alternatelink == "") + $alternatelink = $owner['url']; - return $atom; -} + $root = $doc->createElementNS(NS_ATOM, 'feed'); + $doc->appendChild($root); -/** - * @brief Create XML text for DFRN mails - * - * @param array $item message elements - * @param array $owner Owner record - * - * @return string DFRN mail - */ -function dfrn_mail($item, $owner) { - $doc = new DOMDocument('1.0', 'utf-8'); - $doc->formatOutput = true; + $root->setAttribute("xmlns:thr", NS_THR); + $root->setAttribute("xmlns:at", "http://purl.org/atompub/tombstones/1.0"); + $root->setAttribute("xmlns:media", NS_MEDIA); + $root->setAttribute("xmlns:dfrn", "http://purl.org/macgirvin/dfrn/1.0"); + $root->setAttribute("xmlns:activity", NS_ACTIVITY); + $root->setAttribute("xmlns:georss", NS_GEORSS); + $root->setAttribute("xmlns:poco", NS_POCO); + $root->setAttribute("xmlns:ostatus", NS_OSTATUS); + $root->setAttribute("xmlns:statusnet", NS_STATUSNET); - $root = dfrn_add_header($doc, $owner, "dfrn:owner", "", false); + //xml_add_element($doc, $root, "id", app::get_baseurl()."/profile/".$owner["nick"]); + xml_add_element($doc, $root, "id", app::get_baseurl()."/profile/".$owner["nick"]); + xml_add_element($doc, $root, "title", $owner["name"]); - $mail = $doc->createElement("dfrn:mail"); - $sender = $doc->createElement("dfrn:sender"); + $attributes = array("uri" => "https://friendi.ca", "version" => FRIENDICA_VERSION."-".DB_UPDATE_VERSION); + xml_add_element($doc, $root, "generator", FRIENDICA_PLATFORM, $attributes); - xml_add_element($doc, $sender, "dfrn:name", $owner['name']); - xml_add_element($doc, $sender, "dfrn:uri", $owner['url']); - xml_add_element($doc, $sender, "dfrn:avatar", $owner['thumb']); - - $mail->appendChild($sender); - - xml_add_element($doc, $mail, "dfrn:id", $item['uri']); - xml_add_element($doc, $mail, "dfrn:in-reply-to", $item['parent-uri']); - xml_add_element($doc, $mail, "dfrn:sentdate", datetime_convert('UTC', 'UTC', $item['created'] . '+00:00' , ATOM_TIME)); - xml_add_element($doc, $mail, "dfrn:subject", $item['title']); - xml_add_element($doc, $mail, "dfrn:content", $item['body']); - - $root->appendChild($mail); - - return(trim($doc->saveXML())); -} - -/** - * @brief Create XML text for DFRN friend suggestions - * - * @param array $item suggestion elements - * @param array $owner Owner record - * - * @return string DFRN suggestions - */ -function dfrn_fsuggest($item, $owner) { - $doc = new DOMDocument('1.0', 'utf-8'); - $doc->formatOutput = true; - - $root = dfrn_add_header($doc, $owner, "dfrn:owner", "", false); - - $suggest = $doc->createElement("dfrn:suggest"); - - xml_add_element($doc, $suggest, "dfrn:url", $item['url']); - xml_add_element($doc, $suggest, "dfrn:name", $item['name']); - xml_add_element($doc, $suggest, "dfrn:photo", $item['photo']); - xml_add_element($doc, $suggest, "dfrn:request", $item['request']); - xml_add_element($doc, $suggest, "dfrn:note", $item['note']); - - $root->appendChild($suggest); - - return(trim($doc->saveXML())); -} - -/** - * @brief Create XML text for DFRN relocations - * - * @param array $owner Owner record - * @param int $uid User ID - * - * @return string DFRN relocations - */ -function dfrn_relocate($owner, $uid) { - - $a = get_app(); - - /* get site pubkey. this could be a new installation with no site keys*/ - $pubkey = get_config('system','site_pubkey'); - if(! $pubkey) { - $res = new_keypair(1024); - set_config('system','site_prvkey', $res['prvkey']); - set_config('system','site_pubkey', $res['pubkey']); - } - - $rp = q("SELECT `resource-id` , `scale`, type FROM `photo` - WHERE `profile` = 1 AND `uid` = %d ORDER BY scale;", $uid); - $photos = array(); - $ext = Photo::supportedTypes(); - foreach($rp as $p){ - $photos[$p['scale']] = $a->get_baseurl().'/photo/'.$p['resource-id'].'-'.$p['scale'].'.'.$ext[$p['type']]; - } - unset($rp, $ext); - - $doc = new DOMDocument('1.0', 'utf-8'); - $doc->formatOutput = true; - - $root = dfrn_add_header($doc, $owner, "dfrn:owner", "", false); - - $relocate = $doc->createElement("dfrn:relocate"); - - xml_add_element($doc, $relocate, "dfrn:url", $owner['url']); - xml_add_element($doc, $relocate, "dfrn:name", $owner['name']); - xml_add_element($doc, $relocate, "dfrn:photo", $photos[4]); - xml_add_element($doc, $relocate, "dfrn:thumb", $photos[5]); - xml_add_element($doc, $relocate, "dfrn:micro", $photos[6]); - xml_add_element($doc, $relocate, "dfrn:request", $owner['request']); - xml_add_element($doc, $relocate, "dfrn:confirm", $owner['confirm']); - xml_add_element($doc, $relocate, "dfrn:notify", $owner['notify']); - xml_add_element($doc, $relocate, "dfrn:poll", $owner['poll']); - xml_add_element($doc, $relocate, "dfrn:sitepubkey", get_config('system','site_pubkey')); - - $root->appendChild($relocate); - - return(trim($doc->saveXML())); -} - -/** - * @brief Adds the header elements for the DFRN protocol - * - * @param object $doc XML document - * @param array $owner Owner record - * @param string $authorelement Element name for the author - * @param string $alternatelink link to profile or category - * @param bool $public Is it a header for public posts? - * - * @return object XML root object - */ -function dfrn_add_header($doc, $owner, $authorelement, $alternatelink = "", $public = false) { - $a = get_app(); - - if ($alternatelink == "") - $alternatelink = $owner['url']; - - $root = $doc->createElementNS(NS_ATOM, 'feed'); - $doc->appendChild($root); - - $root->setAttribute("xmlns:thr", NS_THR); - $root->setAttribute("xmlns:at", "http://purl.org/atompub/tombstones/1.0"); - $root->setAttribute("xmlns:media", NS_MEDIA); - $root->setAttribute("xmlns:dfrn", "http://purl.org/macgirvin/dfrn/1.0"); - $root->setAttribute("xmlns:activity", NS_ACTIVITY); - $root->setAttribute("xmlns:georss", NS_GEORSS); - $root->setAttribute("xmlns:poco", NS_POCO); - $root->setAttribute("xmlns:ostatus", NS_OSTATUS); - $root->setAttribute("xmlns:statusnet", NS_STATUSNET); - - xml_add_element($doc, $root, "id", $a->get_baseurl()."/profile/".$owner["nick"]); - xml_add_element($doc, $root, "title", $owner["name"]); - - $attributes = array("uri" => "https://friendi.ca", "version" => FRIENDICA_VERSION."-".DB_UPDATE_VERSION); - xml_add_element($doc, $root, "generator", FRIENDICA_PLATFORM, $attributes); - - $attributes = array("rel" => "license", "href" => "http://creativecommons.org/licenses/by/3.0/"); - xml_add_element($doc, $root, "link", "", $attributes); - - $attributes = array("rel" => "alternate", "type" => "text/html", "href" => $alternatelink); - xml_add_element($doc, $root, "link", "", $attributes); - - ostatus_hublinks($doc, $root); - - if ($public) { - $attributes = array("rel" => "salmon", "href" => $a->get_baseurl()."/salmon/".$owner["nick"]); + $attributes = array("rel" => "license", "href" => "http://creativecommons.org/licenses/by/3.0/"); xml_add_element($doc, $root, "link", "", $attributes); - $attributes = array("rel" => "http://salmon-protocol.org/ns/salmon-replies", "href" => $a->get_baseurl()."/salmon/".$owner["nick"]); + $attributes = array("rel" => "alternate", "type" => "text/html", "href" => $alternatelink); xml_add_element($doc, $root, "link", "", $attributes); - $attributes = array("rel" => "http://salmon-protocol.org/ns/salmon-mention", "href" => $a->get_baseurl()."/salmon/".$owner["nick"]); - xml_add_element($doc, $root, "link", "", $attributes); + ostatus_hublinks($doc, $root); + + if ($public) { + $attributes = array("rel" => "salmon", "href" => app::get_baseurl()."/salmon/".$owner["nick"]); + xml_add_element($doc, $root, "link", "", $attributes); + + $attributes = array("rel" => "http://salmon-protocol.org/ns/salmon-replies", "href" => app::get_baseurl()."/salmon/".$owner["nick"]); + xml_add_element($doc, $root, "link", "", $attributes); + + $attributes = array("rel" => "http://salmon-protocol.org/ns/salmon-mention", "href" => app::get_baseurl()."/salmon/".$owner["nick"]); + xml_add_element($doc, $root, "link", "", $attributes); + } + + if ($owner['page-flags'] == PAGE_COMMUNITY) + xml_add_element($doc, $root, "dfrn:community", 1); + + xml_add_element($doc, $root, "updated", datetime_convert("UTC", "UTC", "now", ATOM_TIME)); + + $author = self::add_author($doc, $owner, $authorelement, $public); + $root->appendChild($author); + + return $root; } - if ($owner['page-flags'] == PAGE_COMMUNITY) - xml_add_element($doc, $root, "dfrn:community", 1); + /** + * @brief Adds the author element in the header for the DFRN protocol + * + * @param object $doc XML document + * @param array $owner Owner record + * @param string $authorelement Element name for the author + * + * @return object XML author object + */ + private function add_author($doc, $owner, $authorelement, $public) { - xml_add_element($doc, $root, "updated", datetime_convert("UTC", "UTC", "now", ATOM_TIME)); + $author = $doc->createElement($authorelement); - $author = dfrn_add_author($doc, $owner, $authorelement, $public); - $root->appendChild($author); + $namdate = datetime_convert('UTC', 'UTC', $owner['name-date'].'+00:00' , ATOM_TIME); + $uridate = datetime_convert('UTC', 'UTC', $owner['uri-date'].'+00:00', ATOM_TIME); + $picdate = datetime_convert('UTC', 'UTC', $owner['avatar-date'].'+00:00', ATOM_TIME); - return $root; -} + $attributes = array("dfrn:updated" => $namdate); + xml_add_element($doc, $author, "name", $owner["name"], $attributes); -/** - * @brief Adds the author element in the header for the DFRN protocol - * - * @param object $doc XML document - * @param array $owner Owner record - * @param string $authorelement Element name for the author - * - * @return object XML author object - */ -function dfrn_add_author($doc, $owner, $authorelement, $public) { - $a = get_app(); + $attributes = array("dfrn:updated" => $namdate); + xml_add_element($doc, $author, "uri", app::get_baseurl().'/profile/'.$owner["nickname"], $attributes); - $author = $doc->createElement($authorelement); + $attributes = array("rel" => "photo", "type" => "image/jpeg", "dfrn:updated" => $picdate, + "media:width" => 175, "media:height" => 175, "href" => $owner['photo']); + xml_add_element($doc, $author, "link", "", $attributes); - $namdate = datetime_convert('UTC', 'UTC', $owner['name-date'].'+00:00' , ATOM_TIME); - $uridate = datetime_convert('UTC', 'UTC', $owner['uri-date'].'+00:00', ATOM_TIME); - $picdate = datetime_convert('UTC', 'UTC', $owner['avatar-date'].'+00:00', ATOM_TIME); + $attributes = array("rel" => "avatar", "type" => "image/jpeg", "dfrn:updated" => $picdate, + "media:width" => 175, "media:height" => 175, "href" => $owner['photo']); + xml_add_element($doc, $author, "link", "", $attributes); - $attributes = array("dfrn:updated" => $namdate); - xml_add_element($doc, $author, "name", $owner["name"], $attributes); + $birthday = feed_birthday($owner['user_uid'], $owner['timezone']); - $attributes = array("dfrn:updated" => $namdate); - xml_add_element($doc, $author, "uri", $a->get_baseurl().'/profile/'.$owner["nickname"], $attributes); + if ($birthday) + xml_add_element($doc, $author, "dfrn:birthday", $birthday); - $attributes = array("rel" => "photo", "type" => "image/jpeg", "dfrn:updated" => $picdate, - "media:width" => 175, "media:height" => 175, "href" => $owner['photo']); - xml_add_element($doc, $author, "link", "", $attributes); + // The following fields will only be generated if this isn't for a public feed + if ($public) + return $author; - $attributes = array("rel" => "avatar", "type" => "image/jpeg", "dfrn:updated" => $picdate, - "media:width" => 175, "media:height" => 175, "href" => $owner['photo']); - xml_add_element($doc, $author, "link", "", $attributes); + // Only show contact details when we are allowed to + $r = q("SELECT `profile`.`about`, `profile`.`name`, `profile`.`homepage`, `user`.`nickname`, `user`.`timezone`, + `profile`.`locality`, `profile`.`region`, `profile`.`country-name`, `profile`.`pub_keywords`, `profile`.`dob` + FROM `profile` + INNER JOIN `user` ON `user`.`uid` = `profile`.`uid` + WHERE `profile`.`is-default` AND NOT `user`.`hidewall` AND `user`.`uid` = %d", + intval($owner['user_uid'])); + if ($r) { + $profile = $r[0]; + xml_add_element($doc, $author, "poco:displayName", $profile["name"]); + xml_add_element($doc, $author, "poco:updated", $namdate); - $birthday = feed_birthday($owner['user_uid'], $owner['timezone']); + if (trim($profile["dob"]) != "0000-00-00") + xml_add_element($doc, $author, "poco:birthday", "0000-".date("m-d", strtotime($profile["dob"]))); - if ($birthday) - xml_add_element($doc, $author, "dfrn:birthday", $birthday); + xml_add_element($doc, $author, "poco:note", $profile["about"]); + xml_add_element($doc, $author, "poco:preferredUsername", $profile["nickname"]); + + $savetz = date_default_timezone_get(); + date_default_timezone_set($profile["timezone"]); + xml_add_element($doc, $author, "poco:utcOffset", date("P")); + date_default_timezone_set($savetz); + + if (trim($profile["homepage"]) != "") { + $urls = $doc->createElement("poco:urls"); + xml_add_element($doc, $urls, "poco:type", "homepage"); + xml_add_element($doc, $urls, "poco:value", $profile["homepage"]); + xml_add_element($doc, $urls, "poco:primary", "true"); + $author->appendChild($urls); + } + + if (trim($profile["pub_keywords"]) != "") { + $keywords = explode(",", $profile["pub_keywords"]); + + foreach ($keywords AS $keyword) + xml_add_element($doc, $author, "poco:tags", trim($keyword)); + + } + + /// @todo When we are having the XMPP address in the profile we should propagate it here + $xmpp = ""; + if (trim($xmpp) != "") { + $ims = $doc->createElement("poco:ims"); + xml_add_element($doc, $ims, "poco:type", "xmpp"); + xml_add_element($doc, $ims, "poco:value", $xmpp); + xml_add_element($doc, $ims, "poco:primary", "true"); + $author->appendChild($ims); + } + + if (trim($profile["locality"].$profile["region"].$profile["country-name"]) != "") { + $element = $doc->createElement("poco:address"); + + xml_add_element($doc, $element, "poco:formatted", formatted_location($profile)); + + if (trim($profile["locality"]) != "") + xml_add_element($doc, $element, "poco:locality", $profile["locality"]); + + if (trim($profile["region"]) != "") + xml_add_element($doc, $element, "poco:region", $profile["region"]); + + if (trim($profile["country-name"]) != "") + xml_add_element($doc, $element, "poco:country", $profile["country-name"]); + + $author->appendChild($element); + } + } - // The following fields will only be generated if this isn't for a public feed - if ($public) return $author; + } - // Only show contact details when we are allowed to - $r = q("SELECT `profile`.`about`, `profile`.`name`, `profile`.`homepage`, `user`.`nickname`, `user`.`timezone`, - `profile`.`locality`, `profile`.`region`, `profile`.`country-name`, `profile`.`pub_keywords`, `profile`.`dob` - FROM `profile` - INNER JOIN `user` ON `user`.`uid` = `profile`.`uid` - WHERE `profile`.`is-default` AND NOT `user`.`hidewall` AND `user`.`uid` = %d", - intval($owner['user_uid'])); - if ($r) { - $profile = $r[0]; - xml_add_element($doc, $author, "poco:displayName", $profile["name"]); - xml_add_element($doc, $author, "poco:updated", $namdate); + /** + * @brief Adds the author elements in the "entry" elements of the DFRN protocol + * + * @param object $doc XML document + * @param string $element Element name for the author + * @param string $contact_url Link of the contact + * @param array $items Item elements + * + * @return object XML author object + */ + private function add_entry_author($doc, $element, $contact_url, $item) { - if (trim($profile["dob"]) != "0000-00-00") - xml_add_element($doc, $author, "poco:birthday", "0000-".date("m-d", strtotime($profile["dob"]))); + $contact = get_contact_details_by_url($contact_url, $item["uid"]); - xml_add_element($doc, $author, "poco:note", $profile["about"]); - xml_add_element($doc, $author, "poco:preferredUsername", $profile["nickname"]); + $author = $doc->createElement($element); + xml_add_element($doc, $author, "name", $contact["name"]); + xml_add_element($doc, $author, "uri", $contact["url"]); - $savetz = date_default_timezone_get(); - date_default_timezone_set($profile["timezone"]); - xml_add_element($doc, $author, "poco:utcOffset", date("P")); - date_default_timezone_set($savetz); + /// @Todo + /// - Check real image type and image size + /// - Check which of these boths elements we should use + $attributes = array( + "rel" => "photo", + "type" => "image/jpeg", + "media:width" => 80, + "media:height" => 80, + "href" => $contact["photo"]); + xml_add_element($doc, $author, "link", "", $attributes); - if (trim($profile["homepage"]) != "") { - $urls = $doc->createElement("poco:urls"); - xml_add_element($doc, $urls, "poco:type", "homepage"); - xml_add_element($doc, $urls, "poco:value", $profile["homepage"]); - xml_add_element($doc, $urls, "poco:primary", "true"); - $author->appendChild($urls); + $attributes = array( + "rel" => "avatar", + "type" => "image/jpeg", + "media:width" => 80, + "media:height" => 80, + "href" => $contact["photo"]); + xml_add_element($doc, $author, "link", "", $attributes); + + return $author; + } + + /** + * @brief Adds the activity elements + * + * @param object $doc XML document + * @param string $element Element name for the activity + * @param string $activity activity value + * + * @return object XML activity object + */ + private function create_activity($doc, $element, $activity) { + + if($activity) { + $entry = $doc->createElement($element); + + $r = parse_xml_string($activity, false); + if(!$r) + return false; + if($r->type) + xml_add_element($doc, $entry, "activity:object-type", $r->type); + if($r->id) + xml_add_element($doc, $entry, "id", $r->id); + if($r->title) + xml_add_element($doc, $entry, "title", $r->title); + if($r->link) { + if(substr($r->link,0,1) === '<') { + if(strstr($r->link,'&') && (! strstr($r->link,'&'))) + $r->link = str_replace('&','&', $r->link); + + $r->link = preg_replace('/\/','',$r->link); + + $data = parse_xml_string($r->link, false); + foreach ($data->attributes() AS $parameter => $value) + $attributes[$parameter] = $value; + } else + $attributes = array("rel" => "alternate", "type" => "text/html", "href" => $r->link); + + xml_add_element($doc, $entry, "link", "", $attributes); + } + if($r->content) + xml_add_element($doc, $entry, "content", bbcode($r->content), array("type" => "html")); + + return $entry; } - if (trim($profile["pub_keywords"]) != "") { - $keywords = explode(",", $profile["pub_keywords"]); + return false; + } - foreach ($keywords AS $keyword) - xml_add_element($doc, $author, "poco:tags", trim($keyword)); + /** + * @brief Adds the elements for attachments + * + * @param object $doc XML document + * @param object $root XML root + * @param array $item Item element + * + * @return object XML attachment object + */ + private function get_attachment($doc, $root, $item) { + $arr = explode('[/attach],',$item['attach']); + if(count($arr)) { + foreach($arr as $r) { + $matches = false; + $cnt = preg_match('|\[attach\]href=\"(.*?)\" length=\"(.*?)\" type=\"(.*?)\" title=\"(.*?)\"|',$r,$matches); + if($cnt) { + $attributes = array("rel" => "enclosure", + "href" => $matches[1], + "type" => $matches[3]); - } + if(intval($matches[2])) + $attributes["length"] = intval($matches[2]); - /// @todo When we are having the XMPP address in the profile we should propagate it here - $xmpp = ""; - if (trim($xmpp) != "") { - $ims = $doc->createElement("poco:ims"); - xml_add_element($doc, $ims, "poco:type", "xmpp"); - xml_add_element($doc, $ims, "poco:value", $xmpp); - xml_add_element($doc, $ims, "poco:primary", "true"); - $author->appendChild($ims); - } + if(trim($matches[4]) != "") + $attributes["title"] = trim($matches[4]); - if (trim($profile["locality"].$profile["region"].$profile["country-name"]) != "") { - $element = $doc->createElement("poco:address"); - - xml_add_element($doc, $element, "poco:formatted", formatted_location($profile)); - - if (trim($profile["locality"]) != "") - xml_add_element($doc, $element, "poco:locality", $profile["locality"]); - - if (trim($profile["region"]) != "") - xml_add_element($doc, $element, "poco:region", $profile["region"]); - - if (trim($profile["country-name"]) != "") - xml_add_element($doc, $element, "poco:country", $profile["country-name"]); - - $author->appendChild($element); + xml_add_element($doc, $root, "link", "", $attributes); + } + } } } - return $author; -} + /** + * @brief Adds the "entry" elements for the DFRN protocol + * + * @param object $doc XML document + * @param string $type "text" or "html" + * @param array $item Item element + * @param array $owner Owner record + * @param bool $comment Trigger the sending of the "comment" element + * @param int $cid Contact ID of the recipient + * + * @return object XML entry object + */ + private function entry($doc, $type, $item, $owner, $comment = false, $cid = 0) { -/** - * @brief Adds the author elements in the "entry" elements of the DFRN protocol - * - * @param object $doc XML document - * @param string $element Element name for the author - * @param string $contact_url Link of the contact - * @param array $items Item elements - * - * @return object XML author object - */ -function dfrn_add_entry_author($doc, $element, $contact_url, $item) { + $mentioned = array(); - $contact = get_contact_details_by_url($contact_url, $item["uid"]); + if(!$item['parent']) + return; - $author = $doc->createElement($element); - xml_add_element($doc, $author, "name", $contact["name"]); - xml_add_element($doc, $author, "uri", $contact["url"]); - - /// @Todo - /// - Check real image type and image size - /// - Check which of these boths elements we should use - $attributes = array( - "rel" => "photo", - "type" => "image/jpeg", - "media:width" => 80, - "media:height" => 80, - "href" => $contact["photo"]); - xml_add_element($doc, $author, "link", "", $attributes); - - $attributes = array( - "rel" => "avatar", - "type" => "image/jpeg", - "media:width" => 80, - "media:height" => 80, - "href" => $contact["photo"]); - xml_add_element($doc, $author, "link", "", $attributes); - - return $author; -} - -/** - * @brief Adds the activity elements - * - * @param object $doc XML document - * @param string $element Element name for the activity - * @param string $activity activity value - * - * @return object XML activity object - */ -function dfrn_create_activity($doc, $element, $activity) { - - if($activity) { - $entry = $doc->createElement($element); - - $r = parse_xml_string($activity, false); - if(!$r) - return false; - if($r->type) - xml_add_element($doc, $entry, "activity:object-type", $r->type); - if($r->id) - xml_add_element($doc, $entry, "id", $r->id); - if($r->title) - xml_add_element($doc, $entry, "title", $r->title); - if($r->link) { - if(substr($r->link,0,1) === '<') { - if(strstr($r->link,'&') && (! strstr($r->link,'&'))) - $r->link = str_replace('&','&', $r->link); - - $r->link = preg_replace('/\/','',$r->link); - - $data = parse_xml_string($r->link, false); - foreach ($data->attributes() AS $parameter => $value) - $attributes[$parameter] = $value; - } else - $attributes = array("rel" => "alternate", "type" => "text/html", "href" => $r->link); - - xml_add_element($doc, $entry, "link", "", $attributes); + if($item['deleted']) { + $attributes = array("ref" => $item['uri'], "when" => datetime_convert('UTC','UTC',$item['edited'] . '+00:00',ATOM_TIME)); + return xml_create_element($doc, "at:deleted-entry", "", $attributes); } - if($r->content) - xml_add_element($doc, $entry, "content", bbcode($r->content), array("type" => "html")); + + $entry = $doc->createElement("entry"); + + if($item['allow_cid'] || $item['allow_gid'] || $item['deny_cid'] || $item['deny_gid']) + $body = fix_private_photos($item['body'],$owner['uid'],$item,$cid); + else + $body = $item['body']; + + if ($type == 'html') { + $htmlbody = $body; + + if ($item['title'] != "") + $htmlbody = "[b]".$item['title']."[/b]\n\n".$htmlbody; + + $htmlbody = bbcode($htmlbody, false, false, 7); + } + + $author = self::add_entry_author($doc, "author", $item["author-link"], $item); + $entry->appendChild($author); + + $dfrnowner = self::add_entry_author($doc, "dfrn:owner", $item["owner-link"], $item); + $entry->appendChild($dfrnowner); + + if(($item['parent'] != $item['id']) || ($item['parent-uri'] !== $item['uri']) || (($item['thr-parent'] !== '') && ($item['thr-parent'] !== $item['uri']))) { + $parent = q("SELECT `guid` FROM `item` WHERE `id` = %d", intval($item["parent"])); + $parent_item = (($item['thr-parent']) ? $item['thr-parent'] : $item['parent-uri']); + $attributes = array("ref" => $parent_item, "type" => "text/html", "href" => app::get_baseurl().'/display/'.$parent[0]['guid']); + xml_add_element($doc, $entry, "thr:in-reply-to", "", $attributes); + } + + xml_add_element($doc, $entry, "id", $item["uri"]); + xml_add_element($doc, $entry, "title", $item["title"]); + + xml_add_element($doc, $entry, "published", datetime_convert("UTC","UTC",$item["created"]."+00:00",ATOM_TIME)); + xml_add_element($doc, $entry, "updated", datetime_convert("UTC","UTC",$item["edited"]."+00:00",ATOM_TIME)); + + xml_add_element($doc, $entry, "dfrn:env", base64url_encode($body, true)); + xml_add_element($doc, $entry, "content", (($type === 'html') ? $htmlbody : $body), array("type" => $type)); + + xml_add_element($doc, $entry, "link", "", array("rel" => "alternate", "type" => "text/html", + "href" => app::get_baseurl()."/display/".$item["guid"])); + + // "comment-allow" is some old fashioned stuff for old Friendica versions. + // It is included in the rewritten code for completeness + if ($comment) + xml_add_element($doc, $entry, "dfrn:comment-allow", intval($item['last-child'])); + + if($item['location']) + xml_add_element($doc, $entry, "dfrn:location", $item['location']); + + if($item['coord']) + xml_add_element($doc, $entry, "georss:point", $item['coord']); + + if(($item['private']) || strlen($item['allow_cid']) || strlen($item['allow_gid']) || strlen($item['deny_cid']) || strlen($item['deny_gid'])) + xml_add_element($doc, $entry, "dfrn:private", (($item['private']) ? $item['private'] : 1)); + + if($item['extid']) + xml_add_element($doc, $entry, "dfrn:extid", $item['extid']); + + if($item['bookmark']) + xml_add_element($doc, $entry, "dfrn:bookmark", "true"); + + if($item['app']) + xml_add_element($doc, $entry, "statusnet:notice_info", "", array("local_id" => $item['id'], "source" => $item['app'])); + + xml_add_element($doc, $entry, "dfrn:diaspora_guid", $item["guid"]); + + // The signed text contains the content in Markdown, the sender handle and the signatur for the content + // It is needed for relayed comments to Diaspora. + if($item['signed_text']) { + $sign = base64_encode(json_encode(array('signed_text' => $item['signed_text'],'signature' => $item['signature'],'signer' => $item['signer']))); + xml_add_element($doc, $entry, "dfrn:diaspora_signature", $sign); + } + + xml_add_element($doc, $entry, "activity:verb", construct_verb($item)); + + $actobj = self::create_activity($doc, "activity:object", $item['object']); + if ($actobj) + $entry->appendChild($actobj); + + $actarg = self::create_activity($doc, "activity:target", $item['target']); + if ($actarg) + $entry->appendChild($actarg); + + $tags = item_getfeedtags($item); + + if(count($tags)) { + foreach($tags as $t) + if (($type != 'html') OR ($t[0] != "@")) + xml_add_element($doc, $entry, "category", "", array("scheme" => "X-DFRN:".$t[0].":".$t[1], "term" => $t[2])); + } + + if(count($tags)) + foreach($tags as $t) + if ($t[0] == "@") + $mentioned[$t[1]] = $t[1]; + + foreach ($mentioned AS $mention) { + $r = q("SELECT `forum`, `prv` FROM `contact` WHERE `uid` = %d AND `nurl` = '%s'", + intval($owner["uid"]), + dbesc(normalise_link($mention))); + if ($r[0]["forum"] OR $r[0]["prv"]) + xml_add_element($doc, $entry, "link", "", array("rel" => "mentioned", + "ostatus:object-type" => ACTIVITY_OBJ_GROUP, + "href" => $mention)); + else + xml_add_element($doc, $entry, "link", "", array("rel" => "mentioned", + "ostatus:object-type" => ACTIVITY_OBJ_PERSON, + "href" => $mention)); + } + + self::get_attachment($doc, $entry, $item); return $entry; } - return false; -} + /** + * @brief Delivers the atom content to the contacts + * + * @param array $owner Owner record + * @param array $contactr Contact record of the receiver + * @param string $atom Content that will be transmitted + * @param bool $dissolve (to be documented) + * + * @return int Deliver status. -1 means an error. + */ + function deliver($owner,$contact,$atom, $dissolve = false) { -/** - * @brief Adds the elements for attachments - * - * @param object $doc XML document - * @param object $root XML root - * @param array $item Item element - * - * @return object XML attachment object - */ -function dfrn_get_attachment($doc, $root, $item) { - $arr = explode('[/attach],',$item['attach']); - if(count($arr)) { - foreach($arr as $r) { - $matches = false; - $cnt = preg_match('|\[attach\]href=\"(.*?)\" length=\"(.*?)\" type=\"(.*?)\" title=\"(.*?)\"|',$r,$matches); - if($cnt) { - $attributes = array("rel" => "enclosure", - "href" => $matches[1], - "type" => $matches[3]); + $a = get_app(); - if(intval($matches[2])) - $attributes["length"] = intval($matches[2]); + $idtosend = $orig_id = (($contact['dfrn-id']) ? $contact['dfrn-id'] : $contact['issued-id']); - if(trim($matches[4]) != "") - $attributes["title"] = trim($matches[4]); + if($contact['duplex'] && $contact['dfrn-id']) + $idtosend = '0:' . $orig_id; + if($contact['duplex'] && $contact['issued-id']) + $idtosend = '1:' . $orig_id; - xml_add_element($doc, $root, "link", "", $attributes); + + $rino = get_config('system','rino_encrypt'); + $rino = intval($rino); + // use RINO1 if mcrypt isn't installed and RINO2 was selected + if ($rino==2 and !function_exists('mcrypt_create_iv')) $rino=1; + + logger("Local rino version: ". $rino, LOGGER_DEBUG); + + $ssl_val = intval(get_config('system','ssl_policy')); + $ssl_policy = ''; + + switch($ssl_val){ + case SSL_POLICY_FULL: + $ssl_policy = 'full'; + break; + case SSL_POLICY_SELFSIGN: + $ssl_policy = 'self'; + break; + case SSL_POLICY_NONE: + default: + $ssl_policy = 'none'; + break; + } + + $url = $contact['notify'] . '&dfrn_id=' . $idtosend . '&dfrn_version=' . DFRN_PROTOCOL_VERSION . (($rino) ? '&rino='.$rino : ''); + + logger('dfrn_deliver: ' . $url); + + $xml = fetch_url($url); + + $curl_stat = $a->get_curl_code(); + if(! $curl_stat) + return(-1); // timed out + + logger('dfrn_deliver: ' . $xml, LOGGER_DATA); + + if(! $xml) + return 3; + + if(strpos($xml,'status) != 0) || (! strlen($res->challenge)) || (! strlen($res->dfrn_id))) + return (($res->status) ? $res->status : 3); + + $postvars = array(); + $sent_dfrn_id = hex2bin((string) $res->dfrn_id); + $challenge = hex2bin((string) $res->challenge); + $perm = (($res->perm) ? $res->perm : null); + $dfrn_version = (float) (($res->dfrn_version) ? $res->dfrn_version : 2.0); + $rino_remote_version = intval($res->rino); + $page = (($owner['page-flags'] == PAGE_COMMUNITY) ? 1 : 0); + + logger("Remote rino version: ".$rino_remote_version." for ".$contact["url"], LOGGER_DEBUG); + + if($owner['page-flags'] == PAGE_PRVGROUP) + $page = 2; + + $final_dfrn_id = ''; + + if($perm) { + if((($perm == 'rw') && (! intval($contact['writable']))) + || (($perm == 'r') && (intval($contact['writable'])))) { + q("update contact set writable = %d where id = %d", + intval(($perm == 'rw') ? 1 : 0), + intval($contact['id']) + ); + $contact['writable'] = (string) 1 - intval($contact['writable']); } } + + if(($contact['duplex'] && strlen($contact['pubkey'])) + || ($owner['page-flags'] == PAGE_COMMUNITY && strlen($contact['pubkey'])) + || ($contact['rel'] == CONTACT_IS_SHARING && strlen($contact['pubkey']))) { + openssl_public_decrypt($sent_dfrn_id,$final_dfrn_id,$contact['pubkey']); + openssl_public_decrypt($challenge,$postvars['challenge'],$contact['pubkey']); + } else { + openssl_private_decrypt($sent_dfrn_id,$final_dfrn_id,$contact['prvkey']); + openssl_private_decrypt($challenge,$postvars['challenge'],$contact['prvkey']); + } + + $final_dfrn_id = substr($final_dfrn_id, 0, strpos($final_dfrn_id, '.')); + + if(strpos($final_dfrn_id,':') == 1) + $final_dfrn_id = substr($final_dfrn_id,2); + + if($final_dfrn_id != $orig_id) { + logger('dfrn_deliver: wrong dfrn_id.'); + // did not decode properly - cannot trust this site + return 3; + } + + $postvars['dfrn_id'] = $idtosend; + $postvars['dfrn_version'] = DFRN_PROTOCOL_VERSION; + if($dissolve) + $postvars['dissolve'] = '1'; + + + if((($contact['rel']) && ($contact['rel'] != CONTACT_IS_SHARING) && (! $contact['blocked'])) || ($owner['page-flags'] == PAGE_COMMUNITY)) { + $postvars['data'] = $atom; + $postvars['perm'] = 'rw'; + } else { + $postvars['data'] = str_replace('1','0',$atom); + $postvars['perm'] = 'r'; + } + + $postvars['ssl_policy'] = $ssl_policy; + + if($page) + $postvars['page'] = $page; + + + if($rino>0 && $rino_remote_version>0 && (! $dissolve)) { + logger('rino version: '. $rino_remote_version); + + switch($rino_remote_version) { + case 1: + // Deprecated rino version! + $key = substr(random_string(),0,16); + $data = aes_encrypt($postvars['data'],$key); + break; + case 2: + // RINO 2 based on php-encryption + try { + $key = Crypto::createNewRandomKey(); + } catch (CryptoTestFailed $ex) { + logger('Cannot safely create a key'); + return -1; + } catch (CannotPerformOperation $ex) { + logger('Cannot safely create a key'); + return -1; + } + try { + $data = Crypto::encrypt($postvars['data'], $key); + } catch (CryptoTestFailed $ex) { + logger('Cannot safely perform encryption'); + return -1; + } catch (CannotPerformOperation $ex) { + logger('Cannot safely perform encryption'); + return -1; + } + break; + default: + logger("rino: invalid requested verision '$rino_remote_version'"); + return -1; + } + + $postvars['rino'] = $rino_remote_version; + $postvars['data'] = bin2hex($data); + + #logger('rino: sent key = ' . $key, LOGGER_DEBUG); + + + if($dfrn_version >= 2.1) { + if(($contact['duplex'] && strlen($contact['pubkey'])) + || ($owner['page-flags'] == PAGE_COMMUNITY && strlen($contact['pubkey'])) + || ($contact['rel'] == CONTACT_IS_SHARING && strlen($contact['pubkey']))) + + openssl_public_encrypt($key,$postvars['key'],$contact['pubkey']); + else + openssl_private_encrypt($key,$postvars['key'],$contact['prvkey']); + + } else { + if(($contact['duplex'] && strlen($contact['prvkey'])) || ($owner['page-flags'] == PAGE_COMMUNITY)) + openssl_private_encrypt($key,$postvars['key'],$contact['prvkey']); + else + openssl_public_encrypt($key,$postvars['key'],$contact['pubkey']); + + } + + logger('md5 rawkey ' . md5($postvars['key'])); + + $postvars['key'] = bin2hex($postvars['key']); + } + + + logger('dfrn_deliver: ' . "SENDING: " . print_r($postvars,true), LOGGER_DATA); + + $xml = post_url($contact['notify'],$postvars); + + logger('dfrn_deliver: ' . "RECEIVED: " . $xml, LOGGER_DATA); + + $curl_stat = $a->get_curl_code(); + if((! $curl_stat) || (! strlen($xml))) + return(-1); // timed out + + if(($curl_stat == 503) && (stristr($a->get_curl_headers(),'retry-after'))) + return(-1); + + if(strpos($xml,'status; } } - -/** - * @brief Adds the "entry" elements for the DFRN protocol - * - * @param object $doc XML document - * @param string $type "text" or "html" - * @param array $item Item element - * @param array $owner Owner record - * @param bool $comment Trigger the sending of the "comment" element - * @param int $cid Contact ID of the recipient - * - * @return object XML entry object - */ -function dfrn_entry($doc, $type, $item, $owner, $comment = false, $cid = 0) { - $a = get_app(); - - $mentioned = array(); - - if(!$item['parent']) - return; - - if($item['deleted']) { - $attributes = array("ref" => $item['uri'], "when" => datetime_convert('UTC','UTC',$item['edited'] . '+00:00',ATOM_TIME)); - return xml_create_element($doc, "at:deleted-entry", "", $attributes); - } - - $entry = $doc->createElement("entry"); - - if($item['allow_cid'] || $item['allow_gid'] || $item['deny_cid'] || $item['deny_gid']) - $body = fix_private_photos($item['body'],$owner['uid'],$item,$cid); - else - $body = $item['body']; - - if ($type == 'html') { - $htmlbody = $body; - - if ($item['title'] != "") - $htmlbody = "[b]".$item['title']."[/b]\n\n".$htmlbody; - - $htmlbody = bbcode($htmlbody, false, false, 7); - } - - $author = dfrn_add_entry_author($doc, "author", $item["author-link"], $item); - $entry->appendChild($author); - - $dfrnowner = dfrn_add_entry_author($doc, "dfrn:owner", $item["owner-link"], $item); - $entry->appendChild($dfrnowner); - - if(($item['parent'] != $item['id']) || ($item['parent-uri'] !== $item['uri']) || (($item['thr-parent'] !== '') && ($item['thr-parent'] !== $item['uri']))) { - $parent = q("SELECT `guid` FROM `item` WHERE `id` = %d", intval($item["parent"])); - $parent_item = (($item['thr-parent']) ? $item['thr-parent'] : $item['parent-uri']); - $attributes = array("ref" => $parent_item, "type" => "text/html", "href" => $a->get_baseurl().'/display/'.$parent[0]['guid']); - xml_add_element($doc, $entry, "thr:in-reply-to", "", $attributes); - } - - xml_add_element($doc, $entry, "id", $item["uri"]); - xml_add_element($doc, $entry, "title", $item["title"]); - - xml_add_element($doc, $entry, "published", datetime_convert("UTC","UTC",$item["created"]."+00:00",ATOM_TIME)); - xml_add_element($doc, $entry, "updated", datetime_convert("UTC","UTC",$item["edited"]."+00:00",ATOM_TIME)); - - xml_add_element($doc, $entry, "dfrn:env", base64url_encode($body, true)); - xml_add_element($doc, $entry, "content", (($type === 'html') ? $htmlbody : $body), array("type" => $type)); - - xml_add_element($doc, $entry, "link", "", array("rel" => "alternate", "type" => "text/html", - "href" => $a->get_baseurl()."/display/".$item["guid"])); - - // "comment-allow" is some old fashioned stuff for old Friendica versions. - // It is included in the rewritten code for completeness - if ($comment) - xml_add_element($doc, $entry, "dfrn:comment-allow", intval($item['last-child'])); - - if($item['location']) - xml_add_element($doc, $entry, "dfrn:location", $item['location']); - - if($item['coord']) - xml_add_element($doc, $entry, "georss:point", $item['coord']); - - if(($item['private']) || strlen($item['allow_cid']) || strlen($item['allow_gid']) || strlen($item['deny_cid']) || strlen($item['deny_gid'])) - xml_add_element($doc, $entry, "dfrn:private", (($item['private']) ? $item['private'] : 1)); - - if($item['extid']) - xml_add_element($doc, $entry, "dfrn:extid", $item['extid']); - - if($item['bookmark']) - xml_add_element($doc, $entry, "dfrn:bookmark", "true"); - - if($item['app']) - xml_add_element($doc, $entry, "statusnet:notice_info", "", array("local_id" => $item['id'], "source" => $item['app'])); - - xml_add_element($doc, $entry, "dfrn:diaspora_guid", $item["guid"]); - - // The signed text contains the content in Markdown, the sender handle and the signatur for the content - // It is needed for relayed comments to Diaspora. - if($item['signed_text']) { - $sign = base64_encode(json_encode(array('signed_text' => $item['signed_text'],'signature' => $item['signature'],'signer' => $item['signer']))); - xml_add_element($doc, $entry, "dfrn:diaspora_signature", $sign); - } - - xml_add_element($doc, $entry, "activity:verb", construct_verb($item)); - - $actobj = dfrn_create_activity($doc, "activity:object", $item['object']); - if ($actobj) - $entry->appendChild($actobj); - - $actarg = dfrn_create_activity($doc, "activity:target", $item['target']); - if ($actarg) - $entry->appendChild($actarg); - - $tags = item_getfeedtags($item); - - if(count($tags)) { - foreach($tags as $t) - if (($type != 'html') OR ($t[0] != "@")) - xml_add_element($doc, $entry, "category", "", array("scheme" => "X-DFRN:".$t[0].":".$t[1], "term" => $t[2])); - } - - if(count($tags)) - foreach($tags as $t) - if ($t[0] == "@") - $mentioned[$t[1]] = $t[1]; - - foreach ($mentioned AS $mention) { - $r = q("SELECT `forum`, `prv` FROM `contact` WHERE `uid` = %d AND `nurl` = '%s'", - intval($owner["uid"]), - dbesc(normalise_link($mention))); - if ($r[0]["forum"] OR $r[0]["prv"]) - xml_add_element($doc, $entry, "link", "", array("rel" => "mentioned", - "ostatus:object-type" => ACTIVITY_OBJ_GROUP, - "href" => $mention)); - else - xml_add_element($doc, $entry, "link", "", array("rel" => "mentioned", - "ostatus:object-type" => ACTIVITY_OBJ_PERSON, - "href" => $mention)); - } - - dfrn_get_attachment($doc, $entry, $item); - - return $entry; -} diff --git a/include/items.php b/include/items.php index 6d3cd2b7c7..cf044d8837 100644 --- a/include/items.php +++ b/include/items.php @@ -1696,245 +1696,9 @@ function tgroup_check($uid,$item) { if((! $community_page) && (! $prvgroup)) return false; - - return true; - } - - - - - -function dfrn_deliver($owner,$contact,$atom, $dissolve = false) { - - $a = get_app(); - - $idtosend = $orig_id = (($contact['dfrn-id']) ? $contact['dfrn-id'] : $contact['issued-id']); - - if($contact['duplex'] && $contact['dfrn-id']) - $idtosend = '0:' . $orig_id; - if($contact['duplex'] && $contact['issued-id']) - $idtosend = '1:' . $orig_id; - - - $rino = get_config('system','rino_encrypt'); - $rino = intval($rino); - // use RINO1 if mcrypt isn't installed and RINO2 was selected - if ($rino==2 and !function_exists('mcrypt_create_iv')) $rino=1; - - logger("Local rino version: ". $rino, LOGGER_DEBUG); - - $ssl_val = intval(get_config('system','ssl_policy')); - $ssl_policy = ''; - - switch($ssl_val){ - case SSL_POLICY_FULL: - $ssl_policy = 'full'; - break; - case SSL_POLICY_SELFSIGN: - $ssl_policy = 'self'; - break; - case SSL_POLICY_NONE: - default: - $ssl_policy = 'none'; - break; - } - - $url = $contact['notify'] . '&dfrn_id=' . $idtosend . '&dfrn_version=' . DFRN_PROTOCOL_VERSION . (($rino) ? '&rino='.$rino : ''); - - logger('dfrn_deliver: ' . $url); - - $xml = fetch_url($url); - - $curl_stat = $a->get_curl_code(); - if(! $curl_stat) - return(-1); // timed out - - logger('dfrn_deliver: ' . $xml, LOGGER_DATA); - - if(! $xml) - return 3; - - if(strpos($xml,'status) != 0) || (! strlen($res->challenge)) || (! strlen($res->dfrn_id))) - return (($res->status) ? $res->status : 3); - - $postvars = array(); - $sent_dfrn_id = hex2bin((string) $res->dfrn_id); - $challenge = hex2bin((string) $res->challenge); - $perm = (($res->perm) ? $res->perm : null); - $dfrn_version = (float) (($res->dfrn_version) ? $res->dfrn_version : 2.0); - $rino_remote_version = intval($res->rino); - $page = (($owner['page-flags'] == PAGE_COMMUNITY) ? 1 : 0); - - logger("Remote rino version: ".$rino_remote_version." for ".$contact["url"], LOGGER_DEBUG); - - if($owner['page-flags'] == PAGE_PRVGROUP) - $page = 2; - - $final_dfrn_id = ''; - - if($perm) { - if((($perm == 'rw') && (! intval($contact['writable']))) - || (($perm == 'r') && (intval($contact['writable'])))) { - q("update contact set writable = %d where id = %d", - intval(($perm == 'rw') ? 1 : 0), - intval($contact['id']) - ); - $contact['writable'] = (string) 1 - intval($contact['writable']); - } - } - - if(($contact['duplex'] && strlen($contact['pubkey'])) - || ($owner['page-flags'] == PAGE_COMMUNITY && strlen($contact['pubkey'])) - || ($contact['rel'] == CONTACT_IS_SHARING && strlen($contact['pubkey']))) { - openssl_public_decrypt($sent_dfrn_id,$final_dfrn_id,$contact['pubkey']); - openssl_public_decrypt($challenge,$postvars['challenge'],$contact['pubkey']); - } - else { - openssl_private_decrypt($sent_dfrn_id,$final_dfrn_id,$contact['prvkey']); - openssl_private_decrypt($challenge,$postvars['challenge'],$contact['prvkey']); - } - - $final_dfrn_id = substr($final_dfrn_id, 0, strpos($final_dfrn_id, '.')); - - if(strpos($final_dfrn_id,':') == 1) - $final_dfrn_id = substr($final_dfrn_id,2); - - if($final_dfrn_id != $orig_id) { - logger('dfrn_deliver: wrong dfrn_id.'); - // did not decode properly - cannot trust this site - return 3; - } - - $postvars['dfrn_id'] = $idtosend; - $postvars['dfrn_version'] = DFRN_PROTOCOL_VERSION; - if($dissolve) - $postvars['dissolve'] = '1'; - - - if((($contact['rel']) && ($contact['rel'] != CONTACT_IS_SHARING) && (! $contact['blocked'])) || ($owner['page-flags'] == PAGE_COMMUNITY)) { - $postvars['data'] = $atom; - $postvars['perm'] = 'rw'; - } - else { - $postvars['data'] = str_replace('1','0',$atom); - $postvars['perm'] = 'r'; - } - - $postvars['ssl_policy'] = $ssl_policy; - - if($page) - $postvars['page'] = $page; - - - if($rino>0 && $rino_remote_version>0 && (! $dissolve)) { - logger('rino version: '. $rino_remote_version); - - switch($rino_remote_version) { - case 1: - // Deprecated rino version! - $key = substr(random_string(),0,16); - $data = aes_encrypt($postvars['data'],$key); - break; - case 2: - // RINO 2 based on php-encryption - try { - $key = Crypto::createNewRandomKey(); - } catch (CryptoTestFailed $ex) { - logger('Cannot safely create a key'); - return -1; - } catch (CannotPerformOperation $ex) { - logger('Cannot safely create a key'); - return -1; - } - try { - $data = Crypto::encrypt($postvars['data'], $key); - } catch (CryptoTestFailed $ex) { - logger('Cannot safely perform encryption'); - return -1; - } catch (CannotPerformOperation $ex) { - logger('Cannot safely perform encryption'); - return -1; - } - break; - default: - logger("rino: invalid requested verision '$rino_remote_version'"); - return -1; - } - - $postvars['rino'] = $rino_remote_version; - $postvars['data'] = bin2hex($data); - - #logger('rino: sent key = ' . $key, LOGGER_DEBUG); - - - if($dfrn_version >= 2.1) { - if(($contact['duplex'] && strlen($contact['pubkey'])) - || ($owner['page-flags'] == PAGE_COMMUNITY && strlen($contact['pubkey'])) - || ($contact['rel'] == CONTACT_IS_SHARING && strlen($contact['pubkey']))) { - - openssl_public_encrypt($key,$postvars['key'],$contact['pubkey']); - } - else { - openssl_private_encrypt($key,$postvars['key'],$contact['prvkey']); - } - } - else { - if(($contact['duplex'] && strlen($contact['prvkey'])) || ($owner['page-flags'] == PAGE_COMMUNITY)) { - openssl_private_encrypt($key,$postvars['key'],$contact['prvkey']); - } - else { - openssl_public_encrypt($key,$postvars['key'],$contact['pubkey']); - } - } - - logger('md5 rawkey ' . md5($postvars['key'])); - - $postvars['key'] = bin2hex($postvars['key']); - } - - - logger('dfrn_deliver: ' . "SENDING: " . print_r($postvars,true), LOGGER_DATA); - - $xml = post_url($contact['notify'],$postvars); - - logger('dfrn_deliver: ' . "RECEIVED: " . $xml, LOGGER_DATA); - - $curl_stat = $a->get_curl_code(); - if((! $curl_stat) || (! strlen($xml))) - return(-1); // timed out - - if(($curl_stat == 503) && (stristr($a->get_curl_headers(),'retry-after'))) - return(-1); - - if(strpos($xml,'status; -} - - /* This function returns true if $update has an edited timestamp newer than $existing, i.e. $update contains new data which should override diff --git a/include/queue.php b/include/queue.php index f40768f0d0..1525ca3abf 100644 --- a/include/queue.php +++ b/include/queue.php @@ -1,6 +1,7 @@ '); - $deliver_status = dfrn_deliver($owner,$contact,$data); + $deliver_status = dfrn::deliver($owner,$contact,$data); if($deliver_status == (-1)) { update_queue_time($q_item['id']); diff --git a/mod/dfrn_poll.php b/mod/dfrn_poll.php index 658a248c62..ab6637607e 100644 --- a/mod/dfrn_poll.php +++ b/mod/dfrn_poll.php @@ -44,7 +44,7 @@ function dfrn_poll_init(&$a) { logger('dfrn_poll: public feed request from ' . $_SERVER['REMOTE_ADDR'] . ' for ' . $user); header("Content-type: application/atom+xml"); - echo dfrn_feed($a, '', $user,$last_update); + echo dfrn::feed('', $user,$last_update); killme(); } @@ -371,7 +371,7 @@ function dfrn_poll_post(&$a) { } header("Content-type: application/atom+xml"); - $o = dfrn_feed($a,$dfrn_id, $a->argv[1], $last_update, $direction); + $o = dfrn::feed($dfrn_id, $a->argv[1], $last_update, $direction); echo $o; killme(); From 778d9250c699962a1f9907322756b81d24032fa3 Mon Sep 17 00:00:00 2001 From: Michael Vogel Date: Mon, 25 Jan 2016 22:10:26 +0100 Subject: [PATCH 134/242] Still some more documentation --- include/dfrn.php | 11 +++++++++++ 1 file changed, 11 insertions(+) diff --git a/include/dfrn.php b/include/dfrn.php index 885e03a91b..ee29e7347c 100644 --- a/include/dfrn.php +++ b/include/dfrn.php @@ -1,8 +1,19 @@ Date: Mon, 25 Jan 2016 22:35:18 +0100 Subject: [PATCH 135/242] API: Only allow repeating of public items --- include/api.php | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/include/api.php b/include/api.php index 3bc7c8bab9..4d206da28e 100644 --- a/include/api.php +++ b/include/api.php @@ -1551,6 +1551,8 @@ WHERE `item`.`visible` = 1 and `item`.`moderated` = 0 AND `item`.`deleted` = 0 AND `contact`.`id` = `item`.`contact-id` AND `contact`.`blocked` = 0 AND `contact`.`pending` = 0 + AND NOT `item`.`private` AND `item`.`allow_cid` = '' AND `item`.`allow`.`gid` = '' + AND `item`.`deny_cid` = '' AND `item`.`deny_gid` = '' $sql_extra AND `item`.`id`=%d", intval($id) @@ -1579,7 +1581,8 @@ $_REQUEST["source"] = api_source(); item_post($a); - } + } else + throw new ForbiddenException(); // this should output the last post (the one we just posted). $called_api = null; From c0eb7b10a3644ad207ca88dade2e9f53dd8f8aca Mon Sep 17 00:00:00 2001 From: Michael Vogel Date: Tue, 26 Jan 2016 12:18:57 +0100 Subject: [PATCH 136/242] Some new fields for the protocol --- include/dfrn.php | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/include/dfrn.php b/include/dfrn.php index ee29e7347c..ac67bf0974 100644 --- a/include/dfrn.php +++ b/include/dfrn.php @@ -456,6 +456,9 @@ class dfrn { $attributes = array("dfrn:updated" => $namdate); xml_add_element($doc, $author, "uri", app::get_baseurl().'/profile/'.$owner["nickname"], $attributes); + $attributes = array("dfrn:updated" => $namdate); + xml_add_element($doc, $author, "dfrn:handle", $owner["addr"], $attributes); + $attributes = array("rel" => "photo", "type" => "image/jpeg", "dfrn:updated" => $picdate, "media:width" => 175, "media:height" => 175, "href" => $owner['photo']); xml_add_element($doc, $author, "link", "", $attributes); @@ -560,6 +563,7 @@ class dfrn { $author = $doc->createElement($element); xml_add_element($doc, $author, "name", $contact["name"]); xml_add_element($doc, $author, "uri", $contact["url"]); + xml_add_element($doc, $author, "dfrn:handle", $contact["addr"]); /// @Todo /// - Check real image type and image size @@ -711,7 +715,9 @@ class dfrn { if(($item['parent'] != $item['id']) || ($item['parent-uri'] !== $item['uri']) || (($item['thr-parent'] !== '') && ($item['thr-parent'] !== $item['uri']))) { $parent = q("SELECT `guid` FROM `item` WHERE `id` = %d", intval($item["parent"])); $parent_item = (($item['thr-parent']) ? $item['thr-parent'] : $item['parent-uri']); - $attributes = array("ref" => $parent_item, "type" => "text/html", "href" => app::get_baseurl().'/display/'.$parent[0]['guid']); + $attributes = array("ref" => $parent_item, "type" => "text/html", + "href" => app::get_baseurl().'/display/'.$parent[0]['guid'], + "dfrn:diaspora_guid" => $parent[0]['guid']); xml_add_element($doc, $entry, "thr:in-reply-to", "", $attributes); } From 45a5f63d35e7460e8de194ee778fba6d500deb77 Mon Sep 17 00:00:00 2001 From: Michael Vogel Date: Wed, 27 Jan 2016 02:38:52 +0100 Subject: [PATCH 137/242] The object-type is now transmitted as well --- include/dfrn.php | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/include/dfrn.php b/include/dfrn.php index ac67bf0974..2c8e8ce38f 100644 --- a/include/dfrn.php +++ b/include/dfrn.php @@ -767,6 +767,13 @@ class dfrn { xml_add_element($doc, $entry, "activity:verb", construct_verb($item)); + if ($item['object-type'] != "") + xml_add_element($doc, $entry, "activity:object-type", $item['object-type']); + elseif ($item['id'] == $item['parent']) + xml_add_element($doc, $entry, "activity:object-type", ACTIVITY_OBJ_NOTE); + else + xml_add_element($doc, $entry, "activity:object-type", ACTIVITY_OBJ_COMMENT); + $actobj = self::create_activity($doc, "activity:object", $item['object']); if ($actobj) $entry->appendChild($actobj); From 828cec27dd34477a8fcd3b4fb6f6ff1c54cf1c75 Mon Sep 17 00:00:00 2001 From: Michael Vogel Date: Wed, 27 Jan 2016 10:44:15 +0100 Subject: [PATCH 138/242] Do not notify on "likes" - update only OStatus contacts --- include/ostatus.php | 13 ++++++++----- 1 file changed, 8 insertions(+), 5 deletions(-) diff --git a/include/ostatus.php b/include/ostatus.php index b127d41e41..4ccd13130d 100644 --- a/include/ostatus.php +++ b/include/ostatus.php @@ -176,10 +176,13 @@ function ostatus_fetchauthor($xpath, $context, $importer, &$contact, $onlyfetch) dbesc(datetime_convert()), intval($contact["id"]), dbesc(NETWORK_OSTATUS)); } - /// @todo Add the "addr" field - $contact["generation"] = 2; - $contact["photo"] = $author["author-avatar"]; - update_gcontact($contact); + // Only update the global contact if it is an OStatus contact + if ($contact["network"] == NETWORK_OSTATUS) { + /// @todo Add the "addr" field + $contact["generation"] = 2; + $contact["photo"] = $author["author-avatar"]; + update_gcontact($contact); + } } return($author); @@ -560,7 +563,7 @@ function ostatus_import($xml,$importer,&$contact, &$hub) { logger("Item was stored with id ".$item_id, LOGGER_DEBUG); $item["id"] = $item_id; - if ($mention) { + if ($mention AND in_array($item["verb"], array(ACTIVITY_POST, ACTIVITY_SHARE))) { $u = q("SELECT `notify-flags`, `language`, `username`, `email` FROM user WHERE uid = %d LIMIT 1", intval($item['uid'])); $r = q("SELECT `parent` FROM `item` WHERE `id` = %d", intval($item_id)); From d3bf80a1f3a58cf92e47ddd157879990d01b67bd Mon Sep 17 00:00:00 2001 From: Michael Vogel Date: Wed, 27 Jan 2016 11:16:56 +0100 Subject: [PATCH 139/242] Show contact posts by searching for "contact-id" - not "gcontact-id" --- mod/contacts.php | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/mod/contacts.php b/mod/contacts.php index 38e03459e6..21578a3295 100644 --- a/mod/contacts.php +++ b/mod/contacts.php @@ -903,7 +903,10 @@ function contact_posts($a, $contact_id) { $o .= $tab_str; - if ($contact["url"]) { + $r = q("SELECT `id` FROM `item` WHERE `contact-id` = %d LIMIT 1", intval($contact_id)); + if ($r) + $o .= posts_from_contact($a, $contact_id); + elseif ($contact["url"]) { $r = q("SELECT `id` FROM `gcontact` WHERE `nurl` = '%s' LIMIT 1", dbesc(normalise_link($contact["url"]))); From afed5f3afc62431735b48a0ca6b5fb16ec598cf3 Mon Sep 17 00:00:00 2001 From: Michael Vogel Date: Wed, 27 Jan 2016 11:30:12 +0100 Subject: [PATCH 140/242] Test code for the DFRN import --- include/import-dfrn.php | 376 ++++++++++++++++++++++++++++++++++++++++ include/items.php | 9 + 2 files changed, 385 insertions(+) create mode 100644 include/import-dfrn.php diff --git a/include/import-dfrn.php b/include/import-dfrn.php new file mode 100644 index 0000000000..7336946a7b --- /dev/null +++ b/include/import-dfrn.php @@ -0,0 +1,376 @@ +evaluate($element.'/atom:name/text()', $context)->item(0)->nodeValue; + $author["link"] = $xpath->evaluate($element.'/atom:uri/text()', $context)->item(0)->nodeValue; + + $r = q("SELECT * FROM `contact` WHERE `uid` = %d AND `nurl` IN ('%s', '%s') AND `network` != '%s'", + intval($importer["uid"]), dbesc(normalise_link($author["author-link"])), + dbesc(normalise_link($author["link"])), dbesc(NETWORK_STATUSNET)); + if ($r) { + $contact = $r[0]; + $author["contact-id"] = $r[0]["id"]; + $author["network"] = $r[0]["network"]; + } else { + $author["contact-id"] = $contact["id"]; + $author["network"] = $contact["network"]; + } + + // Until now we aren't serving different sizes - but maybe later + $avatarlist = array(); + // @todo check if "avatar" or "photo" would be the best field in the specification + $avatars = $xpath->query($element."/atom:link[@rel='avatar']", $context); + foreach($avatars AS $avatar) { + $href = ""; + $width = 0; + foreach($avatar->attributes AS $attributes) { + if ($attributes->name == "href") + $href = $attributes->textContent; + if ($attributes->name == "width") + $width = $attributes->textContent; + } + if (($width > 0) AND ($href != "")) + $avatarlist[$width] = $href; + } + if (count($avatarlist) > 0) { + krsort($avatarlist); + $author["avatar"] = current($avatarlist); + } + + if ($r AND !$onlyfetch) { + // Update contact data + + $value = $xpath->evaluate($element.'/poco:displayName/text()', $context)->item(0)->nodeValue; + if ($value != "") + $contact["name"] = $value; + + $value = $xpath->evaluate($element.'/poco:preferredUsername/text()', $context)->item(0)->nodeValue; + if ($value != "") + $contact["nick"] = $value; + + $value = $xpath->evaluate($element.'/poco:note/text()', $context)->item(0)->nodeValue; + if ($value != "") + $contact["about"] = $value; + + $value = $xpath->evaluate($element.'/poco:address/poco:formatted/text()', $context)->item(0)->nodeValue; + if ($value != "") + $contact["location"] = $value; + + /// @todo + /// poco:birthday + /// poco:utcOffset + /// poco:updated + /// poco:ims + /// poco:tags + +/* + if (($contact["name"] != $r[0]["name"]) OR ($contact["nick"] != $r[0]["nick"]) OR ($contact["about"] != $r[0]["about"]) OR ($contact["location"] != $r[0]["location"])) { + + logger("Update contact data for contact ".$contact["id"], LOGGER_DEBUG); + + q("UPDATE `contact` SET `name` = '%s', `nick` = '%s', `about` = '%s', `location` = '%s', `name-date` = '%s' WHERE `id` = %d AND `network` = '%s'", + dbesc($contact["name"]), dbesc($contact["nick"]), dbesc($contact["about"]), dbesc($contact["location"]), + dbesc(datetime_convert()), intval($contact["id"]), dbesc(NETWORK_OSTATUS)); + + } + + if (isset($author["author-avatar"]) AND ($author["author-avatar"] != $r[0]['photo'])) { + logger("Update profile picture for contact ".$contact["id"], LOGGER_DEBUG); + + $photos = import_profile_photo($author["author-avatar"], $importer["uid"], $contact["id"]); + + q("UPDATE `contact` SET `photo` = '%s', `thumb` = '%s', `micro` = '%s', `avatar-date` = '%s' WHERE `id` = %d AND `network` = '%s'", + dbesc($author["author-avatar"]), dbesc($photos[1]), dbesc($photos[2]), + dbesc(datetime_convert()), intval($contact["id"]), dbesc(NETWORK_OSTATUS)); + } +*/ + /// @todo Add the "addr" field +// $contact["generation"] = 2; +// $contact["photo"] = $author["avatar"]; +//print_r($contact); + //update_gcontact($contact); + } + + return($author); + } + + function import($xml,$importer,&$contact, &$hub) { + + $a = get_app(); + + logger("Import DFRN message", LOGGER_DEBUG); + + if ($xml == "") + return; + + $doc = new DOMDocument(); + @$doc->loadXML($xml); + + $xpath = new DomXPath($doc); + $xpath->registerNamespace('atom', "http://www.w3.org/2005/Atom"); + $xpath->registerNamespace('thr', "http://purl.org/syndication/thread/1.0"); + $xpath->registerNamespace('at', "http://purl.org/atompub/tombstones/1.0"); + $xpath->registerNamespace('media', "http://purl.org/syndication/atommedia"); + $xpath->registerNamespace('dfrn', "http://purl.org/macgirvin/dfrn/1.0"); + $xpath->registerNamespace('activity', "http://activitystrea.ms/spec/1.0/"); + $xpath->registerNamespace('georss', "http://www.georss.org/georss"); + $xpath->registerNamespace('poco', "http://portablecontacts.net/spec/1.0"); + $xpath->registerNamespace('ostatus', "http://ostatus.org/schema/1.0"); + $xpath->registerNamespace('statusnet', "http://status.net/schema/api/1/"); + + $header = array(); + $header["uid"] = $importer["uid"]; + $header["network"] = NETWORK_DFRN; + $header["type"] = "remote"; + $header["wall"] = 0; + $header["origin"] = 0; + $header["gravity"] = GRAVITY_PARENT; + $header["contact-id"] = $importer["id"]; + + // Update the contact table if the data has changed + // Only the "dfrn:owner" in the head section contains all data + self::fetchauthor($xpath, $doc->firstChild, $importer, "dfrn:owner", $contact, false); + + $entries = $xpath->query('/atom:feed/atom:entry'); + + $item_id = 0; + + // Reverse the order of the entries + $entrylist = array(); + + foreach ($entries AS $entry) + $entrylist[] = $entry; + + foreach (array_reverse($entrylist) AS $entry) { + + $item = $header; + + $mention = false; + + // Fetch the owner + $owner = self::fetchauthor($xpath, $entry, $importer, "dfrn:owner", $contact, true); + + $item["owner-name"] = $owner["name"]; + $item["owner-link"] = $owner["link"]; + $item["owner-avatar"] = $owner["avatar"]; + + if ($header["contact-id"] != $owner["contact-id"]) + $item["contact-id"] = $owner["contact-id"]; + + if (($header["network"] != $owner["network"]) AND ($owner["network"] != "")) + $item["network"] = $owner["network"]; + + // fetch the author + $author = self::fetchauthor($xpath, $entry, $importer, "atom:author", $contact, true); + + $item["author-name"] = $author["name"]; + $item["author-link"] = $author["link"]; + $item["author-avatar"] = $author["avatar"]; + + if ($header["contact-id"] != $author["contact-id"]) + $item["contact-id"] = $author["contact-id"]; + + if (($header["network"] != $author["network"]) AND ($author["network"] != "")) + $item["network"] = $author["network"]; + + // Now get the item + $item["uri"] = $xpath->query('atom:id/text()', $entry)->item(0)->nodeValue; + + $r = q("SELECT `id` FROM `item` WHERE `uid` = %d AND `uri` = '%s'", + intval($importer["uid"]), dbesc($item["uri"])); + if ($r) { + //logger("Item with uri ".$item["uri"]." for user ".$importer["uid"]." already existed under id ".$r[0]["id"], LOGGER_DEBUG); + //continue; + } + + // Is it a reply? + $inreplyto = $xpath->query('thr:in-reply-to', $entry); + if (is_object($inreplyto->item(0))) { + $objecttype = ACTIVITY_OBJ_COMMENT; + $item["type"] = 'remote-comment'; + $item["gravity"] = GRAVITY_COMMENT; + + foreach($inreplyto->item(0)->attributes AS $attributes) { + if ($attributes->name == "ref") + $item["parent-uri"] = $attributes->textContent; + } + } else { + $objecttype = ACTIVITY_OBJ_NOTE; + $item["parent-uri"] = $item["uri"]; + } + + $item["title"] = $xpath->query('atom:title/text()', $entry)->item(0)->nodeValue; + + $item["created"] = $xpath->query('atom:published/text()', $entry)->item(0)->nodeValue; + $item["edited"] = $xpath->query('atom:updated/text()', $entry)->item(0)->nodeValue; + + $item["body"] = $xpath->query('dfrn:env/text()', $entry)->item(0)->nodeValue; + $item["body"] = str_replace(array(' ',"\t","\r","\n"), array('','','',''),$item["body"]); + // make sure nobody is trying to sneak some html tags by us + $item["body"] = notags(base64url_decode($item["body"])); + + $item["body"] = limit_body_size($item["body"]); + + /// @todo Do we need the old check for HTML elements? + + // We don't need the content element since "dfrn:env" is always present + //$item["body"] = $xpath->query('atom:content/text()', $entry)->item(0)->nodeValue; + + $item["last-child"] = $xpath->query('dfrn:comment-allow/text()', $entry)->item(0)->nodeValue; + $item["location"] = $xpath->query('dfrn:location/text()', $entry)->item(0)->nodeValue; + + $georsspoint = $xpath->query('georss:point', $entry); + if ($georsspoint) + $item["coord"] = $georsspoint->item(0)->nodeValue; + + $item["private"] = $xpath->query('dfrn:private/text()', $entry)->item(0)->nodeValue; + + $item["extid"] = $xpath->query('dfrn:extid/text()', $entry)->item(0)->nodeValue; + + if ($xpath->query('dfrn:extid/text()', $entry)->item(0)->nodeValue == "true") + $item["bookmark"] = true; + + $notice_info = $xpath->query('statusnet:notice_info', $entry); + if ($notice_info AND ($notice_info->length > 0)) { + foreach($notice_info->item(0)->attributes AS $attributes) { + if ($attributes->name == "source") + $item["app"] = strip_tags($attributes->textContent); + } + } + + $item["guid"] = $xpath->query('dfrn:diaspora_guid/text()', $entry)->item(0)->nodeValue; + + // dfrn:diaspora_signature + + $item["verb"] = $xpath->query('activity:verb/text()', $entry)->item(0)->nodeValue; + + if ($xpath->query('activity:object-type/text()', $entry)->item(0)->nodeValue != "") + $objecttype = $xpath->query('activity:object-type/text()', $entry)->item(0)->nodeValue; + + $item["object-type"] = $objecttype; + + // activity:object + + // activity:target + + $categories = $xpath->query('atom:category', $entry); + if ($categories) { + foreach ($categories AS $category) { + foreach($category->attributes AS $attributes) + if ($attributes->name == "term") { + $term = $attributes->textContent; + if(strlen($item["tag"])) + $item["tag"] .= ','; + $item["tag"] .= "#[url=".$a->get_baseurl()."/search?tag=".$term."]".$term."[/url]"; + } + } + } + + $enclosure = ""; + + $links = $xpath->query('atom:link', $entry); + if ($links) { + $rel = ""; + $href = ""; + $type = ""; + $length = "0"; + $title = ""; + foreach ($links AS $link) { + foreach($link->attributes AS $attributes) { + if ($attributes->name == "href") + $href = $attributes->textContent; + if ($attributes->name == "rel") + $rel = $attributes->textContent; + if ($attributes->name == "type") + $type = $attributes->textContent; + if ($attributes->name == "length") + $length = $attributes->textContent; + if ($attributes->name == "title") + $title = $attributes->textContent; + } + if (($rel != "") AND ($href != "")) + switch($rel) { + case "alternate": + $item["plink"] = $href; + break; + case "enclosure": + $enclosure = $href; + if(strlen($item["attach"])) + $item["attach"] .= ','; + + $item["attach"] .= '[attach]href="'.$href.'" length="'.$length.'" type="'.$type.'" title="'.$title.'"[/attach]'; + break; + case "mentioned": + // Notification check + if ($importer["nurl"] == normalise_link($href)) + $mention = true; + break; + } + } + } + + print_r($item); +/* + if (!$item_id) { + logger("Error storing item", LOGGER_DEBUG); + continue; + } + + logger("Item was stored with id ".$item_id, LOGGER_DEBUG); + $item["id"] = $item_id; +*/ + +/* + if ($mention) { + $u = q("SELECT `notify-flags`, `language`, `username`, `email` FROM user WHERE uid = %d LIMIT 1", intval($item['uid'])); + $r = q("SELECT `parent` FROM `item` WHERE `id` = %d", intval($item_id)); + + notification(array( + 'type' => NOTIFY_TAGSELF, + 'notify_flags' => $u[0]["notify-flags"], + 'language' => $u[0]["language"], + 'to_name' => $u[0]["username"], + 'to_email' => $u[0]["email"], + 'uid' => $item["uid"], + 'item' => $item, + 'link' => $a->get_baseurl().'/display/'.urlencode(get_item_guid($item_id)), + 'source_name' => $item["author-name"], + 'source_link' => $item["author-link"], + 'source_photo' => $item["author-avatar"], + 'verb' => ACTIVITY_TAG, + 'otype' => 'item', + 'parent' => $r[0]["parent"] + )); + } +*/ + } + } +} +?> diff --git a/include/items.php b/include/items.php index cf044d8837..f52d46b7e2 100644 --- a/include/items.php +++ b/include/items.php @@ -1766,6 +1766,12 @@ function consume_feed($xml,$importer,&$contact, &$hub, $datedir = 0, $pass = 0) return; } + // Test - remove before flight + //if ($pass < 2) { + // $tempfile = tempnam(get_temppath(), "dfrn-consume-"); + // file_put_contents($tempfile, $xml); + //} + require_once('library/simplepie/simplepie.inc'); require_once('include/contact_selectors.php'); @@ -2471,6 +2477,9 @@ function local_delivery($importer,$data) { logger(__function__, LOGGER_TRACE); + //$tempfile = tempnam(get_temppath(), "dfrn-local-"); + //file_put_contents($tempfile, $data); + if($importer['readonly']) { // We aren't receiving stuff from this person. But we will quietly ignore them // rather than a blatant "go away" message. From 1d4de969603906646de7a0015346f6fdadd39a89 Mon Sep 17 00:00:00 2001 From: Michael Vogel Date: Wed, 27 Jan 2016 15:57:11 +0100 Subject: [PATCH 141/242] Next steps to add all fields --- include/dfrn.php | 12 +++- include/import-dfrn.php | 125 +++++++++++++++++++++++++++++++++++----- 2 files changed, 121 insertions(+), 16 deletions(-) diff --git a/include/dfrn.php b/include/dfrn.php index 2c8e8ce38f..883afe15f7 100644 --- a/include/dfrn.php +++ b/include/dfrn.php @@ -396,7 +396,6 @@ class dfrn { $root->setAttribute("xmlns:ostatus", NS_OSTATUS); $root->setAttribute("xmlns:statusnet", NS_STATUSNET); - //xml_add_element($doc, $root, "id", app::get_baseurl()."/profile/".$owner["nick"]); xml_add_element($doc, $root, "id", app::get_baseurl()."/profile/".$owner["nick"]); xml_add_element($doc, $root, "title", $owner["name"]); @@ -409,9 +408,11 @@ class dfrn { $attributes = array("rel" => "alternate", "type" => "text/html", "href" => $alternatelink); xml_add_element($doc, $root, "link", "", $attributes); - ostatus_hublinks($doc, $root); if ($public) { + // DFRN itself doesn't uses this. But maybe someone else wants to subscribe to the public feed. + ostatus_hublinks($doc, $root); + $attributes = array("rel" => "salmon", "href" => app::get_baseurl()."/salmon/".$owner["nick"]); xml_add_element($doc, $root, "link", "", $attributes); @@ -425,6 +426,8 @@ class dfrn { if ($owner['page-flags'] == PAGE_COMMUNITY) xml_add_element($doc, $root, "dfrn:community", 1); + /// @todo We need a way to transmit the different page flags like "PAGE_PRVGROUP" + xml_add_element($doc, $root, "updated", datetime_convert("UTC", "UTC", "now", ATOM_TIME)); $author = self::add_author($doc, $owner, $authorelement, $public); @@ -727,9 +730,14 @@ class dfrn { xml_add_element($doc, $entry, "published", datetime_convert("UTC","UTC",$item["created"]."+00:00",ATOM_TIME)); xml_add_element($doc, $entry, "updated", datetime_convert("UTC","UTC",$item["edited"]."+00:00",ATOM_TIME)); + // "dfrn:env" is used to read the content xml_add_element($doc, $entry, "dfrn:env", base64url_encode($body, true)); + + // The "content" field is not read by the receiver. We could remove it when the type is "text" + // We keep it at the moment, maybe there is some old version that doesn't read "dfrn:env" xml_add_element($doc, $entry, "content", (($type === 'html') ? $htmlbody : $body), array("type" => $type)); + // We save this value in "plink". Maybe we should read it from there as well? xml_add_element($doc, $entry, "link", "", array("rel" => "alternate", "type" => "text/html", "href" => app::get_baseurl()."/display/".$item["guid"])); diff --git a/include/import-dfrn.php b/include/import-dfrn.php index 7336946a7b..5a35829263 100644 --- a/include/import-dfrn.php +++ b/include/import-dfrn.php @@ -25,7 +25,48 @@ define("NS_OSTATUS", "http://ostatus.org/schema/1.0"); define("NS_STATUSNET", "http://status.net/schema/api/1/"); class dfrn2 { - function fetchauthor($xpath, $context, $importer, $element, &$contact, $onlyfetch) { + /** + * @brief Add new birthday event for this person + * + * @param array $contact Contact record + * @param string $birthday Birthday of the contact + * + */ + private function birthday_event($contact, $birthday) { + + logger('updating birthday: '.$birthday.' for contact '.$contact['id']); + + $bdtext = sprintf(t('%s\'s birthday'), $contact['name']); + $bdtext2 = sprintf(t('Happy Birthday %s'), ' [url=' . $contact['url'].']'.$contact['name'].'[/url]' ) ; + + + $r = q("INSERT INTO `event` (`uid`,`cid`,`created`,`edited`,`start`,`finish`,`summary`,`desc`,`type`) + VALUES ( %d, %d, '%s', '%s', '%s', '%s', '%s', '%s', '%s' ) ", + intval($contact['uid']), + intval($contact['id']), + dbesc(datetime_convert()), + dbesc(datetime_convert()), + dbesc(datetime_convert('UTC','UTC', $birthday)), + dbesc(datetime_convert('UTC','UTC', $birthday.' + 1 day ')), + dbesc($bdtext), + dbesc($bdtext2), + dbesc('birthday') + ); + } + + /** + * @brief Fetch the author data from head or entry items + * + * @param object $xpath XPath object + * @param object $context In which context should the data be searched + * @param array $importer Record of the importer contact + * @param string $element Element name from which the data is fetched + * @param array $contact The updated contact record of the author + * @param bool $onlyfetch Should the data only be fetched or should it update the contact record as well + * + * @return Returns an array with relevant data of the author + */ + private function fetchauthor($xpath, $context, $importer, $element, &$contact, $onlyfetch) { $author = array(); $author["name"] = $xpath->evaluate($element.'/atom:name/text()', $context)->item(0)->nodeValue; @@ -55,6 +96,8 @@ class dfrn2 { $href = $attributes->textContent; if ($attributes->name == "width") $width = $attributes->textContent; + if ($attributes->name == "updated") + $contact["avatar-date"] = $attributes->textContent; } if (($width > 0) AND ($href != "")) $avatarlist[$width] = $href; @@ -65,7 +108,26 @@ class dfrn2 { } if ($r AND !$onlyfetch) { + + // When was the last change to name or uri? + $name_element = $xpath->query($element."/atom:name", $context)->item(0); + foreach($name_element->attributes AS $attributes) + if ($attributes->name == "updated") + $contact["name-date"] = $attributes->textContent; + + + $link_element = $xpath->query($element."/atom:link", $context)->item(0); + foreach($link_element->attributes AS $attributes) + if ($attributes->name == "updated") + $contact["uri-date"] = $attributes->textContent; + + // is it a public forum? Private forums aren't supported by now with this method + $contact["forum"] = intval($xpath->evaluate($element.'/dfrn:community/text()', $context)->item(0)->nodeValue); + // Update contact data + $value = $xpath->evaluate($element.'/dfrn:handle/text()', $context)->item(0)->nodeValue; + if ($value != "") + $contact["addr"] = $value; $value = $xpath->evaluate($element.'/poco:displayName/text()', $context)->item(0)->nodeValue; if ($value != "") @@ -83,13 +145,54 @@ class dfrn2 { if ($value != "") $contact["location"] = $value; - /// @todo - /// poco:birthday - /// poco:utcOffset - /// poco:updated - /// poco:ims - /// poco:tags + /// @todo Add support for the following fields that we don't support by now in the contact table: + /// - poco:utcOffset + /// - poco:ims + /// - poco:urls + /// - poco:locality + /// - poco:region + /// - poco:country + // Save the keywords into the contact table + $tags = array(); + $tagelements = $xpath->evaluate($element.'/poco:tags/text()', $context); + foreach($tagelements AS $tag) + $tags[$tag->nodeValue] = $tag->nodeValue; + + if (count($tags)) + $contact["keywords"] = implode(", ", $tags); + + // "dfrn:birthday" contains the birthday converted to UTC + $old_bdyear = $contact["bdyear"]; + + $birthday = $xpath->evaluate($element.'/dfrn:birthday/text()', $context)->item(0)->nodeValue; + + if (strtotime($birthday) > time()) { + $bd_timestamp = strtotime($birthday); + + $contact["bdyear"] = date("Y", $bd_timestamp); + } + + // "poco:birthday" is the birthday in the format "yyyy-mm-dd" + $value = $xpath->evaluate($element.'/poco:birthday/text()', $context)->item(0)->nodeValue; + + if (!in_array($value, array("", "0000-00-00"))) { + $bdyear = date("Y"); + $value = str_replace("0000", $bdyear, $value); + + if (strtotime($value) < time()) { + $value = str_replace($bdyear, $bdyear + 1, $value); + $bdyear = $bdyear + 1; + } + + $contact["bd"] = $value; + } + + if ($old_bdyear != $contact["bdyear"]) + self::birthday_event($contact, $birthday; + +print_r($contact); +die(); /* if (($contact["name"] != $r[0]["name"]) OR ($contact["nick"] != $r[0]["nick"]) OR ($contact["about"] != $r[0]["about"]) OR ($contact["location"] != $r[0]["location"])) { @@ -162,13 +265,7 @@ class dfrn2 { $item_id = 0; - // Reverse the order of the entries - $entrylist = array(); - - foreach ($entries AS $entry) - $entrylist[] = $entry; - - foreach (array_reverse($entrylist) AS $entry) { + foreach ($entries AS $entry) { $item = $header; From 613f6b9b32e5c8370bb236caba03a82c09625239 Mon Sep 17 00:00:00 2001 From: Michael Vogel Date: Wed, 27 Jan 2016 20:06:23 +0100 Subject: [PATCH 142/242] Just some more code :-) --- include/import-dfrn.php | 97 +++++++++++++++++++++++------------------ 1 file changed, 55 insertions(+), 42 deletions(-) diff --git a/include/import-dfrn.php b/include/import-dfrn.php index 5a35829263..b3a8dbaf86 100644 --- a/include/import-dfrn.php +++ b/include/import-dfrn.php @@ -25,13 +25,13 @@ define("NS_OSTATUS", "http://ostatus.org/schema/1.0"); define("NS_STATUSNET", "http://status.net/schema/api/1/"); class dfrn2 { - /** - * @brief Add new birthday event for this person - * - * @param array $contact Contact record - * @param string $birthday Birthday of the contact - * - */ + /** + * @brief Add new birthday event for this person + * + * @param array $contact Contact record + * @param string $birthday Birthday of the contact + * + */ private function birthday_event($contact, $birthday) { logger('updating birthday: '.$birthday.' for contact '.$contact['id']); @@ -54,25 +54,27 @@ class dfrn2 { ); } - /** - * @brief Fetch the author data from head or entry items - * - * @param object $xpath XPath object - * @param object $context In which context should the data be searched - * @param array $importer Record of the importer contact - * @param string $element Element name from which the data is fetched - * @param array $contact The updated contact record of the author - * @param bool $onlyfetch Should the data only be fetched or should it update the contact record as well - * + /** + * @brief Fetch the author data from head or entry items + * + * @param object $xpath XPath object + * @param object $context In which context should the data be searched + * @param array $importer Record of the importer contact + * @param string $element Element name from which the data is fetched + * @param array $contact The updated contact record of the author + * @param bool $onlyfetch Should the data only be fetched or should it update the contact record as well + * * @return Returns an array with relevant data of the author - */ + */ private function fetchauthor($xpath, $context, $importer, $element, &$contact, $onlyfetch) { $author = array(); $author["name"] = $xpath->evaluate($element.'/atom:name/text()', $context)->item(0)->nodeValue; $author["link"] = $xpath->evaluate($element.'/atom:uri/text()', $context)->item(0)->nodeValue; - $r = q("SELECT * FROM `contact` WHERE `uid` = %d AND `nurl` IN ('%s', '%s') AND `network` != '%s'", + $r = q("SELECT `id`, `uid`, `network`, `avatar-date`, `name-date`, `uri-date`, `addr`, + `name`, `nick`, `about`, `location`, `keywords`, `bdyear`, `bd` + FROM `contact` WHERE `uid` = %d AND `nurl` IN ('%s', '%s') AND `network` != '%s'", intval($importer["uid"]), dbesc(normalise_link($author["author-link"])), dbesc(normalise_link($author["link"])), dbesc(NETWORK_STATUSNET)); if ($r) { @@ -115,15 +117,11 @@ class dfrn2 { if ($attributes->name == "updated") $contact["name-date"] = $attributes->textContent; - $link_element = $xpath->query($element."/atom:link", $context)->item(0); foreach($link_element->attributes AS $attributes) if ($attributes->name == "updated") $contact["uri-date"] = $attributes->textContent; - // is it a public forum? Private forums aren't supported by now with this method - $contact["forum"] = intval($xpath->evaluate($element.'/dfrn:community/text()', $context)->item(0)->nodeValue); - // Update contact data $value = $xpath->evaluate($element.'/dfrn:handle/text()', $context)->item(0)->nodeValue; if ($value != "") @@ -188,37 +186,49 @@ class dfrn2 { $contact["bd"] = $value; } - if ($old_bdyear != $contact["bdyear"]) - self::birthday_event($contact, $birthday; + //if ($old_bdyear != $contact["bdyear"]) + // self::birthday_event($contact, $birthday); -print_r($contact); -die(); -/* - if (($contact["name"] != $r[0]["name"]) OR ($contact["nick"] != $r[0]["nick"]) OR ($contact["about"] != $r[0]["about"]) OR ($contact["location"] != $r[0]["location"])) { + // Get all field names + $fields = array(); + foreach ($r[0] AS $field => $data) + $fields[$field] = $data; + unset($fields["id"]); + unset($fields["uid"]); + + foreach ($fields AS $field => $data) + if ($contact[$field] != $r[0][$field]) + $update = true; + + if ($update) { logger("Update contact data for contact ".$contact["id"], LOGGER_DEBUG); - q("UPDATE `contact` SET `name` = '%s', `nick` = '%s', `about` = '%s', `location` = '%s', `name-date` = '%s' WHERE `id` = %d AND `network` = '%s'", + q("UPDATE `contact` SET `name` = '%s', `nick` = '%s', `about` = '%s', `location` = '%s', + `addr` = '%s', `keywords` = '%s', `bdyear` = '%s', `bd` = '%s' + `avatar-date` = '%s', `name-date` = '%s', `uri-date` = '%s' + WHERE `id` = %d AND `network` = '%s'", dbesc($contact["name"]), dbesc($contact["nick"]), dbesc($contact["about"]), dbesc($contact["location"]), - dbesc(datetime_convert()), intval($contact["id"]), dbesc(NETWORK_OSTATUS)); - + dbesc($contact["addr"]), dbesc($contact["keywords"]), dbesc($contact["bdyear"]), + dbesc($contact["bd"]), dbesc($contact["avatar-date"]), dbesc($contact["name-date"]), dbesc($contact["uri-date"]), + intval($contact["id"]), dbesc($contact["network"])); } - if (isset($author["author-avatar"]) AND ($author["author-avatar"] != $r[0]['photo'])) { + if ((isset($author["avatar"]) AND ($author["avatar"] != $r[0]["photo"])) OR + ($contact["avatar-date"] != $r[0]["avatar-date"])) { logger("Update profile picture for contact ".$contact["id"], LOGGER_DEBUG); - $photos = import_profile_photo($author["author-avatar"], $importer["uid"], $contact["id"]); + $photos = import_profile_photo($author["avatar"], $importer["uid"], $contact["id"]); q("UPDATE `contact` SET `photo` = '%s', `thumb` = '%s', `micro` = '%s', `avatar-date` = '%s' WHERE `id` = %d AND `network` = '%s'", - dbesc($author["author-avatar"]), dbesc($photos[1]), dbesc($photos[2]), - dbesc(datetime_convert()), intval($contact["id"]), dbesc(NETWORK_OSTATUS)); + dbesc($author["avatar"]), dbesc($photos[1]), dbesc($photos[2]), + dbesc($contact["avatar-date"]), intval($contact["id"]), dbesc($contact["network"])); } -*/ - /// @todo Add the "addr" field -// $contact["generation"] = 2; -// $contact["photo"] = $author["avatar"]; -//print_r($contact); - //update_gcontact($contact); + + $contact["generation"] = 2; + $contact["photo"] = $author["avatar"]; + print_r($contact); + update_gcontact($contact); } return($author); @@ -261,6 +271,9 @@ die(); // Only the "dfrn:owner" in the head section contains all data self::fetchauthor($xpath, $doc->firstChild, $importer, "dfrn:owner", $contact, false); + // is it a public forum? Private forums aren't supported by now with this method + //$contact["forum"] = intval($xpath->evaluate($element.'/dfrn:community/text()', $context)->item(0)->nodeValue); + $entries = $xpath->query('/atom:feed/atom:entry'); $item_id = 0; From 6f662b8c74ddc6e896e74e6b563e0769bb66fef5 Mon Sep 17 00:00:00 2001 From: Michael Vogel Date: Thu, 28 Jan 2016 01:26:19 +0100 Subject: [PATCH 143/242] New avatar picture fields to better cope with changing avatars --- include/Contact.php | 3 +- include/Photo.php | 110 +++++++++++++++++++++++--------------- include/dbstructure.php | 4 ++ include/diaspora.php | 9 +++- include/discover_poco.php | 1 + include/follow.php | 5 +- include/gprobe.php | 4 +- include/ostatus.php | 8 +-- include/socgraph.php | 33 ++++++++++-- mod/contacts.php | 5 +- mod/crepair.php | 5 +- mod/dfrn_confirm.php | 4 ++ mod/item.php | 1 + mod/poco.php | 5 +- mod/wall_upload.php | 5 ++ 15 files changed, 143 insertions(+), 59 deletions(-) diff --git a/include/Contact.php b/include/Contact.php index 86e67bbe86..1c99dd0298 100644 --- a/include/Contact.php +++ b/include/Contact.php @@ -488,9 +488,10 @@ function get_contact($url, $uid = 0) { $photos = import_profile_photo($data["photo"],$uid,$contactid); - q("UPDATE `contact` SET `photo` = '%s', `thumb` = '%s', `micro` = '%s', + q("UPDATE `contact` SET `avatar` = '%s', `photo` = '%s', `thumb` = '%s', `micro` = '%s', `addr` = '%s', `alias` = '%s', `name` = '%s', `nick` = '%s', `name-date` = '%s', `uri-date` = '%s', `avatar-date` = '%s' WHERE `id` = %d", + dbesc($data["photo"]), dbesc($photos[0]), dbesc($photos[1]), dbesc($photos[2]), diff --git a/include/Photo.php b/include/Photo.php index 5fdd682e74..e0cb23008a 100644 --- a/include/Photo.php +++ b/include/Photo.php @@ -720,65 +720,91 @@ function guess_image_type($filename, $fromcurl=false) { } -function import_profile_photo($photo,$uid,$cid) { +function update_contact_avatar($avatar,$uid,$cid) { - $a = get_app(); + $r = q("SELECT `avatar`, `photo`, `thumb`, `micro` FROM `contact` WHERE `id` = %d LIMIT 1", intval($cid)); + if (!$r) + return false; + else + $data = array($r[0]["photo"], $r[0]["thumb"], $r[0]["micro"]); - $r = q("select `resource-id` from photo where `uid` = %d and `contact-id` = %d and `scale` = 4 and `album` = 'Contact Photos' limit 1", - intval($uid), - intval($cid) - ); - if(count($r) && strlen($r[0]['resource-id'])) { - $hash = $r[0]['resource-id']; - } - else { - $hash = photo_new_resource(); - } + if ($r[0]["avatar"] != $avatar) { + $photos = import_profile_photo($avatar,$uid,$cid, true); - $photo_failure = false; + if ($photos) { + q("UPDATE `contact` SET `avatar` = '%s', `photo` = '%s', `thumb` = '%s', `micro` = '%s', `avatar-date` = '%s' WHERE `id` = %d", + dbesc($avatar), dbesc($photos[0]), dbesc($photos[1]), dbesc($photos[2]), + dbesc(datetime_convert()), intval($cid)); + return $photos; + } + } - $filename = basename($photo); - $img_str = fetch_url($photo,true); + return $data; +} - $type = guess_image_type($photo,true); - $img = new Photo($img_str, $type); - if($img->is_valid()) { +function import_profile_photo($photo,$uid,$cid, $quit_on_error = false) { - $img->scaleImageSquare(175); + $a = get_app(); - $r = $img->store($uid, $cid, $hash, $filename, 'Contact Photos', 4 ); + $r = q("select `resource-id` from photo where `uid` = %d and `contact-id` = %d and `scale` = 4 and `album` = 'Contact Photos' limit 1", + intval($uid), + intval($cid) + ); + if(count($r) && strlen($r[0]['resource-id'])) { + $hash = $r[0]['resource-id']; + } else { + $hash = photo_new_resource(); + } - if($r === false) - $photo_failure = true; + $photo_failure = false; - $img->scaleImage(80); + $filename = basename($photo); + $img_str = fetch_url($photo,true); - $r = $img->store($uid, $cid, $hash, $filename, 'Contact Photos', 5 ); + if ($quit_on_error AND ($img_str == "")) + return false; - if($r === false) - $photo_failure = true; + $type = guess_image_type($photo,true); + $img = new Photo($img_str, $type); + if($img->is_valid()) { - $img->scaleImage(48); + $img->scaleImageSquare(175); - $r = $img->store($uid, $cid, $hash, $filename, 'Contact Photos', 6 ); + $r = $img->store($uid, $cid, $hash, $filename, 'Contact Photos', 4 ); - if($r === false) - $photo_failure = true; + if($r === false) + $photo_failure = true; - $photo = $a->get_baseurl() . '/photo/' . $hash . '-4.' . $img->getExt(); - $thumb = $a->get_baseurl() . '/photo/' . $hash . '-5.' . $img->getExt(); - $micro = $a->get_baseurl() . '/photo/' . $hash . '-6.' . $img->getExt(); - } - else - $photo_failure = true; + $img->scaleImage(80); - if($photo_failure) { - $photo = $a->get_baseurl() . '/images/person-175.jpg'; - $thumb = $a->get_baseurl() . '/images/person-80.jpg'; - $micro = $a->get_baseurl() . '/images/person-48.jpg'; - } + $r = $img->store($uid, $cid, $hash, $filename, 'Contact Photos', 5 ); - return(array($photo,$thumb,$micro)); + if($r === false) + $photo_failure = true; + + $img->scaleImage(48); + + $r = $img->store($uid, $cid, $hash, $filename, 'Contact Photos', 6 ); + + if($r === false) + $photo_failure = true; + + $photo = $a->get_baseurl() . '/photo/' . $hash . '-4.' . $img->getExt(); + $thumb = $a->get_baseurl() . '/photo/' . $hash . '-5.' . $img->getExt(); + $micro = $a->get_baseurl() . '/photo/' . $hash . '-6.' . $img->getExt(); + } else + $photo_failure = true; + + if($photo_failure AND $quit_on_error) + return false; + + if($photo_failure) { + $photo = $a->get_baseurl() . '/images/person-175.jpg'; + $thumb = $a->get_baseurl() . '/images/person-80.jpg'; + $micro = $a->get_baseurl() . '/images/person-48.jpg'; + } + + return(array($photo,$thumb,$micro)); } diff --git a/include/dbstructure.php b/include/dbstructure.php index 43dfbd7b35..fd5883911a 100644 --- a/include/dbstructure.php +++ b/include/dbstructure.php @@ -453,6 +453,7 @@ function db_definition() { "keywords" => array("type" => "text", "not null" => "1"), "gender" => array("type" => "varchar(32)", "not null" => "1", "default" => ""), "attag" => array("type" => "varchar(255)", "not null" => "1", "default" => ""), + "avatar" => array("type" => "varchar(255)", "not null" => "1", "default" => ""), "photo" => array("type" => "text", "not null" => "1"), "thumb" => array("type" => "text", "not null" => "1"), "micro" => array("type" => "text", "not null" => "1"), @@ -656,7 +657,10 @@ function db_definition() { "nick" => array("type" => "varchar(255)", "not null" => "1", "default" => ""), "url" => array("type" => "varchar(255)", "not null" => "1", "default" => ""), "nurl" => array("type" => "varchar(255)", "not null" => "1", "default" => ""), + "avatar" => array("type" => "varchar(255)", "not null" => "1", "default" => ""), "photo" => array("type" => "varchar(255)", "not null" => "1", "default" => ""), + "thumb" => array("type" => "varchar(255)", "not null" => "1", "default" => ""), + "micro" => array("type" => "varchar(255)", "not null" => "1", "default" => ""), "connect" => array("type" => "varchar(255)", "not null" => "1", "default" => ""), "created" => array("type" => "datetime", "not null" => "1", "default" => "0000-00-00 00:00:00"), "updated" => array("type" => "datetime", "default" => "0000-00-00 00:00:00"), diff --git a/include/diaspora.php b/include/diaspora.php index b72239c4ce..3f0b4be432 100644 --- a/include/diaspora.php +++ b/include/diaspora.php @@ -740,6 +740,7 @@ function diaspora_request($importer,$xml) { $new_relation = CONTACT_IS_FOLLOWER; $r = q("UPDATE `contact` SET + `avatar` = '%s', `photo` = '%s', `thumb` = '%s', `micro` = '%s', @@ -752,6 +753,7 @@ function diaspora_request($importer,$xml) { `writable` = 1 WHERE `id` = %d ", + dbesc($contact_record['photo']), dbesc($photos[0]), dbesc($photos[1]), dbesc($photos[2]), @@ -2491,12 +2493,15 @@ function diaspora_profile($importer,$xml,$msg) { /// @TODO Update name on item['author-name'] if the name changed. See consume_feed() /// (Not doing this currently because D* protocol is scheduled for revision soon). - $r = q("UPDATE `contact` SET `name` = '%s', `nick` = '%s', `addr` = '%s', `name-date` = '%s', `photo` = '%s', `thumb` = '%s', `micro` = '%s', `avatar-date` = '%s' , `bd` = '%s', `location` = '%s', `about` = '%s', `keywords` = '%s', `gender` = '%s' WHERE `id` = %d AND `uid` = %d", + $r = q("UPDATE `contact` SET `name` = '%s', `nick` = '%s', `addr` = '%s', `name-date` = '%s', + `avatar` = '%s', `photo` = '%s', `thumb` = '%s', `micro` = '%s', `avatar-date` = '%s' , `bd` = '%s', + `location` = '%s', `about` = '%s', `keywords` = '%s', `gender` = '%s' WHERE `id` = %d AND `uid` = %d", dbesc($name), dbesc($nick), dbesc($diaspora_handle), dbesc(datetime_convert()), dbesc($image_url), + dbesc($images[0]), dbesc($images[1]), dbesc($images[2]), dbesc(datetime_convert()), @@ -2516,7 +2521,7 @@ function diaspora_profile($importer,$xml,$msg) { } update_gcontact(array("url" => $contact['url'], "network" => NETWORK_DIASPORA, "generation" => 2, - "photo" => $image_url, "name" => $name, "location" => $location, + "avatar" => $image_url, "name" => $name, "location" => $location, "about" => $about, "birthday" => $birthday, "gender" => $gender, "addr" => $diaspora_handle, "nick" => $nick, "keywords" => $keywords, "hide" => !$searchable, "nsfw" => $nsfw)); diff --git a/include/discover_poco.php b/include/discover_poco.php index a8f670334b..63d1175a71 100644 --- a/include/discover_poco.php +++ b/include/discover_poco.php @@ -222,6 +222,7 @@ function gs_search_user($search) { $contact = probe_url($user->site_address."/".$user->name); if ($contact["network"] != NETWORK_PHANTOM) { $contact["about"] = $user->description; + $contact["avatar"] = $contact["photo"]; update_gcontact($contact); } } diff --git a/include/follow.php b/include/follow.php index 21c05c8f3e..8e6094cb4d 100644 --- a/include/follow.php +++ b/include/follow.php @@ -266,13 +266,16 @@ function new_contact($uid,$url,$interactive = false) { $photos = import_profile_photo($ret['photo'],$uid,$contact_id); - $r = q("UPDATE `contact` SET `photo` = '%s', + $r = q("UPDATE `contact` SET + `avatar` = '%s', + `photo` = '%s', `thumb` = '%s', `micro` = '%s', `name-date` = '%s', `uri-date` = '%s', `avatar-date` = '%s' WHERE `id` = %d", + dbesc($ret['photo']), dbesc($photos[0]), dbesc($photos[1]), dbesc($photos[2]), diff --git a/include/gprobe.php b/include/gprobe.php index dfa9137d7d..8e4d3715c0 100644 --- a/include/gprobe.php +++ b/include/gprobe.php @@ -58,8 +58,10 @@ function gprobe_run(&$argv, &$argc){ if (is_null($result)) Cache::set("gprobe:".$urlparts["host"],serialize($arr)); - if (!in_array($result["network"], array(NETWORK_FEED, NETWORK_PHANTOM))) + if (!in_array($result["network"], array(NETWORK_FEED, NETWORK_PHANTOM))) { + $arr["avatar"] = $arr["photo"]; update_gcontact($arr); + } $r = q("SELECT `id`, `url`, `network` FROM `gcontact` WHERE `nurl` = '%s' ORDER BY `id` LIMIT 1", dbesc(normalise_link($url)) diff --git a/include/ostatus.php b/include/ostatus.php index 4ccd13130d..eeacd40de4 100644 --- a/include/ostatus.php +++ b/include/ostatus.php @@ -166,13 +166,13 @@ function ostatus_fetchauthor($xpath, $context, $importer, &$contact, $onlyfetch) "", "", "", datetime_convert(), 2, $contact["id"], $contact["uid"]); } - if (isset($author["author-avatar"]) AND ($author["author-avatar"] != $r[0]['photo'])) { + if (isset($author["author-avatar"]) AND ($author["author-avatar"] != $r[0]['avatar'])) { logger("Update profile picture for contact ".$contact["id"], LOGGER_DEBUG); $photos = import_profile_photo($author["author-avatar"], $importer["uid"], $contact["id"]); - q("UPDATE `contact` SET `photo` = '%s', `thumb` = '%s', `micro` = '%s', `avatar-date` = '%s' WHERE `id` = %d AND `network` = '%s'", - dbesc($author["author-avatar"]), dbesc($photos[1]), dbesc($photos[2]), + q("UPDATE `contact` SET `avatar` = '%s', `photo` = '%s', `thumb` = '%s', `micro` = '%s', `avatar-date` = '%s' WHERE `id` = %d AND `network` = '%s'", + dbesc($author["author-avatar"]), dbesc($photos[0]), dbesc($photos[1]), dbesc($photos[2]), dbesc(datetime_convert()), intval($contact["id"]), dbesc(NETWORK_OSTATUS)); } @@ -180,7 +180,7 @@ function ostatus_fetchauthor($xpath, $context, $importer, &$contact, $onlyfetch) if ($contact["network"] == NETWORK_OSTATUS) { /// @todo Add the "addr" field $contact["generation"] = 2; - $contact["photo"] = $author["author-avatar"]; + $contact["avatar"] = $author["author-avatar"]; update_gcontact($contact); } } diff --git a/include/socgraph.php b/include/socgraph.php index c545343393..241e2df7f0 100644 --- a/include/socgraph.php +++ b/include/socgraph.php @@ -10,7 +10,7 @@ require_once('include/datetime.php'); require_once("include/Scrape.php"); require_once("include/html2bbcode.php"); - +require_once("include/Contact.php"); /* * poco_load @@ -294,7 +294,7 @@ function poco_check($profile_url, $name, $network, $profile_photo, $about, $loca "alias" => $alias, "name" => $name, "network" => $network, - "photo" => $profile_photo, + "avatar" => $profile_photo, "about" => $about, "location" => $location, "gender" => $gender, @@ -1517,7 +1517,7 @@ function update_gcontact($contact) { if (!$gcontact_id) return false; - $r = q("SELECT `name`, `nick`, `photo`, `location`, `about`, `addr`, `generation`, `birthday`, `gender`, `keywords`, + $r = q("SELECT `name`, `nick`, `avatar`, `photo`, `thumb`, `micro`, `location`, `about`, `addr`, `generation`, `birthday`, `gender`, `keywords`, `hide`, `nsfw`, `network`, `alias`, `notify`, `server_url`, `connect`, `updated`, `url` FROM `gcontact` WHERE `id` = %d LIMIT 1", intval($gcontact_id)); @@ -1552,14 +1552,37 @@ function update_gcontact($contact) { if ($contact["generation"] < $r[0]["generation"]) $update = true; + if (isset($contact["avatar"]) AND (($contact["avatar"] != $r[0]["avatar"]) OR + ($r[0]["photo"] == $r[0]["avatar"]) OR ($r[0]["thumb"] == "") OR ($r[0]["micro"] == ""))) { + + $cid = get_contact($contact["url"]); + + // We always store avatar picture with a contact-id. + // We don't have a contact-id when we use the gcontact table. + // Solution is to use a matching entry in the contact table. (Which is not totally clean) + if (($cid == 0) AND isset($contact["uid"])) + $cid = get_contact($contact["url"], $contact["uid"]); + + $photos = update_contact_avatar($contact["avatar"], 0, $cid); + + if ($photos) { + $contact["photo"] = $photos[0]; + $contact["thumb"] = $photos[1]; + $contact["micro"] = $photos[2]; + } + } + if ($update) { - q("UPDATE `gcontact` SET `photo` = '%s', `name` = '%s', `nick` = '%s', `addr` = '%s', `network` = '%s', + + q("UPDATE `gcontact` SET `avatar` = '%s', `photo` = '%s', `thumb` = '%s', `micro` = '%s', + `name` = '%s', `nick` = '%s', `addr` = '%s', `network` = '%s', `birthday` = '%s', `gender` = '%s', `keywords` = %d, `hide` = %d, `nsfw` = %d, `alias` = '%s', `notify` = '%s', `url` = '%s', `location` = '%s', `about` = '%s', `generation` = %d, `updated` = '%s', `server_url` = '%s', `connect` = '%s' WHERE `nurl` = '%s' AND (`generation` = 0 OR `generation` >= %d)", - dbesc($contact["photo"]), dbesc($contact["name"]), dbesc($contact["nick"]), + dbesc($contact["avatar"]), dbesc($contact["photo"]), dbesc($contact["thumb"]), + dbesc($contact["micro"]), dbesc($contact["name"]), dbesc($contact["nick"]), dbesc($contact["addr"]), dbesc($contact["network"]), dbesc($contact["birthday"]), dbesc($contact["gender"]), dbesc($contact["keywords"]), intval($contact["hide"]), intval($contact["nsfw"]), dbesc($contact["alias"]), dbesc($contact["notify"]), diff --git a/mod/contacts.php b/mod/contacts.php index 21578a3295..1ef201490c 100644 --- a/mod/contacts.php +++ b/mod/contacts.php @@ -295,7 +295,9 @@ function _contact_update_profile($contact_id) { $photos = import_profile_photo($data['photo'], local_user(), $contact_id); - $r = q("UPDATE `contact` SET `photo` = '%s', + $r = q("UPDATE `contact` SET + `avatar` = '%s', + `photo` = '%s', `thumb` = '%s', `micro` = '%s', `name-date` = '%s', @@ -303,6 +305,7 @@ function _contact_update_profile($contact_id) { `avatar-date` = '%s' WHERE `id` = %d", dbesc($data["photo"]), + dbesc($photos[0]), dbesc($photos[1]), dbesc($photos[2]), dbesc(datetime_convert()), diff --git a/mod/crepair.php b/mod/crepair.php index 6f951bdf6e..606c388458 100644 --- a/mod/crepair.php +++ b/mod/crepair.php @@ -82,7 +82,9 @@ function crepair_post(&$a) { $photos = import_profile_photo($photo,local_user(),$contact['id']); - $x = q("UPDATE `contact` SET `photo` = '%s', + $x = q("UPDATE `contact` SET + `avatar` = '%s', + `photo` = '%s', `thumb` = '%s', `micro` = '%s', `name-date` = '%s', @@ -90,6 +92,7 @@ function crepair_post(&$a) { `avatar-date` = '%s' WHERE `id` = %d ", + dbesc($photo), dbesc($photos[0]), dbesc($photos[1]), dbesc($photos[2]), diff --git a/mod/dfrn_confirm.php b/mod/dfrn_confirm.php index d5dbab951e..8528ba9ffd 100644 --- a/mod/dfrn_confirm.php +++ b/mod/dfrn_confirm.php @@ -329,6 +329,7 @@ function dfrn_confirm_post(&$a,$handsfree = null) { $duplex = 0; $r = q("UPDATE `contact` SET + `avatar` = '%s', `photo` = '%s', `thumb` = '%s', `micro` = '%s', @@ -342,6 +343,7 @@ function dfrn_confirm_post(&$a,$handsfree = null) { `hidden` = %d, `network` = '%s' WHERE `id` = %d ", + dbesc($contact['photo']), dbesc($photos[0]), dbesc($photos[1]), dbesc($photos[2]), @@ -695,6 +697,7 @@ function dfrn_confirm_post(&$a,$handsfree = null) { $duplex = 0; $r = q("UPDATE `contact` SET + `avatar` = '%s', `photo` = '%s', `thumb` = '%s', `micro` = '%s', @@ -709,6 +712,7 @@ function dfrn_confirm_post(&$a,$handsfree = null) { `prv` = %d, `network` = '%s' WHERE `id` = %d ", + dbesc($photo), dbesc($photos[0]), dbesc($photos[1]), dbesc($photos[2]), diff --git a/mod/item.php b/mod/item.php index 8c5a479646..bf0ead4932 100644 --- a/mod/item.php +++ b/mod/item.php @@ -1146,6 +1146,7 @@ function handle_tag($a, &$body, &$inform, &$str_tags, $profile_uid, $tag, $netwo if (!$r) { $probed = probe_url($name); if (isset($probed["url"])) { + $probed["avatar"] = $probed["photo"]; update_gcontact($probed); $r = q("SELECT `url`, `name`, `nick`, `network`, `alias`, `notify` FROM `gcontact` WHERE `nurl` = '%s' LIMIT 1", dbesc(normalise_link($probed["url"]))); diff --git a/mod/poco.php b/mod/poco.php index 0a1b392169..3927f125ea 100644 --- a/mod/poco.php +++ b/mod/poco.php @@ -179,6 +179,9 @@ function poco_init(&$a) { $rr['generation'] = 2; } + if ($rr["avatar"] == "") + $rr["avatar"] = $rr["photo"]; + if (($rr['about'] == "") AND isset($rr['pabout'])) $rr['about'] = $rr['pabout']; @@ -258,7 +261,7 @@ function poco_init(&$a) { $entry['updated'] = date("c", strtotime($entry['updated'])); } if($fields_ret['photos']) - $entry['photos'] = array(array('value' => $rr['photo'], 'type' => 'profile')); + $entry['photos'] = array(array('value' => $rr['avatar'], 'type' => 'profile')); if($fields_ret['network']) { $entry['network'] = $rr['network']; if ($entry['network'] == NETWORK_STATUSNET) diff --git a/mod/wall_upload.php b/mod/wall_upload.php index 8bf471d3d2..a1dab53779 100644 --- a/mod/wall_upload.php +++ b/mod/wall_upload.php @@ -158,6 +158,7 @@ function wall_upload_post(&$a, $desktopmode = true) { killme(); } + logger("Check size of picture.", LOGGER_DEBUG); $r = q("select sum(octet_length(data)) as total from photo where uid = %d and scale = 0 and album != 'Contact Photos' ", intval($page_owner_uid) ); @@ -176,6 +177,7 @@ function wall_upload_post(&$a, $desktopmode = true) { } + logger("Picture will be processed.", LOGGER_DEBUG); $imagedata = @file_get_contents($src); $ph = new Photo($imagedata, $filetype); @@ -210,6 +212,7 @@ function wall_upload_post(&$a, $desktopmode = true) { $defperm = '<' . $default_cid . '>'; + logger("Picture will be stored", LOGGER_DEBUG); $r = $ph->store($page_owner_uid, $visitor, $hash, $filename, t('Wall Photos'), 0, 0, $defperm); if(! $r) { @@ -266,6 +269,8 @@ function wall_upload_post(&$a, $desktopmode = true) { return $picture; } + logger("Picture is stored.", LOGGER_DEBUG); + if ($r_json) { echo json_encode(array('ok'=>true)); killme(); From 78e79de7c974732e6cb8cee58536fa9b6f98e06f Mon Sep 17 00:00:00 2001 From: Michael Vogel Date: Thu, 28 Jan 2016 11:09:08 +0100 Subject: [PATCH 144/242] New central function to store avatar data in contacts --- include/Contact.php | 12 +++--------- include/diaspora.php | 27 +++++---------------------- include/discover_poco.php | 1 - include/follow.php | 23 ++--------------------- include/gprobe.php | 4 +--- include/ostatus.php | 25 ++++++++++--------------- include/socgraph.php | 30 ++++-------------------------- mod/contacts.php | 22 ++-------------------- mod/crepair.php | 22 +--------------------- mod/dfrn_confirm.php | 37 ++++--------------------------------- mod/item.php | 1 - 11 files changed, 32 insertions(+), 172 deletions(-) diff --git a/include/Contact.php b/include/Contact.php index 1c99dd0298..3799e0b189 100644 --- a/include/Contact.php +++ b/include/Contact.php @@ -486,22 +486,16 @@ function get_contact($url, $uid = 0) { require_once("Photo.php"); - $photos = import_profile_photo($data["photo"],$uid,$contactid); + update_contact_avatar($data["photo"],$uid,$contactid); - q("UPDATE `contact` SET `avatar` = '%s', `photo` = '%s', `thumb` = '%s', `micro` = '%s', - `addr` = '%s', `alias` = '%s', `name` = '%s', `nick` = '%s', - `name-date` = '%s', `uri-date` = '%s', `avatar-date` = '%s' WHERE `id` = %d", - dbesc($data["photo"]), - dbesc($photos[0]), - dbesc($photos[1]), - dbesc($photos[2]), + q("UPDATE `contact` SET `addr` = '%s', `alias` = '%s', `name` = '%s', `nick` = '%s', + `name-date` = '%s', `uri-date` = '%s' WHERE `id` = %d", dbesc($data["addr"]), dbesc($data["alias"]), dbesc($data["name"]), dbesc($data["nick"]), dbesc(datetime_convert()), dbesc(datetime_convert()), - dbesc(datetime_convert()), intval($contactid) ); diff --git a/include/diaspora.php b/include/diaspora.php index 3f0b4be432..1b71d4f2bd 100644 --- a/include/diaspora.php +++ b/include/diaspora.php @@ -728,7 +728,7 @@ function diaspora_request($importer,$xml) { require_once('include/Photo.php'); - $photos = import_profile_photo($contact_record['photo'],$importer['uid'],$contact_record['id']); + update_contact_avatar($contact_record['photo'],$importer['uid'],$contact_record['id']); // technically they are sharing with us (CONTACT_IS_SHARING), // but if our page-type is PAGE_COMMUNITY or PAGE_SOAPBOX @@ -739,28 +739,17 @@ function diaspora_request($importer,$xml) { else $new_relation = CONTACT_IS_FOLLOWER; - $r = q("UPDATE `contact` SET - `avatar` = '%s', - `photo` = '%s', - `thumb` = '%s', - `micro` = '%s', - `rel` = %d, + $r = q("UPDATE `contact` SET `rel` = %d, `name-date` = '%s', `uri-date` = '%s', - `avatar-date` = '%s', `blocked` = 0, `pending` = 0, `writable` = 1 WHERE `id` = %d ", - dbesc($contact_record['photo']), - dbesc($photos[0]), - dbesc($photos[1]), - dbesc($photos[2]), intval($new_relation), dbesc(datetime_convert()), dbesc(datetime_convert()), - dbesc(datetime_convert()), intval($contact_record['id']) ); @@ -2475,7 +2464,7 @@ function diaspora_profile($importer,$xml,$msg) { require_once('include/Photo.php'); - $images = import_profile_photo($image_url,$importer['uid'],$contact['id']); + update_contact_avatar($image_url,$importer['uid'],$contact['id']); // Generic birthday. We don't know the timezone. The year is irrelevant. @@ -2493,18 +2482,12 @@ function diaspora_profile($importer,$xml,$msg) { /// @TODO Update name on item['author-name'] if the name changed. See consume_feed() /// (Not doing this currently because D* protocol is scheduled for revision soon). - $r = q("UPDATE `contact` SET `name` = '%s', `nick` = '%s', `addr` = '%s', `name-date` = '%s', - `avatar` = '%s', `photo` = '%s', `thumb` = '%s', `micro` = '%s', `avatar-date` = '%s' , `bd` = '%s', + $r = q("UPDATE `contact` SET `name` = '%s', `nick` = '%s', `addr` = '%s', `name-date` = '%s', `bd` = '%s', `location` = '%s', `about` = '%s', `keywords` = '%s', `gender` = '%s' WHERE `id` = %d AND `uid` = %d", dbesc($name), dbesc($nick), dbesc($diaspora_handle), dbesc(datetime_convert()), - dbesc($image_url), - dbesc($images[0]), - dbesc($images[1]), - dbesc($images[2]), - dbesc(datetime_convert()), dbesc($birthday), dbesc($location), dbesc($about), @@ -2521,7 +2504,7 @@ function diaspora_profile($importer,$xml,$msg) { } update_gcontact(array("url" => $contact['url'], "network" => NETWORK_DIASPORA, "generation" => 2, - "avatar" => $image_url, "name" => $name, "location" => $location, + "photo" => $image_url, "name" => $name, "location" => $location, "about" => $about, "birthday" => $birthday, "gender" => $gender, "addr" => $diaspora_handle, "nick" => $nick, "keywords" => $keywords, "hide" => !$searchable, "nsfw" => $nsfw)); diff --git a/include/discover_poco.php b/include/discover_poco.php index 63d1175a71..a8f670334b 100644 --- a/include/discover_poco.php +++ b/include/discover_poco.php @@ -222,7 +222,6 @@ function gs_search_user($search) { $contact = probe_url($user->site_address."/".$user->name); if ($contact["network"] != NETWORK_PHANTOM) { $contact["about"] = $user->description; - $contact["avatar"] = $contact["photo"]; update_gcontact($contact); } } diff --git a/include/follow.php b/include/follow.php index 8e6094cb4d..22ff079b63 100644 --- a/include/follow.php +++ b/include/follow.php @@ -264,27 +264,8 @@ function new_contact($uid,$url,$interactive = false) { require_once("include/Photo.php"); - $photos = import_profile_photo($ret['photo'],$uid,$contact_id); - - $r = q("UPDATE `contact` SET - `avatar` = '%s', - `photo` = '%s', - `thumb` = '%s', - `micro` = '%s', - `name-date` = '%s', - `uri-date` = '%s', - `avatar-date` = '%s' - WHERE `id` = %d", - dbesc($ret['photo']), - dbesc($photos[0]), - dbesc($photos[1]), - dbesc($photos[2]), - dbesc(datetime_convert()), - dbesc(datetime_convert()), - dbesc(datetime_convert()), - intval($contact_id) - ); - + // Update the avatar + update_contact_avatar($ret['photo'],$uid,$contact_id); // pull feed and consume it, which should subscribe to the hub. diff --git a/include/gprobe.php b/include/gprobe.php index 8e4d3715c0..dfa9137d7d 100644 --- a/include/gprobe.php +++ b/include/gprobe.php @@ -58,10 +58,8 @@ function gprobe_run(&$argv, &$argc){ if (is_null($result)) Cache::set("gprobe:".$urlparts["host"],serialize($arr)); - if (!in_array($result["network"], array(NETWORK_FEED, NETWORK_PHANTOM))) { - $arr["avatar"] = $arr["photo"]; + if (!in_array($result["network"], array(NETWORK_FEED, NETWORK_PHANTOM))) update_gcontact($arr); - } $r = q("SELECT `id`, `url`, `network` FROM `gcontact` WHERE `nurl` = '%s' ORDER BY `id` LIMIT 1", dbesc(normalise_link($url)) diff --git a/include/ostatus.php b/include/ostatus.php index eeacd40de4..d4c5d1617c 100644 --- a/include/ostatus.php +++ b/include/ostatus.php @@ -127,7 +127,8 @@ function ostatus_fetchauthor($xpath, $context, $importer, &$contact, $onlyfetch) $author["owner-link"] = $author["author-link"]; $author["owner-avatar"] = $author["author-avatar"]; - if ($r AND !$onlyfetch) { + // Only update the contacts if it is an OStatus contact + if ($r AND !$onlyfetch AND ($contact["network"] == NETWORK_OSTATUS)) { // Update contact data $value = $xpath->query("atom:link[@rel='salmon']", $context)->item(0)->nodeValue; @@ -158,9 +159,9 @@ function ostatus_fetchauthor($xpath, $context, $importer, &$contact, $onlyfetch) logger("Update contact data for contact ".$contact["id"], LOGGER_DEBUG); - q("UPDATE `contact` SET `name` = '%s', `nick` = '%s', `about` = '%s', `location` = '%s', `name-date` = '%s' WHERE `id` = %d AND `network` = '%s'", + q("UPDATE `contact` SET `name` = '%s', `nick` = '%s', `about` = '%s', `location` = '%s', `name-date` = '%s' WHERE `id` = %d", dbesc($contact["name"]), dbesc($contact["nick"]), dbesc($contact["about"]), dbesc($contact["location"]), - dbesc(datetime_convert()), intval($contact["id"]), dbesc(NETWORK_OSTATUS)); + dbesc(datetime_convert()), intval($contact["id"])); poco_check($contact["url"], $contact["name"], $contact["network"], $author["author-avatar"], $contact["about"], $contact["location"], "", "", "", datetime_convert(), 2, $contact["id"], $contact["uid"]); @@ -169,20 +170,14 @@ function ostatus_fetchauthor($xpath, $context, $importer, &$contact, $onlyfetch) if (isset($author["author-avatar"]) AND ($author["author-avatar"] != $r[0]['avatar'])) { logger("Update profile picture for contact ".$contact["id"], LOGGER_DEBUG); - $photos = import_profile_photo($author["author-avatar"], $importer["uid"], $contact["id"]); - - q("UPDATE `contact` SET `avatar` = '%s', `photo` = '%s', `thumb` = '%s', `micro` = '%s', `avatar-date` = '%s' WHERE `id` = %d AND `network` = '%s'", - dbesc($author["author-avatar"]), dbesc($photos[0]), dbesc($photos[1]), dbesc($photos[2]), - dbesc(datetime_convert()), intval($contact["id"]), dbesc(NETWORK_OSTATUS)); + update_contact_avatar($author["author-avatar"], $importer["uid"], $contact["id"]); } - // Only update the global contact if it is an OStatus contact - if ($contact["network"] == NETWORK_OSTATUS) { - /// @todo Add the "addr" field - $contact["generation"] = 2; - $contact["avatar"] = $author["author-avatar"]; - update_gcontact($contact); - } + + /// @todo Add the "addr" field + $contact["generation"] = 2; + $contact["photo"] = $author["author-avatar"]; + update_gcontact($contact); } return($author); diff --git a/include/socgraph.php b/include/socgraph.php index 241e2df7f0..268b5d3e72 100644 --- a/include/socgraph.php +++ b/include/socgraph.php @@ -294,7 +294,7 @@ function poco_check($profile_url, $name, $network, $profile_photo, $about, $loca "alias" => $alias, "name" => $name, "network" => $network, - "avatar" => $profile_photo, + "photo" => $profile_photo, "about" => $about, "location" => $location, "gender" => $gender, @@ -1517,7 +1517,7 @@ function update_gcontact($contact) { if (!$gcontact_id) return false; - $r = q("SELECT `name`, `nick`, `avatar`, `photo`, `thumb`, `micro`, `location`, `about`, `addr`, `generation`, `birthday`, `gender`, `keywords`, + $r = q("SELECT `name`, `nick`, `photo`, `location`, `about`, `addr`, `generation`, `birthday`, `gender`, `keywords`, `hide`, `nsfw`, `network`, `alias`, `notify`, `server_url`, `connect`, `updated`, `url` FROM `gcontact` WHERE `id` = %d LIMIT 1", intval($gcontact_id)); @@ -1552,37 +1552,15 @@ function update_gcontact($contact) { if ($contact["generation"] < $r[0]["generation"]) $update = true; - if (isset($contact["avatar"]) AND (($contact["avatar"] != $r[0]["avatar"]) OR - ($r[0]["photo"] == $r[0]["avatar"]) OR ($r[0]["thumb"] == "") OR ($r[0]["micro"] == ""))) { - - $cid = get_contact($contact["url"]); - - // We always store avatar picture with a contact-id. - // We don't have a contact-id when we use the gcontact table. - // Solution is to use a matching entry in the contact table. (Which is not totally clean) - if (($cid == 0) AND isset($contact["uid"])) - $cid = get_contact($contact["url"], $contact["uid"]); - - $photos = update_contact_avatar($contact["avatar"], 0, $cid); - - if ($photos) { - $contact["photo"] = $photos[0]; - $contact["thumb"] = $photos[1]; - $contact["micro"] = $photos[2]; - } - } - if ($update) { - q("UPDATE `gcontact` SET `avatar` = '%s', `photo` = '%s', `thumb` = '%s', `micro` = '%s', - `name` = '%s', `nick` = '%s', `addr` = '%s', `network` = '%s', + q("UPDATE `gcontact` SET `photo` = '%s', `name` = '%s', `nick` = '%s', `addr` = '%s', `network` = '%s', `birthday` = '%s', `gender` = '%s', `keywords` = %d, `hide` = %d, `nsfw` = %d, `alias` = '%s', `notify` = '%s', `url` = '%s', `location` = '%s', `about` = '%s', `generation` = %d, `updated` = '%s', `server_url` = '%s', `connect` = '%s' WHERE `nurl` = '%s' AND (`generation` = 0 OR `generation` >= %d)", - dbesc($contact["avatar"]), dbesc($contact["photo"]), dbesc($contact["thumb"]), - dbesc($contact["micro"]), dbesc($contact["name"]), dbesc($contact["nick"]), + dbesc($contact["photo"]), dbesc($contact["name"]), dbesc($contact["nick"]), dbesc($contact["addr"]), dbesc($contact["network"]), dbesc($contact["birthday"]), dbesc($contact["gender"]), dbesc($contact["keywords"]), intval($contact["hide"]), intval($contact["nsfw"]), dbesc($contact["alias"]), dbesc($contact["notify"]), diff --git a/mod/contacts.php b/mod/contacts.php index 1ef201490c..0b421433e0 100644 --- a/mod/contacts.php +++ b/mod/contacts.php @@ -293,26 +293,8 @@ function _contact_update_profile($contact_id) { intval(local_user()) ); - $photos = import_profile_photo($data['photo'], local_user(), $contact_id); - - $r = q("UPDATE `contact` SET - `avatar` = '%s', - `photo` = '%s', - `thumb` = '%s', - `micro` = '%s', - `name-date` = '%s', - `uri-date` = '%s', - `avatar-date` = '%s' - WHERE `id` = %d", - dbesc($data["photo"]), - dbesc($photos[0]), - dbesc($photos[1]), - dbesc($photos[2]), - dbesc(datetime_convert()), - dbesc(datetime_convert()), - dbesc(datetime_convert()), - intval($contact_id) - ); + // Update the entry in the contact table + update_contact_avatar($data['photo'], local_user(), $contact_id); // Update the entry in the gcontact table update_gcontact_from_probe($data["url"]); diff --git a/mod/crepair.php b/mod/crepair.php index 606c388458..5b4db09dac 100644 --- a/mod/crepair.php +++ b/mod/crepair.php @@ -80,27 +80,7 @@ function crepair_post(&$a) { logger('mod-crepair: updating photo from ' . $photo); require_once("include/Photo.php"); - $photos = import_profile_photo($photo,local_user(),$contact['id']); - - $x = q("UPDATE `contact` SET - `avatar` = '%s', - `photo` = '%s', - `thumb` = '%s', - `micro` = '%s', - `name-date` = '%s', - `uri-date` = '%s', - `avatar-date` = '%s' - WHERE `id` = %d - ", - dbesc($photo), - dbesc($photos[0]), - dbesc($photos[1]), - dbesc($photos[2]), - dbesc(datetime_convert()), - dbesc(datetime_convert()), - dbesc(datetime_convert()), - intval($contact['id']) - ); + update_contact_avatar($photo,local_user(),$contact['id']); } if($r) diff --git a/mod/dfrn_confirm.php b/mod/dfrn_confirm.php index 8528ba9ffd..27c04a908d 100644 --- a/mod/dfrn_confirm.php +++ b/mod/dfrn_confirm.php @@ -315,7 +315,7 @@ function dfrn_confirm_post(&$a,$handsfree = null) { require_once('include/Photo.php'); - $photos = import_profile_photo($contact['photo'],$uid,$contact_id); + update_contact_avatar($contact['photo'],$uid,$contact_id); logger('dfrn_confirm: confirm - imported photos'); @@ -328,29 +328,18 @@ function dfrn_confirm_post(&$a,$handsfree = null) { if(($relation == CONTACT_IS_SHARING) && ($duplex)) $duplex = 0; - $r = q("UPDATE `contact` SET - `avatar` = '%s', - `photo` = '%s', - `thumb` = '%s', - `micro` = '%s', - `rel` = %d, + $r = q("UPDATE `contact` SET `rel` = %d, `name-date` = '%s', `uri-date` = '%s', - `avatar-date` = '%s', `blocked` = 0, `pending` = 0, `duplex` = %d, `hidden` = %d, `network` = '%s' WHERE `id` = %d ", - dbesc($contact['photo']), - dbesc($photos[0]), - dbesc($photos[1]), - dbesc($photos[2]), intval($new_relation), dbesc(datetime_convert()), dbesc(datetime_convert()), - dbesc(datetime_convert()), intval($duplex), intval($hidden), dbesc(NETWORK_DFRN), @@ -396,12 +385,8 @@ function dfrn_confirm_post(&$a,$handsfree = null) { ); - $r = q("UPDATE `contact` SET `photo` = '%s', - `thumb` = '%s', - `micro` = '%s', - `name-date` = '%s', + $r = q("UPDATE `contact` SET `name-date` = '%s', `uri-date` = '%s', - `avatar-date` = '%s', `notify` = '%s', `poll` = '%s', `blocked` = 0, @@ -412,10 +397,6 @@ function dfrn_confirm_post(&$a,$handsfree = null) { `rel` = %d WHERE `id` = %d ", - dbesc($photos[0]), - dbesc($photos[1]), - dbesc($photos[2]), - dbesc(datetime_convert()), dbesc(datetime_convert()), dbesc(datetime_convert()), dbesc($notify), @@ -685,7 +666,7 @@ function dfrn_confirm_post(&$a,$handsfree = null) { require_once("include/Photo.php"); - $photos = import_profile_photo($photo,$local_uid,$dfrn_record); + update_contact_avatar($photo,$local_uid,$dfrn_record); logger('dfrn_confirm: request - photos imported'); @@ -697,14 +678,9 @@ function dfrn_confirm_post(&$a,$handsfree = null) { $duplex = 0; $r = q("UPDATE `contact` SET - `avatar` = '%s', - `photo` = '%s', - `thumb` = '%s', - `micro` = '%s', `rel` = %d, `name-date` = '%s', `uri-date` = '%s', - `avatar-date` = '%s', `blocked` = 0, `pending` = 0, `duplex` = %d, @@ -712,14 +688,9 @@ function dfrn_confirm_post(&$a,$handsfree = null) { `prv` = %d, `network` = '%s' WHERE `id` = %d ", - dbesc($photo), - dbesc($photos[0]), - dbesc($photos[1]), - dbesc($photos[2]), intval($new_relation), dbesc(datetime_convert()), dbesc(datetime_convert()), - dbesc(datetime_convert()), intval($duplex), intval($forum), intval($prv), diff --git a/mod/item.php b/mod/item.php index bf0ead4932..8c5a479646 100644 --- a/mod/item.php +++ b/mod/item.php @@ -1146,7 +1146,6 @@ function handle_tag($a, &$body, &$inform, &$str_tags, $profile_uid, $tag, $netwo if (!$r) { $probed = probe_url($name); if (isset($probed["url"])) { - $probed["avatar"] = $probed["photo"]; update_gcontact($probed); $r = q("SELECT `url`, `name`, `nick`, `network`, `alias`, `notify` FROM `gcontact` WHERE `nurl` = '%s' LIMIT 1", dbesc(normalise_link($probed["url"]))); From 04725d12837e024a17285ae7454b69e995521846 Mon Sep 17 00:00:00 2001 From: Michael Vogel Date: Thu, 28 Jan 2016 11:14:13 +0100 Subject: [PATCH 145/242] Reverted some work ... --- include/socgraph.php | 2 -- mod/poco.php | 5 +---- 2 files changed, 1 insertion(+), 6 deletions(-) diff --git a/include/socgraph.php b/include/socgraph.php index 268b5d3e72..23ef05cb25 100644 --- a/include/socgraph.php +++ b/include/socgraph.php @@ -10,7 +10,6 @@ require_once('include/datetime.php'); require_once("include/Scrape.php"); require_once("include/html2bbcode.php"); -require_once("include/Contact.php"); /* * poco_load @@ -1553,7 +1552,6 @@ function update_gcontact($contact) { $update = true; if ($update) { - q("UPDATE `gcontact` SET `photo` = '%s', `name` = '%s', `nick` = '%s', `addr` = '%s', `network` = '%s', `birthday` = '%s', `gender` = '%s', `keywords` = %d, `hide` = %d, `nsfw` = %d, `alias` = '%s', `notify` = '%s', `url` = '%s', diff --git a/mod/poco.php b/mod/poco.php index 3927f125ea..0a1b392169 100644 --- a/mod/poco.php +++ b/mod/poco.php @@ -179,9 +179,6 @@ function poco_init(&$a) { $rr['generation'] = 2; } - if ($rr["avatar"] == "") - $rr["avatar"] = $rr["photo"]; - if (($rr['about'] == "") AND isset($rr['pabout'])) $rr['about'] = $rr['pabout']; @@ -261,7 +258,7 @@ function poco_init(&$a) { $entry['updated'] = date("c", strtotime($entry['updated'])); } if($fields_ret['photos']) - $entry['photos'] = array(array('value' => $rr['avatar'], 'type' => 'profile')); + $entry['photos'] = array(array('value' => $rr['photo'], 'type' => 'profile')); if($fields_ret['network']) { $entry['network'] = $rr['network']; if ($entry['network'] == NETWORK_STATUSNET) From eba9f15daab5e4c2d246aaa7c3d9a0aacc945f01 Mon Sep 17 00:00:00 2001 From: Michael Vogel Date: Thu, 28 Jan 2016 11:18:57 +0100 Subject: [PATCH 146/242] Removed some more work --- include/dbstructure.php | 3 --- include/socgraph.php | 1 + 2 files changed, 1 insertion(+), 3 deletions(-) diff --git a/include/dbstructure.php b/include/dbstructure.php index fd5883911a..96d18cd789 100644 --- a/include/dbstructure.php +++ b/include/dbstructure.php @@ -657,10 +657,7 @@ function db_definition() { "nick" => array("type" => "varchar(255)", "not null" => "1", "default" => ""), "url" => array("type" => "varchar(255)", "not null" => "1", "default" => ""), "nurl" => array("type" => "varchar(255)", "not null" => "1", "default" => ""), - "avatar" => array("type" => "varchar(255)", "not null" => "1", "default" => ""), "photo" => array("type" => "varchar(255)", "not null" => "1", "default" => ""), - "thumb" => array("type" => "varchar(255)", "not null" => "1", "default" => ""), - "micro" => array("type" => "varchar(255)", "not null" => "1", "default" => ""), "connect" => array("type" => "varchar(255)", "not null" => "1", "default" => ""), "created" => array("type" => "datetime", "not null" => "1", "default" => "0000-00-00 00:00:00"), "updated" => array("type" => "datetime", "default" => "0000-00-00 00:00:00"), diff --git a/include/socgraph.php b/include/socgraph.php index 23ef05cb25..c545343393 100644 --- a/include/socgraph.php +++ b/include/socgraph.php @@ -11,6 +11,7 @@ require_once('include/datetime.php'); require_once("include/Scrape.php"); require_once("include/html2bbcode.php"); + /* * poco_load * From 845a769dc224f9e654a983711bf0f4687788f5fb Mon Sep 17 00:00:00 2001 From: Michael Vogel Date: Thu, 28 Jan 2016 12:28:04 +0100 Subject: [PATCH 147/242] Only check size if needed - should speed up the uploading. --- mod/wall_upload.php | 17 +++++++++-------- 1 file changed, 9 insertions(+), 8 deletions(-) diff --git a/mod/wall_upload.php b/mod/wall_upload.php index a1dab53779..b815348c70 100644 --- a/mod/wall_upload.php +++ b/mod/wall_upload.php @@ -158,14 +158,18 @@ function wall_upload_post(&$a, $desktopmode = true) { killme(); } - logger("Check size of picture.", LOGGER_DEBUG); - $r = q("select sum(octet_length(data)) as total from photo where uid = %d and scale = 0 and album != 'Contact Photos' ", - intval($page_owner_uid) - ); $limit = service_class_fetch($page_owner_uid,'photo_upload_limit'); - if(($limit !== false) && (($r[0]['total'] + strlen($imagedata)) > $limit)) { + if ($limit) { + $r = q("select sum(octet_length(data)) as total from photo where uid = %d and scale = 0 and album != 'Contact Photos' ", + intval($page_owner_uid) + ); + $size = $r[0]['total']; + } else + $size = 0; + + if(($limit !== false) && (($size + strlen($imagedata)) > $limit)) { $msg = upgrade_message(true); if ($r_json) { echo json_encode(array('error'=>$msg)); @@ -177,7 +181,6 @@ function wall_upload_post(&$a, $desktopmode = true) { } - logger("Picture will be processed.", LOGGER_DEBUG); $imagedata = @file_get_contents($src); $ph = new Photo($imagedata, $filetype); @@ -212,7 +215,6 @@ function wall_upload_post(&$a, $desktopmode = true) { $defperm = '<' . $default_cid . '>'; - logger("Picture will be stored", LOGGER_DEBUG); $r = $ph->store($page_owner_uid, $visitor, $hash, $filename, t('Wall Photos'), 0, 0, $defperm); if(! $r) { @@ -269,7 +271,6 @@ function wall_upload_post(&$a, $desktopmode = true) { return $picture; } - logger("Picture is stored.", LOGGER_DEBUG); if ($r_json) { echo json_encode(array('ok'=>true)); From 410ebb4cbf0a674967a8599647a042922ea3d5ef Mon Sep 17 00:00:00 2001 From: Michael Vogel Date: Thu, 28 Jan 2016 12:35:07 +0100 Subject: [PATCH 148/242] Added documentation --- include/Photo.php | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/include/Photo.php b/include/Photo.php index e0cb23008a..3f1608d3ec 100644 --- a/include/Photo.php +++ b/include/Photo.php @@ -720,6 +720,15 @@ function guess_image_type($filename, $fromcurl=false) { } +/** + * @brief Updates the avatar links in a contact only if needed + * + * @param string $avatar Link to avatar picture + * @param int $uid User id of contact owner + * @param int $cid Contact id + * + * @return array Returns array of the different avatar sizes + */ function update_contact_avatar($avatar,$uid,$cid) { $r = q("SELECT `avatar`, `photo`, `thumb`, `micro` FROM `contact` WHERE `id` = %d LIMIT 1", intval($cid)); From a93d35bfdabb083b1234b7c65c2e9e05219370a4 Mon Sep 17 00:00:00 2001 From: Michael Vogel Date: Thu, 28 Jan 2016 18:06:17 +0100 Subject: [PATCH 149/242] gcontact-id now depends on the owner, not the author of a post --- include/items.php | 20 +++++++++++++++----- 1 file changed, 15 insertions(+), 5 deletions(-) diff --git a/include/items.php b/include/items.php index cf044d8837..5ebf41c057 100644 --- a/include/items.php +++ b/include/items.php @@ -971,7 +971,9 @@ function item_store($arr,$force_parent = false, $notify = false, $dontcache = fa // The contact-id should be set before "item_store" was called - but there seems to be some issues if ($arr["contact-id"] == 0) { // First we are looking for a suitable contact that matches with the author of the post - $arr["contact-id"] = get_contact($arr['author-link'], $uid); + // This is done only for comments (See below explanation at "gcontact-id") + if($arr['parent-uri'] != $arr['uri']) + $arr["contact-id"] = get_contact($arr['author-link'], $uid); // If not present then maybe the owner was found if ($arr["contact-id"] == 0) @@ -983,12 +985,20 @@ function item_store($arr,$force_parent = false, $notify = false, $dontcache = fa if ($r) $arr["contact-id"] = $r[0]["id"]; } - logger("Contact-id was missing for post ".$arr["guid"]." - now set to ".$arr["contact-id"], LOGGER_DEBUG); + logger("Contact-id was missing for post ".$arr["guid"]." from user id ".$uid." - now set to ".$arr["contact-id"], LOGGER_DEBUG); } - if ($arr["gcontact-id"] == 0) - $arr["gcontact-id"] = get_gcontact_id(array("url" => $arr['author-link'], "network" => $arr['network'], - "photo" => $arr['author-avatar'], "name" => $arr['author-name'])); + if ($arr["gcontact-id"] == 0) { + // The gcontact should mostly behave like the contact. But is is supposed to be global for the system. + // This means that wall posts, repeated posts, etc. should have the gcontact id of the owner. + // On comments the author is the better choice. + if($arr['parent-uri'] === $arr['uri']) + $arr["gcontact-id"] = get_gcontact_id(array("url" => $arr['owner-link'], "network" => $arr['network'], + "photo" => $arr['owner-avatar'], "name" => $arr['owner-name'])); + else + $arr["gcontact-id"] = get_gcontact_id(array("url" => $arr['author-link'], "network" => $arr['network'], + "photo" => $arr['author-avatar'], "name" => $arr['author-name'])); + } if ($arr['guid'] != "") { // Checking if there is already an item with the same guid From b3e86f4e6b0953b09ce0556de3bec72edcd285d7 Mon Sep 17 00:00:00 2001 From: Michael Vogel Date: Thu, 28 Jan 2016 22:58:05 +0100 Subject: [PATCH 150/242] There is now a central function for item notifications --- include/diaspora.php | 43 +---------- include/enotify.php | 94 ++++++++++++++++++++++++ include/items.php | 171 ++----------------------------------------- include/ostatus.php | 45 ------------ 4 files changed, 100 insertions(+), 253 deletions(-) diff --git a/include/diaspora.php b/include/diaspora.php index b72239c4ce..f1e6f7ff02 100644 --- a/include/diaspora.php +++ b/include/diaspora.php @@ -14,6 +14,7 @@ require_once('include/queue_fn.php'); require_once('include/lock.php'); require_once('include/threads.php'); require_once('mod/share.php'); +require_once('include/enotify.php'); function diaspora_dispatch_public($msg) { @@ -1598,47 +1599,6 @@ function diaspora_comment($importer,$xml,$msg) { proc_run('php','include/notifier.php','comment-import',$message_id); } - $myconv = q("SELECT `author-link`, `author-avatar`, `parent` FROM `item` WHERE `parent-uri` = '%s' AND `uid` = %d AND `parent` != 0 AND `deleted` = 0 ", - dbesc($parent_item['uri']), - intval($importer['uid']) - ); - - if(count($myconv)) { - $importer_url = $a->get_baseurl() . '/profile/' . $importer['nickname']; - - foreach($myconv as $conv) { - - // now if we find a match, it means we're in this conversation - - if(! link_compare($conv['author-link'],$importer_url)) - continue; - - require_once('include/enotify.php'); - - $conv_parent = $conv['parent']; - - notification(array( - 'type' => NOTIFY_COMMENT, - 'notify_flags' => $importer['notify-flags'], - 'language' => $importer['language'], - 'to_name' => $importer['username'], - 'to_email' => $importer['email'], - 'uid' => $importer['uid'], - 'item' => $datarray, - 'link' => $a->get_baseurl().'/display/'.urlencode($datarray['guid']), - 'source_name' => $datarray['author-name'], - 'source_link' => $datarray['author-link'], - 'source_photo' => $datarray['author-avatar'], - 'verb' => ACTIVITY_POST, - 'otype' => 'item', - 'parent' => $conv_parent, - 'parent_uri' => $parent_uri - )); - - // only send one notification - break; - } - } return; } @@ -1793,7 +1753,6 @@ function diaspora_conversation($importer,$xml,$msg) { intval($conversation['id']) ); - require_once('include/enotify.php'); notification(array( 'type' => NOTIFY_MAIL, 'notify_flags' => $importer['notify-flags'], diff --git a/include/enotify.php b/include/enotify.php index e02c613831..80fd4d3363 100644 --- a/include/enotify.php +++ b/include/enotify.php @@ -633,4 +633,98 @@ function notification($params) { } +/** + * @brief Checks for item related notifications and sends them + * + * @param int $itemid ID of the item for which the check should be done + * @param int $uid User ID + * @param str $profile (Optional) Can be used for connector post. Otherwise empty. + */ +function check_item_notification($itemid, $uid, $profile = "", $defaulttype = "") { + + $user = q("SELECT `notify-flags`, `language`, `username`, `email` FROM `user` WHERE `uid` = %d", intval($uid)); + if (!$user) + return false; + + $owner = q("SELECT `id`, `url` FROM `contact` WHERE `self` AND `uid` = %d LIMIT 1", intval($uid)); + if (!$owner) + return false; + $local_profile = $owner[0]["url"]; + + if ($profile == "") + $profile = $local_profile; + + // Only act if it is a "real" post + // We need the additional check for the "local_profile" because of mixed situations on connector networks + $item = q("SELECT `id`, `mention`, `tag`,`parent`, `title`, `body`, `author-name`, `author-link`, `author-avatar`, `guid`, + `parent-uri`, `uri`, `contact-id` + FROM `item` WHERE `id` = %d AND `verb` IN ('%s', '') AND `type` != 'activity' AND + `author-link` != '%s' AND `author-link` != '%s' LIMIT 1", + intval($itemid), dbesc(ACTIVITY_POST), dbesc($profile), dbesc($local_profile)); + if (!$item) + return false; + + // Generate the notification array + $params = array(); + $params["uid"] = $uid; + $params["notify_flags"] = $user[0]["notify-flags"]; + $params["language"] = $user[0]["language"]; + $params["to_name"] = $user[0]["username"]; + $params["to_email"] = $user[0]["email"]; + $params["item"] = $item[0]; + $params["parent"] = $item[0]["parent"]; + $params["link"] = App::get_baseurl().'/display/'.urlencode($item[0]["guid"]); + $params["otype"] = 'item'; + $params["source_name"] = $item[0]["author-name"]; + $params["source_link"] = $item[0]["author-link"]; + $params["source_photo"] = $item[0]["author-avatar"]; + + if ($item[0]["parent-uri"] === $item[0]["uri"]) { + // Send a notification for every new post? + $r = q("SELECT `notify_new_posts` FROM `contact` WHERE `id` = %d AND `uid` = %d AND `notify_new_posts` LIMIT 1", + intval($item[0]['contact-id']), + intval($uid) + ); + $send_notification = count($r); + + if (!$send_notification) { + $tags = q("SELECT `url` FROM `term` WHERE `otype` = %d AND `oid` = %d AND `type` = %d AND `uid` = %d", + intval(TERM_OBJ_POST), intval($itemid), intval(TERM_MENTION), intval($uid)); + + if (count($tags)) { + foreach ($tags AS $tag) { + $r = q("SELECT `id` FROM `contact` WHERE `nurl` = '%s' AND `uid` = %d AND `notify_new_posts`", + normalise_link($tag["url"]), intval($uid)); + if (count($r)) + $send_notification = true; + } + } + } + + if ($send_notification) { + $params["type"] = NOTIFY_SHARE; + $params["verb"] = ACTIVITY_TAG; + } + } + + // Is the user mentioned in this post? + if ($item[0]["mention"] OR strpos($item[0]["tag"], "=".$profile."]") OR ($defaulttype == NOTIFY_TAGSELF)) { + $params["type"] = NOTIFY_TAGSELF; + $params["verb"] = ACTIVITY_TAG; + } + + // Is it a post that the user had started or where he interacted? + $parent = q("SELECT `thread`.`iid` FROM `thread` INNER JOIN `item` ON `item`.`parent` = `thread`.`iid` + WHERE `thread`.`iid` = %d AND `thread`.`uid` = %d AND NOT `thread`.`ignored` AND + (`thread`.`mention` OR `item`.`author-link` = '%s') + LIMIT 1", + intval($item[0]["parent"]), intval($uid), dbesc($profile)); + if ($parent AND !isset($params["type"])) { + $params["type"] = NOTIFY_COMMENT; + $params["verb"] = ACTIVITY_POST; + } + + if (isset($params["type"])) + notification($params); +} ?> diff --git a/include/items.php b/include/items.php index cf044d8837..5a3e021f94 100644 --- a/include/items.php +++ b/include/items.php @@ -16,6 +16,7 @@ require_once('include/ostatus.php'); require_once('include/feed.php'); require_once('include/Contact.php'); require_once('mod/share.php'); +require_once('include/enotify.php'); require_once('library/defuse/php-encryption-1.2.1/Crypto.php'); @@ -1313,67 +1314,15 @@ function item_store($arr,$force_parent = false, $notify = false, $dontcache = fa create_files_from_item($current_post); // Only check for notifications on start posts - if ($arr['parent-uri'] === $arr['uri']) { + if ($arr['parent-uri'] === $arr['uri']) add_thread($current_post); - logger('item_store: Check notification for contact '.$arr['contact-id'].' and post '.$current_post, LOGGER_DEBUG); - - // Send a notification for every new post? - $r = q("SELECT `notify_new_posts` FROM `contact` WHERE `id` = %d AND `uid` = %d AND `notify_new_posts` LIMIT 1", - intval($arr['contact-id']), - intval($arr['uid']) - ); - $send_notification = count($r); - - if (!$send_notification) { - $tags = q("SELECT `url` FROM `term` WHERE `otype` = %d AND `oid` = %d AND `type` = %d AND `uid` = %d", - intval(TERM_OBJ_POST), intval($current_post), intval(TERM_MENTION), intval($arr['uid'])); - - if (count($tags)) { - foreach ($tags AS $tag) { - $r = q("SELECT `id` FROM `contact` WHERE `nurl` = '%s' AND `uid` = %d AND `notify_new_posts`", - normalise_link($tag["url"]), intval($arr['uid'])); - if (count($r)) - $send_notification = true; - } - } - } - - if ($send_notification) { - logger('item_store: Send notification for contact '.$arr['contact-id'].' and post '.$current_post, LOGGER_DEBUG); - $u = q("SELECT * FROM user WHERE uid = %d LIMIT 1", - intval($arr['uid'])); - - $item = q("SELECT * FROM `item` WHERE `id` = %d AND `uid` = %d", - intval($current_post), - intval($arr['uid']) - ); - - $a = get_app(); - - require_once('include/enotify.php'); - notification(array( - 'type' => NOTIFY_SHARE, - 'notify_flags' => $u[0]['notify-flags'], - 'language' => $u[0]['language'], - 'to_name' => $u[0]['username'], - 'to_email' => $u[0]['email'], - 'uid' => $u[0]['uid'], - 'item' => $item[0], - 'link' => $a->get_baseurl().'/display/'.urlencode($arr['guid']), - 'source_name' => $item[0]['author-name'], - 'source_link' => $item[0]['author-link'], - 'source_photo' => $item[0]['author-avatar'], - 'verb' => ACTIVITY_TAG, - 'otype' => 'item', - 'parent' => $arr['parent'] - )); - logger('item_store: Notification sent for contact '.$arr['contact-id'].' and post '.$current_post, LOGGER_DEBUG); - } - } else { + else { update_thread($parent_id); add_shadow_entry($arr); } + check_item_notification($current_post, $uid); + if ($notify) proc_run('php', "include/notifier.php", $notify_type, $current_post); @@ -1569,37 +1518,6 @@ function tag_deliver($uid,$item_id) { return; } - - // send a notification - - // use a local photo if we have one - - $r = q("select * from contact where uid = %d and nurl = '%s' limit 1", - intval($u[0]['uid']), - dbesc(normalise_link($item['author-link'])) - ); - $photo = (($r && count($r)) ? $r[0]['thumb'] : $item['author-avatar']); - - - require_once('include/enotify.php'); - notification(array( - 'type' => NOTIFY_TAGSELF, - 'notify_flags' => $u[0]['notify-flags'], - 'language' => $u[0]['language'], - 'to_name' => $u[0]['username'], - 'to_email' => $u[0]['email'], - 'uid' => $u[0]['uid'], - 'item' => $item, - 'link' => $a->get_baseurl() . '/display/'.urlencode(get_item_guid($item['id'])), - 'source_name' => $item['author-name'], - 'source_link' => $item['author-link'], - 'source_photo' => $photo, - 'verb' => ACTIVITY_TAG, - 'otype' => 'item', - 'parent' => $item['parent'] - )); - - $arr = array('item' => $item, 'user' => $u[0], 'contact' => $r[0]); call_hooks('tagged', $arr); @@ -3245,33 +3163,7 @@ function local_delivery($importer,$data) { } if($posted_id && $parent) { - proc_run('php',"include/notifier.php","comment-import","$posted_id"); - - if((! $is_like) && (! $importer['self'])) { - - require_once('include/enotify.php'); - - notification(array( - 'type' => NOTIFY_COMMENT, - 'notify_flags' => $importer['notify-flags'], - 'language' => $importer['language'], - 'to_name' => $importer['username'], - 'to_email' => $importer['email'], - 'uid' => $importer['importer_uid'], - 'item' => $datarray, - 'link' => $a->get_baseurl().'/display/'.urlencode(get_item_guid($posted_id)), - 'source_name' => stripslashes($datarray['author-name']), - 'source_link' => $datarray['author-link'], - 'source_photo' => ((link_compare($datarray['author-link'],$importer['url'])) - ? $importer['thumb'] : $datarray['author-avatar']), - 'verb' => ACTIVITY_POST, - 'otype' => 'item', - 'parent' => $parent, - 'parent_uri' => $parent_uri, - )); - - } } return 0; @@ -3393,59 +3285,6 @@ function local_delivery($importer,$data) { $posted_id = item_store($datarray); - // find out if our user is involved in this conversation and wants to be notified. - - if(!x($datarray['type']) || $datarray['type'] != 'activity') { - - $myconv = q("SELECT `author-link`, `author-avatar`, `parent` FROM `item` WHERE `parent-uri` = '%s' AND `uid` = %d AND `parent` != 0 AND `deleted` = 0", - dbesc($top_uri), - intval($importer['importer_uid']) - ); - - if(count($myconv)) { - $importer_url = $a->get_baseurl() . '/profile/' . $importer['nickname']; - - // first make sure this isn't our own post coming back to us from a wall-to-wall event - if(! link_compare($datarray['author-link'],$importer_url)) { - - - foreach($myconv as $conv) { - - // now if we find a match, it means we're in this conversation - - if(! link_compare($conv['author-link'],$importer_url)) - continue; - - require_once('include/enotify.php'); - - $conv_parent = $conv['parent']; - - notification(array( - 'type' => NOTIFY_COMMENT, - 'notify_flags' => $importer['notify-flags'], - 'language' => $importer['language'], - 'to_name' => $importer['username'], - 'to_email' => $importer['email'], - 'uid' => $importer['importer_uid'], - 'item' => $datarray, - 'link' => $a->get_baseurl().'/display/'.urlencode(get_item_guid($posted_id)), - 'source_name' => stripslashes($datarray['author-name']), - 'source_link' => $datarray['author-link'], - 'source_photo' => ((link_compare($datarray['author-link'],$importer['url'])) - ? $importer['thumb'] : $datarray['author-avatar']), - 'verb' => ACTIVITY_POST, - 'otype' => 'item', - 'parent' => $conv_parent, - 'parent_uri' => $parent_uri - - )); - - // only send one notification - break; - } - } - } - } continue; } } diff --git a/include/ostatus.php b/include/ostatus.php index 4ccd13130d..f2e33b1327 100644 --- a/include/ostatus.php +++ b/include/ostatus.php @@ -561,29 +561,6 @@ function ostatus_import($xml,$importer,&$contact, &$hub) { } logger("Item was stored with id ".$item_id, LOGGER_DEBUG); - $item["id"] = $item_id; - - if ($mention AND in_array($item["verb"], array(ACTIVITY_POST, ACTIVITY_SHARE))) { - $u = q("SELECT `notify-flags`, `language`, `username`, `email` FROM user WHERE uid = %d LIMIT 1", intval($item['uid'])); - $r = q("SELECT `parent` FROM `item` WHERE `id` = %d", intval($item_id)); - - notification(array( - 'type' => NOTIFY_TAGSELF, - 'notify_flags' => $u[0]["notify-flags"], - 'language' => $u[0]["language"], - 'to_name' => $u[0]["username"], - 'to_email' => $u[0]["email"], - 'uid' => $item["uid"], - 'item' => $item, - 'link' => $a->get_baseurl().'/display/'.urlencode(get_item_guid($item_id)), - 'source_name' => $item["author-name"], - 'source_link' => $item["author-link"], - 'source_photo' => $item["author-avatar"], - 'verb' => ACTIVITY_TAG, - 'otype' => 'item', - 'parent' => $r[0]["parent"] - )); - } } } @@ -1028,28 +1005,6 @@ function ostatus_completion($conversation_url, $uid, $item = array()) { // Add the conversation entry (but don't fetch the whole conversation) ostatus_store_conversation($newitem, $conversation_url); - if ($mention) { - $u = q("SELECT `notify-flags`, `language`, `username`, `email` FROM user WHERE uid = %d LIMIT 1", intval($uid)); - $r = q("SELECT `parent` FROM `item` WHERE `id` = %d", intval($newitem)); - - notification(array( - 'type' => NOTIFY_TAGSELF, - 'notify_flags' => $u[0]["notify-flags"], - 'language' => $u[0]["language"], - 'to_name' => $u[0]["username"], - 'to_email' => $u[0]["email"], - 'uid' => $uid, - 'item' => $arr, - 'link' => $a->get_baseurl().'/display/'.urlencode(get_item_guid($newitem)), - 'source_name' => $arr["author-name"], - 'source_link' => $arr["author-link"], - 'source_photo' => $arr["author-avatar"], - 'verb' => ACTIVITY_TAG, - 'otype' => 'item', - 'parent' => $r[0]["parent"] - )); - } - // If the newly created item is the top item then change the parent settings of the thread // This shouldn't happen anymore. This is supposed to be absolote. if ($arr["uri"] == $first_id) { From 8767ea5f5200fac985fd94fdaf68ee4b5d47c432 Mon Sep 17 00:00:00 2001 From: Michael Vogel Date: Fri, 29 Jan 2016 01:18:18 +0100 Subject: [PATCH 151/242] Improved check against profile --- include/enotify.php | 16 +++++++++++----- 1 file changed, 11 insertions(+), 5 deletions(-) diff --git a/include/enotify.php b/include/enotify.php index 80fd4d3363..476703178c 100644 --- a/include/enotify.php +++ b/include/enotify.php @@ -654,13 +654,17 @@ function check_item_notification($itemid, $uid, $profile = "", $defaulttype = "" if ($profile == "") $profile = $local_profile; + $profile = normalise_link($profile); + + $profile_ssl = str_replace("http://", "https://", normalise_link($profile)); + // Only act if it is a "real" post // We need the additional check for the "local_profile" because of mixed situations on connector networks $item = q("SELECT `id`, `mention`, `tag`,`parent`, `title`, `body`, `author-name`, `author-link`, `author-avatar`, `guid`, `parent-uri`, `uri`, `contact-id` FROM `item` WHERE `id` = %d AND `verb` IN ('%s', '') AND `type` != 'activity' AND - `author-link` != '%s' AND `author-link` != '%s' LIMIT 1", - intval($itemid), dbesc(ACTIVITY_POST), dbesc($profile), dbesc($local_profile)); + NOT (`author-link` IN ('%s', '%s', '%s')) LIMIT 1", + intval($itemid), dbesc(ACTIVITY_POST), dbesc($profile), dbesc($profile_ssl), dbesc($local_profile)); if (!$item) return false; @@ -708,7 +712,8 @@ function check_item_notification($itemid, $uid, $profile = "", $defaulttype = "" } // Is the user mentioned in this post? - if ($item[0]["mention"] OR strpos($item[0]["tag"], "=".$profile."]") OR ($defaulttype == NOTIFY_TAGSELF)) { + if ($item[0]["mention"] OR strpos($item[0]["tag"], "=".$profile."]") OR strpos($item[0]["tag"], "=".$profile_ssl."]") OR + strpos($item[0]["tag"], "=".$local_profile."]") OR ($defaulttype == NOTIFY_TAGSELF)) { $params["type"] = NOTIFY_TAGSELF; $params["verb"] = ACTIVITY_TAG; } @@ -716,9 +721,10 @@ function check_item_notification($itemid, $uid, $profile = "", $defaulttype = "" // Is it a post that the user had started or where he interacted? $parent = q("SELECT `thread`.`iid` FROM `thread` INNER JOIN `item` ON `item`.`parent` = `thread`.`iid` WHERE `thread`.`iid` = %d AND `thread`.`uid` = %d AND NOT `thread`.`ignored` AND - (`thread`.`mention` OR `item`.`author-link` = '%s') + (`thread`.`mention` OR `item`.`author-link` IN ('%s', '%s', '%s')) LIMIT 1", - intval($item[0]["parent"]), intval($uid), dbesc($profile)); + intval($item[0]["parent"]), intval($uid), + dbesc($profile), dbesc($profile_ssl), dbesc($local_profile)); if ($parent AND !isset($params["type"])) { $params["type"] = NOTIFY_COMMENT; $params["verb"] = ACTIVITY_POST; From e4c4b8e13eae4c798f25b0ebe7b4adeee546a3e1 Mon Sep 17 00:00:00 2001 From: Michael Vogel Date: Fri, 29 Jan 2016 03:02:15 +0100 Subject: [PATCH 152/242] It's better to ask the connectors for their profile data --- include/enotify.php | 53 +++++++++++++++++++++++++++++++++------------ 1 file changed, 39 insertions(+), 14 deletions(-) diff --git a/include/enotify.php b/include/enotify.php index 476703178c..d3f1ab580b 100644 --- a/include/enotify.php +++ b/include/enotify.php @@ -638,9 +638,14 @@ function notification($params) { * * @param int $itemid ID of the item for which the check should be done * @param int $uid User ID - * @param str $profile (Optional) Can be used for connector post. Otherwise empty. + * @param str $defaulttype (Optional) Forces a notification with this type. */ -function check_item_notification($itemid, $uid, $profile = "", $defaulttype = "") { +function check_item_notification($itemid, $uid, $defaulttype = "") { + + $notification_data = array("uid" => $uid, "profiles" => array()); + call_hooks('check_item_notification', $notification_data); + + $profiles = $notification_data["profiles"]; $user = q("SELECT `notify-flags`, `language`, `username`, `email` FROM `user` WHERE `uid` = %d", intval($uid)); if (!$user) @@ -649,22 +654,36 @@ function check_item_notification($itemid, $uid, $profile = "", $defaulttype = "" $owner = q("SELECT `id`, `url` FROM `contact` WHERE `self` AND `uid` = %d LIMIT 1", intval($uid)); if (!$owner) return false; - $local_profile = $owner[0]["url"]; - if ($profile == "") - $profile = $local_profile; + $profiles[] = $owner[0]["url"]; - $profile = normalise_link($profile); + $profiles2 = array(); - $profile_ssl = str_replace("http://", "https://", normalise_link($profile)); + foreach ($profiles AS $profile) { + $profiles2[] = normalise_link($profile); + $profiles2[] = str_replace("http://", "https://", normalise_link($profile)); + } + + $profiles = $profiles2; + + $profile_list = ""; + + foreach ($profiles AS $profile) { + if ($profile_list != "") + $profile_list .= "', '"; + + $profile_list .= dbesc($profile); + } + + $profile_list = "'".$profile_list."'"; // Only act if it is a "real" post // We need the additional check for the "local_profile" because of mixed situations on connector networks $item = q("SELECT `id`, `mention`, `tag`,`parent`, `title`, `body`, `author-name`, `author-link`, `author-avatar`, `guid`, `parent-uri`, `uri`, `contact-id` FROM `item` WHERE `id` = %d AND `verb` IN ('%s', '') AND `type` != 'activity' AND - NOT (`author-link` IN ('%s', '%s', '%s')) LIMIT 1", - intval($itemid), dbesc(ACTIVITY_POST), dbesc($profile), dbesc($profile_ssl), dbesc($local_profile)); + NOT (`author-link` IN ($profile_list)) LIMIT 1", + intval($itemid), dbesc(ACTIVITY_POST)); if (!$item) return false; @@ -712,8 +731,14 @@ function check_item_notification($itemid, $uid, $profile = "", $defaulttype = "" } // Is the user mentioned in this post? - if ($item[0]["mention"] OR strpos($item[0]["tag"], "=".$profile."]") OR strpos($item[0]["tag"], "=".$profile_ssl."]") OR - strpos($item[0]["tag"], "=".$local_profile."]") OR ($defaulttype == NOTIFY_TAGSELF)) { + $tagged = false; + + foreach ($profiles AS $profile) { + if (strpos($item[0]["tag"], "=".$profile."]")) + $tagged = true; + } + + if ($item[0]["mention"] OR $tagged OR ($defaulttype == NOTIFY_TAGSELF)) { $params["type"] = NOTIFY_TAGSELF; $params["verb"] = ACTIVITY_TAG; } @@ -721,10 +746,10 @@ function check_item_notification($itemid, $uid, $profile = "", $defaulttype = "" // Is it a post that the user had started or where he interacted? $parent = q("SELECT `thread`.`iid` FROM `thread` INNER JOIN `item` ON `item`.`parent` = `thread`.`iid` WHERE `thread`.`iid` = %d AND `thread`.`uid` = %d AND NOT `thread`.`ignored` AND - (`thread`.`mention` OR `item`.`author-link` IN ('%s', '%s', '%s')) + (`thread`.`mention` OR `item`.`author-link` IN ($profile_list)) LIMIT 1", - intval($item[0]["parent"]), intval($uid), - dbesc($profile), dbesc($profile_ssl), dbesc($local_profile)); + intval($item[0]["parent"]), intval($uid)); + if ($parent AND !isset($params["type"])) { $params["type"] = NOTIFY_COMMENT; $params["verb"] = ACTIVITY_POST; From 56687f5bc8fc9e9a533b10fee27238689c60f83b Mon Sep 17 00:00:00 2001 From: Michael Vogel Date: Fri, 29 Jan 2016 03:46:43 +0100 Subject: [PATCH 153/242] Check the body for notifications as well --- include/enotify.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/include/enotify.php b/include/enotify.php index d3f1ab580b..54b59857c2 100644 --- a/include/enotify.php +++ b/include/enotify.php @@ -734,7 +734,7 @@ function check_item_notification($itemid, $uid, $defaulttype = "") { $tagged = false; foreach ($profiles AS $profile) { - if (strpos($item[0]["tag"], "=".$profile."]")) + if (strpos($item[0]["tag"], "=".$profile."]") OR strpos($item[0]["body"], "=".$profile."]")) $tagged = true; } From 4d33441c2ef5f576537c43d04fc3c4b0bf9a6561 Mon Sep 17 00:00:00 2001 From: Michael Vogel Date: Fri, 29 Jan 2016 03:51:12 +0100 Subject: [PATCH 154/242] DB Version was forgotten ... --- boot.php | 2 +- update.php | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/boot.php b/boot.php index 955b89e56c..4ef30eadac 100644 --- a/boot.php +++ b/boot.php @@ -36,7 +36,7 @@ define ( 'FRIENDICA_PLATFORM', 'Friendica'); define ( 'FRIENDICA_CODENAME', 'Asparagus'); define ( 'FRIENDICA_VERSION', '3.5-dev' ); define ( 'DFRN_PROTOCOL_VERSION', '2.23' ); -define ( 'DB_UPDATE_VERSION', 1193 ); +define ( 'DB_UPDATE_VERSION', 1194 ); /** * @brief Constant with a HTML line break. diff --git a/update.php b/update.php index a825c82e92..0689aa19b3 100644 --- a/update.php +++ b/update.php @@ -1,6 +1,6 @@ Date: Fri, 29 Jan 2016 12:14:04 +0100 Subject: [PATCH 155/242] Profile data from the gcontact should only be taken if there is content --- mod/display.php | 15 +++++++++++---- 1 file changed, 11 insertions(+), 4 deletions(-) diff --git a/mod/display.php b/mod/display.php index ca57af9233..4e33927072 100644 --- a/mod/display.php +++ b/mod/display.php @@ -192,13 +192,20 @@ function display_fetchauthor($a, $item) { $profiledata["photo"] = $r[0]["photo"]; $profiledata["nickname"] = $r[0]["nick"]; $profiledata["addr"] = $r[0]["addr"]; - $profiledata["keywords"] = $r[0]["keywords"]; $profiledata["network"] = $r[0]["network"]; + if ($r[0]["keywords"]) + $profiledata["keywords"] = $r[0]["keywords"]; + if ($showdetails) { - $profiledata["address"] = $r[0]["location"]; - $profiledata["about"] = $r[0]["about"]; - $profiledata["gender"] = $r[0]["gender"]; + if ($r[0]["location"]) + $profiledata["address"] = $r[0]["location"]; + + if ($r[0]["about"]) + $profiledata["about"] = $r[0]["about"]; + + if ($r[0]["gender"]) + $profiledata["gender"] = $r[0]["gender"]; } } } From 1cdcb9fc2e9abc97167a6b004d773172e4166eb7 Mon Sep 17 00:00:00 2001 From: Michael Vogel Date: Fri, 29 Jan 2016 17:42:38 +0100 Subject: [PATCH 156/242] DFRN: Entry import could work now, first steps for mails --- include/Photo.php | 5 +- include/import-dfrn.php | 533 +++++++++++++++++++++++----------------- 2 files changed, 315 insertions(+), 223 deletions(-) diff --git a/include/Photo.php b/include/Photo.php index 3f1608d3ec..91fce55a86 100644 --- a/include/Photo.php +++ b/include/Photo.php @@ -726,10 +726,11 @@ function guess_image_type($filename, $fromcurl=false) { * @param string $avatar Link to avatar picture * @param int $uid User id of contact owner * @param int $cid Contact id + * @param bool $force force picture update * * @return array Returns array of the different avatar sizes */ -function update_contact_avatar($avatar,$uid,$cid) { +function update_contact_avatar($avatar,$uid,$cid, $force = false) { $r = q("SELECT `avatar`, `photo`, `thumb`, `micro` FROM `contact` WHERE `id` = %d LIMIT 1", intval($cid)); if (!$r) @@ -737,7 +738,7 @@ function update_contact_avatar($avatar,$uid,$cid) { else $data = array($r[0]["photo"], $r[0]["thumb"], $r[0]["micro"]); - if ($r[0]["avatar"] != $avatar) { + if (($r[0]["avatar"] != $avatar) OR $force) { $photos = import_profile_photo($avatar,$uid,$cid, true); if ($photos) { diff --git a/include/import-dfrn.php b/include/import-dfrn.php index b3a8dbaf86..c934380357 100644 --- a/include/import-dfrn.php +++ b/include/import-dfrn.php @@ -109,6 +109,8 @@ class dfrn2 { $author["avatar"] = current($avatarlist); } +$onlyfetch = true; // Test + if ($r AND !$onlyfetch) { // When was the last change to name or uri? @@ -186,8 +188,8 @@ class dfrn2 { $contact["bd"] = $value; } - //if ($old_bdyear != $contact["bdyear"]) - // self::birthday_event($contact, $birthday); + if ($old_bdyear != $contact["bdyear"]) + self::birthday_event($contact, $birthday); // Get all field names $fields = array(); @@ -214,26 +216,301 @@ class dfrn2 { intval($contact["id"]), dbesc($contact["network"])); } - if ((isset($author["avatar"]) AND ($author["avatar"] != $r[0]["photo"])) OR - ($contact["avatar-date"] != $r[0]["avatar-date"])) { - logger("Update profile picture for contact ".$contact["id"], LOGGER_DEBUG); - - $photos = import_profile_photo($author["avatar"], $importer["uid"], $contact["id"]); - - q("UPDATE `contact` SET `photo` = '%s', `thumb` = '%s', `micro` = '%s', `avatar-date` = '%s' WHERE `id` = %d AND `network` = '%s'", - dbesc($author["avatar"]), dbesc($photos[1]), dbesc($photos[2]), - dbesc($contact["avatar-date"]), intval($contact["id"]), dbesc($contact["network"])); - } + update_contact_avatar($author["avatar"], $importer["uid"], $contact["id"], ($contact["avatar-date"] != $r[0]["avatar-date"])); $contact["generation"] = 2; $contact["photo"] = $author["avatar"]; - print_r($contact); update_gcontact($contact); } return($author); } + private function transform_activity($xpath, $activity, $element) { + if (!is_object($activity)) + return ""; + + $obj_doc = new DOMDocument('1.0', 'utf-8'); + $obj_doc->formatOutput = true; + + $obj_element = $obj_doc->createElementNS(NS_ATOM, $element); + + $activity_type = $xpath->query('activity:object-type/text()', $activity)->item(0)->nodeValue; + xml_add_element($obj_doc, $obj_element, "type", $activity_type); + + $id = $xpath->query('atom:id', $activity)->item(0); + if (is_object($id)) + $obj_element->appendChild($obj_doc->importNode($id, true)); + + $title = $xpath->query('atom:title', $activity)->item(0); + if (is_object($title)) + $obj_element->appendChild($obj_doc->importNode($title, true)); + + $link = $xpath->query('atom:link', $activity)->item(0); + if (is_object($link)) + $obj_element->appendChild($obj_doc->importNode($link, true)); + + $content = $xpath->query('atom:content', $activity)->item(0); + if (is_object($content)) + $obj_element->appendChild($obj_doc->importNode($content, true)); + + $obj_doc->appendChild($obj_element); + + $objxml = $obj_doc->saveXML($obj_element); + + // @todo This isn't totally clean. We should find a way to transform the namespaces + $objxml = str_replace('<'.$element.' xmlns="http://www.w3.org/2005/Atom">', "<".$element.">", $objxml); + return($objxml); + } + + private function process_mail($header, $xpath, $mail, $importer, $contact) { + + $msg = array(); + $msg["uid"] = $importer['importer_uid']; + $msg["from-name"] = $xpath->query('dfrn:sender/dfrn:name/text()', $mail)->item(0)->nodeValue; + $msg["from-url"] = $xpath->query('dfrn:sender/dfrn:uri/text()', $mail)->item(0)->nodeValue; + $msg["from-photo"] = $xpath->query('dfrn:sender/dfrn:avatar/text()', $mail)->item(0)->nodeValue; + $msg["contact-id"] = $importer["id"]; + $msg["uri"] = $xpath->query('dfrn:id/text()', $mail)->item(0)->nodeValue; + $msg["parent-uri"] = $xpath->query('dfrn:in-reply-to/text()', $mail)->item(0)->nodeValue; + $msg["created"] = $xpath->query('dfrn:sentdate/text()', $mail)->item(0)->nodeValue; + $msg["title"] = $xpath->query('dfrn:subject/text()', $mail)->item(0)->nodeValue; + $msg["body"] = $xpath->query('dfrn:content/text()', $mail)->item(0)->nodeValue; + $msg["seen"] = 0; + $msg["replied"] = 0; + + dbesc_array($msg); + + //$r = dbq("INSERT INTO `mail` (`" . implode("`, `", array_keys($msg)) + // . "`) VALUES ('" . implode("', '", array_values($msg)) . "')" ); + +print_r($msg); + + // send notifications. + + require_once('include/enotify.php'); + + $notif_params = array( + 'type' => NOTIFY_MAIL, + 'notify_flags' => $importer['notify-flags'], + 'language' => $importer['language'], + 'to_name' => $importer['username'], + 'to_email' => $importer['email'], + 'uid' => $importer['importer_uid'], + 'item' => $msg, + 'source_name' => $msg['from-name'], + 'source_link' => $importer['url'], + 'source_photo' => $importer['thumb'], + 'verb' => ACTIVITY_POST, + 'otype' => 'mail' + ); + +// notification($notif_params); +print_r($notif_params); + + } + + private function process_suggestion($header, $xpath, $suggestion, $importer, $contact) { + } + + private function process_relocation($header, $xpath, $relocation, $importer, $contact) { + } + + private function process_entry($header, $xpath, $entry, $importer, $contact) { + $item = $header; + + // Fetch the owner + $owner = self::fetchauthor($xpath, $entry, $importer, "dfrn:owner", $contact, true); + + $item["owner-name"] = $owner["name"]; + $item["owner-link"] = $owner["link"]; + $item["owner-avatar"] = $owner["avatar"]; + + if ($header["contact-id"] != $owner["contact-id"]) + $item["contact-id"] = $owner["contact-id"]; + + if (($header["network"] != $owner["network"]) AND ($owner["network"] != "")) + $item["network"] = $owner["network"]; + + // fetch the author + $author = self::fetchauthor($xpath, $entry, $importer, "atom:author", $contact, true); + + $item["author-name"] = $author["name"]; + $item["author-link"] = $author["link"]; + $item["author-avatar"] = $author["avatar"]; + + if ($header["contact-id"] != $author["contact-id"]) + $item["contact-id"] = $author["contact-id"]; + + if (($header["network"] != $author["network"]) AND ($author["network"] != "")) + $item["network"] = $author["network"]; + + // Now get the item + $item["uri"] = $xpath->query('atom:id/text()', $entry)->item(0)->nodeValue; + + $r = q("SELECT `id` FROM `item` WHERE `uid` = %d AND `uri` = '%s'", + intval($importer["uid"]), dbesc($item["uri"])); + if ($r) { + //logger("Item with uri ".$item["uri"]." for user ".$importer["uid"]." already existed under id ".$r[0]["id"], LOGGER_DEBUG); + //return false; + } + + // Is it a reply? + $inreplyto = $xpath->query('thr:in-reply-to', $entry); + if (is_object($inreplyto->item(0))) { + $objecttype = ACTIVITY_OBJ_COMMENT; + $item["type"] = 'remote-comment'; + $item["gravity"] = GRAVITY_COMMENT; + + foreach($inreplyto->item(0)->attributes AS $attributes) { + if ($attributes->name == "ref") + $item["parent-uri"] = $attributes->textContent; + } + } else { + $objecttype = ACTIVITY_OBJ_NOTE; + $item["parent-uri"] = $item["uri"]; + } + + $item["title"] = $xpath->query('atom:title/text()', $entry)->item(0)->nodeValue; + + $item["created"] = $xpath->query('atom:published/text()', $entry)->item(0)->nodeValue; + $item["edited"] = $xpath->query('atom:updated/text()', $entry)->item(0)->nodeValue; + + $item["body"] = $xpath->query('dfrn:env/text()', $entry)->item(0)->nodeValue; + $item["body"] = str_replace(array(' ',"\t","\r","\n"), array('','','',''),$item["body"]); + // make sure nobody is trying to sneak some html tags by us + $item["body"] = notags(base64url_decode($item["body"])); + + $item["body"] = limit_body_size($item["body"]); + + /// @todo Do we need the old check for HTML elements? + + // We don't need the content element since "dfrn:env" is always present + //$item["body"] = $xpath->query('atom:content/text()', $entry)->item(0)->nodeValue; + + $item["last-child"] = $xpath->query('dfrn:comment-allow/text()', $entry)->item(0)->nodeValue; + $item["location"] = $xpath->query('dfrn:location/text()', $entry)->item(0)->nodeValue; + + $georsspoint = $xpath->query('georss:point', $entry); + if ($georsspoint) + $item["coord"] = $georsspoint->item(0)->nodeValue; + + $item["private"] = $xpath->query('dfrn:private/text()', $entry)->item(0)->nodeValue; + + $item["extid"] = $xpath->query('dfrn:extid/text()', $entry)->item(0)->nodeValue; + + if ($xpath->query('dfrn:extid/text()', $entry)->item(0)->nodeValue == "true") + $item["bookmark"] = true; + + $notice_info = $xpath->query('statusnet:notice_info', $entry); + if ($notice_info AND ($notice_info->length > 0)) { + foreach($notice_info->item(0)->attributes AS $attributes) { + if ($attributes->name == "source") + $item["app"] = strip_tags($attributes->textContent); + } + } + + $item["guid"] = $xpath->query('dfrn:diaspora_guid/text()', $entry)->item(0)->nodeValue; + + // We store the data from "dfrn:diaspora_signature" in a later step. See some lines below + $signature = $xpath->query('dfrn:diaspora_signature/text()', $entry)->item(0)->nodeValue; + + $item["verb"] = $xpath->query('activity:verb/text()', $entry)->item(0)->nodeValue; + + if ($xpath->query('activity:object-type/text()', $entry)->item(0)->nodeValue != "") + $objecttype = $xpath->query('activity:object-type/text()', $entry)->item(0)->nodeValue; + + $item["object-type"] = $objecttype; + + // I have the feeling that we don't do anything with this data + $object = $xpath->query('activity:object', $entry)->item(0); + $item["object"] = self::transform_activity($xpath, $object, "object"); + + // Could someone explain what this is for? + $target = $xpath->query('activity:target', $entry)->item(0); + $item["target"] = self::transform_activity($xpath, $target, "target"); + + $categories = $xpath->query('atom:category', $entry); + if ($categories) { + foreach ($categories AS $category) { + foreach($category->attributes AS $attributes) + if ($attributes->name == "term") { + $term = $attributes->textContent; + if(strlen($item["tag"])) + $item["tag"] .= ','; + + $item["tag"] .= "#[url=".$a->get_baseurl()."/search?tag=".$term."]".$term."[/url]"; + } + } + } + + $enclosure = ""; + + $links = $xpath->query('atom:link', $entry); + if ($links) { + $rel = ""; + $href = ""; + $type = ""; + $length = "0"; + $title = ""; + foreach ($links AS $link) { + foreach($link->attributes AS $attributes) { + if ($attributes->name == "href") + $href = $attributes->textContent; + if ($attributes->name == "rel") + $rel = $attributes->textContent; + if ($attributes->name == "type") + $type = $attributes->textContent; + if ($attributes->name == "length") + $length = $attributes->textContent; + if ($attributes->name == "title") + $title = $attributes->textContent; + } + if (($rel != "") AND ($href != "")) + switch($rel) { + case "alternate": + $item["plink"] = $href; + break; + case "enclosure": + $enclosure = $href; + if(strlen($item["attach"])) + $item["attach"] .= ','; + + $item["attach"] .= '[attach]href="'.$href.'" length="'.$length.'" type="'.$type.'" title="'.$title.'"[/attach]'; + break; + } + } + } + + print_r($item); + //$item_id = item_store($item); + + return; + + if (!$item_id) { + logger("Error storing item", LOGGER_DEBUG); + return false; + } else { + logger("Item was stored with id ".$item_id, LOGGER_DEBUG); + + if ($signature) { + $signature = json_decode(base64_decode($signature)); + + // Check for falsely double encoded signatures + $signature->signature = diaspora_repair_signature($signature->signature, $signature->signer); + + // Store it in the "sign" table where we will read it for comments that we relay to Diaspora + q("INSERT INTO `sign` (`iid`,`signed_text`,`signature`,`signer`) VALUES (%d,'%s','%s','%s')", + intval($item_id), + dbesc($signature->signed_text), + dbesc($signature->signature), + dbesc($signature->signer) + ); + } + } + return $item_id; + } + function import($xml,$importer,&$contact, &$hub) { $a = get_app(); @@ -269,218 +546,32 @@ class dfrn2 { // Update the contact table if the data has changed // Only the "dfrn:owner" in the head section contains all data - self::fetchauthor($xpath, $doc->firstChild, $importer, "dfrn:owner", $contact, false); + $dfrn_owner = self::fetchauthor($xpath, $doc->firstChild, $importer, "dfrn:owner", $contact, false); // is it a public forum? Private forums aren't supported by now with this method - //$contact["forum"] = intval($xpath->evaluate($element.'/dfrn:community/text()', $context)->item(0)->nodeValue); + $forum = intval($xpath->evaluate('/atom:feed/dfrn:community/text()', $context)->item(0)->nodeValue); + + if ($forum AND ($dfrn_owner["contact-id"] != 0)) + q("UPDATE `contact` SET `forum` = %d WHERE `forum` != %d AND `id` = %d", + intval($forum), intval($forum), + intval($dfrn_owner["contact-id"]) + ); + + $mails = $xpath->query('/atom:feed/dfrn:mail'); + foreach ($mails AS $mail) + self::process_mail($header, $xpath, $mail, $importer, $contact); + + $suggestions = $xpath->query('/atom:feed/dfrn:suggest'); + foreach ($suggestions AS $suggestion) + self::process_suggestion($header, $xpath, $suggestion, $importer, $contact); + + $relocations = $xpath->query('/atom:feed/dfrn:relocate'); + foreach ($relocations AS $relocation) + self::process_relocation($header, $xpath, $relocation, $importer, $contact); $entries = $xpath->query('/atom:feed/atom:entry'); - - $item_id = 0; - - foreach ($entries AS $entry) { - - $item = $header; - - $mention = false; - - // Fetch the owner - $owner = self::fetchauthor($xpath, $entry, $importer, "dfrn:owner", $contact, true); - - $item["owner-name"] = $owner["name"]; - $item["owner-link"] = $owner["link"]; - $item["owner-avatar"] = $owner["avatar"]; - - if ($header["contact-id"] != $owner["contact-id"]) - $item["contact-id"] = $owner["contact-id"]; - - if (($header["network"] != $owner["network"]) AND ($owner["network"] != "")) - $item["network"] = $owner["network"]; - - // fetch the author - $author = self::fetchauthor($xpath, $entry, $importer, "atom:author", $contact, true); - - $item["author-name"] = $author["name"]; - $item["author-link"] = $author["link"]; - $item["author-avatar"] = $author["avatar"]; - - if ($header["contact-id"] != $author["contact-id"]) - $item["contact-id"] = $author["contact-id"]; - - if (($header["network"] != $author["network"]) AND ($author["network"] != "")) - $item["network"] = $author["network"]; - - // Now get the item - $item["uri"] = $xpath->query('atom:id/text()', $entry)->item(0)->nodeValue; - - $r = q("SELECT `id` FROM `item` WHERE `uid` = %d AND `uri` = '%s'", - intval($importer["uid"]), dbesc($item["uri"])); - if ($r) { - //logger("Item with uri ".$item["uri"]." for user ".$importer["uid"]." already existed under id ".$r[0]["id"], LOGGER_DEBUG); - //continue; - } - - // Is it a reply? - $inreplyto = $xpath->query('thr:in-reply-to', $entry); - if (is_object($inreplyto->item(0))) { - $objecttype = ACTIVITY_OBJ_COMMENT; - $item["type"] = 'remote-comment'; - $item["gravity"] = GRAVITY_COMMENT; - - foreach($inreplyto->item(0)->attributes AS $attributes) { - if ($attributes->name == "ref") - $item["parent-uri"] = $attributes->textContent; - } - } else { - $objecttype = ACTIVITY_OBJ_NOTE; - $item["parent-uri"] = $item["uri"]; - } - - $item["title"] = $xpath->query('atom:title/text()', $entry)->item(0)->nodeValue; - - $item["created"] = $xpath->query('atom:published/text()', $entry)->item(0)->nodeValue; - $item["edited"] = $xpath->query('atom:updated/text()', $entry)->item(0)->nodeValue; - - $item["body"] = $xpath->query('dfrn:env/text()', $entry)->item(0)->nodeValue; - $item["body"] = str_replace(array(' ',"\t","\r","\n"), array('','','',''),$item["body"]); - // make sure nobody is trying to sneak some html tags by us - $item["body"] = notags(base64url_decode($item["body"])); - - $item["body"] = limit_body_size($item["body"]); - - /// @todo Do we need the old check for HTML elements? - - // We don't need the content element since "dfrn:env" is always present - //$item["body"] = $xpath->query('atom:content/text()', $entry)->item(0)->nodeValue; - - $item["last-child"] = $xpath->query('dfrn:comment-allow/text()', $entry)->item(0)->nodeValue; - $item["location"] = $xpath->query('dfrn:location/text()', $entry)->item(0)->nodeValue; - - $georsspoint = $xpath->query('georss:point', $entry); - if ($georsspoint) - $item["coord"] = $georsspoint->item(0)->nodeValue; - - $item["private"] = $xpath->query('dfrn:private/text()', $entry)->item(0)->nodeValue; - - $item["extid"] = $xpath->query('dfrn:extid/text()', $entry)->item(0)->nodeValue; - - if ($xpath->query('dfrn:extid/text()', $entry)->item(0)->nodeValue == "true") - $item["bookmark"] = true; - - $notice_info = $xpath->query('statusnet:notice_info', $entry); - if ($notice_info AND ($notice_info->length > 0)) { - foreach($notice_info->item(0)->attributes AS $attributes) { - if ($attributes->name == "source") - $item["app"] = strip_tags($attributes->textContent); - } - } - - $item["guid"] = $xpath->query('dfrn:diaspora_guid/text()', $entry)->item(0)->nodeValue; - - // dfrn:diaspora_signature - - $item["verb"] = $xpath->query('activity:verb/text()', $entry)->item(0)->nodeValue; - - if ($xpath->query('activity:object-type/text()', $entry)->item(0)->nodeValue != "") - $objecttype = $xpath->query('activity:object-type/text()', $entry)->item(0)->nodeValue; - - $item["object-type"] = $objecttype; - - // activity:object - - // activity:target - - $categories = $xpath->query('atom:category', $entry); - if ($categories) { - foreach ($categories AS $category) { - foreach($category->attributes AS $attributes) - if ($attributes->name == "term") { - $term = $attributes->textContent; - if(strlen($item["tag"])) - $item["tag"] .= ','; - $item["tag"] .= "#[url=".$a->get_baseurl()."/search?tag=".$term."]".$term."[/url]"; - } - } - } - - $enclosure = ""; - - $links = $xpath->query('atom:link', $entry); - if ($links) { - $rel = ""; - $href = ""; - $type = ""; - $length = "0"; - $title = ""; - foreach ($links AS $link) { - foreach($link->attributes AS $attributes) { - if ($attributes->name == "href") - $href = $attributes->textContent; - if ($attributes->name == "rel") - $rel = $attributes->textContent; - if ($attributes->name == "type") - $type = $attributes->textContent; - if ($attributes->name == "length") - $length = $attributes->textContent; - if ($attributes->name == "title") - $title = $attributes->textContent; - } - if (($rel != "") AND ($href != "")) - switch($rel) { - case "alternate": - $item["plink"] = $href; - break; - case "enclosure": - $enclosure = $href; - if(strlen($item["attach"])) - $item["attach"] .= ','; - - $item["attach"] .= '[attach]href="'.$href.'" length="'.$length.'" type="'.$type.'" title="'.$title.'"[/attach]'; - break; - case "mentioned": - // Notification check - if ($importer["nurl"] == normalise_link($href)) - $mention = true; - break; - } - } - } - - print_r($item); -/* - if (!$item_id) { - logger("Error storing item", LOGGER_DEBUG); - continue; - } - - logger("Item was stored with id ".$item_id, LOGGER_DEBUG); - $item["id"] = $item_id; -*/ - -/* - if ($mention) { - $u = q("SELECT `notify-flags`, `language`, `username`, `email` FROM user WHERE uid = %d LIMIT 1", intval($item['uid'])); - $r = q("SELECT `parent` FROM `item` WHERE `id` = %d", intval($item_id)); - - notification(array( - 'type' => NOTIFY_TAGSELF, - 'notify_flags' => $u[0]["notify-flags"], - 'language' => $u[0]["language"], - 'to_name' => $u[0]["username"], - 'to_email' => $u[0]["email"], - 'uid' => $item["uid"], - 'item' => $item, - 'link' => $a->get_baseurl().'/display/'.urlencode(get_item_guid($item_id)), - 'source_name' => $item["author-name"], - 'source_link' => $item["author-link"], - 'source_photo' => $item["author-avatar"], - 'verb' => ACTIVITY_TAG, - 'otype' => 'item', - 'parent' => $r[0]["parent"] - )); - } -*/ - } + foreach ($entries AS $entry) + self::process_entry($header, $xpath, $entry, $importer, $contact); } } ?> From decaac6c31226fcbfd064f894e14f5c3b2405813 Mon Sep 17 00:00:00 2001 From: Michael Vogel Date: Fri, 29 Jan 2016 23:14:01 +0100 Subject: [PATCH 157/242] DFRN-Import is now nearly complete, changed namespace constants --- include/dfrn.php | 18 +-- include/import-dfrn.php | 249 +++++++++++++++++++++++++++++++++------- include/ostatus.php | 73 ++++++------ 3 files changed, 248 insertions(+), 92 deletions(-) diff --git a/include/dfrn.php b/include/dfrn.php index 883afe15f7..50d78de3c4 100644 --- a/include/dfrn.php +++ b/include/dfrn.php @@ -386,15 +386,15 @@ class dfrn { $root = $doc->createElementNS(NS_ATOM, 'feed'); $doc->appendChild($root); - $root->setAttribute("xmlns:thr", NS_THR); - $root->setAttribute("xmlns:at", "http://purl.org/atompub/tombstones/1.0"); - $root->setAttribute("xmlns:media", NS_MEDIA); - $root->setAttribute("xmlns:dfrn", "http://purl.org/macgirvin/dfrn/1.0"); - $root->setAttribute("xmlns:activity", NS_ACTIVITY); - $root->setAttribute("xmlns:georss", NS_GEORSS); - $root->setAttribute("xmlns:poco", NS_POCO); - $root->setAttribute("xmlns:ostatus", NS_OSTATUS); - $root->setAttribute("xmlns:statusnet", NS_STATUSNET); + $root->setAttribute("xmlns:thr", NAMESPACE_THREAD); + $root->setAttribute("xmlns:at", NAMESPACE_TOMB); + $root->setAttribute("xmlns:media", NAMESPACE_MEDIA); + $root->setAttribute("xmlns:dfrn", NAMESPACE_DFRN); + $root->setAttribute("xmlns:activity", NAMESPACE_ACTIVITY); + $root->setAttribute("xmlns:georss", NAMESPACE_GEORSS); + $root->setAttribute("xmlns:poco", NAMESPACE_POCO); + $root->setAttribute("xmlns:ostatus", NAMESPACE_OSTATUS); + $root->setAttribute("xmlns:statusnet", NAMESPACE_STATUSNET); xml_add_element($doc, $root, "id", app::get_baseurl()."/profile/".$owner["nick"]); xml_add_element($doc, $root, "title", $owner["name"]); diff --git a/include/import-dfrn.php b/include/import-dfrn.php index c934380357..3265eb6ff5 100644 --- a/include/import-dfrn.php +++ b/include/import-dfrn.php @@ -263,57 +263,215 @@ $onlyfetch = true; // Test return($objxml); } - private function process_mail($header, $xpath, $mail, $importer, $contact) { + private function process_mail($xpath, $mail, $importer) { $msg = array(); $msg["uid"] = $importer['importer_uid']; $msg["from-name"] = $xpath->query('dfrn:sender/dfrn:name/text()', $mail)->item(0)->nodeValue; $msg["from-url"] = $xpath->query('dfrn:sender/dfrn:uri/text()', $mail)->item(0)->nodeValue; $msg["from-photo"] = $xpath->query('dfrn:sender/dfrn:avatar/text()', $mail)->item(0)->nodeValue; - $msg["contact-id"] = $importer["id"]; + $msg["contact-id"] = $importer["id"]; $msg["uri"] = $xpath->query('dfrn:id/text()', $mail)->item(0)->nodeValue; $msg["parent-uri"] = $xpath->query('dfrn:in-reply-to/text()', $mail)->item(0)->nodeValue; $msg["created"] = $xpath->query('dfrn:sentdate/text()', $mail)->item(0)->nodeValue; $msg["title"] = $xpath->query('dfrn:subject/text()', $mail)->item(0)->nodeValue; $msg["body"] = $xpath->query('dfrn:content/text()', $mail)->item(0)->nodeValue; - $msg["seen"] = 0; - $msg["replied"] = 0; + $msg["seen"] = 0; + $msg["replied"] = 0; dbesc_array($msg); - //$r = dbq("INSERT INTO `mail` (`" . implode("`, `", array_keys($msg)) - // . "`) VALUES ('" . implode("', '", array_values($msg)) . "')" ); + $r = dbq("INSERT INTO `mail` (`".implode("`, `", array_keys($msg))."`) VALUES ('".implode("', '", array_values($msg))."')"); -print_r($msg); + // send notifications. - // send notifications. + $notif_params = array( + 'type' => NOTIFY_MAIL, + 'notify_flags' => $importer['notify-flags'], + 'language' => $importer['language'], + 'to_name' => $importer['username'], + 'to_email' => $importer['email'], + 'uid' => $importer['importer_uid'], + 'item' => $msg, + 'source_name' => $msg['from-name'], + 'source_link' => $importer['url'], + 'source_photo' => $importer['thumb'], + 'verb' => ACTIVITY_POST, + 'otype' => 'mail' + ); - require_once('include/enotify.php'); + notification($notif_params); + } - $notif_params = array( - 'type' => NOTIFY_MAIL, - 'notify_flags' => $importer['notify-flags'], - 'language' => $importer['language'], - 'to_name' => $importer['username'], - 'to_email' => $importer['email'], - 'uid' => $importer['importer_uid'], - 'item' => $msg, - 'source_name' => $msg['from-name'], - 'source_link' => $importer['url'], - 'source_photo' => $importer['thumb'], - 'verb' => ACTIVITY_POST, - 'otype' => 'mail' - ); + private function process_suggestion($xpath, $suggestion, $importer) { -// notification($notif_params); -print_r($notif_params); + $suggest = array(); + $suggest["uid"] = $importer["importer_uid"]; + $suggest["cid"] = $importer["id"]; + $suggest["url"] = $xpath->query('dfrn:url/text()', $suggestion)->item(0)->nodeValue; + $suggest["name"] = $xpath->query('dfrn:name/text()', $suggestion)->item(0)->nodeValue; + $suggest["photo"] = $xpath->query('dfrn:photo/text()', $suggestion)->item(0)->nodeValue; + $suggest["request"] = $xpath->query('dfrn:request/text()', $suggestion)->item(0)->nodeValue; + $suggest["note"] = $xpath->query('dfrn:note/text()', $suggestion)->item(0)->nodeValue; + + // Does our member already have a friend matching this description? + + $r = q("SELECT `id` FROM `contact` WHERE `name` = '%s' AND `nurl` = '%s' AND `uid` = %d LIMIT 1", + dbesc($suggest["name"]), + dbesc(normalise_link($suggest["url"])), + intval($suggest["uid"]) + ); + if(count($r)) + return false; + + // Do we already have an fcontact record for this person? + + $fid = 0; + $r = q("SELECT `id` FROM `fcontact` WHERE `url` = '%s' AND `name` = '%s' AND `request` = '%s' LIMIT 1", + dbesc($suggest["url"]), + dbesc($suggest["name"]), + dbesc($suggest["request"]) + ); + if(count($r)) { + $fid = $r[0]["id"]; + + // OK, we do. Do we already have an introduction for this person ? + $r = q("SELECT `id` FROM `intro` WHERE `uid` = %d AND `fid` = %d LIMIT 1", + intval($suggest["uid"]), + intval($fid) + ); + if(count($r)) + return false; + } + if(!$fid) + $r = q("INSERT INTO `fcontact` (`name`,`url`,`photo`,`request`) VALUES ('%s', '%s', '%s', '%s')", + dbesc($suggest["name"]), + dbesc($suggest["url"]), + dbesc($suggest["photo"]), + dbesc($suggest["request"]) + ); + $r = q("SELECT `id` FROM `fcontact` WHERE `url` = '%s' AND `name` = '%s' AND `request` = '%s' LIMIT 1", + dbesc($suggest["url"]), + dbesc($suggest["name"]), + dbesc($suggest["request"]) + ); + if(count($r)) + $fid = $r[0]["id"]; + else + // database record did not get created. Quietly give up. + return false; + + + $hash = random_string(); + + $r = q("INSERT INTO `intro` (`uid`, `fid`, `contact-id`, `note`, `hash`, `datetime`, `blocked`) + VALUES(%d, %d, %d, '%s', '%s', '%s', %d)", + intval($suggest["uid"]), + intval($fid), + intval($suggest["cid"]), + dbesc($suggest["body"]), + dbesc($hash), + dbesc(datetime_convert()), + intval(0) + ); + + notification(array( + 'type' => NOTIFY_SUGGEST, + 'notify_flags' => $importer["notify-flags"], + 'language' => $importer["language"], + 'to_name' => $importer["username"], + 'to_email' => $importer["email"], + 'uid' => $importer["importer_uid"], + 'item' => $suggest, + 'link' => App::get_baseurl()."/notifications/intros", + 'source_name' => $importer["name"], + 'source_link' => $importer["url"], + 'source_photo' => $importer["photo"], + 'verb' => ACTIVITY_REQ_FRIEND, + 'otype' => "intro" + )); + + return true; } - private function process_suggestion($header, $xpath, $suggestion, $importer, $contact) { - } + private function process_relocation($xpath, $relocation, $importer) { - private function process_relocation($header, $xpath, $relocation, $importer, $contact) { + $relocate = array(); + $relocate["uid"] = $importer["importer_uid"]; + $relocate["cid"] = $importer["id"]; + $relocate["url"] = $xpath->query('dfrn:url/text()', $relocation)->item(0)->nodeValue; + $relocate["name"] = $xpath->query('dfrn:name/text()', $relocation)->item(0)->nodeValue; + $relocate["photo"] = $xpath->query('dfrn:photo/text()', $relocation)->item(0)->nodeValue; + $relocate["thumb"] = $xpath->query('dfrn:thumb/text()', $relocation)->item(0)->nodeValue; + $relocate["micro"] = $xpath->query('dfrn:micro/text()', $relocation)->item(0)->nodeValue; + $relocate["request"] = $xpath->query('dfrn:request/text()', $relocation)->item(0)->nodeValue; + $relocate["confirm"] = $xpath->query('dfrn:confirm/text()', $relocation)->item(0)->nodeValue; + $relocate["notify"] = $xpath->query('dfrn:notify/text()', $relocation)->item(0)->nodeValue; + $relocate["poll"] = $xpath->query('dfrn:poll/text()', $relocation)->item(0)->nodeValue; + $relocate["sitepubkey"] = $xpath->query('dfrn:sitepubkey/text()', $relocation)->item(0)->nodeValue; + + // update contact + $r = q("SELECT `photo`, `url` FROM `contact` WHERE `id` = %d AND `uid` = %d;", + intval($importer["id"]), + intval($importer["importer_uid"])); + if (!$r) + return false; + + $old = $r[0]; + + $x = q("UPDATE `contact` SET + `name` = '%s', + `photo` = '%s', + `thumb` = '%s', + `micro` = '%s', + `url` = '%s', + `nurl` = '%s', + `request` = '%s', + `confirm` = '%s', + `notify` = '%s', + `poll` = '%s', + `site-pubkey` = '%s' + WHERE `id` = %d AND `uid` = %d;", + dbesc($relocate["name"]), + dbesc($relocate["photo"]), + dbesc($relocate["thumb"]), + dbesc($relocate["micro"]), + dbesc($relocate["url"]), + dbesc(normalise_link($relocate["url"])), + dbesc($relocate["request"]), + dbesc($relocate["confirm"]), + dbesc($relocate["notify"]), + dbesc($relocate["poll"]), + dbesc($relocate["sitepubkey"]), + intval($importer["id"]), + intval($importer["importer_uid"])); + + if ($x === false) + return false; + + // update items + $fields = array( + 'owner-link' => array($old["url"], $relocate["url"]), + 'author-link' => array($old["url"], $relocate["url"]), + 'owner-avatar' => array($old["photo"], $relocate["photo"]), + 'author-avatar' => array($old["photo"], $relocate["photo"]), + ); + foreach ($fields as $n=>$f){ + $x = q("UPDATE `item` SET `%s` = '%s' WHERE `%s` = '%s' AND `uid` = %d", + $n, dbesc($f[1]), + $n, dbesc($f[0]), + intval($importer["importer_uid"])); + if ($x === false) + return false; + } + + /// @TODO + /// merge with current record, current contents have priority + /// update record, set url-updated + /// update profile photos + /// schedule a scan? + return true; } private function process_entry($header, $xpath, $entry, $importer, $contact) { @@ -511,7 +669,11 @@ print_r($notif_params); return $item_id; } - function import($xml,$importer,&$contact, &$hub) { + private function process_deletion($header, $xpath, $entry, $importer, $contact) { + die("blubb"); + } + + function import($xml,$importer) { $a = get_app(); @@ -524,16 +686,19 @@ print_r($notif_params); @$doc->loadXML($xml); $xpath = new DomXPath($doc); - $xpath->registerNamespace('atom', "http://www.w3.org/2005/Atom"); - $xpath->registerNamespace('thr', "http://purl.org/syndication/thread/1.0"); - $xpath->registerNamespace('at', "http://purl.org/atompub/tombstones/1.0"); - $xpath->registerNamespace('media', "http://purl.org/syndication/atommedia"); - $xpath->registerNamespace('dfrn', "http://purl.org/macgirvin/dfrn/1.0"); - $xpath->registerNamespace('activity', "http://activitystrea.ms/spec/1.0/"); - $xpath->registerNamespace('georss', "http://www.georss.org/georss"); - $xpath->registerNamespace('poco', "http://portablecontacts.net/spec/1.0"); - $xpath->registerNamespace('ostatus', "http://ostatus.org/schema/1.0"); - $xpath->registerNamespace('statusnet', "http://status.net/schema/api/1/"); + $xpath->registerNamespace('atom', NAMESPACE_ATOM1); + $xpath->registerNamespace('thr', NAMESPACE_THREAD); + $xpath->registerNamespace('at', NAMESPACE_TOMB); + $xpath->registerNamespace('media', NAMESPACE_MEDIA); + $xpath->registerNamespace('dfrn', NAMESPACE_DFRN); + $xpath->registerNamespace('activity', NAMESPACE_ACTIVITY); + $xpath->registerNamespace('georss', NAMESPACE_GEORSS); + $xpath->registerNamespace('poco', NAMESPACE_POCO); + $xpath->registerNamespace('ostatus', NAMESPACE_OSTATUS); + $xpath->registerNamespace('statusnet', NAMESPACE_STATUSNET); + + $r = q("SELECT * FROM `contact` WHERE `id` = %d AND `self`", intval($importer["uid"])); + $contact = $r[0]; $header = array(); $header["uid"] = $importer["uid"]; @@ -559,15 +724,15 @@ print_r($notif_params); $mails = $xpath->query('/atom:feed/dfrn:mail'); foreach ($mails AS $mail) - self::process_mail($header, $xpath, $mail, $importer, $contact); + self::process_mail($xpath, $mail, $importer); $suggestions = $xpath->query('/atom:feed/dfrn:suggest'); foreach ($suggestions AS $suggestion) - self::process_suggestion($header, $xpath, $suggestion, $importer, $contact); + self::process_suggestion($xpath, $suggestion, $importer); $relocations = $xpath->query('/atom:feed/dfrn:relocate'); foreach ($relocations AS $relocation) - self::process_relocation($header, $xpath, $relocation, $importer, $contact); + self::process_relocation($xpath, $relocation, $importer); $entries = $xpath->query('/atom:feed/atom:entry'); foreach ($entries AS $entry) diff --git a/include/ostatus.php b/include/ostatus.php index 37b308db70..caaeec84f7 100644 --- a/include/ostatus.php +++ b/include/ostatus.php @@ -17,15 +17,6 @@ define('OSTATUS_DEFAULT_POLL_INTERVAL', 30); // given in minutes define('OSTATUS_DEFAULT_POLL_TIMEFRAME', 1440); // given in minutes define('OSTATUS_DEFAULT_POLL_TIMEFRAME_MENTIONS', 14400); // given in minutes -define("NS_ATOM", "http://www.w3.org/2005/Atom"); -define("NS_THR", "http://purl.org/syndication/thread/1.0"); -define("NS_GEORSS", "http://www.georss.org/georss"); -define("NS_ACTIVITY", "http://activitystrea.ms/spec/1.0/"); -define("NS_MEDIA", "http://purl.org/syndication/atommedia"); -define("NS_POCO", "http://portablecontacts.net/spec/1.0"); -define("NS_OSTATUS", "http://ostatus.org/schema/1.0"); -define("NS_STATUSNET", "http://status.net/schema/api/1/"); - function ostatus_check_follow_friends() { $r = q("SELECT `uid`,`v` FROM `pconfig` WHERE `cat`='system' AND `k`='ostatus_legacy_contact' AND `v` != ''"); @@ -193,14 +184,14 @@ function ostatus_salmon_author($xml, $importer) { @$doc->loadXML($xml); $xpath = new DomXPath($doc); - $xpath->registerNamespace('atom', "http://www.w3.org/2005/Atom"); - $xpath->registerNamespace('thr', "http://purl.org/syndication/thread/1.0"); - $xpath->registerNamespace('georss', "http://www.georss.org/georss"); - $xpath->registerNamespace('activity', "http://activitystrea.ms/spec/1.0/"); - $xpath->registerNamespace('media', "http://purl.org/syndication/atommedia"); - $xpath->registerNamespace('poco', "http://portablecontacts.net/spec/1.0"); - $xpath->registerNamespace('ostatus', "http://ostatus.org/schema/1.0"); - $xpath->registerNamespace('statusnet', "http://status.net/schema/api/1/"); + $xpath->registerNamespace('atom', NAMESPACE_ATOM1); + $xpath->registerNamespace('thr', NAMESPACE_THREAD); + $xpath->registerNamespace('georss', NAMESPACE_GEORSS); + $xpath->registerNamespace('activity', NAMESPACE_ACTIVITY); + $xpath->registerNamespace('media', NAMESPACE_MEDIA); + $xpath->registerNamespace('poco', NAMESPACE_POCO); + $xpath->registerNamespace('ostatus', NAMESPACE_OSTATUS); + $xpath->registerNamespace('statusnet', NAMESPACE_STATUSNET); $entries = $xpath->query('/atom:entry'); @@ -224,14 +215,14 @@ function ostatus_import($xml,$importer,&$contact, &$hub) { @$doc->loadXML($xml); $xpath = new DomXPath($doc); - $xpath->registerNamespace('atom', "http://www.w3.org/2005/Atom"); - $xpath->registerNamespace('thr', "http://purl.org/syndication/thread/1.0"); - $xpath->registerNamespace('georss', "http://www.georss.org/georss"); - $xpath->registerNamespace('activity', "http://activitystrea.ms/spec/1.0/"); - $xpath->registerNamespace('media', "http://purl.org/syndication/atommedia"); - $xpath->registerNamespace('poco', "http://portablecontacts.net/spec/1.0"); - $xpath->registerNamespace('ostatus', "http://ostatus.org/schema/1.0"); - $xpath->registerNamespace('statusnet', "http://status.net/schema/api/1/"); + $xpath->registerNamespace('atom', NAMESPACE_ATOM1); + $xpath->registerNamespace('thr', NAMESPACE_THREAD); + $xpath->registerNamespace('georss', NAMESPACE_GEORSS); + $xpath->registerNamespace('activity', NAMESPACE_ACTIVITY); + $xpath->registerNamespace('media', NAMESPACE_MEDIA); + $xpath->registerNamespace('poco', NAMESPACE_POCO); + $xpath->registerNamespace('ostatus', NAMESPACE_OSTATUS); + $xpath->registerNamespace('statusnet', NAMESPACE_STATUSNET); $gub = ""; $hub_attributes = $xpath->query("/atom:feed/atom:link[@rel='hub']")->item(0)->attributes; @@ -1120,16 +1111,16 @@ function ostatus_format_picture_post($body) { function ostatus_add_header($doc, $owner) { $a = get_app(); - $root = $doc->createElementNS(NS_ATOM, 'feed'); + $root = $doc->createElementNS(NAMESPACE_ATOM1, 'feed'); $doc->appendChild($root); - $root->setAttribute("xmlns:thr", NS_THR); - $root->setAttribute("xmlns:georss", NS_GEORSS); - $root->setAttribute("xmlns:activity", NS_ACTIVITY); - $root->setAttribute("xmlns:media", NS_MEDIA); - $root->setAttribute("xmlns:poco", NS_POCO); - $root->setAttribute("xmlns:ostatus", NS_OSTATUS); - $root->setAttribute("xmlns:statusnet", NS_STATUSNET); + $root->setAttribute("xmlns:thr", NAMESPACE_THREAD); + $root->setAttribute("xmlns:georss", NAMESPACE_GEORSS); + $root->setAttribute("xmlns:activity", NAMESPACE_ACTIVITY); + $root->setAttribute("xmlns:media", NAMESPACE_MEDIA); + $root->setAttribute("xmlns:poco", NAMESPACE_POCO); + $root->setAttribute("xmlns:ostatus", NAMESPACE_OSTATUS); + $root->setAttribute("xmlns:statusnet", NAMESPACE_STATUSNET); $attributes = array("uri" => "https://friendi.ca", "version" => FRIENDICA_VERSION."-".DB_UPDATE_VERSION); xml_add_element($doc, $root, "generator", FRIENDICA_PLATFORM, $attributes); @@ -1343,15 +1334,15 @@ function ostatus_entry($doc, $item, $owner, $toplevel = false, $repeat = false) $entry = $doc->createElement("activity:object"); $title = sprintf("New note by %s", $owner["nick"]); } else { - $entry = $doc->createElementNS(NS_ATOM, "entry"); + $entry = $doc->createElementNS(NAMESPACE_ATOM1, "entry"); - $entry->setAttribute("xmlns:thr", NS_THR); - $entry->setAttribute("xmlns:georss", NS_GEORSS); - $entry->setAttribute("xmlns:activity", NS_ACTIVITY); - $entry->setAttribute("xmlns:media", NS_MEDIA); - $entry->setAttribute("xmlns:poco", NS_POCO); - $entry->setAttribute("xmlns:ostatus", NS_OSTATUS); - $entry->setAttribute("xmlns:statusnet", NS_STATUSNET); + $entry->setAttribute("xmlns:thr", NAMESPACE_THREAD); + $entry->setAttribute("xmlns:georss", NAMESPACE_GEORSS); + $entry->setAttribute("xmlns:activity", NAMESPACE_ACTIVITY); + $entry->setAttribute("xmlns:media", NAMESPACE_MEDIA); + $entry->setAttribute("xmlns:poco", NAMESPACE_POCO); + $entry->setAttribute("xmlns:ostatus", NAMESPACE_OSTATUS); + $entry->setAttribute("xmlns:statusnet", NAMESPACE_STATUSNET); $author = ostatus_add_author($doc, $owner); $entry->appendChild($author); From cd1f3cde00612a4798fc0c42fd5daa37ff393964 Mon Sep 17 00:00:00 2001 From: Michael Vogel Date: Sat, 30 Jan 2016 01:20:43 +0100 Subject: [PATCH 158/242] DFRN Deletions should now work too --- include/import-dfrn.php | 143 ++++++++++++++++++++++++++++++++++++---- 1 file changed, 131 insertions(+), 12 deletions(-) diff --git a/include/import-dfrn.php b/include/import-dfrn.php index 3265eb6ff5..fd5b71cadb 100644 --- a/include/import-dfrn.php +++ b/include/import-dfrn.php @@ -1,13 +1,9 @@ attributes AS $attributes) { + if ($attributes->name == "ref") + $uri = $attributes->textContent; + if ($attributes->name == "when") + $when = $attributes->textContent; + } + if ($when) + $when = datetime_convert('UTC','UTC', $when, 'Y-m-d H:i:s'); + else + $when = datetime_convert('UTC','UTC','now','Y-m-d H:i:s'); + + if (!$uri OR !is_array($contact)) + return false; + + $r = q("SELECT `item`.*, `contact`.`self` FROM `item` INNER JOIN `contact` on `item`.`contact-id` = `contact`.`id` + WHERE `uri` = '%s' AND `item`.`uid` = %d AND `contact-id` = %d AND NOT `item`.`file` LIKE '%%[%%' LIMIT 1", + dbesc($uri), + intval($importer["uid"]), + intval($contact["id"]) + ); + if(count($r)) { + $item = $r[0]; + + if(!$item["deleted"]) + logger('deleting item '.$item["id"].' uri='.$item['uri'], LOGGER_DEBUG); + + if($item["object-type"] === ACTIVITY_OBJ_EVENT) { + logger("Deleting event ".$item["event-id"], LOGGER_DEBUG); + event_delete($item["event-id"]); + } + + if(($item["verb"] === ACTIVITY_TAG) && ($item["object-type"] === ACTIVITY_OBJ_TAGTERM)) { + $xo = parse_xml_string($item["object"],false); + $xt = parse_xml_string($item["target"],false); + if($xt->type === ACTIVITY_OBJ_NOTE) { + $i = q("SELECT `id`, `contact-id`, `tag` FROM `item` WHERE `uri` = '%s' AND `uid` = %d LIMIT 1", + dbesc($xt->id), + intval($importer["importer_uid"]) + ); + if(count($i)) { + + // For tags, the owner cannot remove the tag on the author's copy of the post. + + $owner_remove = (($item['contact-id'] == $i[0]['contact-id']) ? true: false); + $author_remove = (($item['origin'] && $item['self']) ? true : false); + $author_copy = (($item['origin']) ? true : false); + + if($owner_remove && $author_copy) + continue; + if($author_remove || $owner_remove) { + $tags = explode(',',$i[0]['tag']); + $newtags = array(); + if(count($tags)) { + foreach($tags as $tag) + if(trim($tag) !== trim($xo->body)) + $newtags[] = trim($tag); + } + q("UPDATE `item` SET `tag` = '%s' WHERE `id` = %d", + dbesc(implode(',',$newtags)), + intval($i[0]['id']) + ); + create_tags_from_item($i[0]['id']); + } + } + } + } + + if($item['uri'] == $item['parent-uri']) { + $r = q("UPDATE `item` SET `deleted` = 1, `edited` = '%s', `changed` = '%s', + `body` = '', `title` = '' + WHERE `parent-uri` = '%s' AND `uid` = %d", + dbesc($when), + dbesc(datetime_convert()), + dbesc($item['uri']), + intval($importer['uid']) + ); + create_tags_from_itemuri($item['uri'], $importer['uid']); + create_files_from_itemuri($item['uri'], $importer['uid']); + update_thread_uri($item['uri'], $importer['uid']); + } else { + $r = q("UPDATE `item` SET `deleted` = 1, `edited` = '%s', `changed` = '%s', + `body` = '', `title` = '' + WHERE `uri` = '%s' AND `uid` = %d", + dbesc($when), + dbesc(datetime_convert()), + dbesc($uri), + intval($importer['uid']) + ); + create_tags_from_itemuri($uri, $importer['uid']); + create_files_from_itemuri($uri, $importer['uid']); + if($item['last-child']) { + // ensure that last-child is set in case the comment that had it just got wiped. + q("UPDATE `item` SET `last-child` = 0, `changed` = '%s' WHERE `parent-uri` = '%s' AND `uid` = %d ", + dbesc(datetime_convert()), + dbesc($item['parent-uri']), + intval($item['uid']) + ); + // who is the last child now? + $r = q("SELECT `id` FROM `item` WHERE `parent-uri` = '%s' AND `type` != 'activity' AND `deleted` = 0 AND `moderated` = 0 AND `uid` = %d + ORDER BY `created` DESC LIMIT 1", + dbesc($item['parent-uri']), + intval($importer['uid']) + ); + if(count($r)) { + q("UPDATE `item` SET `last-child` = 1 WHERE `id` = %d", + intval($r[0]['id']) + ); + } + } + } + } } - function import($xml,$importer) { + function import($xml,$importer, &$contact) { $a = get_app(); @@ -697,8 +810,10 @@ $onlyfetch = true; // Test $xpath->registerNamespace('ostatus', NAMESPACE_OSTATUS); $xpath->registerNamespace('statusnet', NAMESPACE_STATUSNET); - $r = q("SELECT * FROM `contact` WHERE `id` = %d AND `self`", intval($importer["uid"])); - $contact = $r[0]; + if (!$contact) { + $r = q("SELECT * FROM `contact` WHERE `id` = %d AND `self`", intval($importer["uid"])); + $contact = $r[0]; + } $header = array(); $header["uid"] = $importer["uid"]; @@ -734,6 +849,10 @@ $onlyfetch = true; // Test foreach ($relocations AS $relocation) self::process_relocation($xpath, $relocation, $importer); + $deletions = $xpath->query('/atom:feed/at:deleted-entry'); + foreach ($deletions AS $deletion) + self::process_deletion($header, $xpath, $deletion, $importer, $contact); + $entries = $xpath->query('/atom:feed/atom:entry'); foreach ($entries AS $entry) self::process_entry($header, $xpath, $entry, $importer, $contact); From 8e0f04026c3c223703f8f363f96e37adf7c0edf5 Mon Sep 17 00:00:00 2001 From: rabuzarus <> Date: Sat, 30 Jan 2016 01:53:21 +0100 Subject: [PATCH 159/242] vier: some fixes for mobile view --- include/text.php | 4 ++-- view/theme/vier/mobile.css | 15 ++++++++++++++- view/theme/vier/style.css | 3 ++- 3 files changed, 18 insertions(+), 4 deletions(-) diff --git a/include/text.php b/include/text.php index 62d4bf151e..4f3af5aee8 100644 --- a/include/text.php +++ b/include/text.php @@ -1504,7 +1504,7 @@ function prepare_body(&$item,$attach = false, $preview = false) { $pos = strpos($s, $spoilersearch); $rnd = random_string(8); - $spoilerreplace = '
      '.sprintf(t('Click to open/close')).''. + $spoilerreplace = '
      '.sprintf(t('Click to open/close')).''. '
    "; + $day = str_replace(' ',' ',sprintf('%2.2d', $d)); + if($started) { + if(is_array($links) && isset($links[$d])) + $o .= "$day"; + else + $o .= $day; + $d ++; + } else { + $o .= ' '; + } + + $o .= '
     
    '."\r\n"; + + return $o; +} + +/** + * @brief Create a birthday event. + * + * Update the year and the birthday. + */ function update_contact_birthdays() { // This only handles foreign or alien networks where a birthday has been provided. @@ -474,8 +563,6 @@ function update_contact_birthdays() { $bdtext = sprintf( t('%s\'s birthday'), $rr['name']); $bdtext2 = sprintf( t('Happy Birthday %s'), ' [url=' . $rr['url'] . ']' . $rr['name'] . '[/url]') ; - - $r = q("INSERT INTO `event` (`uid`,`cid`,`created`,`edited`,`start`,`finish`,`summary`,`desc`,`type`,`adjust`) VALUES ( %d, %d, '%s', '%s', '%s', '%s', '%s', '%s', '%s', '%d' ) ", intval($rr['uid']), From c7158772619f2b38a55b22c7639ee3fd58bc0db0 Mon Sep 17 00:00:00 2001 From: Silke Meyer Date: Wed, 3 Feb 2016 20:47:41 +0100 Subject: [PATCH 178/242] Slightly updated docs about Let's Encrypt --- doc/SSL.md | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/doc/SSL.md b/doc/SSL.md index a72eec2a16..bcff929fe5 100644 --- a/doc/SSL.md +++ b/doc/SSL.md @@ -90,8 +90,8 @@ If you run your own server, upload the files and check out the Mozilla wiki link Let's encrypt --- -If you run your own server and you control your name server, the "Let's encrypt" initiative might become an interesting alternative. -Their offer is not ready, yet. +If you run your own server, the "Let's encrypt" initiative might become an interesting alternative. +Their offer is in public beta right now. Check out [their website](https://letsencrypt.org/) for status updates. Web server settings From 2d0c2990ea13a756578b3117efeee788413648b6 Mon Sep 17 00:00:00 2001 From: Michael Vogel Date: Wed, 3 Feb 2016 23:04:52 +0100 Subject: [PATCH 179/242] Differences fixed between old and new code --- include/import-dfrn.php | 80 +++++++++++++++++++++-------------------- include/items.php | 30 ++++++++++++---- 2 files changed, 65 insertions(+), 45 deletions(-) diff --git a/include/import-dfrn.php b/include/import-dfrn.php index bfcb002bb1..981e596432 100644 --- a/include/import-dfrn.php +++ b/include/import-dfrn.php @@ -18,12 +18,12 @@ require_once("include/items.php"); require_once("include/tags.php"); require_once("include/files.php"); -define("DFRN_TOP_LEVEL", 0); -define("DFRN_REPLY", 1); -define("DFRN_REPLY_RC", 2); - class dfrn2 { + const DFRN_TOP_LEVEL = 0; + const DFRN_REPLY = 1; + const DFRN_REPLY_RC = 2; + /** * @brief Add new birthday event for this person * @@ -58,14 +58,13 @@ class dfrn2 { * * @param object $xpath XPath object * @param object $context In which context should the data be searched - * @param array $importer Record of the importer contact + * @param array $importer Record of the importer user mixed with contact of the content * @param string $element Element name from which the data is fetched - * @param array $contact The updated contact record of the author * @param bool $onlyfetch Should the data only be fetched or should it update the contact record as well * * @return Returns an array with relevant data of the author */ - private function fetchauthor($xpath, $context, $importer, $element, $contact, $onlyfetch) { + private function fetchauthor($xpath, $context, $importer, $element, $onlyfetch) { $author = array(); $author["name"] = $xpath->evaluate($element."/atom:name/text()", $context)->item(0)->nodeValue; @@ -80,8 +79,8 @@ class dfrn2 { $author["contact-id"] = $r[0]["id"]; $author["network"] = $r[0]["network"]; } else { - $author["contact-id"] = $contact["id"]; - $author["network"] = $contact["network"]; + $author["contact-id"] = $importer["id"]; + $author["network"] = $importer["network"]; $onlyfetch = true; } @@ -623,7 +622,7 @@ class dfrn2 { } } - private function process_entry($header, $xpath, $entry, $importer, $contact) { + private function process_entry($header, $xpath, $entry, $importer) { logger("Processing entries"); @@ -633,27 +632,29 @@ class dfrn2 { $item["uri"] = $xpath->query("atom:id/text()", $entry)->item(0)->nodeValue; // Fetch the owner - $owner = self::fetchauthor($xpath, $entry, $importer, "dfrn:owner", $contact, true); + $owner = self::fetchauthor($xpath, $entry, $importer, "dfrn:owner", true); $item["owner-name"] = $owner["name"]; $item["owner-link"] = $owner["link"]; $item["owner-avatar"] = $owner["avatar"]; - if ($header["contact-id"] != $owner["contact-id"]) - $item["contact-id"] = $owner["contact-id"]; + // At the moment we trust the importer array + //if ($header["contact-id"] != $owner["contact-id"]) + // $item["contact-id"] = $owner["contact-id"]; if (($header["network"] != $owner["network"]) AND ($owner["network"] != "")) $item["network"] = $owner["network"]; // fetch the author - $author = self::fetchauthor($xpath, $entry, $importer, "atom:author", $contact, true); + $author = self::fetchauthor($xpath, $entry, $importer, "atom:author", true); $item["author-name"] = $author["name"]; $item["author-link"] = $author["link"]; $item["author-avatar"] = $author["avatar"]; - if ($header["contact-id"] != $author["contact-id"]) - $item["contact-id"] = $author["contact-id"]; + // At the moment we trust the importer array + //if ($header["contact-id"] != $author["contact-id"]) + // $item["contact-id"] = $author["contact-id"]; if (($header["network"] != $author["network"]) AND ($author["network"] != "")) $item["network"] = $author["network"]; @@ -948,7 +949,7 @@ class dfrn2 { } } - private function process_deletion($header, $xpath, $deletion, $importer, $contact_id) { + private function process_deletion($header, $xpath, $deletion, $importer) { logger("Processing deletions"); @@ -963,7 +964,7 @@ class dfrn2 { else $when = datetime_convert("UTC", "UTC", "now", "Y-m-d H:i:s"); - if (!$uri OR !$contact_id) + if (!$uri OR !$importer["id"]) return false; /// @todo Only select the used fields @@ -971,10 +972,10 @@ class dfrn2 { WHERE `uri` = '%s' AND `item`.`uid` = %d AND `contact-id` = %d AND NOT `item`.`file` LIKE '%%[%%' LIMIT 1", dbesc($uri), intval($importer["uid"]), - intval($contact_id) + intval($importer["id"]) ); if(!count($r)) { - logger("Item with uri ".$uri." from contact ".$contact_id." for user ".$importer["uid"]." wasn't found.", LOGGER_DEBUG); + logger("Item with uri ".$uri." from contact ".$importer["id"]." for user ".$importer["uid"]." wasn't found.", LOGGER_DEBUG); return; } else { @@ -1079,11 +1080,25 @@ class dfrn2 { } } - function import($xml,$importer, &$contact) { + /** + * @brief Imports a DFRN message + * + * @param text $xml The DFRN message + * @param array $importer Record of the importer user mixed with contact of the content + * @param bool $sort_by_date Is used when feeds are polled + */ + function import($xml,$importer, $sort_by_date = false) { if ($xml == "") return; + if($importer["readonly"]) { + // We aren't receiving stuff from this person. But we will quietly ignore them + // rather than a blatant "go away" message. + logger('ignoring contact '.$importer["id"]); + return; + } + $doc = new DOMDocument(); @$doc->loadXML($xml); @@ -1099,12 +1114,6 @@ class dfrn2 { $xpath->registerNamespace("ostatus", NAMESPACE_OSTATUS); $xpath->registerNamespace("statusnet", NAMESPACE_STATUSNET); - /// @todo Do we need this? - if (!$contact) { - $r = q("SELECT * FROM `contact` WHERE `id` = %d AND `self`", intval($importer["uid"])); - $contact = $r[0]; - } - $header = array(); $header["uid"] = $importer["uid"]; $header["network"] = NETWORK_DFRN; @@ -1115,22 +1124,17 @@ class dfrn2 { // Update the contact table if the data has changed // Only the "dfrn:owner" in the head section contains all data - $dfrn_owner = self::fetchauthor($xpath, $doc->firstChild, $importer, "dfrn:owner", $contact, false); + self::fetchauthor($xpath, $doc->firstChild, $importer, "dfrn:owner", false); - logger("Import DFRN message for user ".$importer["uid"]." from contact ".$contact["id"]." ".print_r($dfrn_owner, true)." - ".print_r($contact, true), LOGGER_DEBUG); - - //if (!$dfrn_owner["found"]) { - // logger("Author doesn't seem to be known by us. UID: ".$importer["uid"]." Contact: ".$dfrn_owner["contact-id"]." - ".print_r($dfrn_owner, true)); - // return; - //} + logger("Import DFRN message for user ".$importer["uid"]." from contact ".$importer["id"], LOGGER_DEBUG); // is it a public forum? Private forums aren't supported by now with this method $forum = intval($xpath->evaluate("/atom:feed/dfrn:community/text()", $context)->item(0)->nodeValue); - if ($forum AND ($dfrn_owner["contact-id"] != 0)) + if ($forum) q("UPDATE `contact` SET `forum` = %d WHERE `forum` != %d AND `id` = %d", intval($forum), intval($forum), - intval($dfrn_owner["contact-id"]) + intval($importer["id"]) ); $mails = $xpath->query("/atom:feed/dfrn:mail"); @@ -1147,11 +1151,11 @@ class dfrn2 { $deletions = $xpath->query("/atom:feed/at:deleted-entry"); foreach ($deletions AS $deletion) - self::process_deletion($header, $xpath, $deletion, $importer, $dfrn_owner["contact-id"]); + self::process_deletion($header, $xpath, $deletion, $importer); $entries = $xpath->query("/atom:feed/atom:entry"); foreach ($entries AS $entry) - self::process_entry($header, $xpath, $entry, $importer, $contact); + self::process_entry($header, $xpath, $entry, $importer); } } ?> diff --git a/include/items.php b/include/items.php index 0e98e8f19e..f1291d6490 100644 --- a/include/items.php +++ b/include/items.php @@ -1696,13 +1696,29 @@ function consume_feed($xml,$importer,&$contact, &$hub, $datedir = 0, $pass = 0) return; } // dfrn-test -// if ($contact['network'] === NETWORK_DFRN) { -// logger("Consume DFRN messages", LOGGER_DEBUG); -// logger("dfrn-test"); -// dfrn2::import($xml,$importer, $contact); -// return; -// } +/* + if ($contact['network'] === NETWORK_DFRN) { + logger("Consume DFRN messages", LOGGER_DEBUG); + logger("dfrn-test"); + $r = q("SELECT `contact`.*, `contact`.`uid` AS `importer_uid`, + `contact`.`pubkey` AS `cpubkey`, + `contact`.`prvkey` AS `cprvkey`, + `contact`.`thumb` AS `thumb`, + `contact`.`url` as `url`, + `contact`.`name` as `senderName`, + `user`.* + FROM `contact` + LEFT JOIN `user` ON `contact`.`uid` = `user`.`uid` + WHERE `contact`.`id` = %d AND `user`.`uid` = %d", + dbesc($contact["id"], $importer["uid"]); + ); + if ($r) { + dfrn2::import($xml,$r[0], true); + return; + } + } +*/ // Test - remove before flight //if ($pass < 2) { // $tempfile = tempnam(get_temppath(), "dfrn-consume-"); @@ -2408,7 +2424,7 @@ function item_is_remote_self($contact, &$datarray) { function local_delivery($importer,$data) { // dfrn-Test - //return dfrn2::import($data, $importer, $contact); + //return dfrn2::import($data, $importer); require_once('library/simplepie/simplepie.inc'); From e11ff25de2122fd619a68152af8f7a66cfb11ca1 Mon Sep 17 00:00:00 2001 From: fabrixxm Date: Wed, 3 Feb 2016 23:22:45 +0100 Subject: [PATCH 180/242] fix empty ACL window on desktop --- view/templates/acl_selector.tpl | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/view/templates/acl_selector.tpl b/view/templates/acl_selector.tpl index bb76135067..7c68a73064 100644 --- a/view/templates/acl_selector.tpl +++ b/view/templates/acl_selector.tpl @@ -30,7 +30,7 @@ $(document).ready(function() { baseurl+"/acl", [ {{$allowcid}},{{$allowgid}},{{$denycid}},{{$denygid}} ], {{$features.aclautomention}}, - {{$APP->is_mobile}} + {{if $APP->is_mobile}}true{{else}}false{{/if}} ); } }); From 5f6ba00408ca0f28b2d36d799fa62d37c72333a8 Mon Sep 17 00:00:00 2001 From: Michael Vogel Date: Thu, 4 Feb 2016 10:19:13 +0100 Subject: [PATCH 181/242] Added documentation, fixed some bug --- include/import-dfrn.php | 13 ++++++++++--- 1 file changed, 10 insertions(+), 3 deletions(-) diff --git a/include/import-dfrn.php b/include/import-dfrn.php index 981e596432..0abf92feb4 100644 --- a/include/import-dfrn.php +++ b/include/import-dfrn.php @@ -776,7 +776,7 @@ class dfrn2 { $item["parent-uri"] = $attributes->textContent; // Get the type of the item (Top level post, reply or remote reply) - $entrytype = get_entry_type($importer, $item); + $entrytype = self::get_entry_type($importer, $item); // Now assign the rest of the values that depend on the type of the message if ($entrytype == DFRN_REPLY_RC) { @@ -892,6 +892,8 @@ class dfrn2 { if($posted_id) { + logger("Reply was stored with id ".$posted_id, LOGGER_DEBUG); + $item["id"] = $posted_id; $r = q("SELECT `parent`, `parent-uri` FROM `item` WHERE `id` = %d AND `uid` = %d LIMIT 1", @@ -918,6 +920,7 @@ class dfrn2 { } if($posted_id AND $parent AND ($entrytype == DFRN_REPLY_RC)) { + logger("Notifying followers about comment ".$posted_id, LOGGER_DEBUG); proc_run("php", "include/notifier.php", "comment-import", $posted_id); } @@ -944,6 +947,8 @@ class dfrn2 { $posted_id = item_store($item, false, $notify); + logger("Item was stored with id ".$posted_id, LOGGER_DEBUG); + if(stristr($item["verb"],ACTIVITY_POKE)) self::do_poke($item, $importer, $posted_id); } @@ -981,7 +986,7 @@ class dfrn2 { $item = $r[0]; - $entrytype = get_entry_type($importer, $item); + $entrytype = self::get_entry_type($importer, $item); if(!$item["deleted"]) logger('deleting item '.$item["id"].' uri='.$uri, LOGGER_DEBUG); @@ -1074,8 +1079,10 @@ class dfrn2 { } // if this is a relayed delete, propagate it to other recipients - if($entrytype == DFRN_REPLY_RC) + if($entrytype == DFRN_REPLY_RC) { + logger("Notifying followers about deletion of post ".$item["id"], LOGGER_DEBUG); proc_run("php", "include/notifier.php","drop", $item["id"]); + } } } } From 3a649047df15c5edad55572c62c2e3b6a35084db Mon Sep 17 00:00:00 2001 From: Michael Vogel Date: Thu, 4 Feb 2016 12:51:34 +0100 Subject: [PATCH 182/242] DFRN: Contact-id is now stored depending on the author/Some more bugfixes --- include/import-dfrn.php | 75 +++++++++++++++++++++-------------------- include/items.php | 4 +-- 2 files changed, 41 insertions(+), 38 deletions(-) diff --git a/include/import-dfrn.php b/include/import-dfrn.php index 0abf92feb4..87b2273ef4 100644 --- a/include/import-dfrn.php +++ b/include/import-dfrn.php @@ -1,16 +1,4 @@ strtotime($r[0][$field])) + $update = true; foreach ($fields AS $field => $data) - if ($contact[$field] != $r[0][$field]) + if ($contact[$field] != $r[0][$field]) { + logger("Difference for contact ".$contact["id"]." in field '".$field."'. Old value: '".$contact[$field]."', new value '".$r[0][$field]."'", LOGGER_DEBUG); $update = true; + } if ($update) { logger("Update contact data for contact ".$contact["id"], LOGGER_DEBUG); q("UPDATE `contact` SET `name` = '%s', `nick` = '%s', `about` = '%s', `location` = '%s', - `addr` = '%s', `keywords` = '%s', `bdyear` = '%s', `bd` = '%s' - `avatar-date` = '%s', `name-date` = '%s', `uri-date` = '%s' + `addr` = '%s', `keywords` = '%s', `bdyear` = '%s', `bd` = '%s', + `name-date` = '%s', `uri-date` = '%s' WHERE `id` = %d AND `network` = '%s'", dbesc($contact["name"]), dbesc($contact["nick"]), dbesc($contact["about"]), dbesc($contact["location"]), dbesc($contact["addr"]), dbesc($contact["keywords"]), dbesc($contact["bdyear"]), - dbesc($contact["bd"]), dbesc($contact["avatar-date"]), dbesc($contact["name-date"]), dbesc($contact["uri-date"]), + dbesc($contact["bd"]), dbesc($contact["name-date"]), dbesc($contact["uri-date"]), intval($contact["id"]), dbesc($contact["network"])); } - update_contact_avatar($author["avatar"], $importer["uid"], $contact["id"], ($contact["avatar-date"] != $r[0]["avatar-date"])); + update_contact_avatar($author["avatar"], $importer["uid"], $contact["id"], + (strtotime($contact["avatar-date"]) > strtotime($r[0]["avatar-date"]))); $contact["generation"] = 2; $contact["photo"] = $author["avatar"]; @@ -301,6 +301,8 @@ class dfrn2 { ); notification($notif_params); + + logger("Mail is processed, notification was sent."); } private function process_suggestion($xpath, $suggestion, $importer) { @@ -638,13 +640,6 @@ class dfrn2 { $item["owner-link"] = $owner["link"]; $item["owner-avatar"] = $owner["avatar"]; - // At the moment we trust the importer array - //if ($header["contact-id"] != $owner["contact-id"]) - // $item["contact-id"] = $owner["contact-id"]; - - if (($header["network"] != $owner["network"]) AND ($owner["network"] != "")) - $item["network"] = $owner["network"]; - // fetch the author $author = self::fetchauthor($xpath, $entry, $importer, "atom:author", true); @@ -652,13 +647,6 @@ class dfrn2 { $item["author-link"] = $author["link"]; $item["author-avatar"] = $author["avatar"]; - // At the moment we trust the importer array - //if ($header["contact-id"] != $author["contact-id"]) - // $item["contact-id"] = $author["contact-id"]; - - if (($header["network"] != $author["network"]) AND ($author["network"] != "")) - $item["network"] = $author["network"]; - $item["title"] = $xpath->query("atom:title/text()", $entry)->item(0)->nodeValue; $item["created"] = $xpath->query("atom:published/text()", $entry)->item(0)->nodeValue; @@ -779,16 +767,31 @@ class dfrn2 { $entrytype = self::get_entry_type($importer, $item); // Now assign the rest of the values that depend on the type of the message - if ($entrytype == DFRN_REPLY_RC) { + if (in_array($entrytype, array(DFRN_REPLY, DFRN_REPLY_RC))) { if (!isset($item["object-type"])) $item["object-type"] = ACTIVITY_OBJ_COMMENT; + if ($item["contact-id"] != $owner["contact-id"]) + $item["contact-id"] = $owner["contact-id"]; + + if (($item["network"] != $owner["network"]) AND ($owner["network"] != "")) + $item["network"] = $owner["network"]; + + if ($item["contact-id"] != $author["contact-id"]) + $item["contact-id"] = $author["contact-id"]; + + if (($item["network"] != $author["network"]) AND ($author["network"] != "")) + $item["network"] = $author["network"]; + } + + if ($entrytype == DFRN_REPLY_RC) { $item["type"] = "remote-comment"; $item["wall"] = 1; - } elseif ($entrytype == DFRN_REPLY) { - if (!isset($item["object-type"])) - $item["object-type"] = ACTIVITY_OBJ_COMMENT; } else { + // The Diaspora signature is only stored in replies + // Since this isn't a field in the item table this would create a bug when inserting this in the item table + unset($item["dsprsig"]); + if (!isset($item["object-type"])) $item["object-type"] = ACTIVITY_OBJ_NOTE; @@ -892,7 +895,7 @@ class dfrn2 { if($posted_id) { - logger("Reply was stored with id ".$posted_id, LOGGER_DEBUG); + logger("Reply from contact ".$item["contact-id"]." was stored with id ".$posted_id, LOGGER_DEBUG); $item["id"] = $posted_id; diff --git a/include/items.php b/include/items.php index f1291d6490..0ec645cc7a 100644 --- a/include/items.php +++ b/include/items.php @@ -17,7 +17,7 @@ require_once('include/feed.php'); require_once('include/Contact.php'); require_once('mod/share.php'); require_once('include/enotify.php'); -//require_once('include/import-dfrn.php'); +require_once('include/import-dfrn.php'); require_once('library/defuse/php-encryption-1.2.1/Crypto.php'); @@ -2424,7 +2424,7 @@ function item_is_remote_self($contact, &$datarray) { function local_delivery($importer,$data) { // dfrn-Test - //return dfrn2::import($data, $importer); + return dfrn2::import($data, $importer); require_once('library/simplepie/simplepie.inc'); From 9a54afa629acc58a8e1df9dd48a2dd1f718b8a77 Mon Sep 17 00:00:00 2001 From: rabuzarus <> Date: Thu, 4 Feb 2016 14:47:20 +0100 Subject: [PATCH 183/242] Forum class - rename Class CamelCase and rename some methods --- include/{forum.php => Forum.php} | 12 ++++++------ include/identity.php | 4 ++-- mod/network.php | 4 ++-- mod/ping.php | 4 ++-- view/theme/vier/theme.php | 4 ++-- 5 files changed, 14 insertions(+), 14 deletions(-) rename include/{forum.php => Forum.php} (92%) diff --git a/include/forum.php b/include/Forum.php similarity index 92% rename from include/forum.php rename to include/Forum.php index 290f0134a1..847affa875 100644 --- a/include/forum.php +++ b/include/Forum.php @@ -8,7 +8,7 @@ /** * @brief This class handles functions related to the forum functionality */ -class forum { +class Forum { /** * @brief Function to list all forums a user is connected with @@ -27,7 +27,7 @@ class forum { * 'id' => number of the key from the array * 'micro' => contact photo in format micro */ - public static function get_forumlist($uid, $showhidden = true, $lastitem, $showprivate = false) { + public static function get_list($uid, $showhidden = true, $lastitem, $showprivate = false) { $forumlist = array(); @@ -72,7 +72,7 @@ class forum { * The contact id which is used to mark a forum as "selected" * @return string */ - public static function widget_forumlist($uid,$cid = 0) { + public static function widget($uid,$cid = 0) { if(! intval(feature_enabled(local_user(),'forumlist_widget'))) return; @@ -82,7 +82,7 @@ class forum { //sort by last updated item $lastitem = true; - $contacts = self::get_forumlist($uid,true,$lastitem, true); + $contacts = self::get_list($uid,true,$lastitem, true); $total = count($contacts); $visible_forums = 10; @@ -131,7 +131,7 @@ class forum { * @return string * */ - public static function forumlist_profile_advanced($uid) { + public static function profile_advanced($uid) { $profile = intval(feature_enabled($uid,'forumlist_profile')); if(! $profile) @@ -145,7 +145,7 @@ class forum { //don't sort by last updated item $lastitem = false; - $contacts = self::get_forumlist($uid,false,$lastitem,false); + $contacts = self::get_list($uid,false,$lastitem,false); $total_shown = 0; diff --git a/include/identity.php b/include/identity.php index 87c91e6dcc..a6932f0911 100644 --- a/include/identity.php +++ b/include/identity.php @@ -3,7 +3,7 @@ * @file include/identity.php */ -require_once('include/forum.php'); +require_once('include/Forum.php'); require_once('include/bbcode.php'); require_once("mod/proxy.php"); @@ -655,7 +655,7 @@ function advanced_profile(&$a) { //show subcribed forum if it is enabled in the usersettings if (feature_enabled($uid,'forumlist_profile')) { - $profile['forumlist'] = array( t('Forums:'), forum::forumlist_profile_advanced($uid)); + $profile['forumlist'] = array( t('Forums:'), Forum::profile_advanced($uid)); } if ($a->profile['uid'] == local_user()) diff --git a/mod/network.php b/mod/network.php index 151384cd67..b72d72d78f 100644 --- a/mod/network.php +++ b/mod/network.php @@ -114,7 +114,7 @@ function network_init(&$a) { require_once('include/group.php'); require_once('include/contact_widgets.php'); require_once('include/items.php'); - require_once('include/forum.php'); + require_once('include/Forum.php'); if(! x($a->page,'aside')) $a->page['aside'] = ''; @@ -148,7 +148,7 @@ function network_init(&$a) { } $a->page['aside'] .= (feature_enabled(local_user(),'groups') ? group_side('network/0','network','standard',$group_id) : ''); - $a->page['aside'] .= (feature_enabled(local_user(),'forumlist_widget') ? forum::widget_forumlist(local_user(),$cid) : ''); + $a->page['aside'] .= (feature_enabled(local_user(),'forumlist_widget') ? Forum::widget(local_user(),$cid) : ''); $a->page['aside'] .= posted_date_widget($a->get_baseurl() . '/network',local_user(),false); $a->page['aside'] .= networks_widget($a->get_baseurl(true) . '/network',(x($_GET, 'nets') ? $_GET['nets'] : '')); $a->page['aside'] .= saved_searches($search); diff --git a/mod/ping.php b/mod/ping.php index 3d34e2fe62..2abad13b0b 100644 --- a/mod/ping.php +++ b/mod/ping.php @@ -1,7 +1,7 @@ user['uid'],true,$lastitem, true); + $contacts = Forum::get_list($a->user['uid'],true,$lastitem, true); $total = count($contacts); $visible_forums = 10; From 52dbb0b4a2fd4aa4d747605e329002334a26dd72 Mon Sep 17 00:00:00 2001 From: rabuzarus <> Date: Thu, 4 Feb 2016 14:51:54 +0100 Subject: [PATCH 184/242] Forum class - rename Class CamelCase and rename some methods --- include/{Forum.php => ForumManager.php} | 2 +- include/identity.php | 4 ++-- mod/network.php | 4 ++-- mod/ping.php | 4 ++-- view/theme/vier/theme.php | 4 ++-- 5 files changed, 9 insertions(+), 9 deletions(-) rename include/{Forum.php => ForumManager.php} (99%) diff --git a/include/Forum.php b/include/ForumManager.php similarity index 99% rename from include/Forum.php rename to include/ForumManager.php index 847affa875..49417d1831 100644 --- a/include/Forum.php +++ b/include/ForumManager.php @@ -8,7 +8,7 @@ /** * @brief This class handles functions related to the forum functionality */ -class Forum { +class ForumManager { /** * @brief Function to list all forums a user is connected with diff --git a/include/identity.php b/include/identity.php index a6932f0911..ec66225d0f 100644 --- a/include/identity.php +++ b/include/identity.php @@ -3,7 +3,7 @@ * @file include/identity.php */ -require_once('include/Forum.php'); +require_once('include/ForumManager.php'); require_once('include/bbcode.php'); require_once("mod/proxy.php"); @@ -655,7 +655,7 @@ function advanced_profile(&$a) { //show subcribed forum if it is enabled in the usersettings if (feature_enabled($uid,'forumlist_profile')) { - $profile['forumlist'] = array( t('Forums:'), Forum::profile_advanced($uid)); + $profile['forumlist'] = array( t('Forums:'), ForumManager::profile_advanced($uid)); } if ($a->profile['uid'] == local_user()) diff --git a/mod/network.php b/mod/network.php index b72d72d78f..0010a3d824 100644 --- a/mod/network.php +++ b/mod/network.php @@ -114,7 +114,7 @@ function network_init(&$a) { require_once('include/group.php'); require_once('include/contact_widgets.php'); require_once('include/items.php'); - require_once('include/Forum.php'); + require_once('include/ForumManager.php'); if(! x($a->page,'aside')) $a->page['aside'] = ''; @@ -148,7 +148,7 @@ function network_init(&$a) { } $a->page['aside'] .= (feature_enabled(local_user(),'groups') ? group_side('network/0','network','standard',$group_id) : ''); - $a->page['aside'] .= (feature_enabled(local_user(),'forumlist_widget') ? Forum::widget(local_user(),$cid) : ''); + $a->page['aside'] .= (feature_enabled(local_user(),'forumlist_widget') ? ForumManager::widget(local_user(),$cid) : ''); $a->page['aside'] .= posted_date_widget($a->get_baseurl() . '/network',local_user(),false); $a->page['aside'] .= networks_widget($a->get_baseurl(true) . '/network',(x($_GET, 'nets') ? $_GET['nets'] : '')); $a->page['aside'] .= saved_searches($search); diff --git a/mod/ping.php b/mod/ping.php index 2abad13b0b..577a2c6c82 100644 --- a/mod/ping.php +++ b/mod/ping.php @@ -1,7 +1,7 @@ user['uid'],true,$lastitem, true); + $contacts = ForumManager::get_list($a->user['uid'],true,$lastitem, true); $total = count($contacts); $visible_forums = 10; From 0390001d4e9244f114e3021c6ae243cdd77d99c9 Mon Sep 17 00:00:00 2001 From: Michael Vogel Date: Thu, 4 Feb 2016 15:53:22 +0100 Subject: [PATCH 185/242] Added some more logging --- include/import-dfrn.php | 22 ++++++++++++++++------ 1 file changed, 16 insertions(+), 6 deletions(-) diff --git a/include/import-dfrn.php b/include/import-dfrn.php index 87b2273ef4..c4b3fed361 100644 --- a/include/import-dfrn.php +++ b/include/import-dfrn.php @@ -95,8 +95,6 @@ class dfrn2 { $author["avatar"] = current($avatarlist); } - //$onlyfetch = true; // Test - if ($r AND !$onlyfetch) { // When was the last change to name or uri? @@ -481,11 +479,13 @@ class dfrn2 { } private function update_content($current, $item, $importer, $entrytype) { + $changed = false; + if (edited_timestamp_is_newer($current, $item)) { // do not accept (ignore) an earlier edit than one we currently have. if(datetime_convert("UTC","UTC",$item["edited"]) < $current["edited"]) - return; + return(false); $r = q("UPDATE `item` SET `title` = '%s', `body` = '%s', `tag` = '%s', `edited` = '%s', `changed` = '%s' WHERE `uri` = '%s' AND `uid` = %d", dbesc($item["title"]), @@ -499,6 +499,8 @@ class dfrn2 { create_tags_from_itemuri($item["uri"], $importer["importer_uid"]); update_thread_uri($item["uri"], $importer["importer_uid"]); + $changed = true; + if ($entrytype == DFRN_REPLY_RC) proc_run("php", "include/notifier.php","comment-import", $current["id"]); } @@ -517,6 +519,7 @@ class dfrn2 { intval($importer["importer_uid"]) ); } + return $changed; } private function get_entry_type($importer, $item) { @@ -812,7 +815,8 @@ class dfrn2 { if(count($r)) $ev["id"] = $r[0]["id"]; $xyz = event_store($ev); - return; + logger("Event ".$ev["id"]." was stored", LOGGER_DEBUG); + return; } } } @@ -824,13 +828,18 @@ class dfrn2 { // Update content if 'updated' changes if(count($r)) { - self::update_content($r[0], $item, $importer, $entrytype); + if (self::update_content($r[0], $item, $importer, $entrytype)) + logger("Item ".$item["uri"]." was updated.", LOGGER_DEBUG); + else + logger("Item ".$item["uri"]." already existed.", LOGGER_DEBUG); return; } if (in_array($entrytype, array(DFRN_REPLY, DFRN_REPLY_RC))) { - if($importer["rel"] == CONTACT_IS_FOLLOWER) + if($importer["rel"] == CONTACT_IS_FOLLOWER) { + logger("Contact ".$importer["id"]." is only follower. Quitting", LOGGER_DEBUG); return; + } if(($item["verb"] === ACTIVITY_LIKE) || ($item["verb"] === ACTIVITY_DISLIKE) @@ -931,6 +940,7 @@ class dfrn2 { } } else { if(!link_compare($item["owner-link"],$importer["url"])) { + /// @todo Check if this is really used // The item owner info is not our contact. It's OK and is to be expected if this is a tgroup delivery, // but otherwise there's a possible data mixup on the sender's system. // the tgroup delivery code called from item_store will correct it if it's a forum, From 12c6ba9081e05ecb2b9ebcbb16aeb0b7dfc0eb55 Mon Sep 17 00:00:00 2001 From: rabuzarus <> Date: Thu, 4 Feb 2016 16:21:40 +0100 Subject: [PATCH 186/242] vier: remove some hardcoded css to be more mobile friendly --- view/theme/vier/style.css | 67 +++++++++++---------------------------- 1 file changed, 19 insertions(+), 48 deletions(-) diff --git a/view/theme/vier/style.css b/view/theme/vier/style.css index 7d7e2683a4..8c03277976 100644 --- a/view/theme/vier/style.css +++ b/view/theme/vier/style.css @@ -1583,63 +1583,34 @@ section.minimal { width: calc(100% - 165px); } -.wall-item-container.comment .wall-item-content { - max-width: 585px; -} -.wall-item-container.thread_level_3 .wall-item-content { - max-width: 570px; -} -.wall-item-container.thread_level_4 .wall-item-content { - max-width: 555px; -} -.wall-item-container.thread_level_5 .wall-item-content { - max-width: 540px; -} -.wall-item-container.thread_level_6 .wall-item-content { - max-width: 525px; -} +.wall-item-container.comment .wall-item-content, +.wall-item-container.thread_level_3 .wall-item-content, +.wall-item-container.thread_level_4 .wall-item-content, +.wall-item-container.thread_level_5 .wall-item-content, +.wall-item-container.thread_level_6 .wall-item-content, .wall-item-container.thread_level_7 .wall-item-content { - max-width: 510px; + max-width: calc(100% - 1px); } -.children .wall-item-comment-wrapper textarea { - width: 570px; -} -.wall-item-container.thread_level_3 .wall-item-comment-wrapper textarea { - width: 555px; -} -.wall-item-container.thread_level_4 .wall-item-comment-wrapper textarea { - width: 540px; -} -.wall-item-container.thread_level_5 .wall-item-comment-wrapper textarea { - width: 525px; -} -.wall-item-container.thread_level_6 .wall-item-comment-wrapper textarea { - width: 510px; -} +.children .wall-item-comment-wrapper textarea, +.wall-item-container.thread_level_3 .wall-item-comment-wrapper textarea, +.wall-item-container.thread_level_4 .wall-item-comment-wrapper textarea, +.wall-item-container.thread_level_5 .wall-item-comment-wrapper textarea, +.wall-item-container.thread_level_6 .wall-item-comment-wrapper textarea, .wall-item-container.thread_level_7 .wall-item-comment-wrapper textarea { - width: 495px; + width: calc(100% - 11px); } -.children .wall-item-bottom .comment-edit-preview { - width: 575px; -} -.wall-item-container.thread_level_3 .wall-item-bottom .comment-edit-preview { - width: 560px; -} -.wall-item-container.thread_level_4 .wall-item-bottom .comment-edit-preview { - width: 545px; -} -.wall-item-container.thread_level_5 .wall-item-bottom .comment-edit-preview { - width: 530px; -} -.wall-item-container.thread_level_6 .wall-item-bottom .comment-edit-preview { - width: 515px; -} +.children .wall-item-bottom .comment-edit-preview, +.wall-item-container.thread_level_3 .wall-item-bottom .comment-edit-preview, +.wall-item-container.thread_level_4 .wall-item-bottom .comment-edit-preview, +.wall-item-container.thread_level_5 .wall-item-bottom .comment-edit-preview, +.wall-item-container.thread_level_6 .wall-item-bottom .comment-edit-preview, .wall-item-container.thread_level_7 .wall-item-bottom .comment-edit-preview { - width: 500px; + width: calc(100% - 6px); } + .wall-item-container.comment .contact-photo { width: 32px; height: 32px; From a75be65860391ea81e91ba28d2b4047c8b3bcc02 Mon Sep 17 00:00:00 2001 From: rabuzarus <> Date: Thu, 4 Feb 2016 16:45:39 +0100 Subject: [PATCH 187/242] vier: little float fix --- view/theme/vier/style.css | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/view/theme/vier/style.css b/view/theme/vier/style.css index 8c03277976..39d2af680b 100644 --- a/view/theme/vier/style.css +++ b/view/theme/vier/style.css @@ -1042,6 +1042,9 @@ aside { box-shadow: 1px 2px 0px 0px #D8D8D8; color: #737373; } +aside .vcard .tool { + clear: both; +} aside .vcard .fn { font-size: 18px; font-weight: bold; @@ -1050,7 +1053,6 @@ aside .vcard .fn { } aside .vcard .title { margin-bottom: 5px; - float: left; } aside .vcard dl { height: auto; From b85369a03bcc10c8f6860be11e129c03dd49c141 Mon Sep 17 00:00:00 2001 From: Michael Vogel Date: Thu, 4 Feb 2016 18:58:33 +0100 Subject: [PATCH 188/242] Vier: The font "system" can make the system look ugly --- view/theme/vier/style.css | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/view/theme/vier/style.css b/view/theme/vier/style.css index e0abee837c..7d56f6c402 100644 --- a/view/theme/vier/style.css +++ b/view/theme/vier/style.css @@ -269,7 +269,7 @@ div.pager { /* global */ body { /* font-family: "Helvetica Neue", Helvetica, Arial, sans-serif; */ - font-family: system,-apple-system,".SFNSText-Regular","San Francisco","Roboto","Segoe UI","Helvetica Neue","Lucida Grande",Helvetica,Arial,sans-serif; + font-family: -apple-system,".SFNSText-Regular","San Francisco","Roboto","Segoe UI","Helvetica Neue","Lucida Grande",Helvetica,Arial,sans-serif; font-size: 14px; /* font-size: 13px; line-height: 19.5px; */ From acefb846810434a77335862bfb9bd1294c079a9c Mon Sep 17 00:00:00 2001 From: Andrej Stieben Date: Thu, 4 Feb 2016 19:37:06 +0100 Subject: [PATCH 189/242] Improved documentation formatting (of Plugins.md) --- doc/Plugins.md | 101 +++++++++++++++++++++++----------------------- doc/de/Plugins.md | 75 ++++++++++++++++++---------------- 2 files changed, 92 insertions(+), 84 deletions(-) diff --git a/doc/Plugins.md b/doc/Plugins.md index 24d403e1f6..a30a3f4a71 100644 --- a/doc/Plugins.md +++ b/doc/Plugins.md @@ -1,5 +1,7 @@ Friendica Addon/Plugin development -========================== +============== + +* [Home](help) Please see the sample addon 'randplace' for a working example of using some of these features. Addons work by intercepting event hooks - which must be registered. @@ -16,12 +18,12 @@ Future extensions may provide for "setup" amd "remove". Plugins should contain a comment block with the four following parameters: - /* - * Name: My Great Plugin - * Description: This is what my plugin does. It's really cool - * Version: 1.0 - * Author: John Q. Public - */ + /* + * Name: My Great Plugin + * Description: This is what my plugin does. It's really cool. + * Version: 1.0 + * Author: John Q. Public + */ Register your plugin hooks during installation. @@ -45,7 +47,7 @@ Your hook callback functions will be called with at least one and possibly two a If you wish to make changes to the calling data, you must declare them as reference variables (with '&') during function declaration. -###$a +#### $a $a is the Friendica 'App' class. It contains a wealth of information about the current state of Friendica: @@ -56,13 +58,13 @@ It contains a wealth of information about the current state of Friendica: It is recommeded you call this '$a' to match its usage elsewhere. -###$b +#### $b $b can be called anything you like. This is information specific to the hook currently being processed, and generally contains information that is being immediately processed or acted on that you can use, display, or alter. Remember to declare it with '&' if you wish to alter it. Modules --------- +--- Plugins/addons may also act as "modules" and intercept all page requests for a given URL path. In order for a plugin to act as a module it needs to define a function "plugin_name_module()" which takes no arguments and needs not do anything. @@ -72,15 +74,15 @@ These are parsed into an array $a->argv, with a corresponding $a->argc indicatin So http://my.web.site/plugin/arg1/arg2 would look for a module named "plugin" and pass its module functions the $a App structure (which is available to many components). This will include: - $a->argc = 3 - $a->argv = array(0 => 'plugin', 1 => 'arg1', 2 => 'arg2'); + $a->argc = 3 + $a->argv = array(0 => 'plugin', 1 => 'arg1', 2 => 'arg2'); Your module functions will often contain the function plugin_name_content(&$a), which defines and returns the page body content. They may also contain plugin_name_post(&$a) which is called before the _content function and typically handles the results of POST forms. You may also have plugin_name_init(&$a) which is called very early on and often does module initialisation. Templates ----------- +--- If your plugin needs some template, you can use the Friendica template system. Friendica uses [smarty3](http://www.smarty.net/) as a template engine. @@ -104,140 +106,140 @@ See also the wiki page [Quick Template Guide](https://github.com/friendica/frien Current hooks ------------- -###'authenticate' +### 'authenticate' 'authenticate' is called when a user attempts to login. $b is an array containing: - 'username' => the supplied username - 'password' => the supplied password + 'username' => the supplied username + 'password' => the supplied password 'authenticated' => set this to non-zero to authenticate the user. 'user_record' => successful authentication must also return a valid user record from the database -###'logged_in' +### 'logged_in' 'logged_in' is called after a user has successfully logged in. $b contains the $a->user array. -###'display_item' +### 'display_item' 'display_item' is called when formatting a post for display. $b is an array: 'item' => The item (array) details pulled from the database 'output' => the (string) HTML representation of this item prior to adding it to the page -###'post_local' +### 'post_local' * called when a status post or comment is entered on the local system * $b is the item array of the information to be stored in the database * Please note: body contents are bbcode - not HTML -###'post_local_end' +### 'post_local_end' * called when a local status post or comment has been stored on the local system * $b is the item array of the information which has just been stored in the database * Please note: body contents are bbcode - not HTML -###'post_remote' +### 'post_remote' * called when receiving a post from another source. This may also be used to post local activity or system generated messages. * $b is the item array of information to be stored in the database and the item body is bbcode. -###'settings_form' +### 'settings_form' * called when generating the HTML for the user Settings page * $b is the (string) HTML of the settings page before the final '' tag. -###'settings_post' +### 'settings_post' * called when the Settings pages are submitted * $b is the $_POST array -###'plugin_settings' +### 'plugin_settings' * called when generating the HTML for the addon settings page * $b is the (string) HTML of the addon settings page before the final '' tag. -###'plugin_settings_post' +### 'plugin_settings_post' * called when the Addon Settings pages are submitted * $b is the $_POST array -###'profile_post' +### 'profile_post' * called when posting a profile page * $b is the $_POST array -###'profile_edit' +### 'profile_edit' 'profile_edit' is called prior to output of profile edit page. $b is an array containing: 'profile' => profile (array) record from the database 'entry' => the (string) HTML of the generated entry -###'profile_advanced' +### 'profile_advanced' * called when the HTML is generated for the 'Advanced profile', corresponding to the 'Profile' tab within a person's profile page * $b is the (string) HTML representation of the generated profile * The profile array details are in $a->profile. -###'directory_item' +### 'directory_item' 'directory_item' is called from the Directory page when formatting an item for display. $b is an array: 'contact' => contact (array) record for the person from the database 'entry' => the (string) HTML of the generated entry -###'profile_sidebar_enter' +### 'profile_sidebar_enter' * called prior to generating the sidebar "short" profile for a page * $b is the person's profile array -###'profile_sidebar' +### 'profile_sidebar' 'profile_sidebar is called when generating the sidebar "short" profile for a page. $b is an array: 'profile' => profile (array) record for the person from the database 'entry' => the (string) HTML of the generated entry -###'contact_block_end' +### 'contact_block_end' is called when formatting the block of contacts/friends on a profile sidebar has completed. $b is an array: 'contacts' => array of contacts 'output' => the (string) generated HTML of the contact block -###'bbcode' +### 'bbcode' * called during conversion of bbcode to html * $b is a string converted text -###'html2bbcode' +### 'html2bbcode' * called during conversion of html to bbcode (e.g. remote message posting) * $b is a string converted text -###'page_header' +### 'page_header' * called after building the page navigation section * $b is a string HTML of nav region -###'personal_xrd' +### 'personal_xrd' 'personal_xrd' is called prior to output of personal XRD file. $b is an array: 'user' => the user record for the person 'xml' => the complete XML to be output -###'home_content' +### 'home_content' * called prior to output home page content, shown to unlogged users * $b is (string) HTML of section region -###'contact_edit' +### 'contact_edit' is called when editing contact details on an individual from the Contacts page. $b is an array: 'contact' => contact record (array) of target contact 'output' => the (string) generated HTML of the contact edit page -###'contact_edit_post' +### 'contact_edit_post' * called when posting the contact edit page. * $b is the $_POST array -###'init_1' +### 'init_1' * called just after DB has been opened and before session start * $b is not used or passed -###'page_end' +### 'page_end' * called after HTML content functions have completed * $b is (string) HTML of content div -###'avatar_lookup' +### 'avatar_lookup' 'avatar_lookup' is called when looking up the avatar. $b is an array: @@ -245,11 +247,11 @@ $b is an array: 'email' => email to look up the avatar for 'url' => the (string) generated URL of the avatar -###'emailer_send_prepare' +### 'emailer_send_prepare' 'emailer_send_prepare' called from Emailer::send() before building the mime message. $b is an array, params to Emailer::send() - 'fromName' => name of the sender + 'fromName' => name of the sender 'fromEmail' => email fo the sender 'replyTo' => replyTo address to direct responses 'toEmail' => destination email address @@ -258,20 +260,20 @@ $b is an array, params to Emailer::send() 'textVersion' => text only version of the message 'additionalMailHeader' => additions to the smtp mail header -###'emailer_send' +### 'emailer_send' is called before calling PHP's mail(). $b is an array, params to mail() - 'to' - 'subject' + 'to' + 'subject' 'body' 'headers' -###'nav_info' +### 'nav_info' is called after the navigational menu is build in include/nav.php. $b is an array containing $nav from nav.php. -###'template_vars' +### 'template_vars' is called before vars are passed to the template engine to render the page. The registered function can add,change or remove variables passed to template. $b is an array with: @@ -463,4 +465,3 @@ mod/cb.php: call_hooks('cb_afterpost'); mod/cb.php: call_hooks('cb_content', $o); mod/directory.php: call_hooks('directory_item', $arr); - diff --git a/doc/de/Plugins.md b/doc/de/Plugins.md index dcff41a4b6..11113843bb 100644 --- a/doc/de/Plugins.md +++ b/doc/de/Plugins.md @@ -1,27 +1,27 @@ -**Friendica Addon/Plugin-Entwicklung** +Friendica Addon/Plugin-Entwicklung ============== * [Zur Startseite der Hilfe](help) -Bitte schau dir das Beispiel-Addon "randplace" für ein funktionierendes Beispiel für manche der hier aufgeführten Funktionen an. -Das Facebook-Addon bietet ein Beispiel dafür, die "addon"- und "module"-Funktion gemeinsam zu integrieren. -Addons arbeiten, indem sie Event Hooks abfangen. Module arbeiten, indem bestimmte Seitenanfragen (durch den URL-Pfad) abgefangen werden +Bitte schau dir das Beispiel-Addon "randplace" für ein funktionierendes Beispiel für manche der hier aufgeführten Funktionen an. +Das Facebook-Addon bietet ein Beispiel dafür, die "addon"- und "module"-Funktion gemeinsam zu integrieren. +Addons arbeiten, indem sie Event Hooks abfangen. Module arbeiten, indem bestimmte Seitenanfragen (durch den URL-Pfad) abgefangen werden -Plugin-Namen können keine Leerstellen oder andere Interpunktionen enthalten und werden als Datei- und Funktionsnamen genutzt. -Du kannst einen lesbaren Namen im Kommentarblock eintragen. -Jedes Addon muss beides beinhalten - eine Installations- und eine Deinstallationsfunktion, die auf dem Addon-/Plugin-Namen basieren; z.B. "plugin1name_install()". -Diese beiden Funktionen haben keine Argumente und sind dafür verantwortlich, Event Hooks zu registrieren und abzumelden (unregistering), die dein Plugin benötigt. -Die Installations- und Deinstallationsfunktionfunktionen werden auch ausgeführt (z.B. neu installiert), wenn sich das Plugin nach der Installation ändert - somit sollte deine Deinstallationsfunktion keine Daten zerstört und deine Installationsfunktion sollte bestehende Daten berücksichtigen. +Plugin-Namen können keine Leerstellen oder andere Interpunktionen enthalten und werden als Datei- und Funktionsnamen genutzt. +Du kannst einen lesbaren Namen im Kommentarblock eintragen. +Jedes Addon muss beides beinhalten - eine Installations- und eine Deinstallationsfunktion, die auf dem Addon-/Plugin-Namen basieren; z.B. "plugin1name_install()". +Diese beiden Funktionen haben keine Argumente und sind dafür verantwortlich, Event Hooks zu registrieren und abzumelden (unregistering), die dein Plugin benötigt. +Die Installations- und Deinstallationsfunktionfunktionen werden auch ausgeführt (z.B. neu installiert), wenn sich das Plugin nach der Installation ändert - somit sollte deine Deinstallationsfunktion keine Daten zerstört und deine Installationsfunktion sollte bestehende Daten berücksichtigen. Zukünftige Extensions werden möglicherweise "Setup" und "Entfernen" anbieten. Plugins sollten einen Kommentarblock mit den folgenden vier Parametern enthalten: - /* - * Name: My Great Plugin - * Description: This is what my plugin does. It's really cool - * Version: 1.0 - * Author: John Q. Public - */ + /* + * Name: My Great Plugin + * Description: This is what my plugin does. It's really cool + * Version: 1.0 + * Author: John Q. Public + */ Registriere deine Plugin-Hooks während der Installation. @@ -29,45 +29,50 @@ Registriere deine Plugin-Hooks während der Installation. $hookname ist ein String und entspricht einem bekannten Friendica-Hook. -$file steht für den Pfadnamen, der relativ zum Top-Level-Friendicaverzeichnis liegt. +$file steht für den Pfadnamen, der relativ zum Top-Level-Friendicaverzeichnis liegt. Das *sollte* "addon/plugin_name/plugin_name.php' sein. $function ist ein String und der Name der Funktion, die ausgeführt wird, wenn der Hook aufgerufen wird. +Argumente +--- + Deine Hook-Callback-Funktion wird mit mindestens einem und bis zu zwei Argumenten aufgerufen function myhook_function(&$a, &$b) { } -Wenn du Änderungen an den aufgerufenen Daten vornehmen willst, musst du diese als Referenzvariable (mit "&") während der Funktionsdeklaration deklarieren. +Wenn du Änderungen an den aufgerufenen Daten vornehmen willst, musst du diese als Referenzvariable (mit "&") während der Funktionsdeklaration deklarieren. -$a ist die Friendica "App"-Klasse, die eine Menge an Informationen über den aktuellen Friendica-Status beinhaltet, u.a. welche Module genutzt werden, Konfigurationsinformationen, Inhalte der Seite zum Zeitpunkt des Hook-Aufrufs. -Es ist empfohlen, diese Funktion "$a" zu nennen, um seine Nutzung an den Gebrauch an anderer Stelle anzugleichen. +$a ist die Friendica "App"-Klasse, die eine Menge an Informationen über den aktuellen Friendica-Status beinhaltet, u.a. welche Module genutzt werden, Konfigurationsinformationen, Inhalte der Seite zum Zeitpunkt des Hook-Aufrufs. +Es ist empfohlen, diese Funktion "$a" zu nennen, um seine Nutzung an den Gebrauch an anderer Stelle anzugleichen. -$b kann frei benannt werden. -Diese Information ist speziell auf den Hook bezogen, der aktuell bearbeitet wird, und beinhaltet normalerweise Daten, die du sofort nutzen, anzeigen oder bearbeiten kannst. -Achte darauf, diese mit "&" zu deklarieren, wenn du sie bearbeiten willst. +$b kann frei benannt werden. +Diese Information ist speziell auf den Hook bezogen, der aktuell bearbeitet wird, und beinhaltet normalerweise Daten, die du sofort nutzen, anzeigen oder bearbeiten kannst. +Achte darauf, diese mit "&" zu deklarieren, wenn du sie bearbeiten willst. -**Module** +Module +--- -Plugins/Addons können auch als "Module" agieren und alle Seitenanfragen für eine bestimte URL abfangen. -Um ein Plugin als Modul zu nutzen, ist es nötig, die Funktion "plugin_name_module()" zu definieren, die keine Argumente benötigt und nichts weiter machen muss. +Plugins/Addons können auch als "Module" agieren und alle Seitenanfragen für eine bestimte URL abfangen. +Um ein Plugin als Modul zu nutzen, ist es nötig, die Funktion "plugin_name_module()" zu definieren, die keine Argumente benötigt und nichts weiter machen muss. -Wenn diese Funktion existiert, wirst du nun alle Seitenanfragen für "http://my.web.site/plugin_name" erhalten - mit allen URL-Komponenten als zusätzliche Argumente. -Diese werden in ein Array $a->argv geparst und stimmen mit $a->argc überein, wobei sie die Anzahl der URL-Komponenten abbilden. +Wenn diese Funktion existiert, wirst du nun alle Seitenanfragen für "http://my.web.site/plugin_name" erhalten - mit allen URL-Komponenten als zusätzliche Argumente. +Diese werden in ein Array $a->argv geparst und stimmen mit $a->argc überein, wobei sie die Anzahl der URL-Komponenten abbilden. So würde http://my.web.site/plugin/arg1/arg2 nach einem Modul "plugin" suchen und seiner Modulfunktion die $a-App-Strukur übergeben (dies ist für viele Komponenten verfügbar). Das umfasst: - $a->argc = 3 - $a->argv = array(0 => 'plugin', 1 => 'arg1', 2 => 'arg2'); + $a->argc = 3 + $a->argv = array(0 => 'plugin', 1 => 'arg1', 2 => 'arg2'); -Deine Modulfunktionen umfassen oft die Funktion plugin_name_content(&$a), welche den Seiteninhalt definiert und zurückgibt. -Sie können auch plugin_name_post(&$a) umfassen, welches vor der content-Funktion aufgerufen wird und normalerweise die Resultate der POST-Formulare handhabt. +Deine Modulfunktionen umfassen oft die Funktion plugin_name_content(&$a), welche den Seiteninhalt definiert und zurückgibt. +Sie können auch plugin_name_post(&$a) umfassen, welches vor der content-Funktion aufgerufen wird und normalerweise die Resultate der POST-Formulare handhabt. Du kannst ebenso plugin_name_init(&$a) nutzen, was oft frühzeitig aufgerufen wird und das Modul initialisert. -**Derzeitige Hooks:** +Derzeitige Hooks +--- **'authenticate'** - wird aufgerufen, wenn sich der User einloggt. $b ist ein Array @@ -180,6 +185,9 @@ Du kannst ebenso plugin_name_init(&$a) nutzen, was oft frühzeitig aufgerufen wi - wird aufgerufen nachdem in include/nav,php der Inhalt des Navigations Menüs erzeugt wurde. - $b ist ein Array, das $nav wiederspiegelt. +Komplette Liste der Hook-Callbacks +--- + Eine komplette Liste aller Hook-Callbacks mit den zugehörigen Dateien (am 14-Feb-2012 generiert): Bitte schau in die Quellcodes für Details zu Hooks, die oben nicht dokumentiert sind. boot.php: call_hooks('login_hook',$o); @@ -204,7 +212,7 @@ include/text.php: call_hooks('contact_block_end', $arr); include/text.php: call_hooks('smilie', $s); -include/text.php: call_hooks('prepare_body_init', $item); +include/text.php: call_hooks('prepare_body_init', $item); include/text.php: call_hooks('prepare_body', $prep_arr); @@ -359,4 +367,3 @@ mod/cb.php: call_hooks('cb_afterpost'); mod/cb.php: call_hooks('cb_content', $o); mod/directory.php: call_hooks('directory_item', $arr); - From 92a31344b5e8e0c01aec325874a86808f7bba8e5 Mon Sep 17 00:00:00 2001 From: Michael Vogel Date: Thu, 4 Feb 2016 20:34:18 +0100 Subject: [PATCH 190/242] Events do work now. --- include/import-dfrn.php | 20 +++++++++++++++----- 1 file changed, 15 insertions(+), 5 deletions(-) diff --git a/include/import-dfrn.php b/include/import-dfrn.php index c4b3fed361..edbbde98a0 100644 --- a/include/import-dfrn.php +++ b/include/import-dfrn.php @@ -5,6 +5,7 @@ require_once("include/socgraph.php"); require_once("include/items.php"); require_once("include/tags.php"); require_once("include/files.php"); +require_once("include/event.php"); class dfrn2 { @@ -702,6 +703,12 @@ class dfrn2 { $object = $xpath->query("activity:object", $entry)->item(0); $item["object"] = self::transform_activity($xpath, $object, "object"); + if (trim($item["object"]) != "") { + $r = parse_xml_string($item["object"], false); + if (isset($r->type)) + $item["object-type"] = $r->type; + } + $target = $xpath->query("activity:target", $entry)->item(0); $item["target"] = self::transform_activity($xpath, $target, "target"); @@ -790,7 +797,7 @@ class dfrn2 { if ($entrytype == DFRN_REPLY_RC) { $item["type"] = "remote-comment"; $item["wall"] = 1; - } else { + } elseif ($entrytype == DFRN_TOP_LEVEL) { // The Diaspora signature is only stored in replies // Since this isn't a field in the item table this would create a bug when inserting this in the item table unset($item["dsprsig"]); @@ -798,9 +805,11 @@ class dfrn2 { if (!isset($item["object-type"])) $item["object-type"] = ACTIVITY_OBJ_NOTE; - if ($item["object-type"] === ACTIVITY_OBJ_EVENT) { + if ($item["object-type"] == ACTIVITY_OBJ_EVENT) { + logger("Item ".$item["uri"]." seems to contain an event.", LOGGER_DEBUG); $ev = bbtoevent($item["body"]); if((x($ev, "desc") || x($ev, "summary")) && x($ev, "start")) { + logger("Event in item ".$item["uri"]." was found.", LOGGER_DEBUG); $ev["cid"] = $importer["id"]; $ev["uid"] = $importer["uid"]; $ev["uri"] = $item["uri"]; @@ -814,9 +823,10 @@ class dfrn2 { ); if(count($r)) $ev["id"] = $r[0]["id"]; - $xyz = event_store($ev); - logger("Event ".$ev["id"]." was stored", LOGGER_DEBUG); - return; + + $event_id = event_store($ev); + logger("Event ".$event_id." was stored", LOGGER_DEBUG); + return; } } } From 48e6ff21aa50b428a970c53f1f6618c4794fa043 Mon Sep 17 00:00:00 2001 From: Andrej Stieben Date: Thu, 4 Feb 2016 21:45:21 +0100 Subject: [PATCH 191/242] Added the possibility for themes to override core module functions --- doc/themes.md | 16 ++++++++++++++-- index.php | 11 ++++++++++- 2 files changed, 24 insertions(+), 3 deletions(-) diff --git a/doc/themes.md b/doc/themes.md index add44c776b..ec3a76ac28 100644 --- a/doc/themes.md +++ b/doc/themes.md @@ -59,7 +59,19 @@ The same rule applies to the JavaScript files found in they will be overwritten by files in - /view/theme/**your-theme-name**/js. + /view/theme/**your-theme-name**/js + +### Modules + +You have the freedom to override core modules found in + + /mod + +They will be overwritten by files in + + /view/theme/**your-theme-name**/mod + +Be aware that you can break things easily here if you don't know what you do. Also notice that you can override parts of the module – functions not defined in your theme module will be loaded from the core module. ## Expand an existing Theme @@ -288,4 +300,4 @@ The default file is in /view/default.php if you want to change it, say adding a 4th column for banners of your favourite FLOSS projects, place a new default.php file in your theme directory. -As with the theme.php file, you can use the properties of the $a variable with holds the friendica application to decide what content is displayed. \ No newline at end of file +As with the theme.php file, you can use the properties of the $a variable with holds the friendica application to decide what content is displayed. diff --git a/index.php b/index.php index bf926d1fe7..2b1053cc1b 100644 --- a/index.php +++ b/index.php @@ -233,7 +233,16 @@ if(strlen($a->module)) { } /** - * If not, next look for a 'standard' program module in the 'mod' directory + * If not, next look for module overrides by the theme + */ + + if((! $a->module_loaded) && (file_exists("view/theme/" . current_theme() . "/mod/{$a->module}.php"))) { + include_once("view/theme/" . current_theme() . "/mod/{$a->module}.php"); + // We will not set module_loaded to true to allow for partial overrides. + } + + /** + * Finally, look for a 'standard' program module in the 'mod' directory */ if((! $a->module_loaded) && (file_exists("mod/{$a->module}.php"))) { From 2bd36e562889803841588a276232ef5fa819730a Mon Sep 17 00:00:00 2001 From: Michael Vogel Date: Thu, 4 Feb 2016 23:52:06 +0100 Subject: [PATCH 192/242] Feed should work now as well --- include/import-dfrn.php | 25 +++++++++++++++++++++---- include/items.php | 9 ++++----- 2 files changed, 25 insertions(+), 9 deletions(-) diff --git a/include/import-dfrn.php b/include/import-dfrn.php index edbbde98a0..72d507bbf1 100644 --- a/include/import-dfrn.php +++ b/include/import-dfrn.php @@ -961,8 +961,10 @@ class dfrn2 { $item["owner-avatar"] = $importer["thumb"]; } - if(($importer["rel"] == CONTACT_IS_FOLLOWER) && (!tgroup_check($importer["importer_uid"], $item))) + if(($importer["rel"] == CONTACT_IS_FOLLOWER) && (!tgroup_check($importer["importer_uid"], $item))) { + logger("Contact ".$importer["id"]." is only follower and tgroup check was negative.", LOGGER_DEBUG); return; + } // This is my contact on another system, but it's really me. // Turn this into a wall post. @@ -1183,9 +1185,24 @@ class dfrn2 { foreach ($deletions AS $deletion) self::process_deletion($header, $xpath, $deletion, $importer); - $entries = $xpath->query("/atom:feed/atom:entry"); - foreach ($entries AS $entry) - self::process_entry($header, $xpath, $entry, $importer); + if (!$sort_by_date) { + $entries = $xpath->query("/atom:feed/atom:entry"); + foreach ($entries AS $entry) + self::process_entry($header, $xpath, $entry, $importer); + } else { + $newentries = array(); + $entries = $xpath->query("/atom:feed/atom:entry"); + foreach ($entries AS $entry) { + $created = $xpath->query("atom:published/text()", $entry)->item(0)->nodeValue; + $newentries[strtotime($created)] = $entry; + } + + // Now sort after the publishing date + ksort($newentries); + + foreach ($newentries AS $entry) + self::process_entry($header, $xpath, $entry, $importer); + } } } ?> diff --git a/include/items.php b/include/items.php index 0ec645cc7a..52a1071f2d 100644 --- a/include/items.php +++ b/include/items.php @@ -1695,11 +1695,9 @@ function consume_feed($xml,$importer,&$contact, &$hub, $datedir = 0, $pass = 0) } return; } - // dfrn-test -/* + if ($contact['network'] === NETWORK_DFRN) { logger("Consume DFRN messages", LOGGER_DEBUG); - logger("dfrn-test"); $r = q("SELECT `contact`.*, `contact`.`uid` AS `importer_uid`, `contact`.`pubkey` AS `cpubkey`, @@ -1711,14 +1709,15 @@ function consume_feed($xml,$importer,&$contact, &$hub, $datedir = 0, $pass = 0) FROM `contact` LEFT JOIN `user` ON `contact`.`uid` = `user`.`uid` WHERE `contact`.`id` = %d AND `user`.`uid` = %d", - dbesc($contact["id"], $importer["uid"]); + dbesc($contact["id"]), dbesc($importer["uid"]) ); if ($r) { + logger("Now import the DFRN feed"); dfrn2::import($xml,$r[0], true); return; } } -*/ + // Test - remove before flight //if ($pass < 2) { // $tempfile = tempnam(get_temppath(), "dfrn-consume-"); From e2a8146307123f638d035d6c34bde16c96444e88 Mon Sep 17 00:00:00 2001 From: Michael Vogel Date: Fri, 5 Feb 2016 09:03:17 +0100 Subject: [PATCH 193/242] Added some to-do points --- include/import-dfrn.php | 31 ++++++++++++++++++++++++++----- 1 file changed, 26 insertions(+), 5 deletions(-) diff --git a/include/import-dfrn.php b/include/import-dfrn.php index 72d507bbf1..244018887b 100644 --- a/include/import-dfrn.php +++ b/include/import-dfrn.php @@ -829,6 +829,26 @@ class dfrn2 { return; } } +/* + if(activity_match($item['verb'],ACTIVITY_FOLLOW)) { + logger('consume-feed: New follower'); + new_follower($importer,$contact,$item); + return; + } + if(activity_match($item['verb'],ACTIVITY_UNFOLLOW)) { + lose_follower($importer,$contact,$item); + return; + } + if(activity_match($item['verb'],ACTIVITY_REQ_FRIEND)) { + logger('consume-feed: New friend request'); + new_follower($importer,$contact,$item,(?),true); + return; + } + if(activity_match($item['verb'],ACTIVITY_UNFRIEND)) { + lose_sharer($importer,$contact,$item); + return; + } +*/ } $r = q("SELECT `id`, `uid`, `last-child`, `edited`, `body` FROM `item` WHERE `uri` = '%s' AND `uid` = %d LIMIT 1", @@ -1125,11 +1145,11 @@ class dfrn2 { return; if($importer["readonly"]) { - // We aren't receiving stuff from this person. But we will quietly ignore them - // rather than a blatant "go away" message. - logger('ignoring contact '.$importer["id"]); - return; - } + // We aren't receiving stuff from this person. But we will quietly ignore them + // rather than a blatant "go away" message. + logger('ignoring contact '.$importer["id"]); + return; + } $doc = new DOMDocument(); @$doc->loadXML($xml); @@ -1163,6 +1183,7 @@ class dfrn2 { // is it a public forum? Private forums aren't supported by now with this method $forum = intval($xpath->evaluate("/atom:feed/dfrn:community/text()", $context)->item(0)->nodeValue); + /// @todo Check the opposite as well (forum changed to non-forum) if ($forum) q("UPDATE `contact` SET `forum` = %d WHERE `forum` != %d AND `id` = %d", intval($forum), intval($forum), From a81d929cdf223ac0ecf5407a3696db788cd705c4 Mon Sep 17 00:00:00 2001 From: Andrej Stieben Date: Fri, 5 Feb 2016 14:11:10 +0100 Subject: [PATCH 194/242] Minor documentation update, as requested by @tobiasd --- doc/de/Plugins.md | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) diff --git a/doc/de/Plugins.md b/doc/de/Plugins.md index 11113843bb..40be4a0695 100644 --- a/doc/de/Plugins.md +++ b/doc/de/Plugins.md @@ -5,7 +5,8 @@ Friendica Addon/Plugin-Entwicklung Bitte schau dir das Beispiel-Addon "randplace" für ein funktionierendes Beispiel für manche der hier aufgeführten Funktionen an. Das Facebook-Addon bietet ein Beispiel dafür, die "addon"- und "module"-Funktion gemeinsam zu integrieren. -Addons arbeiten, indem sie Event Hooks abfangen. Module arbeiten, indem bestimmte Seitenanfragen (durch den URL-Pfad) abgefangen werden +Addons arbeiten, indem sie Event Hooks abfangen. +Module arbeiten, indem bestimmte Seitenanfragen (durch den URL-Pfad) abgefangen werden. Plugin-Namen können keine Leerstellen oder andere Interpunktionen enthalten und werden als Datei- und Funktionsnamen genutzt. Du kannst einen lesbaren Namen im Kommentarblock eintragen. @@ -18,7 +19,7 @@ Plugins sollten einen Kommentarblock mit den folgenden vier Parametern enthalten /* * Name: My Great Plugin - * Description: This is what my plugin does. It's really cool + * Description: This is what my plugin does. It's really cool. * Version: 1.0 * Author: John Q. Public */ @@ -59,9 +60,9 @@ Module Plugins/Addons können auch als "Module" agieren und alle Seitenanfragen für eine bestimte URL abfangen. Um ein Plugin als Modul zu nutzen, ist es nötig, die Funktion "plugin_name_module()" zu definieren, die keine Argumente benötigt und nichts weiter machen muss. -Wenn diese Funktion existiert, wirst du nun alle Seitenanfragen für "http://my.web.site/plugin_name" erhalten - mit allen URL-Komponenten als zusätzliche Argumente. +Wenn diese Funktion existiert, wirst du nun alle Seitenanfragen für "http://example.com/plugin_name" erhalten - mit allen URL-Komponenten als zusätzliche Argumente. Diese werden in ein Array $a->argv geparst und stimmen mit $a->argc überein, wobei sie die Anzahl der URL-Komponenten abbilden. -So würde http://my.web.site/plugin/arg1/arg2 nach einem Modul "plugin" suchen und seiner Modulfunktion die $a-App-Strukur übergeben (dies ist für viele Komponenten verfügbar). Das umfasst: +So würde http://example.com/plugin/arg1/arg2 nach einem Modul "plugin" suchen und seiner Modulfunktion die $a-App-Strukur übergeben (dies ist für viele Komponenten verfügbar). Das umfasst: $a->argc = 3 $a->argv = array(0 => 'plugin', 1 => 'arg1', 2 => 'arg2'); From f70f4bb89937d3056f71d8a2d5ba32836946186e Mon Sep 17 00:00:00 2001 From: fabrixxm Date: Fri, 5 Feb 2016 18:43:46 +0100 Subject: [PATCH 195/242] ACL: fix TypeError when selecting permissions --- js/acl.js | 18 +++++------------- 1 file changed, 5 insertions(+), 13 deletions(-) diff --git a/js/acl.js b/js/acl.js index 8e4e06c83c..3c96d13469 100644 --- a/js/acl.js +++ b/js/acl.js @@ -28,7 +28,7 @@ function ACL(backend_url, preset, automention, is_mobile){ if (preset.length==0) this.showall.addClass("selected"); /*events*/ - this.showall.click(this.on_showall); + this.showall.click(this.on_showall.bind(this)); $(document).on("click", ".acl-button-show", this.on_button_show.bind(this)); $(document).on("click", ".acl-button-hide", this.on_button_hide.bind(this)); $("#acl-search").keypress(this.on_search.bind(this)); @@ -123,12 +123,8 @@ ACL.prototype.on_button_show = function(event){ event.preventDefault() event.stopImmediatePropagation() event.stopPropagation(); - - /*this.showall.removeClass("selected"); - $(this).siblings(".acl-button-hide").removeClass("selected"); - $(this).toggleClass("selected");*/ - - this.set_allow($(this).parent().attr('id')); + + this.set_allow($(event.target).parent().attr('id')); return false; } @@ -137,11 +133,7 @@ ACL.prototype.on_button_hide = function(event){ event.stopImmediatePropagation() event.stopPropagation(); - /*this.showall.removeClass("selected"); - $(this).siblings(".acl-button-show").removeClass("selected"); - $(this).toggleClass("selected");*/ - - this.set_deny($(this).parent().attr('id')); + this.set_deny($(event.target).parent().attr('id')); return false; } @@ -303,7 +295,7 @@ ACL.prototype.populate = function(data){ html = "
    "+this.item_tpl+"
    "; html = html.format(item.photo, item.name, item.type, item.id, (item.forum=='1'?'forum':''), item.network, item.link); if (item.uids!=undefined) this.group_uids[item.id] = item.uids; - //console.log(html); + this.list_content.append(html); this.data[item.id] = item; }.bind(this)); From 41405ed0f2ff24dff89e11e5ecd695fb4cf11066 Mon Sep 17 00:00:00 2001 From: rabuzarus <> Date: Fri, 5 Feb 2016 21:24:01 +0100 Subject: [PATCH 196/242] vier: display smiley-preview as inline-block - needs addons update --- view/theme/vier/dark.css | 5 +++++ view/theme/vier/style.css | 9 +++++++++ 2 files changed, 14 insertions(+) diff --git a/view/theme/vier/dark.css b/view/theme/vier/dark.css index 8e128ae27f..7c671e4b7d 100644 --- a/view/theme/vier/dark.css +++ b/view/theme/vier/dark.css @@ -63,3 +63,8 @@ li :hover { #viewcontact_wrapper-network { background-color: #343434; } + +table.smiley-preview{ + background-color: #252C33 !important; + box-shadow: 0px 5px 10px rgba(0, 0, 0, 0.7); +} \ No newline at end of file diff --git a/view/theme/vier/style.css b/view/theme/vier/style.css index 0b52b50960..2b78d25d7f 100644 --- a/view/theme/vier/style.css +++ b/view/theme/vier/style.css @@ -2024,6 +2024,15 @@ section.minimal { cursor: pointer; margin-top: 3px; height: 10px; + display: inline-block; +} +#smileybutton { + position: absolute; + z-index: 99; +} +table.smiley-preview{ + background-color: #FFF; + box-shadow: 0px 5px 10px rgba(0, 0, 0, 0.7); } #jot-perms-icon { float: right; From d408cea871e00a7f3c5e58b466395802eba523f7 Mon Sep 17 00:00:00 2001 From: Michael Vogel Date: Fri, 5 Feb 2016 21:25:20 +0100 Subject: [PATCH 197/242] DFRN import has now gone live --- include/delivery.php | 2 +- include/items.php | 2145 +----------------------------------------- mod/dfrn_notify.php | 3 +- 3 files changed, 7 insertions(+), 2143 deletions(-) diff --git a/include/delivery.php b/include/delivery.php index 5ef942dd06..021ceb9968 100644 --- a/include/delivery.php +++ b/include/delivery.php @@ -374,7 +374,7 @@ function delivery_run(&$argv, &$argc){ break; logger('mod-delivery: local delivery'); - local_delivery($x[0],$atom); + dfrn::import($atom, $x[0]); break; } } diff --git a/include/items.php b/include/items.php index 52a1071f2d..798ee56958 100644 --- a/include/items.php +++ b/include/items.php @@ -17,7 +17,7 @@ require_once('include/feed.php'); require_once('include/Contact.php'); require_once('mod/share.php'); require_once('include/enotify.php'); -require_once('include/import-dfrn.php'); +require_once('include/dfrn.php'); require_once('library/defuse/php-encryption-1.2.1/Crypto.php'); @@ -145,413 +145,6 @@ function title_is_body($title, $body) { return($title == $body); } -function get_atom_elements($feed, $item, $contact = array()) { - - require_once('library/HTMLPurifier.auto.php'); - require_once('include/html2bbcode.php'); - - $best_photo = array(); - - $res = array(); - - $author = $item->get_author(); - if($author) { - $res['author-name'] = unxmlify($author->get_name()); - $res['author-link'] = unxmlify($author->get_link()); - } - else { - $res['author-name'] = unxmlify($feed->get_title()); - $res['author-link'] = unxmlify($feed->get_permalink()); - } - $res['uri'] = unxmlify($item->get_id()); - $res['title'] = unxmlify($item->get_title()); - $res['body'] = unxmlify($item->get_content()); - $res['plink'] = unxmlify($item->get_link(0)); - - if($res['plink']) - $base_url = implode('/', array_slice(explode('/',$res['plink']),0,3)); - else - $base_url = ''; - - // look for a photo. We should check media size and find the best one, - // but for now let's just find any author photo - // Additionally we look for an alternate author link. On OStatus this one is the one we want. - - $authorlinks = $item->feed->data["child"][SIMPLEPIE_NAMESPACE_ATOM_10]["feed"][0]["child"][SIMPLEPIE_NAMESPACE_ATOM_10]["author"][0]["child"]["http://www.w3.org/2005/Atom"]["link"]; - if (is_array($authorlinks)) { - foreach ($authorlinks as $link) { - $linkdata = array_shift($link["attribs"]); - - if ($linkdata["rel"] == "alternate") - $res["author-link"] = $linkdata["href"]; - }; - } - - $rawauthor = $item->get_item_tags(SIMPLEPIE_NAMESPACE_ATOM_10,'author'); - - if($rawauthor && $rawauthor[0]['child'][SIMPLEPIE_NAMESPACE_ATOM_10]['link']) { - $base = $rawauthor[0]['child'][SIMPLEPIE_NAMESPACE_ATOM_10]['link']; - foreach($base as $link) { - if($link['attribs']['']['rel'] === 'alternate') - $res['author-link'] = unxmlify($link['attribs']['']['href']); - - if(!x($res, 'author-avatar') || !$res['author-avatar']) { - if($link['attribs']['']['rel'] === 'photo' || $link['attribs']['']['rel'] === 'avatar') - $res['author-avatar'] = unxmlify($link['attribs']['']['href']); - } - } - } - - $rawactor = $item->get_item_tags(NAMESPACE_ACTIVITY, 'actor'); - - if($rawactor && activity_match($rawactor[0]['child'][NAMESPACE_ACTIVITY]['object-type'][0]['data'],ACTIVITY_OBJ_PERSON)) { - $base = $rawactor[0]['child'][SIMPLEPIE_NAMESPACE_ATOM_10]['link']; - if($base && count($base)) { - foreach($base as $link) { - if($link['attribs']['']['rel'] === 'alternate' && (! $res['author-link'])) - $res['author-link'] = unxmlify($link['attribs']['']['href']); - if(!x($res, 'author-avatar') || !$res['author-avatar']) { - if($link['attribs']['']['rel'] === 'avatar' || $link['attribs']['']['rel'] === 'photo') - $res['author-avatar'] = unxmlify($link['attribs']['']['href']); - } - } - } - } - - // No photo/profile-link on the item - look at the feed level - - if((! (x($res,'author-link'))) || (! (x($res,'author-avatar')))) { - $rawauthor = $feed->get_feed_tags(SIMPLEPIE_NAMESPACE_ATOM_10,'author'); - if($rawauthor && $rawauthor[0]['child'][SIMPLEPIE_NAMESPACE_ATOM_10]['link']) { - $base = $rawauthor[0]['child'][SIMPLEPIE_NAMESPACE_ATOM_10]['link']; - foreach($base as $link) { - if($link['attribs']['']['rel'] === 'alternate' && (! $res['author-link'])) - $res['author-link'] = unxmlify($link['attribs']['']['href']); - if(! $res['author-avatar']) { - if($link['attribs']['']['rel'] === 'photo' || $link['attribs']['']['rel'] === 'avatar') - $res['author-avatar'] = unxmlify($link['attribs']['']['href']); - } - } - } - - $rawactor = $feed->get_feed_tags(NAMESPACE_ACTIVITY, 'subject'); - - if($rawactor && activity_match($rawactor[0]['child'][NAMESPACE_ACTIVITY]['object-type'][0]['data'],ACTIVITY_OBJ_PERSON)) { - $base = $rawactor[0]['child'][SIMPLEPIE_NAMESPACE_ATOM_10]['link']; - - if($base && count($base)) { - foreach($base as $link) { - if($link['attribs']['']['rel'] === 'alternate' && (! $res['author-link'])) - $res['author-link'] = unxmlify($link['attribs']['']['href']); - if(! (x($res,'author-avatar'))) { - if($link['attribs']['']['rel'] === 'avatar' || $link['attribs']['']['rel'] === 'photo') - $res['author-avatar'] = unxmlify($link['attribs']['']['href']); - } - } - } - } - } - - $apps = $item->get_item_tags(NAMESPACE_STATUSNET,'notice_info'); - if($apps && $apps[0]['attribs']['']['source']) { - $res['app'] = strip_tags(unxmlify($apps[0]['attribs']['']['source'])); - if($res['app'] === 'web') - $res['app'] = 'OStatus'; - } - - // base64 encoded json structure representing Diaspora signature - - $dsig = $item->get_item_tags(NAMESPACE_DFRN,'diaspora_signature'); - if($dsig) { - $res['dsprsig'] = unxmlify($dsig[0]['data']); - } - - $dguid = $item->get_item_tags(NAMESPACE_DFRN,'diaspora_guid'); - if($dguid) - $res['guid'] = unxmlify($dguid[0]['data']); - - $bm = $item->get_item_tags(NAMESPACE_DFRN,'bookmark'); - if($bm) - $res['bookmark'] = ((unxmlify($bm[0]['data']) === 'true') ? 1 : 0); - - - /** - * If there's a copy of the body content which is guaranteed to have survived mangling in transit, use it. - */ - - $have_real_body = false; - - $rawenv = $item->get_item_tags(NAMESPACE_DFRN, 'env'); - if($rawenv) { - $have_real_body = true; - $res['body'] = $rawenv[0]['data']; - $res['body'] = str_replace(array(' ',"\t","\r","\n"), array('','','',''),$res['body']); - // make sure nobody is trying to sneak some html tags by us - $res['body'] = notags(base64url_decode($res['body'])); - } - - - $res['body'] = limit_body_size($res['body']); - - // It isn't certain at this point whether our content is plaintext or html and we'd be foolish to trust - // the content type. Our own network only emits text normally, though it might have been converted to - // html if we used a pubsubhubbub transport. But if we see even one html tag in our text, we will - // have to assume it is all html and needs to be purified. - - // It doesn't matter all that much security wise - because before this content is used anywhere, we are - // going to escape any tags we find regardless, but this lets us import a limited subset of html from - // the wild, by sanitising it and converting supported tags to bbcode before we rip out any remaining - // html. - - if((strpos($res['body'],'<') !== false) && (strpos($res['body'],'>') !== false)) { - - $res['body'] = reltoabs($res['body'],$base_url); - - $res['body'] = html2bb_video($res['body']); - - $res['body'] = oembed_html2bbcode($res['body']); - - $config = HTMLPurifier_Config::createDefault(); - $config->set('Cache.DefinitionImpl', null); - - // we shouldn't need a whitelist, because the bbcode converter - // will strip out any unsupported tags. - - $purifier = new HTMLPurifier($config); - $res['body'] = $purifier->purify($res['body']); - - $res['body'] = @html2bbcode($res['body']); - - - } - elseif(! $have_real_body) { - - // it's not one of our messages and it has no tags - // so it's probably just text. We'll escape it just to be safe. - - $res['body'] = escape_tags($res['body']); - } - - - // this tag is obsolete but we keep it for really old sites - - $allow = $item->get_item_tags(NAMESPACE_DFRN,'comment-allow'); - if($allow && $allow[0]['data'] == 1) - $res['last-child'] = 1; - else - $res['last-child'] = 0; - - $private = $item->get_item_tags(NAMESPACE_DFRN,'private'); - if($private && intval($private[0]['data']) > 0) - $res['private'] = intval($private[0]['data']); - else - $res['private'] = 0; - - $extid = $item->get_item_tags(NAMESPACE_DFRN,'extid'); - if($extid && $extid[0]['data']) - $res['extid'] = $extid[0]['data']; - - $rawlocation = $item->get_item_tags(NAMESPACE_DFRN, 'location'); - if($rawlocation) - $res['location'] = unxmlify($rawlocation[0]['data']); - - - $rawcreated = $item->get_item_tags(SIMPLEPIE_NAMESPACE_ATOM_10,'published'); - if($rawcreated) - $res['created'] = unxmlify($rawcreated[0]['data']); - - - $rawedited = $item->get_item_tags(SIMPLEPIE_NAMESPACE_ATOM_10,'updated'); - if($rawedited) - $res['edited'] = unxmlify($rawedited[0]['data']); - - if((x($res,'edited')) && (! (x($res,'created')))) - $res['created'] = $res['edited']; - - if(! $res['created']) - $res['created'] = $item->get_date('c'); - - if(! $res['edited']) - $res['edited'] = $item->get_date('c'); - - - // Disallow time travelling posts - - $d1 = strtotime($res['created']); - $d2 = strtotime($res['edited']); - $d3 = strtotime('now'); - - if($d1 > $d3) - $res['created'] = datetime_convert(); - if($d2 > $d3) - $res['edited'] = datetime_convert(); - - $rawowner = $item->get_item_tags(NAMESPACE_DFRN, 'owner'); - if($rawowner[0]['child'][SIMPLEPIE_NAMESPACE_ATOM_10]['name'][0]['data']) - $res['owner-name'] = unxmlify($rawowner[0]['child'][SIMPLEPIE_NAMESPACE_ATOM_10]['name'][0]['data']); - elseif($rawowner[0]['child'][NAMESPACE_DFRN]['name'][0]['data']) - $res['owner-name'] = unxmlify($rawowner[0]['child'][NAMESPACE_DFRN]['name'][0]['data']); - if($rawowner[0]['child'][SIMPLEPIE_NAMESPACE_ATOM_10]['uri'][0]['data']) - $res['owner-link'] = unxmlify($rawowner[0]['child'][SIMPLEPIE_NAMESPACE_ATOM_10]['uri'][0]['data']); - elseif($rawowner[0]['child'][NAMESPACE_DFRN]['uri'][0]['data']) - $res['owner-link'] = unxmlify($rawowner[0]['child'][NAMESPACE_DFRN]['uri'][0]['data']); - - if($rawowner[0]['child'][SIMPLEPIE_NAMESPACE_ATOM_10]['link']) { - $base = $rawowner[0]['child'][SIMPLEPIE_NAMESPACE_ATOM_10]['link']; - - foreach($base as $link) { - if(!x($res, 'owner-avatar') || !$res['owner-avatar']) { - if($link['attribs']['']['rel'] === 'photo' || $link['attribs']['']['rel'] === 'avatar') - $res['owner-avatar'] = unxmlify($link['attribs']['']['href']); - } - } - } - - $rawgeo = $item->get_item_tags(NAMESPACE_GEORSS,'point'); - if($rawgeo) - $res['coord'] = unxmlify($rawgeo[0]['data']); - - if ($contact["network"] == NETWORK_FEED) { - $res['verb'] = ACTIVITY_POST; - $res['object-type'] = ACTIVITY_OBJ_NOTE; - } - - $rawverb = $item->get_item_tags(NAMESPACE_ACTIVITY, 'verb'); - - // select between supported verbs - - if($rawverb) { - $res['verb'] = unxmlify($rawverb[0]['data']); - } - - // translate OStatus unfollow to activity streams if it happened to get selected - - if((x($res,'verb')) && ($res['verb'] === 'http://ostatus.org/schema/1.0/unfollow')) - $res['verb'] = ACTIVITY_UNFOLLOW; - - $cats = $item->get_categories(); - if($cats) { - $tag_arr = array(); - foreach($cats as $cat) { - $term = $cat->get_term(); - if(! $term) - $term = $cat->get_label(); - $scheme = $cat->get_scheme(); - if($scheme && $term && stristr($scheme,'X-DFRN:')) - $tag_arr[] = substr($scheme,7,1) . '[url=' . unxmlify(substr($scheme,9)) . ']' . unxmlify($term) . '[/url]'; - elseif($term) - $tag_arr[] = notags(trim($term)); - } - $res['tag'] = implode(',', $tag_arr); - } - - $attach = $item->get_enclosures(); - if($attach) { - $att_arr = array(); - foreach($attach as $att) { - $len = intval($att->get_length()); - $link = str_replace(array(',','"'),array('%2D','%22'),notags(trim(unxmlify($att->get_link())))); - $title = str_replace(array(',','"'),array('%2D','%22'),notags(trim(unxmlify($att->get_title())))); - $type = str_replace(array(',','"'),array('%2D','%22'),notags(trim(unxmlify($att->get_type())))); - if(strpos($type,';')) - $type = substr($type,0,strpos($type,';')); - if((! $link) || (strpos($link,'http') !== 0)) - continue; - - if(! $title) - $title = ' '; - if(! $type) - $type = 'application/octet-stream'; - - $att_arr[] = '[attach]href="' . $link . '" length="' . $len . '" type="' . $type . '" title="' . $title . '"[/attach]'; - } - $res['attach'] = implode(',', $att_arr); - } - - $rawobj = $item->get_item_tags(NAMESPACE_ACTIVITY, 'object'); - - if($rawobj) { - $res['object'] = '' . "\n"; - $child = $rawobj[0]['child']; - if($child[NAMESPACE_ACTIVITY]['object-type'][0]['data']) { - $res['object-type'] = $child[NAMESPACE_ACTIVITY]['object-type'][0]['data']; - $res['object'] .= '' . $child[NAMESPACE_ACTIVITY]['object-type'][0]['data'] . '' . "\n"; - } - if(x($child[SIMPLEPIE_NAMESPACE_ATOM_10], 'id') && $child[SIMPLEPIE_NAMESPACE_ATOM_10]['id'][0]['data']) - $res['object'] .= '' . $child[SIMPLEPIE_NAMESPACE_ATOM_10]['id'][0]['data'] . '' . "\n"; - if(x($child[SIMPLEPIE_NAMESPACE_ATOM_10], 'link') && $child[SIMPLEPIE_NAMESPACE_ATOM_10]['link']) - $res['object'] .= '' . encode_rel_links($child[SIMPLEPIE_NAMESPACE_ATOM_10]['link']) . '' . "\n"; - if(x($child[SIMPLEPIE_NAMESPACE_ATOM_10], 'title') && $child[SIMPLEPIE_NAMESPACE_ATOM_10]['title'][0]['data']) - $res['object'] .= '' . $child[SIMPLEPIE_NAMESPACE_ATOM_10]['title'][0]['data'] . '' . "\n"; - if(x($child[SIMPLEPIE_NAMESPACE_ATOM_10], 'content') && $child[SIMPLEPIE_NAMESPACE_ATOM_10]['content'][0]['data']) { - $body = $child[SIMPLEPIE_NAMESPACE_ATOM_10]['content'][0]['data']; - if(! $body) - $body = $child[SIMPLEPIE_NAMESPACE_ATOM_10]['summary'][0]['data']; - // preserve a copy of the original body content in case we later need to parse out any microformat information, e.g. events - $res['object'] .= '' . xmlify($body) . '' . "\n"; - if((strpos($body,'<') !== false) || (strpos($body,'>') !== false)) { - - $body = html2bb_video($body); - - $config = HTMLPurifier_Config::createDefault(); - $config->set('Cache.DefinitionImpl', null); - - $purifier = new HTMLPurifier($config); - $body = $purifier->purify($body); - $body = html2bbcode($body); - } - - $res['object'] .= '' . $body . '' . "\n"; - } - - $res['object'] .= '' . "\n"; - } - - $rawobj = $item->get_item_tags(NAMESPACE_ACTIVITY, 'target'); - - if($rawobj) { - $res['target'] = '' . "\n"; - $child = $rawobj[0]['child']; - if($child[NAMESPACE_ACTIVITY]['object-type'][0]['data']) { - $res['target'] .= '' . $child[NAMESPACE_ACTIVITY]['object-type'][0]['data'] . '' . "\n"; - } - if(x($child[SIMPLEPIE_NAMESPACE_ATOM_10], 'id') && $child[SIMPLEPIE_NAMESPACE_ATOM_10]['id'][0]['data']) - $res['target'] .= '' . $child[SIMPLEPIE_NAMESPACE_ATOM_10]['id'][0]['data'] . '' . "\n"; - if(x($child[SIMPLEPIE_NAMESPACE_ATOM_10], 'link') && $child[SIMPLEPIE_NAMESPACE_ATOM_10]['link']) - $res['target'] .= '' . encode_rel_links($child[SIMPLEPIE_NAMESPACE_ATOM_10]['link']) . '' . "\n"; - if(x($child[SIMPLEPIE_NAMESPACE_ATOM_10], 'data') && $child[SIMPLEPIE_NAMESPACE_ATOM_10]['title'][0]['data']) - $res['target'] .= '' . $child[SIMPLEPIE_NAMESPACE_ATOM_10]['title'][0]['data'] . '' . "\n"; - if(x($child[SIMPLEPIE_NAMESPACE_ATOM_10], 'data') && $child[SIMPLEPIE_NAMESPACE_ATOM_10]['content'][0]['data']) { - $body = $child[SIMPLEPIE_NAMESPACE_ATOM_10]['content'][0]['data']; - if(! $body) - $body = $child[SIMPLEPIE_NAMESPACE_ATOM_10]['summary'][0]['data']; - // preserve a copy of the original body content in case we later need to parse out any microformat information, e.g. events - $res['target'] .= '' . xmlify($body) . '' . "\n"; - if((strpos($body,'<') !== false) || (strpos($body,'>') !== false)) { - - $body = html2bb_video($body); - - $config = HTMLPurifier_Config::createDefault(); - $config->set('Cache.DefinitionImpl', null); - - $purifier = new HTMLPurifier($config); - $body = $purifier->purify($body); - $body = html2bbcode($body); - } - - $res['target'] .= '' . $body . '' . "\n"; - } - - $res['target'] .= '' . "\n"; - } - - $arr = array('feed' => $feed, 'item' => $item, 'result' => $res); - - call_hooks('parse_atom', $arr); - - return $res; -} - function add_page_info_data($data) { call_hooks('page_info_data', $data); @@ -698,27 +291,6 @@ function add_page_info_to_body($body, $texturl = false, $no_photos = false) { return $body; } -function encode_rel_links($links) { - $o = ''; - if(! ((is_array($links)) && (count($links)))) - return $o; - foreach($links as $link) { - $o .= 'set_raw_data($xml); - if($datedir) - $feed->enable_order_by_date(true); - else - $feed->enable_order_by_date(false); - $feed->init(); - - if($feed->error()) - logger('consume_feed: Error parsing XML: ' . $feed->error()); - - $permalink = $feed->get_permalink(); - - // Check at the feed level for updated contact name and/or photo - - $name_updated = ''; - $new_name = ''; - $photo_timestamp = ''; - $photo_url = ''; - $birthday = ''; - $contact_updated = ''; - - $hubs = $feed->get_links('hub'); - logger('consume_feed: hubs: ' . print_r($hubs,true), LOGGER_DATA); - - if(count($hubs)) - $hub = implode(',', $hubs); - - $rawtags = $feed->get_feed_tags( NAMESPACE_DFRN, 'owner'); - if(! $rawtags) - $rawtags = $feed->get_feed_tags( SIMPLEPIE_NAMESPACE_ATOM_10, 'author'); - if($rawtags) { - $elems = $rawtags[0]['child'][SIMPLEPIE_NAMESPACE_ATOM_10]; - if($elems['name'][0]['attribs'][NAMESPACE_DFRN]['updated']) { - $name_updated = $elems['name'][0]['attribs'][NAMESPACE_DFRN]['updated']; - $new_name = $elems['name'][0]['data']; - - // Manually checking for changed contact names - if (($new_name != $contact['name']) AND ($new_name != "") AND ($name_updated <= $contact['name-date'])) { - $name_updated = date("c"); - $photo_timestamp = date("c"); - } - } - if((x($elems,'link')) && ($elems['link'][0]['attribs']['']['rel'] === 'photo') && ($elems['link'][0]['attribs'][NAMESPACE_DFRN]['updated'])) { - if ($photo_timestamp == "") - $photo_timestamp = datetime_convert('UTC','UTC',$elems['link'][0]['attribs'][NAMESPACE_DFRN]['updated']); - $photo_url = $elems['link'][0]['attribs']['']['href']; - } - - if((x($rawtags[0]['child'], NAMESPACE_DFRN)) && (x($rawtags[0]['child'][NAMESPACE_DFRN],'birthday'))) { - $birthday = datetime_convert('UTC','UTC', $rawtags[0]['child'][NAMESPACE_DFRN]['birthday'][0]['data']); - } - } - - if((is_array($contact)) && ($photo_timestamp) && (strlen($photo_url)) && ($photo_timestamp > $contact['avatar-date'])) { - logger('consume_feed: Updating photo for '.$contact['name'].' from '.$photo_url.' uid: '.$contact['uid']); - - $contact_updated = $photo_timestamp; - - require_once("include/Photo.php"); - $photos = import_profile_photo($photo_url,$contact['uid'],$contact['id']); - - q("UPDATE `contact` SET `avatar-date` = '%s', `photo` = '%s', `thumb` = '%s', `micro` = '%s' - WHERE `uid` = %d AND `id` = %d AND NOT `self`", - dbesc(datetime_convert()), - dbesc($photos[0]), - dbesc($photos[1]), - dbesc($photos[2]), - intval($contact['uid']), - intval($contact['id']) - ); - } - - if((is_array($contact)) && ($name_updated) && (strlen($new_name)) && ($name_updated > $contact['name-date'])) { - if ($name_updated > $contact_updated) - $contact_updated = $name_updated; - - $r = q("SELECT * FROM `contact` WHERE `uid` = %d AND `id` = %d LIMIT 1", - intval($contact['uid']), - intval($contact['id']) - ); - - $x = q("UPDATE `contact` SET `name` = '%s', `name-date` = '%s' WHERE `uid` = %d AND `id` = %d AND `name` != '%s' AND NOT `self`", - dbesc(notags(trim($new_name))), - dbesc(datetime_convert()), - intval($contact['uid']), - intval($contact['id']), - dbesc(notags(trim($new_name))) - ); - - // do our best to update the name on content items - - if(count($r) AND (notags(trim($new_name)) != $r[0]['name'])) { - q("UPDATE `item` SET `author-name` = '%s' WHERE `author-name` = '%s' AND `author-link` = '%s' AND `uid` = %d AND `author-name` != '%s'", - dbesc(notags(trim($new_name))), - dbesc($r[0]['name']), - dbesc($r[0]['url']), - intval($contact['uid']), - dbesc(notags(trim($new_name))) - ); - } - } - - if ($contact_updated AND $new_name AND $photo_url) - poco_check($contact['url'], $new_name, NETWORK_DFRN, $photo_url, "", "", "", "", "", $contact_updated, 2, $contact['id'], $contact['uid']); - - if(strlen($birthday)) { - if(substr($birthday,0,4) != $contact['bdyear']) { - logger('consume_feed: updating birthday: ' . $birthday); - - /** - * - * Add new birthday event for this person - * - * $bdtext is just a readable placeholder in case the event is shared - * with others. We will replace it during presentation to our $importer - * to contain a sparkle link and perhaps a photo. - * - */ - - $bdtext = sprintf( t('%s\'s birthday'), $contact['name']); - $bdtext2 = sprintf( t('Happy Birthday %s'), ' [url=' . $contact['url'] . ']' . $contact['name'] . '[/url]' ) ; - - - $r = q("INSERT INTO `event` (`uid`,`cid`,`created`,`edited`,`start`,`finish`,`summary`,`desc`,`type`) - VALUES ( %d, %d, '%s', '%s', '%s', '%s', '%s', '%s', '%s' ) ", - intval($contact['uid']), - intval($contact['id']), - dbesc(datetime_convert()), - dbesc(datetime_convert()), - dbesc(datetime_convert('UTC','UTC', $birthday)), - dbesc(datetime_convert('UTC','UTC', $birthday . ' + 1 day ')), - dbesc($bdtext), - dbesc($bdtext2), - dbesc('birthday') - ); - - - // update bdyear - - q("UPDATE `contact` SET `bdyear` = '%s' WHERE `uid` = %d AND `id` = %d", - dbesc(substr($birthday,0,4)), - intval($contact['uid']), - intval($contact['id']) - ); - - // This function is called twice without reloading the contact - // Make sure we only create one event. This is why &$contact - // is a reference var in this function - - $contact['bdyear'] = substr($birthday,0,4); - } - } - - $community_page = 0; - $rawtags = $feed->get_feed_tags( NAMESPACE_DFRN, 'community'); - if($rawtags) { - $community_page = intval($rawtags[0]['data']); - } - if(is_array($contact) && intval($contact['forum']) != $community_page) { - q("update contact set forum = %d where id = %d", - intval($community_page), - intval($contact['id']) - ); - $contact['forum'] = (string) $community_page; - } - - - // process any deleted entries - - $del_entries = $feed->get_feed_tags(NAMESPACE_TOMB, 'deleted-entry'); - if(is_array($del_entries) && count($del_entries) && $pass != 2) { - foreach($del_entries as $dentry) { - $deleted = false; - if(isset($dentry['attribs']['']['ref'])) { - $uri = $dentry['attribs']['']['ref']; - $deleted = true; - if(isset($dentry['attribs']['']['when'])) { - $when = $dentry['attribs']['']['when']; - $when = datetime_convert('UTC','UTC', $when, 'Y-m-d H:i:s'); - } - else - $when = datetime_convert('UTC','UTC','now','Y-m-d H:i:s'); - } - if($deleted && is_array($contact)) { - $r = q("SELECT `item`.*, `contact`.`self` FROM `item` INNER JOIN `contact` on `item`.`contact-id` = `contact`.`id` - WHERE `uri` = '%s' AND `item`.`uid` = %d AND `contact-id` = %d AND NOT `item`.`file` LIKE '%%[%%' LIMIT 1", - dbesc($uri), - intval($importer['uid']), - intval($contact['id']) - ); - if(count($r)) { - $item = $r[0]; - - if(! $item['deleted']) - logger('consume_feed: deleting item ' . $item['id'] . ' uri=' . $item['uri'], LOGGER_DEBUG); - - if($item['object-type'] === ACTIVITY_OBJ_EVENT) { - logger("Deleting event ".$item['event-id'], LOGGER_DEBUG); - event_delete($item['event-id']); - } - - if(($item['verb'] === ACTIVITY_TAG) && ($item['object-type'] === ACTIVITY_OBJ_TAGTERM)) { - $xo = parse_xml_string($item['object'],false); - $xt = parse_xml_string($item['target'],false); - if($xt->type === ACTIVITY_OBJ_NOTE) { - $i = q("select * from `item` where uri = '%s' and uid = %d limit 1", - dbesc($xt->id), - intval($importer['importer_uid']) - ); - if(count($i)) { - - // For tags, the owner cannot remove the tag on the author's copy of the post. - - $owner_remove = (($item['contact-id'] == $i[0]['contact-id']) ? true: false); - $author_remove = (($item['origin'] && $item['self']) ? true : false); - $author_copy = (($item['origin']) ? true : false); - - if($owner_remove && $author_copy) - continue; - if($author_remove || $owner_remove) { - $tags = explode(',',$i[0]['tag']); - $newtags = array(); - if(count($tags)) { - foreach($tags as $tag) - if(trim($tag) !== trim($xo->body)) - $newtags[] = trim($tag); - } - q("update item set tag = '%s' where id = %d", - dbesc(implode(',',$newtags)), - intval($i[0]['id']) - ); - create_tags_from_item($i[0]['id']); - } - } - } - } - - if($item['uri'] == $item['parent-uri']) { - $r = q("UPDATE `item` SET `deleted` = 1, `edited` = '%s', `changed` = '%s', - `body` = '', `title` = '' - WHERE `parent-uri` = '%s' AND `uid` = %d", - dbesc($when), - dbesc(datetime_convert()), - dbesc($item['uri']), - intval($importer['uid']) - ); - create_tags_from_itemuri($item['uri'], $importer['uid']); - create_files_from_itemuri($item['uri'], $importer['uid']); - update_thread_uri($item['uri'], $importer['uid']); - } - else { - $r = q("UPDATE `item` SET `deleted` = 1, `edited` = '%s', `changed` = '%s', - `body` = '', `title` = '' - WHERE `uri` = '%s' AND `uid` = %d", - dbesc($when), - dbesc(datetime_convert()), - dbesc($uri), - intval($importer['uid']) - ); - create_tags_from_itemuri($uri, $importer['uid']); - create_files_from_itemuri($uri, $importer['uid']); - if($item['last-child']) { - // ensure that last-child is set in case the comment that had it just got wiped. - q("UPDATE `item` SET `last-child` = 0, `changed` = '%s' WHERE `parent-uri` = '%s' AND `uid` = %d ", - dbesc(datetime_convert()), - dbesc($item['parent-uri']), - intval($item['uid']) - ); - // who is the last child now? - $r = q("SELECT `id` FROM `item` WHERE `parent-uri` = '%s' AND `type` != 'activity' AND `deleted` = 0 AND `moderated` = 0 AND `uid` = %d - ORDER BY `created` DESC LIMIT 1", - dbesc($item['parent-uri']), - intval($importer['uid']) - ); - if(count($r)) { - q("UPDATE `item` SET `last-child` = 1 WHERE `id` = %d", - intval($r[0]['id']) - ); - } - } - } - } - } - } - } - - // Now process the feed - - if($feed->get_item_quantity()) { - - logger('consume_feed: feed item count = ' . $feed->get_item_quantity()); - - // in inverse date order - if ($datedir) - $items = array_reverse($feed->get_items()); - else - $items = $feed->get_items(); - - - foreach($items as $item) { - - $is_reply = false; - $item_id = $item->get_id(); - $rawthread = $item->get_item_tags( NAMESPACE_THREAD,'in-reply-to'); - if(isset($rawthread[0]['attribs']['']['ref'])) { - $is_reply = true; - $parent_uri = $rawthread[0]['attribs']['']['ref']; - } - - if(($is_reply) && is_array($contact)) { - - if($pass == 1) - continue; - - // not allowed to post - - if($contact['rel'] == CONTACT_IS_FOLLOWER) - continue; - - - // Have we seen it? If not, import it. - - $item_id = $item->get_id(); - $datarray = get_atom_elements($feed, $item, $contact); - - if((! x($datarray,'author-name')) && ($contact['network'] != NETWORK_DFRN)) - $datarray['author-name'] = $contact['name']; - if((! x($datarray,'author-link')) && ($contact['network'] != NETWORK_DFRN)) - $datarray['author-link'] = $contact['url']; - if((! x($datarray,'author-avatar')) && ($contact['network'] != NETWORK_DFRN)) - $datarray['author-avatar'] = $contact['thumb']; - - if((! x($datarray,'author-name')) || (! x($datarray,'author-link'))) { - logger('consume_feed: no author information! ' . print_r($datarray,true)); - continue; - } - - $force_parent = false; - if($contact['network'] === NETWORK_OSTATUS || stristr($contact['url'],'twitter.com')) { - if($contact['network'] === NETWORK_OSTATUS) - $force_parent = true; - if(strlen($datarray['title'])) - unset($datarray['title']); - $r = q("UPDATE `item` SET `last-child` = 0, `changed` = '%s' WHERE `parent-uri` = '%s' AND `uid` = %d", - dbesc(datetime_convert()), - dbesc($parent_uri), - intval($importer['uid']) - ); - $datarray['last-child'] = 1; - update_thread_uri($parent_uri, $importer['uid']); - } - - - $r = q("SELECT `uid`, `last-child`, `edited`, `body` FROM `item` WHERE `uri` = '%s' AND `uid` = %d LIMIT 1", - dbesc($item_id), - intval($importer['uid']) - ); - - // Update content if 'updated' changes - - if(count($r)) { - if (edited_timestamp_is_newer($r[0], $datarray)) { - - // do not accept (ignore) an earlier edit than one we currently have. - if(datetime_convert('UTC','UTC',$datarray['edited']) < $r[0]['edited']) - continue; - - $r = q("UPDATE `item` SET `title` = '%s', `body` = '%s', `tag` = '%s', `edited` = '%s', `changed` = '%s' WHERE `uri` = '%s' AND `uid` = %d", - dbesc($datarray['title']), - dbesc($datarray['body']), - dbesc($datarray['tag']), - dbesc(datetime_convert('UTC','UTC',$datarray['edited'])), - dbesc(datetime_convert()), - dbesc($item_id), - intval($importer['uid']) - ); - create_tags_from_itemuri($item_id, $importer['uid']); - update_thread_uri($item_id, $importer['uid']); - } - - // update last-child if it changes - - $allow = $item->get_item_tags( NAMESPACE_DFRN, 'comment-allow'); - if(($allow) && ($allow[0]['data'] != $r[0]['last-child'])) { - $r = q("UPDATE `item` SET `last-child` = 0, `changed` = '%s' WHERE `parent-uri` = '%s' AND `uid` = %d", - dbesc(datetime_convert()), - dbesc($parent_uri), - intval($importer['uid']) - ); - $r = q("UPDATE `item` SET `last-child` = %d , `changed` = '%s' WHERE `uri` = '%s' AND `uid` = %d", - intval($allow[0]['data']), - dbesc(datetime_convert()), - dbesc($item_id), - intval($importer['uid']) - ); - update_thread_uri($item_id, $importer['uid']); - } - continue; - } - - - if(($contact['network'] === NETWORK_FEED) || (! strlen($contact['notify']))) { - // one way feed - no remote comment ability - $datarray['last-child'] = 0; - } - $datarray['parent-uri'] = $parent_uri; - $datarray['uid'] = $importer['uid']; - $datarray['contact-id'] = $contact['id']; - if(($datarray['verb'] === ACTIVITY_LIKE) - || ($datarray['verb'] === ACTIVITY_DISLIKE) - || ($datarray['verb'] === ACTIVITY_ATTEND) - || ($datarray['verb'] === ACTIVITY_ATTENDNO) - || ($datarray['verb'] === ACTIVITY_ATTENDMAYBE)) { - $datarray['type'] = 'activity'; - $datarray['gravity'] = GRAVITY_LIKE; - // only one like or dislike per person - // splitted into two queries for performance issues - $r = q("SELECT `id` FROM `item` WHERE `uid` = %d AND `author-link` = '%s' AND `verb` = '%s' AND `parent-uri` = '%s' AND NOT `deleted` LIMIT 1", - intval($datarray['uid']), - dbesc($datarray['author-link']), - dbesc($datarray['verb']), - dbesc($datarray['parent-uri']) - ); - if($r && count($r)) - continue; - - $r = q("SELECT `id` FROM `item` WHERE `uid` = %d AND `author-link` = '%s' AND `verb` = '%s' AND `thr-parent` = '%s' AND NOT `deleted` LIMIT 1", - intval($datarray['uid']), - dbesc($datarray['author-link']), - dbesc($datarray['verb']), - dbesc($datarray['parent-uri']) - ); - if($r && count($r)) - continue; - } - - if(($datarray['verb'] === ACTIVITY_TAG) && ($datarray['object-type'] === ACTIVITY_OBJ_TAGTERM)) { - $xo = parse_xml_string($datarray['object'],false); - $xt = parse_xml_string($datarray['target'],false); - - if($xt->type == ACTIVITY_OBJ_NOTE) { - $r = q("select * from item where `uri` = '%s' AND `uid` = %d limit 1", - dbesc($xt->id), - intval($importer['importer_uid']) - ); - if(! count($r)) - continue; - - // extract tag, if not duplicate, add to parent item - if($xo->id && $xo->content) { - $newtag = '#[url=' . $xo->id . ']'. $xo->content . '[/url]'; - if(! (stristr($r[0]['tag'],$newtag))) { - q("UPDATE item SET tag = '%s' WHERE id = %d", - dbesc($r[0]['tag'] . (strlen($r[0]['tag']) ? ',' : '') . $newtag), - intval($r[0]['id']) - ); - create_tags_from_item($r[0]['id']); - } - } - } - } - - $r = item_store($datarray,$force_parent); - continue; - } - - else { - - // Head post of a conversation. Have we seen it? If not, import it. - - $item_id = $item->get_id(); - - $datarray = get_atom_elements($feed, $item, $contact); - - if(is_array($contact)) { - if((! x($datarray,'author-name')) && ($contact['network'] != NETWORK_DFRN)) - $datarray['author-name'] = $contact['name']; - if((! x($datarray,'author-link')) && ($contact['network'] != NETWORK_DFRN)) - $datarray['author-link'] = $contact['url']; - if((! x($datarray,'author-avatar')) && ($contact['network'] != NETWORK_DFRN)) - $datarray['author-avatar'] = $contact['thumb']; - } - - if((! x($datarray,'author-name')) || (! x($datarray,'author-link'))) { - logger('consume_feed: no author information! ' . print_r($datarray,true)); - continue; - } - - // special handling for events - - if((x($datarray,'object-type')) && ($datarray['object-type'] === ACTIVITY_OBJ_EVENT)) { - $ev = bbtoevent($datarray['body']); - if((x($ev,'desc') || x($ev,'summary')) && x($ev,'start')) { - $ev['uid'] = $importer['uid']; - $ev['uri'] = $item_id; - $ev['edited'] = $datarray['edited']; - $ev['private'] = $datarray['private']; - $ev['guid'] = $datarray['guid']; - - if(is_array($contact)) - $ev['cid'] = $contact['id']; - $r = q("SELECT * FROM `event` WHERE `uri` = '%s' AND `uid` = %d LIMIT 1", - dbesc($item_id), - intval($importer['uid']) - ); - if(count($r)) - $ev['id'] = $r[0]['id']; - $xyz = event_store($ev); - continue; - } - } - - if($contact['network'] === NETWORK_OSTATUS || stristr($contact['url'],'twitter.com')) { - if(strlen($datarray['title'])) - unset($datarray['title']); - $datarray['last-child'] = 1; - } - - - $r = q("SELECT `uid`, `last-child`, `edited`, `body` FROM `item` WHERE `uri` = '%s' AND `uid` = %d LIMIT 1", - dbesc($item_id), - intval($importer['uid']) - ); - - // Update content if 'updated' changes - - if(count($r)) { - if (edited_timestamp_is_newer($r[0], $datarray)) { - - // do not accept (ignore) an earlier edit than one we currently have. - if(datetime_convert('UTC','UTC',$datarray['edited']) < $r[0]['edited']) - continue; - - $r = q("UPDATE `item` SET `title` = '%s', `body` = '%s', `tag` = '%s', `edited` = '%s', `changed` = '%s' WHERE `uri` = '%s' AND `uid` = %d", - dbesc($datarray['title']), - dbesc($datarray['body']), - dbesc($datarray['tag']), - dbesc(datetime_convert('UTC','UTC',$datarray['edited'])), - dbesc(datetime_convert()), - dbesc($item_id), - intval($importer['uid']) - ); - create_tags_from_itemuri($item_id, $importer['uid']); - update_thread_uri($item_id, $importer['uid']); - } - - // update last-child if it changes - - $allow = $item->get_item_tags( NAMESPACE_DFRN, 'comment-allow'); - if($allow && $allow[0]['data'] != $r[0]['last-child']) { - $r = q("UPDATE `item` SET `last-child` = %d , `changed` = '%s' WHERE `uri` = '%s' AND `uid` = %d", - intval($allow[0]['data']), - dbesc(datetime_convert()), - dbesc($item_id), - intval($importer['uid']) - ); - update_thread_uri($item_id, $importer['uid']); - } - continue; - } - - if(activity_match($datarray['verb'],ACTIVITY_FOLLOW)) { - logger('consume-feed: New follower'); - new_follower($importer,$contact,$datarray,$item); - return; - } - if(activity_match($datarray['verb'],ACTIVITY_UNFOLLOW)) { - lose_follower($importer,$contact,$datarray,$item); - return; - } - - if(activity_match($datarray['verb'],ACTIVITY_REQ_FRIEND)) { - logger('consume-feed: New friend request'); - new_follower($importer,$contact,$datarray,$item,true); - return; - } - if(activity_match($datarray['verb'],ACTIVITY_UNFRIEND)) { - lose_sharer($importer,$contact,$datarray,$item); - return; - } - - - if(! is_array($contact)) - return; - - - if(($contact['network'] === NETWORK_FEED) || (! strlen($contact['notify']))) { - // one way feed - no remote comment ability - $datarray['last-child'] = 0; - } - if($contact['network'] === NETWORK_FEED) - $datarray['private'] = 2; - - $datarray['parent-uri'] = $item_id; - $datarray['uid'] = $importer['uid']; - $datarray['contact-id'] = $contact['id']; - - if(! link_compare($datarray['owner-link'],$contact['url'])) { - // The item owner info is not our contact. It's OK and is to be expected if this is a tgroup delivery, - // but otherwise there's a possible data mixup on the sender's system. - // the tgroup delivery code called from item_store will correct it if it's a forum, - // but we're going to unconditionally correct it here so that the post will always be owned by our contact. - logger('consume_feed: Correcting item owner.', LOGGER_DEBUG); - $datarray['owner-name'] = $contact['name']; - $datarray['owner-link'] = $contact['url']; - $datarray['owner-avatar'] = $contact['thumb']; - } - - // We've allowed "followers" to reach this point so we can decide if they are - // posting an @-tag delivery, which followers are allowed to do for certain - // page types. Now that we've parsed the post, let's check if it is legit. Otherwise ignore it. - - if(($contact['rel'] == CONTACT_IS_FOLLOWER) && (! tgroup_check($importer['uid'],$datarray))) - continue; - - // This is my contact on another system, but it's really me. - // Turn this into a wall post. - $notify = item_is_remote_self($contact, $datarray); - - $r = item_store($datarray, false, $notify); - logger('Stored - Contact '.$contact['url'].' Notify '.$notify.' return '.$r.' Item '.print_r($datarray, true), LOGGER_DEBUG); - continue; - - } - } - } } function item_is_remote_self($contact, &$datarray) { @@ -2421,1073 +1351,6 @@ function item_is_remote_self($contact, &$datarray) { return true; } -function local_delivery($importer,$data) { - // dfrn-Test - return dfrn2::import($data, $importer); - - require_once('library/simplepie/simplepie.inc'); - - $a = get_app(); - - logger(__function__, LOGGER_TRACE); - - //$tempfile = tempnam(get_temppath(), "dfrn-local-"); - //file_put_contents($tempfile, $data); - - if($importer['readonly']) { - // We aren't receiving stuff from this person. But we will quietly ignore them - // rather than a blatant "go away" message. - logger('local_delivery: ignoring'); - return 0; - //NOTREACHED - } - - // Consume notification feed. This may differ from consuming a public feed in several ways - // - might contain email or friend suggestions - // - might contain remote followup to our message - // - in which case we need to accept it and then notify other conversants - // - we may need to send various email notifications - - $feed = new SimplePie(); - $feed->set_raw_data($data); - $feed->enable_order_by_date(false); - $feed->init(); - - - if($feed->error()) - logger('local_delivery: Error parsing XML: ' . $feed->error()); - - - // Check at the feed level for updated contact name and/or photo - - $name_updated = ''; - $new_name = ''; - $photo_timestamp = ''; - $photo_url = ''; - $contact_updated = ''; - - - $rawtags = $feed->get_feed_tags( NAMESPACE_DFRN, 'owner'); - -// Fallback should not be needed here. If it isn't DFRN it won't have DFRN updated tags -// if(! $rawtags) -// $rawtags = $feed->get_feed_tags( SIMPLEPIE_NAMESPACE_ATOM_10, 'author'); - - if($rawtags) { - $elems = $rawtags[0]['child'][SIMPLEPIE_NAMESPACE_ATOM_10]; - if($elems['name'][0]['attribs'][NAMESPACE_DFRN]['updated']) { - $name_updated = $elems['name'][0]['attribs'][NAMESPACE_DFRN]['updated']; - $new_name = $elems['name'][0]['data']; - - // Manually checking for changed contact names - if (($new_name != $importer['name']) AND ($new_name != "") AND ($name_updated <= $importer['name-date'])) { - $name_updated = date("c"); - $photo_timestamp = date("c"); - } - } - if((x($elems,'link')) && ($elems['link'][0]['attribs']['']['rel'] === 'photo') && ($elems['link'][0]['attribs'][NAMESPACE_DFRN]['updated'])) { - if ($photo_timestamp == "") - $photo_timestamp = datetime_convert('UTC','UTC',$elems['link'][0]['attribs'][NAMESPACE_DFRN]['updated']); - $photo_url = $elems['link'][0]['attribs']['']['href']; - } - } - - if(($photo_timestamp) && (strlen($photo_url)) && ($photo_timestamp > $importer['avatar-date'])) { - - $contact_updated = $photo_timestamp; - - logger('local_delivery: Updating photo for ' . $importer['name']); - require_once("include/Photo.php"); - - $photos = import_profile_photo($photo_url,$importer['importer_uid'],$importer['id']); - - q("UPDATE `contact` SET `avatar-date` = '%s', `photo` = '%s', `thumb` = '%s', `micro` = '%s' - WHERE `uid` = %d AND `id` = %d AND NOT `self`", - dbesc(datetime_convert()), - dbesc($photos[0]), - dbesc($photos[1]), - dbesc($photos[2]), - intval($importer['importer_uid']), - intval($importer['id']) - ); - } - - if(($name_updated) && (strlen($new_name)) && ($name_updated > $importer['name-date'])) { - if ($name_updated > $contact_updated) - $contact_updated = $name_updated; - - $r = q("SELECT * FROM `contact` WHERE `uid` = %d AND `id` = %d LIMIT 1", - intval($importer['importer_uid']), - intval($importer['id']) - ); - - $x = q("UPDATE `contact` SET `name` = '%s', `name-date` = '%s' WHERE `uid` = %d AND `id` = %d AND `name` != '%s' AND NOT `self`", - dbesc(notags(trim($new_name))), - dbesc(datetime_convert()), - intval($importer['importer_uid']), - intval($importer['id']), - dbesc(notags(trim($new_name))) - ); - - // do our best to update the name on content items - - if(count($r) AND (notags(trim($new_name)) != $r[0]['name'])) { - q("UPDATE `item` SET `author-name` = '%s' WHERE `author-name` = '%s' AND `author-link` = '%s' AND `uid` = %d AND `author-name` != '%s'", - dbesc(notags(trim($new_name))), - dbesc($r[0]['name']), - dbesc($r[0]['url']), - intval($importer['importer_uid']), - dbesc(notags(trim($new_name))) - ); - } - } - - if ($contact_updated AND $new_name AND $photo_url) - poco_check($importer['url'], $new_name, NETWORK_DFRN, $photo_url, "", "", "", "", "", $contact_updated, 2, $importer['id'], $importer['importer_uid']); - - // Currently unsupported - needs a lot of work - $reloc = $feed->get_feed_tags( NAMESPACE_DFRN, 'relocate' ); - if(isset($reloc[0]['child'][NAMESPACE_DFRN])) { - $base = $reloc[0]['child'][NAMESPACE_DFRN]; - $newloc = array(); - $newloc['uid'] = $importer['importer_uid']; - $newloc['cid'] = $importer['id']; - $newloc['name'] = notags(unxmlify($base['name'][0]['data'])); - $newloc['photo'] = notags(unxmlify($base['photo'][0]['data'])); - $newloc['thumb'] = notags(unxmlify($base['thumb'][0]['data'])); - $newloc['micro'] = notags(unxmlify($base['micro'][0]['data'])); - $newloc['url'] = notags(unxmlify($base['url'][0]['data'])); - $newloc['request'] = notags(unxmlify($base['request'][0]['data'])); - $newloc['confirm'] = notags(unxmlify($base['confirm'][0]['data'])); - $newloc['notify'] = notags(unxmlify($base['notify'][0]['data'])); - $newloc['poll'] = notags(unxmlify($base['poll'][0]['data'])); - $newloc['sitepubkey'] = notags(unxmlify($base['sitepubkey'][0]['data'])); - /** relocated user must have original key pair */ - /*$newloc['pubkey'] = notags(unxmlify($base['pubkey'][0]['data'])); - $newloc['prvkey'] = notags(unxmlify($base['prvkey'][0]['data']));*/ - - logger("items:relocate contact ".print_r($newloc, true).print_r($importer, true), LOGGER_DEBUG); - - // update contact - $r = q("SELECT photo, url FROM contact WHERE id=%d AND uid=%d;", - intval($importer['id']), - intval($importer['importer_uid'])); - if ($r === false) - return 1; - $old = $r[0]; - - $x = q("UPDATE contact SET - name = '%s', - photo = '%s', - thumb = '%s', - micro = '%s', - url = '%s', - nurl = '%s', - request = '%s', - confirm = '%s', - notify = '%s', - poll = '%s', - `site-pubkey` = '%s' - WHERE id=%d AND uid=%d;", - dbesc($newloc['name']), - dbesc($newloc['photo']), - dbesc($newloc['thumb']), - dbesc($newloc['micro']), - dbesc($newloc['url']), - dbesc(normalise_link($newloc['url'])), - dbesc($newloc['request']), - dbesc($newloc['confirm']), - dbesc($newloc['notify']), - dbesc($newloc['poll']), - dbesc($newloc['sitepubkey']), - intval($importer['id']), - intval($importer['importer_uid'])); - - if ($x === false) - return 1; - // update items - $fields = array( - 'owner-link' => array($old['url'], $newloc['url']), - 'author-link' => array($old['url'], $newloc['url']), - 'owner-avatar' => array($old['photo'], $newloc['photo']), - 'author-avatar' => array($old['photo'], $newloc['photo']), - ); - foreach ($fields as $n=>$f){ - $x = q("UPDATE `item` SET `%s`='%s' WHERE `%s`='%s' AND uid=%d", - $n, dbesc($f[1]), - $n, dbesc($f[0]), - intval($importer['importer_uid'])); - if ($x === false) - return 1; - } - - /// @TODO - /// merge with current record, current contents have priority - /// update record, set url-updated - /// update profile photos - /// schedule a scan? - return 0; - } - - - // handle friend suggestion notification - - $sugg = $feed->get_feed_tags( NAMESPACE_DFRN, 'suggest' ); - if(isset($sugg[0]['child'][NAMESPACE_DFRN])) { - $base = $sugg[0]['child'][NAMESPACE_DFRN]; - $fsugg = array(); - $fsugg['uid'] = $importer['importer_uid']; - $fsugg['cid'] = $importer['id']; - $fsugg['name'] = notags(unxmlify($base['name'][0]['data'])); - $fsugg['photo'] = notags(unxmlify($base['photo'][0]['data'])); - $fsugg['url'] = notags(unxmlify($base['url'][0]['data'])); - $fsugg['request'] = notags(unxmlify($base['request'][0]['data'])); - $fsugg['body'] = escape_tags(unxmlify($base['note'][0]['data'])); - - // Does our member already have a friend matching this description? - - $r = q("SELECT * FROM `contact` WHERE `name` = '%s' AND `nurl` = '%s' AND `uid` = %d LIMIT 1", - dbesc($fsugg['name']), - dbesc(normalise_link($fsugg['url'])), - intval($fsugg['uid']) - ); - if(count($r)) - return 0; - - // Do we already have an fcontact record for this person? - - $fid = 0; - $r = q("SELECT * FROM `fcontact` WHERE `url` = '%s' AND `name` = '%s' AND `request` = '%s' LIMIT 1", - dbesc($fsugg['url']), - dbesc($fsugg['name']), - dbesc($fsugg['request']) - ); - if(count($r)) { - $fid = $r[0]['id']; - - // OK, we do. Do we already have an introduction for this person ? - $r = q("select id from intro where uid = %d and fid = %d limit 1", - intval($fsugg['uid']), - intval($fid) - ); - if(count($r)) - return 0; - } - if(! $fid) - $r = q("INSERT INTO `fcontact` ( `name`,`url`,`photo`,`request` ) VALUES ( '%s', '%s', '%s', '%s' ) ", - dbesc($fsugg['name']), - dbesc($fsugg['url']), - dbesc($fsugg['photo']), - dbesc($fsugg['request']) - ); - $r = q("SELECT * FROM `fcontact` WHERE `url` = '%s' AND `name` = '%s' AND `request` = '%s' LIMIT 1", - dbesc($fsugg['url']), - dbesc($fsugg['name']), - dbesc($fsugg['request']) - ); - if(count($r)) { - $fid = $r[0]['id']; - } - // database record did not get created. Quietly give up. - else - return 0; - - - $hash = random_string(); - - $r = q("INSERT INTO `intro` ( `uid`, `fid`, `contact-id`, `note`, `hash`, `datetime`, `blocked` ) - VALUES( %d, %d, %d, '%s', '%s', '%s', %d )", - intval($fsugg['uid']), - intval($fid), - intval($fsugg['cid']), - dbesc($fsugg['body']), - dbesc($hash), - dbesc(datetime_convert()), - intval(0) - ); - - notification(array( - 'type' => NOTIFY_SUGGEST, - 'notify_flags' => $importer['notify-flags'], - 'language' => $importer['language'], - 'to_name' => $importer['username'], - 'to_email' => $importer['email'], - 'uid' => $importer['importer_uid'], - 'item' => $fsugg, - 'link' => $a->get_baseurl() . '/notifications/intros', - 'source_name' => $importer['name'], - 'source_link' => $importer['url'], - 'source_photo' => $importer['photo'], - 'verb' => ACTIVITY_REQ_FRIEND, - 'otype' => 'intro' - )); - - return 0; - } - - $ismail = false; - - $rawmail = $feed->get_feed_tags( NAMESPACE_DFRN, 'mail' ); - if(isset($rawmail[0]['child'][NAMESPACE_DFRN])) { - - logger('local_delivery: private message received'); - - $ismail = true; - $base = $rawmail[0]['child'][NAMESPACE_DFRN]; - - $msg = array(); - $msg['uid'] = $importer['importer_uid']; - $msg['from-name'] = notags(unxmlify($base['sender'][0]['child'][NAMESPACE_DFRN]['name'][0]['data'])); - $msg['from-photo'] = notags(unxmlify($base['sender'][0]['child'][NAMESPACE_DFRN]['avatar'][0]['data'])); - $msg['from-url'] = notags(unxmlify($base['sender'][0]['child'][NAMESPACE_DFRN]['uri'][0]['data'])); - $msg['contact-id'] = $importer['id']; - $msg['title'] = notags(unxmlify($base['subject'][0]['data'])); - $msg['body'] = escape_tags(unxmlify($base['content'][0]['data'])); - $msg['seen'] = 0; - $msg['replied'] = 0; - $msg['uri'] = notags(unxmlify($base['id'][0]['data'])); - $msg['parent-uri'] = notags(unxmlify($base['in-reply-to'][0]['data'])); - $msg['created'] = datetime_convert(notags(unxmlify('UTC','UTC',$base['sentdate'][0]['data']))); - - dbesc_array($msg); - - $r = dbq("INSERT INTO `mail` (`" . implode("`, `", array_keys($msg)) - . "`) VALUES ('" . implode("', '", array_values($msg)) . "')" ); - - // send notifications. - - require_once('include/enotify.php'); - - $notif_params = array( - 'type' => NOTIFY_MAIL, - 'notify_flags' => $importer['notify-flags'], - 'language' => $importer['language'], - 'to_name' => $importer['username'], - 'to_email' => $importer['email'], - 'uid' => $importer['importer_uid'], - 'item' => $msg, - 'source_name' => $msg['from-name'], - 'source_link' => $importer['url'], - 'source_photo' => $importer['thumb'], - 'verb' => ACTIVITY_POST, - 'otype' => 'mail' - ); - - notification($notif_params); - return 0; - - // NOTREACHED - } - - $community_page = 0; - $rawtags = $feed->get_feed_tags( NAMESPACE_DFRN, 'community'); - if($rawtags) { - $community_page = intval($rawtags[0]['data']); - } - if(intval($importer['forum']) != $community_page) { - q("update contact set forum = %d where id = %d", - intval($community_page), - intval($importer['id']) - ); - $importer['forum'] = (string) $community_page; - } - - logger('local_delivery: feed item count = ' . $feed->get_item_quantity()); - - // process any deleted entries - - $del_entries = $feed->get_feed_tags(NAMESPACE_TOMB, 'deleted-entry'); - if(is_array($del_entries) && count($del_entries)) { - foreach($del_entries as $dentry) { - $deleted = false; - if(isset($dentry['attribs']['']['ref'])) { - $uri = $dentry['attribs']['']['ref']; - $deleted = true; - if(isset($dentry['attribs']['']['when'])) { - $when = $dentry['attribs']['']['when']; - $when = datetime_convert('UTC','UTC', $when, 'Y-m-d H:i:s'); - } - else - $when = datetime_convert('UTC','UTC','now','Y-m-d H:i:s'); - } - if($deleted) { - - // check for relayed deletes to our conversation - - $is_reply = false; - $r = q("select * from item where uri = '%s' and uid = %d limit 1", - dbesc($uri), - intval($importer['importer_uid']) - ); - if(count($r)) { - $parent_uri = $r[0]['parent-uri']; - if($r[0]['id'] != $r[0]['parent']) - $is_reply = true; - } - - if($is_reply) { - $community = false; - - if($importer['page-flags'] == PAGE_COMMUNITY || $importer['page-flags'] == PAGE_PRVGROUP ) { - $sql_extra = ''; - $community = true; - logger('local_delivery: possible community delete'); - } - else - $sql_extra = " and contact.self = 1 and item.wall = 1 "; - - // was the top-level post for this reply written by somebody on this site? - // Specifically, the recipient? - - $is_a_remote_delete = false; - - // POSSIBLE CLEANUP --> Why select so many fields when only forum_mode and wall are used? - $r = q("select `item`.`id`, `item`.`uri`, `item`.`tag`, `item`.`forum_mode`,`item`.`origin`,`item`.`wall`, - `contact`.`name`, `contact`.`url`, `contact`.`thumb` from `item` - INNER JOIN `contact` ON `contact`.`id` = `item`.`contact-id` - WHERE `item`.`uri` = '%s' AND (`item`.`parent-uri` = '%s' or `item`.`thr-parent` = '%s') - AND `item`.`uid` = %d - $sql_extra - LIMIT 1", - dbesc($parent_uri), - dbesc($parent_uri), - dbesc($parent_uri), - intval($importer['importer_uid']) - ); - if($r && count($r)) - $is_a_remote_delete = true; - - // Does this have the characteristics of a community or private group comment? - // If it's a reply to a wall post on a community/prvgroup page it's a - // valid community comment. Also forum_mode makes it valid for sure. - // If neither, it's not. - - if($is_a_remote_delete && $community) { - if((! $r[0]['forum_mode']) && (! $r[0]['wall'])) { - $is_a_remote_delete = false; - logger('local_delivery: not a community delete'); - } - } - - if($is_a_remote_delete) { - logger('local_delivery: received remote delete'); - } - } - - $r = q("SELECT `item`.*, `contact`.`self` FROM `item` INNER JOIN contact on `item`.`contact-id` = `contact`.`id` - WHERE `uri` = '%s' AND `item`.`uid` = %d AND `contact-id` = %d AND NOT `item`.`file` LIKE '%%[%%' LIMIT 1", - dbesc($uri), - intval($importer['importer_uid']), - intval($importer['id']) - ); - - if(count($r)) { - $item = $r[0]; - - if($item['deleted']) - continue; - - logger('local_delivery: deleting item ' . $item['id'] . ' uri=' . $item['uri'], LOGGER_DEBUG); - - if($item['object-type'] === ACTIVITY_OBJ_EVENT) { - logger("Deleting event ".$item['event-id'], LOGGER_DEBUG); - event_delete($item['event-id']); - } - - if(($item['verb'] === ACTIVITY_TAG) && ($item['object-type'] === ACTIVITY_OBJ_TAGTERM)) { - $xo = parse_xml_string($item['object'],false); - $xt = parse_xml_string($item['target'],false); - - if($xt->type === ACTIVITY_OBJ_NOTE) { - $i = q("select * from `item` where uri = '%s' and uid = %d limit 1", - dbesc($xt->id), - intval($importer['importer_uid']) - ); - if(count($i)) { - - // For tags, the owner cannot remove the tag on the author's copy of the post. - - $owner_remove = (($item['contact-id'] == $i[0]['contact-id']) ? true: false); - $author_remove = (($item['origin'] && $item['self']) ? true : false); - $author_copy = (($item['origin']) ? true : false); - - if($owner_remove && $author_copy) - continue; - if($author_remove || $owner_remove) { - $tags = explode(',',$i[0]['tag']); - $newtags = array(); - if(count($tags)) { - foreach($tags as $tag) - if(trim($tag) !== trim($xo->body)) - $newtags[] = trim($tag); - } - q("update item set tag = '%s' where id = %d", - dbesc(implode(',',$newtags)), - intval($i[0]['id']) - ); - create_tags_from_item($i[0]['id']); - } - } - } - } - - if($item['uri'] == $item['parent-uri']) { - $r = q("UPDATE `item` SET `deleted` = 1, `edited` = '%s', `changed` = '%s', - `body` = '', `title` = '' - WHERE `parent-uri` = '%s' AND `uid` = %d", - dbesc($when), - dbesc(datetime_convert()), - dbesc($item['uri']), - intval($importer['importer_uid']) - ); - create_tags_from_itemuri($item['uri'], $importer['importer_uid']); - create_files_from_itemuri($item['uri'], $importer['importer_uid']); - update_thread_uri($item['uri'], $importer['importer_uid']); - } - else { - $r = q("UPDATE `item` SET `deleted` = 1, `edited` = '%s', `changed` = '%s', - `body` = '', `title` = '' - WHERE `uri` = '%s' AND `uid` = %d", - dbesc($when), - dbesc(datetime_convert()), - dbesc($uri), - intval($importer['importer_uid']) - ); - create_tags_from_itemuri($uri, $importer['importer_uid']); - create_files_from_itemuri($uri, $importer['importer_uid']); - update_thread_uri($uri, $importer['importer_uid']); - if($item['last-child']) { - // ensure that last-child is set in case the comment that had it just got wiped. - q("UPDATE `item` SET `last-child` = 0, `changed` = '%s' WHERE `parent-uri` = '%s' AND `uid` = %d ", - dbesc(datetime_convert()), - dbesc($item['parent-uri']), - intval($item['uid']) - ); - // who is the last child now? - $r = q("SELECT `id` FROM `item` WHERE `parent-uri` = '%s' AND `type` != 'activity' AND `deleted` = 0 AND `uid` = %d - ORDER BY `created` DESC LIMIT 1", - dbesc($item['parent-uri']), - intval($importer['importer_uid']) - ); - if(count($r)) { - q("UPDATE `item` SET `last-child` = 1 WHERE `id` = %d", - intval($r[0]['id']) - ); - } - } - // if this is a relayed delete, propagate it to other recipients - - if($is_a_remote_delete) - proc_run('php',"include/notifier.php","drop",$item['id']); - } - } - } - } - } - - - foreach($feed->get_items() as $item) { - - $is_reply = false; - $item_id = $item->get_id(); - $rawthread = $item->get_item_tags( NAMESPACE_THREAD, 'in-reply-to'); - if(isset($rawthread[0]['attribs']['']['ref'])) { - $is_reply = true; - $parent_uri = $rawthread[0]['attribs']['']['ref']; - } - - if($is_reply) { - $community = false; - - if($importer['page-flags'] == PAGE_COMMUNITY || $importer['page-flags'] == PAGE_PRVGROUP ) { - $sql_extra = ''; - $community = true; - logger('local_delivery: possible community reply'); - } - else - $sql_extra = " and contact.self = 1 and item.wall = 1 "; - - // was the top-level post for this reply written by somebody on this site? - // Specifically, the recipient? - - $is_a_remote_comment = false; - $top_uri = $parent_uri; - - $r = q("select `item`.`parent-uri` from `item` - WHERE `item`.`uri` = '%s' - LIMIT 1", - dbesc($parent_uri) - ); - if($r && count($r)) { - $top_uri = $r[0]['parent-uri']; - - // POSSIBLE CLEANUP --> Why select so many fields when only forum_mode and wall are used? - $r = q("select `item`.`id`, `item`.`uri`, `item`.`tag`, `item`.`forum_mode`,`item`.`origin`,`item`.`wall`, - `contact`.`name`, `contact`.`url`, `contact`.`thumb` from `item` - INNER JOIN `contact` ON `contact`.`id` = `item`.`contact-id` - WHERE `item`.`uri` = '%s' AND (`item`.`parent-uri` = '%s' or `item`.`thr-parent` = '%s') - AND `item`.`uid` = %d - $sql_extra - LIMIT 1", - dbesc($top_uri), - dbesc($top_uri), - dbesc($top_uri), - intval($importer['importer_uid']) - ); - if($r && count($r)) - $is_a_remote_comment = true; - } - - // Does this have the characteristics of a community or private group comment? - // If it's a reply to a wall post on a community/prvgroup page it's a - // valid community comment. Also forum_mode makes it valid for sure. - // If neither, it's not. - - if($is_a_remote_comment && $community) { - if((! $r[0]['forum_mode']) && (! $r[0]['wall'])) { - $is_a_remote_comment = false; - logger('local_delivery: not a community reply'); - } - } - - if($is_a_remote_comment) { - logger('local_delivery: received remote comment'); - $is_like = false; - // remote reply to our post. Import and then notify everybody else. - - $datarray = get_atom_elements($feed, $item); - - $r = q("SELECT `id`, `uid`, `last-child`, `edited`, `body` FROM `item` WHERE `uri` = '%s' AND `uid` = %d LIMIT 1", - dbesc($item_id), - intval($importer['importer_uid']) - ); - - // Update content if 'updated' changes - - if(count($r)) { - $iid = $r[0]['id']; - if (edited_timestamp_is_newer($r[0], $datarray)) { - - // do not accept (ignore) an earlier edit than one we currently have. - if(datetime_convert('UTC','UTC',$datarray['edited']) < $r[0]['edited']) - continue; - - logger('received updated comment' , LOGGER_DEBUG); - $r = q("UPDATE `item` SET `title` = '%s', `body` = '%s', `tag` = '%s', `edited` = '%s', `changed` = '%s' WHERE `uri` = '%s' AND `uid` = %d", - dbesc($datarray['title']), - dbesc($datarray['body']), - dbesc($datarray['tag']), - dbesc(datetime_convert('UTC','UTC',$datarray['edited'])), - dbesc(datetime_convert()), - dbesc($item_id), - intval($importer['importer_uid']) - ); - create_tags_from_itemuri($item_id, $importer['importer_uid']); - - proc_run('php',"include/notifier.php","comment-import",$iid); - - } - - continue; - } - - - - $own = q("select name,url,thumb from contact where uid = %d and self = 1 limit 1", - intval($importer['importer_uid']) - ); - - - $datarray['type'] = 'remote-comment'; - $datarray['wall'] = 1; - $datarray['parent-uri'] = $parent_uri; - $datarray['uid'] = $importer['importer_uid']; - $datarray['owner-name'] = $own[0]['name']; - $datarray['owner-link'] = $own[0]['url']; - $datarray['owner-avatar'] = $own[0]['thumb']; - $datarray['contact-id'] = $importer['id']; - - if(($datarray['verb'] === ACTIVITY_LIKE) - || ($datarray['verb'] === ACTIVITY_DISLIKE) - || ($datarray['verb'] === ACTIVITY_ATTEND) - || ($datarray['verb'] === ACTIVITY_ATTENDNO) - || ($datarray['verb'] === ACTIVITY_ATTENDMAYBE)) { - $is_like = true; - $datarray['type'] = 'activity'; - $datarray['gravity'] = GRAVITY_LIKE; - $datarray['last-child'] = 0; - // only one like or dislike per person - // splitted into two queries for performance issues - $r = q("SELECT `id` FROM `item` WHERE `uid` = %d AND `author-link` = '%s' AND `verb` = '%s' AND `parent-uri` = '%s' AND NOT `deleted` LIMIT 1", - intval($datarray['uid']), - dbesc($datarray['author-link']), - dbesc($datarray['verb']), - dbesc($datarray['parent-uri']) - ); - if($r && count($r)) - continue; - - $r = q("SELECT `id` FROM `item` WHERE `uid` = %d AND `author-link` = '%s' AND `verb` = '%s' AND `thr-parent` = '%s' AND NOT `deleted` LIMIT 1", - intval($datarray['uid']), - dbesc($datarray['author-link']), - dbesc($datarray['verb']), - dbesc($datarray['parent-uri']) - - ); - if($r && count($r)) - continue; - } - - if(($datarray['verb'] === ACTIVITY_TAG) && ($datarray['object-type'] === ACTIVITY_OBJ_TAGTERM)) { - - $xo = parse_xml_string($datarray['object'],false); - $xt = parse_xml_string($datarray['target'],false); - - if(($xt->type == ACTIVITY_OBJ_NOTE) && ($xt->id)) { - - // fetch the parent item - - $tagp = q("select * from item where uri = '%s' and uid = %d limit 1", - dbesc($xt->id), - intval($importer['importer_uid']) - ); - if(! count($tagp)) - continue; - - // extract tag, if not duplicate, and this user allows tags, add to parent item - - if($xo->id && $xo->content) { - $newtag = '#[url=' . $xo->id . ']'. $xo->content . '[/url]'; - if(! (stristr($tagp[0]['tag'],$newtag))) { - $i = q("SELECT `blocktags` FROM `user` where `uid` = %d LIMIT 1", - intval($importer['importer_uid']) - ); - if(count($i) && ! intval($i[0]['blocktags'])) { - q("UPDATE item SET tag = '%s', `edited` = '%s', `changed` = '%s' WHERE id = %d", - dbesc($tagp[0]['tag'] . (strlen($tagp[0]['tag']) ? ',' : '') . $newtag), - intval($tagp[0]['id']), - dbesc(datetime_convert()), - dbesc(datetime_convert()) - ); - create_tags_from_item($tagp[0]['id']); - } - } - } - } - } - - - $posted_id = item_store($datarray); - $parent = 0; - - if($posted_id) { - - $datarray["id"] = $posted_id; - - $r = q("SELECT `parent`, `parent-uri` FROM `item` WHERE `id` = %d AND `uid` = %d LIMIT 1", - intval($posted_id), - intval($importer['importer_uid']) - ); - if(count($r)) { - $parent = $r[0]['parent']; - $parent_uri = $r[0]['parent-uri']; - } - - if(! $is_like) { - $r1 = q("UPDATE `item` SET `last-child` = 0, `changed` = '%s' WHERE `uid` = %d AND `parent` = %d", - dbesc(datetime_convert()), - intval($importer['importer_uid']), - intval($r[0]['parent']) - ); - - $r2 = q("UPDATE `item` SET `last-child` = 1, `changed` = '%s' WHERE `uid` = %d AND `id` = %d", - dbesc(datetime_convert()), - intval($importer['importer_uid']), - intval($posted_id) - ); - } - - if($posted_id && $parent) { - proc_run('php',"include/notifier.php","comment-import","$posted_id"); - } - - return 0; - // NOTREACHED - } - } - else { - - // regular comment that is part of this total conversation. Have we seen it? If not, import it. - - $item_id = $item->get_id(); - $datarray = get_atom_elements($feed,$item); - - if($importer['rel'] == CONTACT_IS_FOLLOWER) - continue; - - $r = q("SELECT `uid`, `last-child`, `edited`, `body` FROM `item` WHERE `uri` = '%s' AND `uid` = %d LIMIT 1", - dbesc($item_id), - intval($importer['importer_uid']) - ); - - // Update content if 'updated' changes - - if(count($r)) { - if (edited_timestamp_is_newer($r[0], $datarray)) { - - // do not accept (ignore) an earlier edit than one we currently have. - if(datetime_convert('UTC','UTC',$datarray['edited']) < $r[0]['edited']) - continue; - - $r = q("UPDATE `item` SET `title` = '%s', `body` = '%s', `tag` = '%s', `edited` = '%s', `changed` = '%s' WHERE `uri` = '%s' AND `uid` = %d", - dbesc($datarray['title']), - dbesc($datarray['body']), - dbesc($datarray['tag']), - dbesc(datetime_convert('UTC','UTC',$datarray['edited'])), - dbesc(datetime_convert()), - dbesc($item_id), - intval($importer['importer_uid']) - ); - create_tags_from_itemuri($item_id, $importer['importer_uid']); - } - - // update last-child if it changes - - $allow = $item->get_item_tags( NAMESPACE_DFRN, 'comment-allow'); - if(($allow) && ($allow[0]['data'] != $r[0]['last-child'])) { - $r = q("UPDATE `item` SET `last-child` = 0, `changed` = '%s' WHERE `parent-uri` = '%s' AND `uid` = %d", - dbesc(datetime_convert()), - dbesc($parent_uri), - intval($importer['importer_uid']) - ); - $r = q("UPDATE `item` SET `last-child` = %d , `changed` = '%s' WHERE `uri` = '%s' AND `uid` = %d", - intval($allow[0]['data']), - dbesc(datetime_convert()), - dbesc($item_id), - intval($importer['importer_uid']) - ); - } - continue; - } - - $datarray['parent-uri'] = $parent_uri; - $datarray['uid'] = $importer['importer_uid']; - $datarray['contact-id'] = $importer['id']; - if(($datarray['verb'] === ACTIVITY_LIKE) - || ($datarray['verb'] === ACTIVITY_DISLIKE) - || ($datarray['verb'] === ACTIVITY_ATTEND) - || ($datarray['verb'] === ACTIVITY_ATTENDNO) - || ($datarray['verb'] === ACTIVITY_ATTENDMAYBE)) { - $datarray['type'] = 'activity'; - $datarray['gravity'] = GRAVITY_LIKE; - // only one like or dislike per person - // splitted into two queries for performance issues - $r = q("SELECT `id` FROM `item` WHERE `uid` = %d AND `author-link` = '%s' AND `verb` = '%s' AND `parent-uri` = '%s' AND NOT `deleted` LIMIT 1", - intval($datarray['uid']), - dbesc($datarray['author-link']), - dbesc($datarray['verb']), - dbesc($datarray['parent-uri']) - ); - if($r && count($r)) - continue; - - $r = q("SELECT `id` FROM `item` WHERE `uid` = %d AND `author-link` = '%s' AND `verb` = '%s' AND `thr-parent` = '%s' AND NOT `deleted` LIMIT 1", - intval($datarray['uid']), - dbesc($datarray['author-link']), - dbesc($datarray['verb']), - dbesc($datarray['parent-uri']) - ); - if($r && count($r)) - continue; - - } - - if(($datarray['verb'] === ACTIVITY_TAG) && ($datarray['object-type'] === ACTIVITY_OBJ_TAGTERM)) { - - $xo = parse_xml_string($datarray['object'],false); - $xt = parse_xml_string($datarray['target'],false); - - if($xt->type == ACTIVITY_OBJ_NOTE) { - $r = q("select * from item where `uri` = '%s' AND `uid` = %d limit 1", - dbesc($xt->id), - intval($importer['importer_uid']) - ); - if(! count($r)) - continue; - - // extract tag, if not duplicate, add to parent item - if($xo->content) { - if(! (stristr($r[0]['tag'],trim($xo->content)))) { - q("UPDATE item SET tag = '%s' WHERE id = %d", - dbesc($r[0]['tag'] . (strlen($r[0]['tag']) ? ',' : '') . '#[url=' . $xo->id . ']'. $xo->content . '[/url]'), - intval($r[0]['id']) - ); - create_tags_from_item($r[0]['id']); - } - } - } - } - - $posted_id = item_store($datarray); - - continue; - } - } - - else { - - // Head post of a conversation. Have we seen it? If not, import it. - - - $item_id = $item->get_id(); - $datarray = get_atom_elements($feed,$item); - - if((x($datarray,'object-type')) && ($datarray['object-type'] === ACTIVITY_OBJ_EVENT)) { - $ev = bbtoevent($datarray['body']); - if((x($ev,'desc') || x($ev,'summary')) && x($ev,'start')) { - $ev['cid'] = $importer['id']; - $ev['uid'] = $importer['uid']; - $ev['uri'] = $item_id; - $ev['edited'] = $datarray['edited']; - $ev['private'] = $datarray['private']; - $ev['guid'] = $datarray['guid']; - - $r = q("SELECT * FROM `event` WHERE `uri` = '%s' AND `uid` = %d LIMIT 1", - dbesc($item_id), - intval($importer['uid']) - ); - if(count($r)) - $ev['id'] = $r[0]['id']; - $xyz = event_store($ev); - continue; - } - } - - $r = q("SELECT `uid`, `last-child`, `edited`, `body` FROM `item` WHERE `uri` = '%s' AND `uid` = %d LIMIT 1", - dbesc($item_id), - intval($importer['importer_uid']) - ); - - // Update content if 'updated' changes - - if(count($r)) { - if (edited_timestamp_is_newer($r[0], $datarray)) { - - // do not accept (ignore) an earlier edit than one we currently have. - if(datetime_convert('UTC','UTC',$datarray['edited']) < $r[0]['edited']) - continue; - - $r = q("UPDATE `item` SET `title` = '%s', `body` = '%s', `tag` = '%s', `edited` = '%s', `changed` = '%s' WHERE `uri` = '%s' AND `uid` = %d", - dbesc($datarray['title']), - dbesc($datarray['body']), - dbesc($datarray['tag']), - dbesc(datetime_convert('UTC','UTC',$datarray['edited'])), - dbesc(datetime_convert()), - dbesc($item_id), - intval($importer['importer_uid']) - ); - create_tags_from_itemuri($item_id, $importer['importer_uid']); - update_thread_uri($item_id, $importer['importer_uid']); - } - - // update last-child if it changes - - $allow = $item->get_item_tags( NAMESPACE_DFRN, 'comment-allow'); - if($allow && $allow[0]['data'] != $r[0]['last-child']) { - $r = q("UPDATE `item` SET `last-child` = %d , `changed` = '%s' WHERE `uri` = '%s' AND `uid` = %d", - intval($allow[0]['data']), - dbesc(datetime_convert()), - dbesc($item_id), - intval($importer['importer_uid']) - ); - } - continue; - } - - $datarray['parent-uri'] = $item_id; - $datarray['uid'] = $importer['importer_uid']; - $datarray['contact-id'] = $importer['id']; - - - if(! link_compare($datarray['owner-link'],$importer['url'])) { - // The item owner info is not our contact. It's OK and is to be expected if this is a tgroup delivery, - // but otherwise there's a possible data mixup on the sender's system. - // the tgroup delivery code called from item_store will correct it if it's a forum, - // but we're going to unconditionally correct it here so that the post will always be owned by our contact. - logger('local_delivery: Correcting item owner.', LOGGER_DEBUG); - $datarray['owner-name'] = $importer['senderName']; - $datarray['owner-link'] = $importer['url']; - $datarray['owner-avatar'] = $importer['thumb']; - } - - if(($importer['rel'] == CONTACT_IS_FOLLOWER) && (! tgroup_check($importer['importer_uid'],$datarray))) - continue; - - // This is my contact on another system, but it's really me. - // Turn this into a wall post. - $notify = item_is_remote_self($importer, $datarray); - - $posted_id = item_store($datarray, false, $notify); - - if(stristr($datarray['verb'],ACTIVITY_POKE)) { - $verb = urldecode(substr($datarray['verb'],strpos($datarray['verb'],'#')+1)); - if(! $verb) - continue; - $xo = parse_xml_string($datarray['object'],false); - - if(($xo->type == ACTIVITY_OBJ_PERSON) && ($xo->id)) { - - // somebody was poked/prodded. Was it me? - - $links = parse_xml_string("".unxmlify($xo->link)."",false); - - foreach($links->link as $l) { - $atts = $l->attributes(); - switch($atts['rel']) { - case "alternate": - $Blink = $atts['href']; - break; - default: - break; - } - } - if($Blink && link_compare($Blink,$a->get_baseurl() . '/profile/' . $importer['nickname'])) { - - // send a notification - require_once('include/enotify.php'); - - notification(array( - 'type' => NOTIFY_POKE, - 'notify_flags' => $importer['notify-flags'], - 'language' => $importer['language'], - 'to_name' => $importer['username'], - 'to_email' => $importer['email'], - 'uid' => $importer['importer_uid'], - 'item' => $datarray, - 'link' => $a->get_baseurl().'/display/'.urlencode(get_item_guid($posted_id)), - 'source_name' => stripslashes($datarray['author-name']), - 'source_link' => $datarray['author-link'], - 'source_photo' => ((link_compare($datarray['author-link'],$importer['url'])) - ? $importer['thumb'] : $datarray['author-avatar']), - 'verb' => $datarray['verb'], - 'otype' => 'person', - 'activity' => $verb, - 'parent' => $datarray['parent'] - )); - } - } - } - - continue; - } - } - - return 0; - // NOTREACHED - -} - - function new_follower($importer,$contact,$datarray,$item,$sharing = false) { $url = notags(trim($datarray['author-link'])); $name = notags(trim($datarray['author-name'])); @@ -3598,7 +1461,7 @@ function new_follower($importer,$contact,$datarray,$item,$sharing = false) { } } -function lose_follower($importer,$contact,$datarray,$item) { +function lose_follower($importer,$contact,$datarray = array(),$item = "") { if(($contact['rel'] == CONTACT_IS_FRIEND) || ($contact['rel'] == CONTACT_IS_SHARING)) { q("UPDATE `contact` SET `rel` = %d WHERE `id` = %d", @@ -3611,7 +1474,7 @@ function lose_follower($importer,$contact,$datarray,$item) { } } -function lose_sharer($importer,$contact,$datarray,$item) { +function lose_sharer($importer,$contact,$datarray = array(),$item = "") { if(($contact['rel'] == CONTACT_IS_FRIEND) || ($contact['rel'] == CONTACT_IS_FOLLOWER)) { q("UPDATE `contact` SET `rel` = %d WHERE `id` = %d", diff --git a/mod/dfrn_notify.php b/mod/dfrn_notify.php index 4aa777b550..780fb456f5 100644 --- a/mod/dfrn_notify.php +++ b/mod/dfrn_notify.php @@ -1,6 +1,7 @@ Date: Fri, 5 Feb 2016 21:30:31 +0100 Subject: [PATCH 198/242] vier smileybutton: little polish in dark.css --- view/theme/vier/dark.css | 1 - 1 file changed, 1 deletion(-) diff --git a/view/theme/vier/dark.css b/view/theme/vier/dark.css index 7c671e4b7d..5ddaf71a2f 100644 --- a/view/theme/vier/dark.css +++ b/view/theme/vier/dark.css @@ -66,5 +66,4 @@ li :hover { table.smiley-preview{ background-color: #252C33 !important; - box-shadow: 0px 5px 10px rgba(0, 0, 0, 0.7); } \ No newline at end of file From 1c82e9f209eb72a7ed8d0fc1ee6a66b8d02d4110 Mon Sep 17 00:00:00 2001 From: Michael Vogel Date: Fri, 5 Feb 2016 21:31:11 +0100 Subject: [PATCH 199/242] Bugfix for OStatus to prevent sending messages from wrong senders --- include/dfrn.php | 1259 ++++++++++++++++++++++++++++++++++++++- include/import-dfrn.php | 1229 -------------------------------------- include/ostatus.php | 4 + 3 files changed, 1260 insertions(+), 1232 deletions(-) delete mode 100644 include/import-dfrn.php diff --git a/include/dfrn.php b/include/dfrn.php index 4c1f21dd06..e286b75cce 100644 --- a/include/dfrn.php +++ b/include/dfrn.php @@ -6,9 +6,19 @@ * https://github.com/friendica/friendica/wiki/Protocol */ -require_once('include/items.php'); -require_once('include/Contact.php'); -require_once('include/ostatus.php'); +require_once("include/Contact.php"); +require_once("include/ostatus.php"); +require_once("include/enotify.php"); +require_once("include/threads.php"); +require_once("include/socgraph.php"); +require_once("include/items.php"); +require_once("include/tags.php"); +require_once("include/files.php"); +require_once("include/event.php"); +require_once("include/text.php"); +require_once("include/oembed.php"); +require_once("include/html2bbcode.php"); +require_once("library/HTMLPurifier.auto.php"); /** * @brief This class contain functions to create and send DFRN XML files @@ -16,6 +26,10 @@ require_once('include/ostatus.php'); */ class dfrn { + const DFRN_TOP_LEVEL = 0; + const DFRN_REPLY = 1; + const DFRN_REPLY_RC = 2; + /** * @brief Generates the atom entries for delivery.php * @@ -1053,4 +1067,1243 @@ class dfrn { return $res->status; } + + /** + * @brief Add new birthday event for this person + * + * @param array $contact Contact record + * @param string $birthday Birthday of the contact + * + */ + private function birthday_event($contact, $birthday) { + + logger("updating birthday: ".$birthday." for contact ".$contact["id"]); + + $bdtext = sprintf(t("%s\'s birthday"), $contact["name"]); + $bdtext2 = sprintf(t("Happy Birthday %s"), " [url=".$contact["url"]."]".$contact["name"]."[/url]") ; + + + $r = q("INSERT INTO `event` (`uid`,`cid`,`created`,`edited`,`start`,`finish`,`summary`,`desc`,`type`) + VALUES ( %d, %d, '%s', '%s', '%s', '%s', '%s', '%s', '%s') ", + intval($contact["uid"]), + intval($contact["id"]), + dbesc(datetime_convert()), + dbesc(datetime_convert()), + dbesc(datetime_convert("UTC","UTC", $birthday)), + dbesc(datetime_convert("UTC","UTC", $birthday." + 1 day ")), + dbesc($bdtext), + dbesc($bdtext2), + dbesc("birthday") + ); + } + + /** + * @brief Fetch the author data from head or entry items + * + * @param object $xpath XPath object + * @param object $context In which context should the data be searched + * @param array $importer Record of the importer user mixed with contact of the content + * @param string $element Element name from which the data is fetched + * @param bool $onlyfetch Should the data only be fetched or should it update the contact record as well + * + * @return Returns an array with relevant data of the author + */ + private function fetchauthor($xpath, $context, $importer, $element, $onlyfetch) { + + $author = array(); + $author["name"] = $xpath->evaluate($element."/atom:name/text()", $context)->item(0)->nodeValue; + $author["link"] = $xpath->evaluate($element."/atom:uri/text()", $context)->item(0)->nodeValue; + + $r = q("SELECT `id`, `uid`, `network`, `avatar-date`, `name-date`, `uri-date`, `addr`, + `name`, `nick`, `about`, `location`, `keywords`, `bdyear`, `bd` + FROM `contact` WHERE `uid` = %d AND `nurl` = '%s' AND `network` != '%s'", + intval($importer["uid"]), dbesc(normalise_link($author["link"])), dbesc(NETWORK_STATUSNET)); + if ($r) { + $contact = $r[0]; + $author["contact-id"] = $r[0]["id"]; + $author["network"] = $r[0]["network"]; + } else { + $author["contact-id"] = $importer["id"]; + $author["network"] = $importer["network"]; + $onlyfetch = true; + } + + // Until now we aren't serving different sizes - but maybe later + $avatarlist = array(); + // @todo check if "avatar" or "photo" would be the best field in the specification + $avatars = $xpath->query($element."/atom:link[@rel='avatar']", $context); + foreach($avatars AS $avatar) { + $href = ""; + $width = 0; + foreach($avatar->attributes AS $attributes) { + if ($attributes->name == "href") + $href = $attributes->textContent; + if ($attributes->name == "width") + $width = $attributes->textContent; + if ($attributes->name == "updated") + $contact["avatar-date"] = $attributes->textContent; + } + if (($width > 0) AND ($href != "")) + $avatarlist[$width] = $href; + } + if (count($avatarlist) > 0) { + krsort($avatarlist); + $author["avatar"] = current($avatarlist); + } + + if ($r AND !$onlyfetch) { + + // When was the last change to name or uri? + $name_element = $xpath->query($element."/atom:name", $context)->item(0); + foreach($name_element->attributes AS $attributes) + if ($attributes->name == "updated") + $contact["name-date"] = $attributes->textContent; + + $link_element = $xpath->query($element."/atom:link", $context)->item(0); + foreach($link_element->attributes AS $attributes) + if ($attributes->name == "updated") + $contact["uri-date"] = $attributes->textContent; + + // Update contact data + $value = $xpath->evaluate($element."/dfrn:handle/text()", $context)->item(0)->nodeValue; + if ($value != "") + $contact["addr"] = $value; + + $value = $xpath->evaluate($element."/poco:displayName/text()", $context)->item(0)->nodeValue; + if ($value != "") + $contact["name"] = $value; + + $value = $xpath->evaluate($element."/poco:preferredUsername/text()", $context)->item(0)->nodeValue; + if ($value != "") + $contact["nick"] = $value; + + $value = $xpath->evaluate($element."/poco:note/text()", $context)->item(0)->nodeValue; + if ($value != "") + $contact["about"] = $value; + + $value = $xpath->evaluate($element."/poco:address/poco:formatted/text()", $context)->item(0)->nodeValue; + if ($value != "") + $contact["location"] = $value; + + /// @todo Add support for the following fields that we don't support by now in the contact table: + /// - poco:utcOffset + /// - poco:ims + /// - poco:urls + /// - poco:locality + /// - poco:region + /// - poco:country + + // Save the keywords into the contact table + $tags = array(); + $tagelements = $xpath->evaluate($element."/poco:tags/text()", $context); + foreach($tagelements AS $tag) + $tags[$tag->nodeValue] = $tag->nodeValue; + + if (count($tags)) + $contact["keywords"] = implode(", ", $tags); + + // "dfrn:birthday" contains the birthday converted to UTC + $old_bdyear = $contact["bdyear"]; + + $birthday = $xpath->evaluate($element."/dfrn:birthday/text()", $context)->item(0)->nodeValue; + + if (strtotime($birthday) > time()) { + $bd_timestamp = strtotime($birthday); + + $contact["bdyear"] = date("Y", $bd_timestamp); + } + + // "poco:birthday" is the birthday in the format "yyyy-mm-dd" + $value = $xpath->evaluate($element."/poco:birthday/text()", $context)->item(0)->nodeValue; + + if (!in_array($value, array("", "0000-00-00"))) { + $bdyear = date("Y"); + $value = str_replace("0000", $bdyear, $value); + + if (strtotime($value) < time()) { + $value = str_replace($bdyear, $bdyear + 1, $value); + $bdyear = $bdyear + 1; + } + + $contact["bd"] = $value; + } + + if ($old_bdyear != $contact["bdyear"]) + self::birthday_event($contact, $birthday); + + // Get all field names + $fields = array(); + foreach ($r[0] AS $field => $data) + $fields[$field] = $data; + + unset($fields["id"]); + unset($fields["uid"]); + unset($fields["avatar-date"]); + unset($fields["name-date"]); + unset($fields["uri-date"]); + + // Update check for this field has to be done differently + $datefields = array("name-date", "uri-date"); + foreach ($datefields AS $field) + if (strtotime($contact[$field]) > strtotime($r[0][$field])) + $update = true; + + foreach ($fields AS $field => $data) + if ($contact[$field] != $r[0][$field]) { + logger("Difference for contact ".$contact["id"]." in field '".$field."'. Old value: '".$contact[$field]."', new value '".$r[0][$field]."'", LOGGER_DEBUG); + $update = true; + } + + if ($update) { + logger("Update contact data for contact ".$contact["id"], LOGGER_DEBUG); + + q("UPDATE `contact` SET `name` = '%s', `nick` = '%s', `about` = '%s', `location` = '%s', + `addr` = '%s', `keywords` = '%s', `bdyear` = '%s', `bd` = '%s', + `name-date` = '%s', `uri-date` = '%s' + WHERE `id` = %d AND `network` = '%s'", + dbesc($contact["name"]), dbesc($contact["nick"]), dbesc($contact["about"]), dbesc($contact["location"]), + dbesc($contact["addr"]), dbesc($contact["keywords"]), dbesc($contact["bdyear"]), + dbesc($contact["bd"]), dbesc($contact["name-date"]), dbesc($contact["uri-date"]), + intval($contact["id"]), dbesc($contact["network"])); + } + + update_contact_avatar($author["avatar"], $importer["uid"], $contact["id"], + (strtotime($contact["avatar-date"]) > strtotime($r[0]["avatar-date"]))); + + $contact["generation"] = 2; + $contact["photo"] = $author["avatar"]; + update_gcontact($contact); + } + + return($author); + } + + private function transform_activity($xpath, $activity, $element) { + if (!is_object($activity)) + return ""; + + $obj_doc = new DOMDocument("1.0", "utf-8"); + $obj_doc->formatOutput = true; + + $obj_element = $obj_doc->createElementNS(NAMESPACE_ATOM1, $element); + + $activity_type = $xpath->query("activity:object-type/text()", $activity)->item(0)->nodeValue; + xml_add_element($obj_doc, $obj_element, "type", $activity_type); + + $id = $xpath->query("atom:id", $activity)->item(0); + if (is_object($id)) + $obj_element->appendChild($obj_doc->importNode($id, true)); + + $title = $xpath->query("atom:title", $activity)->item(0); + if (is_object($title)) + $obj_element->appendChild($obj_doc->importNode($title, true)); + + $link = $xpath->query("atom:link", $activity)->item(0); + if (is_object($link)) + $obj_element->appendChild($obj_doc->importNode($link, true)); + + $content = $xpath->query("atom:content", $activity)->item(0); + if (is_object($content)) + $obj_element->appendChild($obj_doc->importNode($content, true)); + + $obj_doc->appendChild($obj_element); + + $objxml = $obj_doc->saveXML($obj_element); + + // @todo This isn't totally clean. We should find a way to transform the namespaces + $objxml = str_replace("<".$element.' xmlns="http://www.w3.org/2005/Atom">', "<".$element.">", $objxml); + return($objxml); + } + + private function process_mail($xpath, $mail, $importer) { + + logger("Processing mails"); + + $msg = array(); + $msg["uid"] = $importer["importer_uid"]; + $msg["from-name"] = $xpath->query("dfrn:sender/dfrn:name/text()", $mail)->item(0)->nodeValue; + $msg["from-url"] = $xpath->query("dfrn:sender/dfrn:uri/text()", $mail)->item(0)->nodeValue; + $msg["from-photo"] = $xpath->query("dfrn:sender/dfrn:avatar/text()", $mail)->item(0)->nodeValue; + $msg["contact-id"] = $importer["id"]; + $msg["uri"] = $xpath->query("dfrn:id/text()", $mail)->item(0)->nodeValue; + $msg["parent-uri"] = $xpath->query("dfrn:in-reply-to/text()", $mail)->item(0)->nodeValue; + $msg["created"] = $xpath->query("dfrn:sentdate/text()", $mail)->item(0)->nodeValue; + $msg["title"] = $xpath->query("dfrn:subject/text()", $mail)->item(0)->nodeValue; + $msg["body"] = $xpath->query("dfrn:content/text()", $mail)->item(0)->nodeValue; + $msg["seen"] = 0; + $msg["replied"] = 0; + + dbesc_array($msg); + + $r = dbq("INSERT INTO `mail` (`".implode("`, `", array_keys($msg))."`) VALUES ('".implode("', '", array_values($msg))."')"); + + // send notifications. + + $notif_params = array( + "type" => NOTIFY_MAIL, + "notify_flags" => $importer["notify-flags"], + "language" => $importer["language"], + "to_name" => $importer["username"], + "to_email" => $importer["email"], + "uid" => $importer["importer_uid"], + "item" => $msg, + "source_name" => $msg["from-name"], + "source_link" => $importer["url"], + "source_photo" => $importer["thumb"], + "verb" => ACTIVITY_POST, + "otype" => "mail" + ); + + notification($notif_params); + + logger("Mail is processed, notification was sent."); + } + + private function process_suggestion($xpath, $suggestion, $importer) { + + logger("Processing suggestions"); + + $suggest = array(); + $suggest["uid"] = $importer["importer_uid"]; + $suggest["cid"] = $importer["id"]; + $suggest["url"] = $xpath->query("dfrn:url/text()", $suggestion)->item(0)->nodeValue; + $suggest["name"] = $xpath->query("dfrn:name/text()", $suggestion)->item(0)->nodeValue; + $suggest["photo"] = $xpath->query("dfrn:photo/text()", $suggestion)->item(0)->nodeValue; + $suggest["request"] = $xpath->query("dfrn:request/text()", $suggestion)->item(0)->nodeValue; + $suggest["body"] = $xpath->query("dfrn:note/text()", $suggestion)->item(0)->nodeValue; + + // Does our member already have a friend matching this description? + + $r = q("SELECT `id` FROM `contact` WHERE `name` = '%s' AND `nurl` = '%s' AND `uid` = %d LIMIT 1", + dbesc($suggest["name"]), + dbesc(normalise_link($suggest["url"])), + intval($suggest["uid"]) + ); + if(count($r)) + return false; + + // Do we already have an fcontact record for this person? + + $fid = 0; + $r = q("SELECT `id` FROM `fcontact` WHERE `url` = '%s' AND `name` = '%s' AND `request` = '%s' LIMIT 1", + dbesc($suggest["url"]), + dbesc($suggest["name"]), + dbesc($suggest["request"]) + ); + if(count($r)) { + $fid = $r[0]["id"]; + + // OK, we do. Do we already have an introduction for this person ? + $r = q("SELECT `id` FROM `intro` WHERE `uid` = %d AND `fid` = %d LIMIT 1", + intval($suggest["uid"]), + intval($fid) + ); + if(count($r)) + return false; + } + if(!$fid) + $r = q("INSERT INTO `fcontact` (`name`,`url`,`photo`,`request`) VALUES ('%s', '%s', '%s', '%s')", + dbesc($suggest["name"]), + dbesc($suggest["url"]), + dbesc($suggest["photo"]), + dbesc($suggest["request"]) + ); + $r = q("SELECT `id` FROM `fcontact` WHERE `url` = '%s' AND `name` = '%s' AND `request` = '%s' LIMIT 1", + dbesc($suggest["url"]), + dbesc($suggest["name"]), + dbesc($suggest["request"]) + ); + if(count($r)) + $fid = $r[0]["id"]; + else + // database record did not get created. Quietly give up. + return false; + + + $hash = random_string(); + + $r = q("INSERT INTO `intro` (`uid`, `fid`, `contact-id`, `note`, `hash`, `datetime`, `blocked`) + VALUES(%d, %d, %d, '%s', '%s', '%s', %d)", + intval($suggest["uid"]), + intval($fid), + intval($suggest["cid"]), + dbesc($suggest["body"]), + dbesc($hash), + dbesc(datetime_convert()), + intval(0) + ); + + notification(array( + "type" => NOTIFY_SUGGEST, + "notify_flags" => $importer["notify-flags"], + "language" => $importer["language"], + "to_name" => $importer["username"], + "to_email" => $importer["email"], + "uid" => $importer["importer_uid"], + "item" => $suggest, + "link" => App::get_baseurl()."/notifications/intros", + "source_name" => $importer["name"], + "source_link" => $importer["url"], + "source_photo" => $importer["photo"], + "verb" => ACTIVITY_REQ_FRIEND, + "otype" => "intro" + )); + + return true; + + } + + private function process_relocation($xpath, $relocation, $importer) { + + logger("Processing relocations"); + + $relocate = array(); + $relocate["uid"] = $importer["importer_uid"]; + $relocate["cid"] = $importer["id"]; + $relocate["url"] = $xpath->query("dfrn:url/text()", $relocation)->item(0)->nodeValue; + $relocate["name"] = $xpath->query("dfrn:name/text()", $relocation)->item(0)->nodeValue; + $relocate["photo"] = $xpath->query("dfrn:photo/text()", $relocation)->item(0)->nodeValue; + $relocate["thumb"] = $xpath->query("dfrn:thumb/text()", $relocation)->item(0)->nodeValue; + $relocate["micro"] = $xpath->query("dfrn:micro/text()", $relocation)->item(0)->nodeValue; + $relocate["request"] = $xpath->query("dfrn:request/text()", $relocation)->item(0)->nodeValue; + $relocate["confirm"] = $xpath->query("dfrn:confirm/text()", $relocation)->item(0)->nodeValue; + $relocate["notify"] = $xpath->query("dfrn:notify/text()", $relocation)->item(0)->nodeValue; + $relocate["poll"] = $xpath->query("dfrn:poll/text()", $relocation)->item(0)->nodeValue; + $relocate["sitepubkey"] = $xpath->query("dfrn:sitepubkey/text()", $relocation)->item(0)->nodeValue; + + // update contact + $r = q("SELECT `photo`, `url` FROM `contact` WHERE `id` = %d AND `uid` = %d;", + intval($importer["id"]), + intval($importer["importer_uid"])); + if (!$r) + return false; + + $old = $r[0]; + + $x = q("UPDATE `contact` SET + `name` = '%s', + `photo` = '%s', + `thumb` = '%s', + `micro` = '%s', + `url` = '%s', + `nurl` = '%s', + `request` = '%s', + `confirm` = '%s', + `notify` = '%s', + `poll` = '%s', + `site-pubkey` = '%s' + WHERE `id` = %d AND `uid` = %d;", + dbesc($relocate["name"]), + dbesc($relocate["photo"]), + dbesc($relocate["thumb"]), + dbesc($relocate["micro"]), + dbesc($relocate["url"]), + dbesc(normalise_link($relocate["url"])), + dbesc($relocate["request"]), + dbesc($relocate["confirm"]), + dbesc($relocate["notify"]), + dbesc($relocate["poll"]), + dbesc($relocate["sitepubkey"]), + intval($importer["id"]), + intval($importer["importer_uid"])); + + if ($x === false) + return false; + + // update items + $fields = array( + 'owner-link' => array($old["url"], $relocate["url"]), + 'author-link' => array($old["url"], $relocate["url"]), + 'owner-avatar' => array($old["photo"], $relocate["photo"]), + 'author-avatar' => array($old["photo"], $relocate["photo"]), + ); + foreach ($fields as $n=>$f){ + $x = q("UPDATE `item` SET `%s` = '%s' WHERE `%s` = '%s' AND `uid` = %d", + $n, dbesc($f[1]), + $n, dbesc($f[0]), + intval($importer["importer_uid"])); + if ($x === false) + return false; + } + + /// @TODO + /// merge with current record, current contents have priority + /// update record, set url-updated + /// update profile photos + /// schedule a scan? + return true; + } + + private function update_content($current, $item, $importer, $entrytype) { + $changed = false; + + if (edited_timestamp_is_newer($current, $item)) { + + // do not accept (ignore) an earlier edit than one we currently have. + if(datetime_convert("UTC","UTC",$item["edited"]) < $current["edited"]) + return(false); + + $r = q("UPDATE `item` SET `title` = '%s', `body` = '%s', `tag` = '%s', `edited` = '%s', `changed` = '%s' WHERE `uri` = '%s' AND `uid` = %d", + dbesc($item["title"]), + dbesc($item["body"]), + dbesc($item["tag"]), + dbesc(datetime_convert("UTC","UTC",$item["edited"])), + dbesc(datetime_convert()), + dbesc($item["uri"]), + intval($importer["importer_uid"]) + ); + create_tags_from_itemuri($item["uri"], $importer["importer_uid"]); + update_thread_uri($item["uri"], $importer["importer_uid"]); + + $changed = true; + + if ($entrytype == DFRN_REPLY_RC) + proc_run("php", "include/notifier.php","comment-import", $current["id"]); + } + + // update last-child if it changes + if($item["last-child"] AND ($item["last-child"] != $current["last-child"])) { + $r = q("UPDATE `item` SET `last-child` = 0, `changed` = '%s' WHERE `parent-uri` = '%s' AND `uid` = %d", + dbesc(datetime_convert()), + dbesc($item["parent-uri"]), + intval($importer["importer_uid"]) + ); + $r = q("UPDATE `item` SET `last-child` = %d , `changed` = '%s' WHERE `uri` = '%s' AND `uid` = %d", + intval($item["last-child"]), + dbesc(datetime_convert()), + dbesc($item["uri"]), + intval($importer["importer_uid"]) + ); + } + return $changed; + } + + private function get_entry_type($importer, $item) { + if ($item["parent-uri"] != $item["uri"]) { + $community = false; + + if($importer["page-flags"] == PAGE_COMMUNITY || $importer["page-flags"] == PAGE_PRVGROUP) { + $sql_extra = ""; + $community = true; + logger("possible community action"); + } else + $sql_extra = " AND `contact`.`self` AND `item`.`wall` "; + + // was the top-level post for this action written by somebody on this site? + // Specifically, the recipient? + + $is_a_remote_action = false; + + $r = q("SELECT `item`.`parent-uri` FROM `item` + WHERE `item`.`uri` = '%s' + LIMIT 1", + dbesc($item["parent-uri"]) + ); + if($r && count($r)) { + $r = q("SELECT `item`.`forum_mode`, `item`.`wall` FROM `item` + INNER JOIN `contact` ON `contact`.`id` = `item`.`contact-id` + WHERE `item`.`uri` = '%s' AND (`item`.`parent-uri` = '%s' OR `item`.`thr-parent` = '%s') + AND `item`.`uid` = %d + $sql_extra + LIMIT 1", + dbesc($r[0]["parent-uri"]), + dbesc($r[0]["parent-uri"]), + dbesc($r[0]["parent-uri"]), + intval($importer["importer_uid"]) + ); + if($r && count($r)) + $is_a_remote_action = true; + } + + // Does this have the characteristics of a community or private group action? + // If it's an action to a wall post on a community/prvgroup page it's a + // valid community action. Also forum_mode makes it valid for sure. + // If neither, it's not. + + if($is_a_remote_action && $community) { + if((!$r[0]["forum_mode"]) && (!$r[0]["wall"])) { + $is_a_remote_action = false; + logger("not a community action"); + } + } + + if ($is_a_remote_action) + return DFRN_REPLY_RC; + else + return DFRN_REPLY; + + } else + return DFRN_TOP_LEVEL; + + } + + private function do_poke($item, $importer, $posted_id) { + $verb = urldecode(substr($item["verb"],strpos($item["verb"], "#")+1)); + if(!$verb) + return; + $xo = parse_xml_string($item["object"],false); + + if(($xo->type == ACTIVITY_OBJ_PERSON) && ($xo->id)) { + + // somebody was poked/prodded. Was it me? + $links = parse_xml_string("".unxmlify($xo->link)."",false); + + foreach($links->link as $l) { + $atts = $l->attributes(); + switch($atts["rel"]) { + case "alternate": + $Blink = $atts["href"]; + break; + default: + break; + } + } + if($Blink && link_compare($Blink,$a->get_baseurl()."/profile/".$importer["nickname"])) { + + // send a notification + notification(array( + "type" => NOTIFY_POKE, + "notify_flags" => $importer["notify-flags"], + "language" => $importer["language"], + "to_name" => $importer["username"], + "to_email" => $importer["email"], + "uid" => $importer["importer_uid"], + "item" => $item, + "link" => $a->get_baseurl()."/display/".urlencode(get_item_guid($posted_id)), + "source_name" => stripslashes($item["author-name"]), + "source_link" => $item["author-link"], + "source_photo" => ((link_compare($item["author-link"],$importer["url"])) + ? $importer["thumb"] : $item["author-avatar"]), + "verb" => $item["verb"], + "otype" => "person", + "activity" => $verb, + "parent" => $item["parent"] + )); + } + } + } + + private function process_entry($header, $xpath, $entry, $importer) { + + logger("Processing entries"); + + $item = $header; + + // Get the uri + $item["uri"] = $xpath->query("atom:id/text()", $entry)->item(0)->nodeValue; + + // Fetch the owner + $owner = self::fetchauthor($xpath, $entry, $importer, "dfrn:owner", true); + + $item["owner-name"] = $owner["name"]; + $item["owner-link"] = $owner["link"]; + $item["owner-avatar"] = $owner["avatar"]; + + // fetch the author + $author = self::fetchauthor($xpath, $entry, $importer, "atom:author", true); + + $item["author-name"] = $author["name"]; + $item["author-link"] = $author["link"]; + $item["author-avatar"] = $author["avatar"]; + + $item["title"] = $xpath->query("atom:title/text()", $entry)->item(0)->nodeValue; + + $item["created"] = $xpath->query("atom:published/text()", $entry)->item(0)->nodeValue; + $item["edited"] = $xpath->query("atom:updated/text()", $entry)->item(0)->nodeValue; + + $item["body"] = $xpath->query("dfrn:env/text()", $entry)->item(0)->nodeValue; + $item["body"] = str_replace(array(' ',"\t","\r","\n"), array('','','',''),$item["body"]); + // make sure nobody is trying to sneak some html tags by us + $item["body"] = notags(base64url_decode($item["body"])); + + $item["body"] = limit_body_size($item["body"]); + + /// @todo Do we really need this check for HTML elements? (It was copied from the old function) + if((strpos($item['body'],'<') !== false) && (strpos($item['body'],'>') !== false)) { + + $item['body'] = reltoabs($item['body'],$base_url); + + $item['body'] = html2bb_video($item['body']); + + $item['body'] = oembed_html2bbcode($item['body']); + + $config = HTMLPurifier_Config::createDefault(); + $config->set('Cache.DefinitionImpl', null); + + // we shouldn't need a whitelist, because the bbcode converter + // will strip out any unsupported tags. + + $purifier = new HTMLPurifier($config); + $item['body'] = $purifier->purify($item['body']); + + $item['body'] = @html2bbcode($item['body']); + } + + // We don't need the content element since "dfrn:env" is always present + //$item["body"] = $xpath->query("atom:content/text()", $entry)->item(0)->nodeValue; + + $item["last-child"] = $xpath->query("dfrn:comment-allow/text()", $entry)->item(0)->nodeValue; + $item["location"] = $xpath->query("dfrn:location/text()", $entry)->item(0)->nodeValue; + + $georsspoint = $xpath->query("georss:point", $entry); + if ($georsspoint) + $item["coord"] = $georsspoint->item(0)->nodeValue; + + $item["private"] = $xpath->query("dfrn:private/text()", $entry)->item(0)->nodeValue; + + $item["extid"] = $xpath->query("dfrn:extid/text()", $entry)->item(0)->nodeValue; + + if ($xpath->query("dfrn:extid/text()", $entry)->item(0)->nodeValue == "true") + $item["bookmark"] = true; + + $notice_info = $xpath->query("statusnet:notice_info", $entry); + if ($notice_info AND ($notice_info->length > 0)) { + foreach($notice_info->item(0)->attributes AS $attributes) { + if ($attributes->name == "source") + $item["app"] = strip_tags($attributes->textContent); + } + } + + $item["guid"] = $xpath->query("dfrn:diaspora_guid/text()", $entry)->item(0)->nodeValue; + + // We store the data from "dfrn:diaspora_signature" in a different table, this is done in "item_store" + $dsprsig = unxmlify($xpath->query("dfrn:diaspora_signature/text()", $entry)->item(0)->nodeValue); + if ($dsprsig != "") + $item["dsprsig"] = $dsprsig; + + $item["verb"] = $xpath->query("activity:verb/text()", $entry)->item(0)->nodeValue; + + if ($xpath->query("activity:object-type/text()", $entry)->item(0)->nodeValue != "") + $item["object-type"] = $xpath->query("activity:object-type/text()", $entry)->item(0)->nodeValue; + + $object = $xpath->query("activity:object", $entry)->item(0); + $item["object"] = self::transform_activity($xpath, $object, "object"); + + if (trim($item["object"]) != "") { + $r = parse_xml_string($item["object"], false); + if (isset($r->type)) + $item["object-type"] = $r->type; + } + + $target = $xpath->query("activity:target", $entry)->item(0); + $item["target"] = self::transform_activity($xpath, $target, "target"); + + $categories = $xpath->query("atom:category", $entry); + if ($categories) { + foreach ($categories AS $category) { + foreach($category->attributes AS $attributes) + if ($attributes->name == "term") { + $term = $attributes->textContent; + if(strlen($item["tag"])) + $item["tag"] .= ","; + + $item["tag"] .= "#[url=".App::get_baseurl()."/search?tag=".$term."]".$term."[/url]"; + } + } + } + + $enclosure = ""; + + $links = $xpath->query("atom:link", $entry); + if ($links) { + $rel = ""; + $href = ""; + $type = ""; + $length = "0"; + $title = ""; + foreach ($links AS $link) { + foreach($link->attributes AS $attributes) { + if ($attributes->name == "href") + $href = $attributes->textContent; + if ($attributes->name == "rel") + $rel = $attributes->textContent; + if ($attributes->name == "type") + $type = $attributes->textContent; + if ($attributes->name == "length") + $length = $attributes->textContent; + if ($attributes->name == "title") + $title = $attributes->textContent; + } + if (($rel != "") AND ($href != "")) + switch($rel) { + case "alternate": + $item["plink"] = $href; + break; + case "enclosure": + $enclosure = $href; + if(strlen($item["attach"])) + $item["attach"] .= ","; + + $item["attach"] .= '[attach]href="'.$href.'" length="'.$length.'" type="'.$type.'" title="'.$title.'"[/attach]'; + break; + } + } + } + + // Is it a reply or a top level posting? + $item["parent-uri"] = $item["uri"]; + + $inreplyto = $xpath->query("thr:in-reply-to", $entry); + if (is_object($inreplyto->item(0))) + foreach($inreplyto->item(0)->attributes AS $attributes) + if ($attributes->name == "ref") + $item["parent-uri"] = $attributes->textContent; + + // Get the type of the item (Top level post, reply or remote reply) + $entrytype = self::get_entry_type($importer, $item); + + // Now assign the rest of the values that depend on the type of the message + if (in_array($entrytype, array(DFRN_REPLY, DFRN_REPLY_RC))) { + if (!isset($item["object-type"])) + $item["object-type"] = ACTIVITY_OBJ_COMMENT; + + if ($item["contact-id"] != $owner["contact-id"]) + $item["contact-id"] = $owner["contact-id"]; + + if (($item["network"] != $owner["network"]) AND ($owner["network"] != "")) + $item["network"] = $owner["network"]; + + if ($item["contact-id"] != $author["contact-id"]) + $item["contact-id"] = $author["contact-id"]; + + if (($item["network"] != $author["network"]) AND ($author["network"] != "")) + $item["network"] = $author["network"]; + } + + if ($entrytype == DFRN_REPLY_RC) { + $item["type"] = "remote-comment"; + $item["wall"] = 1; + } elseif ($entrytype == DFRN_TOP_LEVEL) { + if (!isset($item["object-type"])) + $item["object-type"] = ACTIVITY_OBJ_NOTE; + + if ($item["object-type"] == ACTIVITY_OBJ_EVENT) { + logger("Item ".$item["uri"]." seems to contain an event.", LOGGER_DEBUG); + $ev = bbtoevent($item["body"]); + if((x($ev, "desc") || x($ev, "summary")) && x($ev, "start")) { + logger("Event in item ".$item["uri"]." was found.", LOGGER_DEBUG); + $ev["cid"] = $importer["id"]; + $ev["uid"] = $importer["uid"]; + $ev["uri"] = $item["uri"]; + $ev["edited"] = $item["edited"]; + $ev['private'] = $item['private']; + $ev["guid"] = $item["guid"]; + + $r = q("SELECT `id` FROM `event` WHERE `uri` = '%s' AND `uid` = %d LIMIT 1", + dbesc($item["uri"]), + intval($importer["uid"]) + ); + if(count($r)) + $ev["id"] = $r[0]["id"]; + + $event_id = event_store($ev); + logger("Event ".$event_id." was stored", LOGGER_DEBUG); + return; + } + } + + // The filling of the the "contact" variable is done for legcy reasons + // The functions below are partly used by ostatus.php as well - where we have this variable + $r = q("SELECT * FROM `contact` WHERE `id` = %d", intval($importer["id"])); + $contact = $r[0]; + $nickname = $contact["nick"]; + + // Big question: Do we need these functions? They were part of the "consume_feed" function. + // This function once was responsible for DFRN and OStatus. + if(activity_match($item['verb'],ACTIVITY_FOLLOW)) { + logger('New follower'); + new_follower($importer, $contact, $item, $nickname); + return; + } + if(activity_match($item['verb'],ACTIVITY_UNFOLLOW)) { + logger('Lost follower'); + lose_follower($importer, $contact, $item); + return; + } + if(activity_match($item['verb'],ACTIVITY_REQ_FRIEND)) { + logger('New friend request'); + new_follower($importer, $contact, $item, $nickname, true); + return; + } + if(activity_match($item['verb'],ACTIVITY_UNFRIEND)) { + logger('Lost sharer'); + lose_sharer($importer, $contact, $item); + return; + } + } + + $r = q("SELECT `id`, `uid`, `last-child`, `edited`, `body` FROM `item` WHERE `uri` = '%s' AND `uid` = %d LIMIT 1", + dbesc($item["uri"]), + intval($importer["importer_uid"]) + ); + + // Update content if 'updated' changes + if(count($r)) { + if (self::update_content($r[0], $item, $importer, $entrytype)) + logger("Item ".$item["uri"]." was updated.", LOGGER_DEBUG); + else + logger("Item ".$item["uri"]." already existed.", LOGGER_DEBUG); + return; + } + + if (in_array($entrytype, array(DFRN_REPLY, DFRN_REPLY_RC))) { + if($importer["rel"] == CONTACT_IS_FOLLOWER) { + logger("Contact ".$importer["id"]." is only follower. Quitting", LOGGER_DEBUG); + return; + } + + if(($item["verb"] === ACTIVITY_LIKE) + || ($item["verb"] === ACTIVITY_DISLIKE) + || ($item["verb"] === ACTIVITY_ATTEND) + || ($item["verb"] === ACTIVITY_ATTENDNO) + || ($item["verb"] === ACTIVITY_ATTENDMAYBE)) { + $is_like = true; + $item["type"] = "activity"; + $item["gravity"] = GRAVITY_LIKE; + // only one like or dislike per person + // splitted into two queries for performance issues + $r = q("SELECT `id` FROM `item` WHERE `uid` = %d AND `author-link` = '%s' AND `verb` = '%s' AND `parent-uri` = '%s' AND NOT `deleted` LIMIT 1", + intval($item["uid"]), + dbesc($item["author-link"]), + dbesc($item["verb"]), + dbesc($item["parent-uri"]) + ); + if($r && count($r)) + return; + + $r = q("SELECT `id` FROM `item` WHERE `uid` = %d AND `author-link` = '%s' AND `verb` = '%s' AND `thr-parent` = '%s' AND NOT `deleted` LIMIT 1", + intval($item["uid"]), + dbesc($item["author-link"]), + dbesc($item["verb"]), + dbesc($item["parent-uri"]) + ); + if($r && count($r)) + return; + + } else + $is_like = false; + + if(($item["verb"] === ACTIVITY_TAG) && ($item["object-type"] === ACTIVITY_OBJ_TAGTERM)) { + + $xo = parse_xml_string($item["object"],false); + $xt = parse_xml_string($item["target"],false); + + if($xt->type == ACTIVITY_OBJ_NOTE) { + $r = q("SELECT `id`, `tag` FROM `item` WHERE `uri` = '%s' AND `uid` = %d LIMIT 1", + dbesc($xt->id), + intval($importer["importer_uid"]) + ); + + if(!count($r)) + return; + + // extract tag, if not duplicate, add to parent item + if($xo->content) { + if(!(stristr($r[0]["tag"],trim($xo->content)))) { + q("UPDATE `item` SET `tag` = '%s' WHERE `id` = %d", + dbesc($r[0]["tag"] . (strlen($r[0]["tag"]) ? ',' : '') . '#[url=' . $xo->id . ']'. $xo->content . '[/url]'), + intval($r[0]["id"]) + ); + create_tags_from_item($r[0]["id"]); + } + } + } + } + + $posted_id = item_store($item); + $parent = 0; + + if($posted_id) { + + logger("Reply from contact ".$item["contact-id"]." was stored with id ".$posted_id, LOGGER_DEBUG); + + $item["id"] = $posted_id; + + $r = q("SELECT `parent`, `parent-uri` FROM `item` WHERE `id` = %d AND `uid` = %d LIMIT 1", + intval($posted_id), + intval($importer["importer_uid"]) + ); + if(count($r)) { + $parent = $r[0]["parent"]; + $parent_uri = $r[0]["parent-uri"]; + } + + if(!$is_like) { + $r1 = q("UPDATE `item` SET `last-child` = 0, `changed` = '%s' WHERE `uid` = %d AND `parent` = %d", + dbesc(datetime_convert()), + intval($importer["importer_uid"]), + intval($r[0]["parent"]) + ); + + $r2 = q("UPDATE `item` SET `last-child` = 1, `changed` = '%s' WHERE `uid` = %d AND `id` = %d", + dbesc(datetime_convert()), + intval($importer["importer_uid"]), + intval($posted_id) + ); + } + + if($posted_id AND $parent AND ($entrytype == DFRN_REPLY_RC)) { + logger("Notifying followers about comment ".$posted_id, LOGGER_DEBUG); + proc_run("php", "include/notifier.php", "comment-import", $posted_id); + } + + return true; + } + } else { + if(!link_compare($item["owner-link"],$importer["url"])) { + // The item owner info is not our contact. It's OK and is to be expected if this is a tgroup delivery, + // but otherwise there's a possible data mixup on the sender's system. + // the tgroup delivery code called from item_store will correct it if it's a forum, + // but we're going to unconditionally correct it here so that the post will always be owned by our contact. + logger('Correcting item owner.', LOGGER_DEBUG); + $item["owner-name"] = $importer["senderName"]; + $item["owner-link"] = $importer["url"]; + $item["owner-avatar"] = $importer["thumb"]; + } + + if(($importer["rel"] == CONTACT_IS_FOLLOWER) && (!tgroup_check($importer["importer_uid"], $item))) { + logger("Contact ".$importer["id"]." is only follower and tgroup check was negative.", LOGGER_DEBUG); + return; + } + + // This is my contact on another system, but it's really me. + // Turn this into a wall post. + $notify = item_is_remote_self($importer, $item); + + $posted_id = item_store($item, false, $notify); + + logger("Item was stored with id ".$posted_id, LOGGER_DEBUG); + + if(stristr($item["verb"],ACTIVITY_POKE)) + self::do_poke($item, $importer, $posted_id); + } + } + + private function process_deletion($header, $xpath, $deletion, $importer) { + + logger("Processing deletions"); + + foreach($deletion->attributes AS $attributes) { + if ($attributes->name == "ref") + $uri = $attributes->textContent; + if ($attributes->name == "when") + $when = $attributes->textContent; + } + if ($when) + $when = datetime_convert("UTC", "UTC", $when, "Y-m-d H:i:s"); + else + $when = datetime_convert("UTC", "UTC", "now", "Y-m-d H:i:s"); + + if (!$uri OR !$importer["id"]) + return false; + + /// @todo Only select the used fields + $r = q("SELECT `item`.*, `contact`.`self` FROM `item` INNER JOIN `contact` on `item`.`contact-id` = `contact`.`id` + WHERE `uri` = '%s' AND `item`.`uid` = %d AND `contact-id` = %d AND NOT `item`.`file` LIKE '%%[%%' LIMIT 1", + dbesc($uri), + intval($importer["uid"]), + intval($importer["id"]) + ); + if(!count($r)) { + logger("Item with uri ".$uri." from contact ".$importer["id"]." for user ".$importer["uid"]." wasn't found.", LOGGER_DEBUG); + return; + } else { + + $item = $r[0]; + + $entrytype = self::get_entry_type($importer, $item); + + if(!$item["deleted"]) + logger('deleting item '.$item["id"].' uri='.$uri, LOGGER_DEBUG); + else + return; + + if($item["object-type"] === ACTIVITY_OBJ_EVENT) { + logger("Deleting event ".$item["event-id"], LOGGER_DEBUG); + event_delete($item["event-id"]); + } + + if(($item["verb"] === ACTIVITY_TAG) && ($item["object-type"] === ACTIVITY_OBJ_TAGTERM)) { + $xo = parse_xml_string($item["object"],false); + $xt = parse_xml_string($item["target"],false); + if($xt->type === ACTIVITY_OBJ_NOTE) { + $i = q("SELECT `id`, `contact-id`, `tag` FROM `item` WHERE `uri` = '%s' AND `uid` = %d LIMIT 1", + dbesc($xt->id), + intval($importer["importer_uid"]) + ); + if(count($i)) { + + // For tags, the owner cannot remove the tag on the author's copy of the post. + + $owner_remove = (($item["contact-id"] == $i[0]["contact-id"]) ? true: false); + $author_remove = (($item["origin"] && $item["self"]) ? true : false); + $author_copy = (($item["origin"]) ? true : false); + + if($owner_remove && $author_copy) + return; + if($author_remove || $owner_remove) { + $tags = explode(',',$i[0]["tag"]); + $newtags = array(); + if(count($tags)) { + foreach($tags as $tag) + if(trim($tag) !== trim($xo->body)) + $newtags[] = trim($tag); + } + q("UPDATE `item` SET `tag` = '%s' WHERE `id` = %d", + dbesc(implode(',',$newtags)), + intval($i[0]["id"]) + ); + create_tags_from_item($i[0]["id"]); + } + } + } + } + + if($entrytype == DFRN_TOP_LEVEL) { + $r = q("UPDATE `item` SET `deleted` = 1, `edited` = '%s', `changed` = '%s', + `body` = '', `title` = '' + WHERE `parent-uri` = '%s' AND `uid` = %d", + dbesc($when), + dbesc(datetime_convert()), + dbesc($uri), + intval($importer["uid"]) + ); + create_tags_from_itemuri($uri, $importer["uid"]); + create_files_from_itemuri($uri, $importer["uid"]); + update_thread_uri($uri, $importer["uid"]); + } else { + $r = q("UPDATE `item` SET `deleted` = 1, `edited` = '%s', `changed` = '%s', + `body` = '', `title` = '' + WHERE `uri` = '%s' AND `uid` = %d", + dbesc($when), + dbesc(datetime_convert()), + dbesc($uri), + intval($importer["uid"]) + ); + create_tags_from_itemuri($uri, $importer["uid"]); + create_files_from_itemuri($uri, $importer["uid"]); + update_thread_uri($uri, $importer["importer_uid"]); + if($item["last-child"]) { + // ensure that last-child is set in case the comment that had it just got wiped. + q("UPDATE `item` SET `last-child` = 0, `changed` = '%s' WHERE `parent-uri` = '%s' AND `uid` = %d ", + dbesc(datetime_convert()), + dbesc($item["parent-uri"]), + intval($item["uid"]) + ); + // who is the last child now? + $r = q("SELECT `id` FROM `item` WHERE `parent-uri` = '%s' AND `type` != 'activity' AND `deleted` = 0 AND `moderated` = 0 AND `uid` = %d + ORDER BY `created` DESC LIMIT 1", + dbesc($item["parent-uri"]), + intval($importer["uid"]) + ); + if(count($r)) { + q("UPDATE `item` SET `last-child` = 1 WHERE `id` = %d", + intval($r[0]["id"]) + ); + } + } + // if this is a relayed delete, propagate it to other recipients + + if($entrytype == DFRN_REPLY_RC) { + logger("Notifying followers about deletion of post ".$item["id"], LOGGER_DEBUG); + proc_run("php", "include/notifier.php","drop", $item["id"]); + } + } + } + } + + /** + * @brief Imports a DFRN message + * + * @param text $xml The DFRN message + * @param array $importer Record of the importer user mixed with contact of the content + * @param bool $sort_by_date Is used when feeds are polled + */ + function import($xml,$importer, $sort_by_date = false) { + + if ($xml == "") + return; + + if($importer["readonly"]) { + // We aren't receiving stuff from this person. But we will quietly ignore them + // rather than a blatant "go away" message. + logger('ignoring contact '.$importer["id"]); + return; + } + + $doc = new DOMDocument(); + @$doc->loadXML($xml); + + $xpath = new DomXPath($doc); + $xpath->registerNamespace("atom", NAMESPACE_ATOM1); + $xpath->registerNamespace("thr", NAMESPACE_THREAD); + $xpath->registerNamespace("at", NAMESPACE_TOMB); + $xpath->registerNamespace("media", NAMESPACE_MEDIA); + $xpath->registerNamespace("dfrn", NAMESPACE_DFRN); + $xpath->registerNamespace("activity", NAMESPACE_ACTIVITY); + $xpath->registerNamespace("georss", NAMESPACE_GEORSS); + $xpath->registerNamespace("poco", NAMESPACE_POCO); + $xpath->registerNamespace("ostatus", NAMESPACE_OSTATUS); + $xpath->registerNamespace("statusnet", NAMESPACE_STATUSNET); + + $header = array(); + $header["uid"] = $importer["uid"]; + $header["network"] = NETWORK_DFRN; + $header["type"] = "remote"; + $header["wall"] = 0; + $header["origin"] = 0; + $header["contact-id"] = $importer["id"]; + + // Update the contact table if the data has changed + // Only the "dfrn:owner" in the head section contains all data + self::fetchauthor($xpath, $doc->firstChild, $importer, "dfrn:owner", false); + + logger("Import DFRN message for user ".$importer["uid"]." from contact ".$importer["id"], LOGGER_DEBUG); + + // is it a public forum? Private forums aren't supported by now with this method + $forum = intval($xpath->evaluate("/atom:feed/dfrn:community/text()", $context)->item(0)->nodeValue); + + if ($forum != $importer["forum"]) + q("UPDATE `contact` SET `forum` = %d WHERE `forum` != %d AND `id` = %d", + intval($forum), intval($forum), + intval($importer["id"]) + ); + + $mails = $xpath->query("/atom:feed/dfrn:mail"); + foreach ($mails AS $mail) + self::process_mail($xpath, $mail, $importer); + + $suggestions = $xpath->query("/atom:feed/dfrn:suggest"); + foreach ($suggestions AS $suggestion) + self::process_suggestion($xpath, $suggestion, $importer); + + $relocations = $xpath->query("/atom:feed/dfrn:relocate"); + foreach ($relocations AS $relocation) + self::process_relocation($xpath, $relocation, $importer); + + $deletions = $xpath->query("/atom:feed/at:deleted-entry"); + foreach ($deletions AS $deletion) + self::process_deletion($header, $xpath, $deletion, $importer); + + if (!$sort_by_date) { + $entries = $xpath->query("/atom:feed/atom:entry"); + foreach ($entries AS $entry) + self::process_entry($header, $xpath, $entry, $importer); + } else { + $newentries = array(); + $entries = $xpath->query("/atom:feed/atom:entry"); + foreach ($entries AS $entry) { + $created = $xpath->query("atom:published/text()", $entry)->item(0)->nodeValue; + $newentries[strtotime($created)] = $entry; + } + + // Now sort after the publishing date + ksort($newentries); + + foreach ($newentries AS $entry) + self::process_entry($header, $xpath, $entry, $importer); + } + logger("Import done for user ".$importer["uid"]." from contact ".$importer["id"], LOGGER_DEBUG); + } } +?> diff --git a/include/import-dfrn.php b/include/import-dfrn.php deleted file mode 100644 index 244018887b..0000000000 --- a/include/import-dfrn.php +++ /dev/null @@ -1,1229 +0,0 @@ -evaluate($element."/atom:name/text()", $context)->item(0)->nodeValue; - $author["link"] = $xpath->evaluate($element."/atom:uri/text()", $context)->item(0)->nodeValue; - - $r = q("SELECT `id`, `uid`, `network`, `avatar-date`, `name-date`, `uri-date`, `addr`, - `name`, `nick`, `about`, `location`, `keywords`, `bdyear`, `bd` - FROM `contact` WHERE `uid` = %d AND `nurl` = '%s' AND `network` != '%s'", - intval($importer["uid"]), dbesc(normalise_link($author["link"])), dbesc(NETWORK_STATUSNET)); - if ($r) { - $contact = $r[0]; - $author["contact-id"] = $r[0]["id"]; - $author["network"] = $r[0]["network"]; - } else { - $author["contact-id"] = $importer["id"]; - $author["network"] = $importer["network"]; - $onlyfetch = true; - } - - // Until now we aren't serving different sizes - but maybe later - $avatarlist = array(); - // @todo check if "avatar" or "photo" would be the best field in the specification - $avatars = $xpath->query($element."/atom:link[@rel='avatar']", $context); - foreach($avatars AS $avatar) { - $href = ""; - $width = 0; - foreach($avatar->attributes AS $attributes) { - if ($attributes->name == "href") - $href = $attributes->textContent; - if ($attributes->name == "width") - $width = $attributes->textContent; - if ($attributes->name == "updated") - $contact["avatar-date"] = $attributes->textContent; - } - if (($width > 0) AND ($href != "")) - $avatarlist[$width] = $href; - } - if (count($avatarlist) > 0) { - krsort($avatarlist); - $author["avatar"] = current($avatarlist); - } - - if ($r AND !$onlyfetch) { - - // When was the last change to name or uri? - $name_element = $xpath->query($element."/atom:name", $context)->item(0); - foreach($name_element->attributes AS $attributes) - if ($attributes->name == "updated") - $contact["name-date"] = $attributes->textContent; - - $link_element = $xpath->query($element."/atom:link", $context)->item(0); - foreach($link_element->attributes AS $attributes) - if ($attributes->name == "updated") - $contact["uri-date"] = $attributes->textContent; - - // Update contact data - $value = $xpath->evaluate($element."/dfrn:handle/text()", $context)->item(0)->nodeValue; - if ($value != "") - $contact["addr"] = $value; - - $value = $xpath->evaluate($element."/poco:displayName/text()", $context)->item(0)->nodeValue; - if ($value != "") - $contact["name"] = $value; - - $value = $xpath->evaluate($element."/poco:preferredUsername/text()", $context)->item(0)->nodeValue; - if ($value != "") - $contact["nick"] = $value; - - $value = $xpath->evaluate($element."/poco:note/text()", $context)->item(0)->nodeValue; - if ($value != "") - $contact["about"] = $value; - - $value = $xpath->evaluate($element."/poco:address/poco:formatted/text()", $context)->item(0)->nodeValue; - if ($value != "") - $contact["location"] = $value; - - /// @todo Add support for the following fields that we don't support by now in the contact table: - /// - poco:utcOffset - /// - poco:ims - /// - poco:urls - /// - poco:locality - /// - poco:region - /// - poco:country - - // Save the keywords into the contact table - $tags = array(); - $tagelements = $xpath->evaluate($element."/poco:tags/text()", $context); - foreach($tagelements AS $tag) - $tags[$tag->nodeValue] = $tag->nodeValue; - - if (count($tags)) - $contact["keywords"] = implode(", ", $tags); - - // "dfrn:birthday" contains the birthday converted to UTC - $old_bdyear = $contact["bdyear"]; - - $birthday = $xpath->evaluate($element."/dfrn:birthday/text()", $context)->item(0)->nodeValue; - - if (strtotime($birthday) > time()) { - $bd_timestamp = strtotime($birthday); - - $contact["bdyear"] = date("Y", $bd_timestamp); - } - - // "poco:birthday" is the birthday in the format "yyyy-mm-dd" - $value = $xpath->evaluate($element."/poco:birthday/text()", $context)->item(0)->nodeValue; - - if (!in_array($value, array("", "0000-00-00"))) { - $bdyear = date("Y"); - $value = str_replace("0000", $bdyear, $value); - - if (strtotime($value) < time()) { - $value = str_replace($bdyear, $bdyear + 1, $value); - $bdyear = $bdyear + 1; - } - - $contact["bd"] = $value; - } - - if ($old_bdyear != $contact["bdyear"]) - self::birthday_event($contact, $birthday); - - // Get all field names - $fields = array(); - foreach ($r[0] AS $field => $data) - $fields[$field] = $data; - - unset($fields["id"]); - unset($fields["uid"]); - unset($fields["avatar-date"]); - unset($fields["name-date"]); - unset($fields["uri-date"]); - - // Update check for this field has to be done differently - $datefields = array("name-date", "uri-date"); - foreach ($datefields AS $field) - if (strtotime($contact[$field]) > strtotime($r[0][$field])) - $update = true; - - foreach ($fields AS $field => $data) - if ($contact[$field] != $r[0][$field]) { - logger("Difference for contact ".$contact["id"]." in field '".$field."'. Old value: '".$contact[$field]."', new value '".$r[0][$field]."'", LOGGER_DEBUG); - $update = true; - } - - if ($update) { - logger("Update contact data for contact ".$contact["id"], LOGGER_DEBUG); - - q("UPDATE `contact` SET `name` = '%s', `nick` = '%s', `about` = '%s', `location` = '%s', - `addr` = '%s', `keywords` = '%s', `bdyear` = '%s', `bd` = '%s', - `name-date` = '%s', `uri-date` = '%s' - WHERE `id` = %d AND `network` = '%s'", - dbesc($contact["name"]), dbesc($contact["nick"]), dbesc($contact["about"]), dbesc($contact["location"]), - dbesc($contact["addr"]), dbesc($contact["keywords"]), dbesc($contact["bdyear"]), - dbesc($contact["bd"]), dbesc($contact["name-date"]), dbesc($contact["uri-date"]), - intval($contact["id"]), dbesc($contact["network"])); - } - - update_contact_avatar($author["avatar"], $importer["uid"], $contact["id"], - (strtotime($contact["avatar-date"]) > strtotime($r[0]["avatar-date"]))); - - $contact["generation"] = 2; - $contact["photo"] = $author["avatar"]; - update_gcontact($contact); - } - - return($author); - } - - private function transform_activity($xpath, $activity, $element) { - if (!is_object($activity)) - return ""; - - $obj_doc = new DOMDocument("1.0", "utf-8"); - $obj_doc->formatOutput = true; - - $obj_element = $obj_doc->createElementNS(NAMESPACE_ATOM1, $element); - - $activity_type = $xpath->query("activity:object-type/text()", $activity)->item(0)->nodeValue; - xml_add_element($obj_doc, $obj_element, "type", $activity_type); - - $id = $xpath->query("atom:id", $activity)->item(0); - if (is_object($id)) - $obj_element->appendChild($obj_doc->importNode($id, true)); - - $title = $xpath->query("atom:title", $activity)->item(0); - if (is_object($title)) - $obj_element->appendChild($obj_doc->importNode($title, true)); - - $link = $xpath->query("atom:link", $activity)->item(0); - if (is_object($link)) - $obj_element->appendChild($obj_doc->importNode($link, true)); - - $content = $xpath->query("atom:content", $activity)->item(0); - if (is_object($content)) - $obj_element->appendChild($obj_doc->importNode($content, true)); - - $obj_doc->appendChild($obj_element); - - $objxml = $obj_doc->saveXML($obj_element); - - // @todo This isn't totally clean. We should find a way to transform the namespaces - $objxml = str_replace("<".$element.' xmlns="http://www.w3.org/2005/Atom">', "<".$element.">", $objxml); - return($objxml); - } - - private function process_mail($xpath, $mail, $importer) { - - logger("Processing mails"); - - $msg = array(); - $msg["uid"] = $importer["importer_uid"]; - $msg["from-name"] = $xpath->query("dfrn:sender/dfrn:name/text()", $mail)->item(0)->nodeValue; - $msg["from-url"] = $xpath->query("dfrn:sender/dfrn:uri/text()", $mail)->item(0)->nodeValue; - $msg["from-photo"] = $xpath->query("dfrn:sender/dfrn:avatar/text()", $mail)->item(0)->nodeValue; - $msg["contact-id"] = $importer["id"]; - $msg["uri"] = $xpath->query("dfrn:id/text()", $mail)->item(0)->nodeValue; - $msg["parent-uri"] = $xpath->query("dfrn:in-reply-to/text()", $mail)->item(0)->nodeValue; - $msg["created"] = $xpath->query("dfrn:sentdate/text()", $mail)->item(0)->nodeValue; - $msg["title"] = $xpath->query("dfrn:subject/text()", $mail)->item(0)->nodeValue; - $msg["body"] = $xpath->query("dfrn:content/text()", $mail)->item(0)->nodeValue; - $msg["seen"] = 0; - $msg["replied"] = 0; - - dbesc_array($msg); - - $r = dbq("INSERT INTO `mail` (`".implode("`, `", array_keys($msg))."`) VALUES ('".implode("', '", array_values($msg))."')"); - - // send notifications. - - $notif_params = array( - "type" => NOTIFY_MAIL, - "notify_flags" => $importer["notify-flags"], - "language" => $importer["language"], - "to_name" => $importer["username"], - "to_email" => $importer["email"], - "uid" => $importer["importer_uid"], - "item" => $msg, - "source_name" => $msg["from-name"], - "source_link" => $importer["url"], - "source_photo" => $importer["thumb"], - "verb" => ACTIVITY_POST, - "otype" => "mail" - ); - - notification($notif_params); - - logger("Mail is processed, notification was sent."); - } - - private function process_suggestion($xpath, $suggestion, $importer) { - - logger("Processing suggestions"); - - $suggest = array(); - $suggest["uid"] = $importer["importer_uid"]; - $suggest["cid"] = $importer["id"]; - $suggest["url"] = $xpath->query("dfrn:url/text()", $suggestion)->item(0)->nodeValue; - $suggest["name"] = $xpath->query("dfrn:name/text()", $suggestion)->item(0)->nodeValue; - $suggest["photo"] = $xpath->query("dfrn:photo/text()", $suggestion)->item(0)->nodeValue; - $suggest["request"] = $xpath->query("dfrn:request/text()", $suggestion)->item(0)->nodeValue; - $suggest["body"] = $xpath->query("dfrn:note/text()", $suggestion)->item(0)->nodeValue; - - // Does our member already have a friend matching this description? - - $r = q("SELECT `id` FROM `contact` WHERE `name` = '%s' AND `nurl` = '%s' AND `uid` = %d LIMIT 1", - dbesc($suggest["name"]), - dbesc(normalise_link($suggest["url"])), - intval($suggest["uid"]) - ); - if(count($r)) - return false; - - // Do we already have an fcontact record for this person? - - $fid = 0; - $r = q("SELECT `id` FROM `fcontact` WHERE `url` = '%s' AND `name` = '%s' AND `request` = '%s' LIMIT 1", - dbesc($suggest["url"]), - dbesc($suggest["name"]), - dbesc($suggest["request"]) - ); - if(count($r)) { - $fid = $r[0]["id"]; - - // OK, we do. Do we already have an introduction for this person ? - $r = q("SELECT `id` FROM `intro` WHERE `uid` = %d AND `fid` = %d LIMIT 1", - intval($suggest["uid"]), - intval($fid) - ); - if(count($r)) - return false; - } - if(!$fid) - $r = q("INSERT INTO `fcontact` (`name`,`url`,`photo`,`request`) VALUES ('%s', '%s', '%s', '%s')", - dbesc($suggest["name"]), - dbesc($suggest["url"]), - dbesc($suggest["photo"]), - dbesc($suggest["request"]) - ); - $r = q("SELECT `id` FROM `fcontact` WHERE `url` = '%s' AND `name` = '%s' AND `request` = '%s' LIMIT 1", - dbesc($suggest["url"]), - dbesc($suggest["name"]), - dbesc($suggest["request"]) - ); - if(count($r)) - $fid = $r[0]["id"]; - else - // database record did not get created. Quietly give up. - return false; - - - $hash = random_string(); - - $r = q("INSERT INTO `intro` (`uid`, `fid`, `contact-id`, `note`, `hash`, `datetime`, `blocked`) - VALUES(%d, %d, %d, '%s', '%s', '%s', %d)", - intval($suggest["uid"]), - intval($fid), - intval($suggest["cid"]), - dbesc($suggest["body"]), - dbesc($hash), - dbesc(datetime_convert()), - intval(0) - ); - - notification(array( - "type" => NOTIFY_SUGGEST, - "notify_flags" => $importer["notify-flags"], - "language" => $importer["language"], - "to_name" => $importer["username"], - "to_email" => $importer["email"], - "uid" => $importer["importer_uid"], - "item" => $suggest, - "link" => App::get_baseurl()."/notifications/intros", - "source_name" => $importer["name"], - "source_link" => $importer["url"], - "source_photo" => $importer["photo"], - "verb" => ACTIVITY_REQ_FRIEND, - "otype" => "intro" - )); - - return true; - - } - - private function process_relocation($xpath, $relocation, $importer) { - - logger("Processing relocations"); - - $relocate = array(); - $relocate["uid"] = $importer["importer_uid"]; - $relocate["cid"] = $importer["id"]; - $relocate["url"] = $xpath->query("dfrn:url/text()", $relocation)->item(0)->nodeValue; - $relocate["name"] = $xpath->query("dfrn:name/text()", $relocation)->item(0)->nodeValue; - $relocate["photo"] = $xpath->query("dfrn:photo/text()", $relocation)->item(0)->nodeValue; - $relocate["thumb"] = $xpath->query("dfrn:thumb/text()", $relocation)->item(0)->nodeValue; - $relocate["micro"] = $xpath->query("dfrn:micro/text()", $relocation)->item(0)->nodeValue; - $relocate["request"] = $xpath->query("dfrn:request/text()", $relocation)->item(0)->nodeValue; - $relocate["confirm"] = $xpath->query("dfrn:confirm/text()", $relocation)->item(0)->nodeValue; - $relocate["notify"] = $xpath->query("dfrn:notify/text()", $relocation)->item(0)->nodeValue; - $relocate["poll"] = $xpath->query("dfrn:poll/text()", $relocation)->item(0)->nodeValue; - $relocate["sitepubkey"] = $xpath->query("dfrn:sitepubkey/text()", $relocation)->item(0)->nodeValue; - - // update contact - $r = q("SELECT `photo`, `url` FROM `contact` WHERE `id` = %d AND `uid` = %d;", - intval($importer["id"]), - intval($importer["importer_uid"])); - if (!$r) - return false; - - $old = $r[0]; - - $x = q("UPDATE `contact` SET - `name` = '%s', - `photo` = '%s', - `thumb` = '%s', - `micro` = '%s', - `url` = '%s', - `nurl` = '%s', - `request` = '%s', - `confirm` = '%s', - `notify` = '%s', - `poll` = '%s', - `site-pubkey` = '%s' - WHERE `id` = %d AND `uid` = %d;", - dbesc($relocate["name"]), - dbesc($relocate["photo"]), - dbesc($relocate["thumb"]), - dbesc($relocate["micro"]), - dbesc($relocate["url"]), - dbesc(normalise_link($relocate["url"])), - dbesc($relocate["request"]), - dbesc($relocate["confirm"]), - dbesc($relocate["notify"]), - dbesc($relocate["poll"]), - dbesc($relocate["sitepubkey"]), - intval($importer["id"]), - intval($importer["importer_uid"])); - - if ($x === false) - return false; - - // update items - $fields = array( - 'owner-link' => array($old["url"], $relocate["url"]), - 'author-link' => array($old["url"], $relocate["url"]), - 'owner-avatar' => array($old["photo"], $relocate["photo"]), - 'author-avatar' => array($old["photo"], $relocate["photo"]), - ); - foreach ($fields as $n=>$f){ - $x = q("UPDATE `item` SET `%s` = '%s' WHERE `%s` = '%s' AND `uid` = %d", - $n, dbesc($f[1]), - $n, dbesc($f[0]), - intval($importer["importer_uid"])); - if ($x === false) - return false; - } - - /// @TODO - /// merge with current record, current contents have priority - /// update record, set url-updated - /// update profile photos - /// schedule a scan? - return true; - } - - private function update_content($current, $item, $importer, $entrytype) { - $changed = false; - - if (edited_timestamp_is_newer($current, $item)) { - - // do not accept (ignore) an earlier edit than one we currently have. - if(datetime_convert("UTC","UTC",$item["edited"]) < $current["edited"]) - return(false); - - $r = q("UPDATE `item` SET `title` = '%s', `body` = '%s', `tag` = '%s', `edited` = '%s', `changed` = '%s' WHERE `uri` = '%s' AND `uid` = %d", - dbesc($item["title"]), - dbesc($item["body"]), - dbesc($item["tag"]), - dbesc(datetime_convert("UTC","UTC",$item["edited"])), - dbesc(datetime_convert()), - dbesc($item["uri"]), - intval($importer["importer_uid"]) - ); - create_tags_from_itemuri($item["uri"], $importer["importer_uid"]); - update_thread_uri($item["uri"], $importer["importer_uid"]); - - $changed = true; - - if ($entrytype == DFRN_REPLY_RC) - proc_run("php", "include/notifier.php","comment-import", $current["id"]); - } - - // update last-child if it changes - if($item["last-child"] AND ($item["last-child"] != $current["last-child"])) { - $r = q("UPDATE `item` SET `last-child` = 0, `changed` = '%s' WHERE `parent-uri` = '%s' AND `uid` = %d", - dbesc(datetime_convert()), - dbesc($item["parent-uri"]), - intval($importer["importer_uid"]) - ); - $r = q("UPDATE `item` SET `last-child` = %d , `changed` = '%s' WHERE `uri` = '%s' AND `uid` = %d", - intval($item["last-child"]), - dbesc(datetime_convert()), - dbesc($item["uri"]), - intval($importer["importer_uid"]) - ); - } - return $changed; - } - - private function get_entry_type($importer, $item) { - if ($item["parent-uri"] != $item["uri"]) { - $community = false; - - if($importer["page-flags"] == PAGE_COMMUNITY || $importer["page-flags"] == PAGE_PRVGROUP) { - $sql_extra = ""; - $community = true; - logger("possible community action"); - } else - $sql_extra = " AND `contact`.`self` AND `item`.`wall` "; - - // was the top-level post for this action written by somebody on this site? - // Specifically, the recipient? - - $is_a_remote_action = false; - - $r = q("SELECT `item`.`parent-uri` FROM `item` - WHERE `item`.`uri` = '%s' - LIMIT 1", - dbesc($item["parent-uri"]) - ); - if($r && count($r)) { - $r = q("SELECT `item`.`forum_mode`, `item`.`wall` FROM `item` - INNER JOIN `contact` ON `contact`.`id` = `item`.`contact-id` - WHERE `item`.`uri` = '%s' AND (`item`.`parent-uri` = '%s' OR `item`.`thr-parent` = '%s') - AND `item`.`uid` = %d - $sql_extra - LIMIT 1", - dbesc($r[0]["parent-uri"]), - dbesc($r[0]["parent-uri"]), - dbesc($r[0]["parent-uri"]), - intval($importer["importer_uid"]) - ); - if($r && count($r)) - $is_a_remote_action = true; - } - - // Does this have the characteristics of a community or private group action? - // If it's an action to a wall post on a community/prvgroup page it's a - // valid community action. Also forum_mode makes it valid for sure. - // If neither, it's not. - - if($is_a_remote_action && $community) { - if((!$r[0]["forum_mode"]) && (!$r[0]["wall"])) { - $is_a_remote_action = false; - logger("not a community action"); - } - } - - if ($is_a_remote_action) - return DFRN_REPLY_RC; - else - return DFRN_REPLY; - - } else - return DFRN_TOP_LEVEL; - - } - - private function do_poke($item, $importer, $posted_id) { - $verb = urldecode(substr($item["verb"],strpos($item["verb"], "#")+1)); - if(!$verb) - return; - $xo = parse_xml_string($item["object"],false); - - if(($xo->type == ACTIVITY_OBJ_PERSON) && ($xo->id)) { - - // somebody was poked/prodded. Was it me? - $links = parse_xml_string("".unxmlify($xo->link)."",false); - - foreach($links->link as $l) { - $atts = $l->attributes(); - switch($atts["rel"]) { - case "alternate": - $Blink = $atts["href"]; - break; - default: - break; - } - } - if($Blink && link_compare($Blink,$a->get_baseurl()."/profile/".$importer["nickname"])) { - - // send a notification - notification(array( - "type" => NOTIFY_POKE, - "notify_flags" => $importer["notify-flags"], - "language" => $importer["language"], - "to_name" => $importer["username"], - "to_email" => $importer["email"], - "uid" => $importer["importer_uid"], - "item" => $item, - "link" => $a->get_baseurl()."/display/".urlencode(get_item_guid($posted_id)), - "source_name" => stripslashes($item["author-name"]), - "source_link" => $item["author-link"], - "source_photo" => ((link_compare($item["author-link"],$importer["url"])) - ? $importer["thumb"] : $item["author-avatar"]), - "verb" => $item["verb"], - "otype" => "person", - "activity" => $verb, - "parent" => $item["parent"] - )); - } - } - } - - private function process_entry($header, $xpath, $entry, $importer) { - - logger("Processing entries"); - - $item = $header; - - // Get the uri - $item["uri"] = $xpath->query("atom:id/text()", $entry)->item(0)->nodeValue; - - // Fetch the owner - $owner = self::fetchauthor($xpath, $entry, $importer, "dfrn:owner", true); - - $item["owner-name"] = $owner["name"]; - $item["owner-link"] = $owner["link"]; - $item["owner-avatar"] = $owner["avatar"]; - - // fetch the author - $author = self::fetchauthor($xpath, $entry, $importer, "atom:author", true); - - $item["author-name"] = $author["name"]; - $item["author-link"] = $author["link"]; - $item["author-avatar"] = $author["avatar"]; - - $item["title"] = $xpath->query("atom:title/text()", $entry)->item(0)->nodeValue; - - $item["created"] = $xpath->query("atom:published/text()", $entry)->item(0)->nodeValue; - $item["edited"] = $xpath->query("atom:updated/text()", $entry)->item(0)->nodeValue; - - $item["body"] = $xpath->query("dfrn:env/text()", $entry)->item(0)->nodeValue; - $item["body"] = str_replace(array(' ',"\t","\r","\n"), array('','','',''),$item["body"]); - // make sure nobody is trying to sneak some html tags by us - $item["body"] = notags(base64url_decode($item["body"])); - - $item["body"] = limit_body_size($item["body"]); - - /// @todo Do we need the old check for HTML elements? - - // We don't need the content element since "dfrn:env" is always present - //$item["body"] = $xpath->query("atom:content/text()", $entry)->item(0)->nodeValue; - - $item["last-child"] = $xpath->query("dfrn:comment-allow/text()", $entry)->item(0)->nodeValue; - $item["location"] = $xpath->query("dfrn:location/text()", $entry)->item(0)->nodeValue; - - $georsspoint = $xpath->query("georss:point", $entry); - if ($georsspoint) - $item["coord"] = $georsspoint->item(0)->nodeValue; - - $item["private"] = $xpath->query("dfrn:private/text()", $entry)->item(0)->nodeValue; - - $item["extid"] = $xpath->query("dfrn:extid/text()", $entry)->item(0)->nodeValue; - - if ($xpath->query("dfrn:extid/text()", $entry)->item(0)->nodeValue == "true") - $item["bookmark"] = true; - - $notice_info = $xpath->query("statusnet:notice_info", $entry); - if ($notice_info AND ($notice_info->length > 0)) { - foreach($notice_info->item(0)->attributes AS $attributes) { - if ($attributes->name == "source") - $item["app"] = strip_tags($attributes->textContent); - } - } - - $item["guid"] = $xpath->query("dfrn:diaspora_guid/text()", $entry)->item(0)->nodeValue; - - // We store the data from "dfrn:diaspora_signature" in a different table, this is done in "item_store" - $item["dsprsig"] = unxmlify($xpath->query("dfrn:diaspora_signature/text()", $entry)->item(0)->nodeValue); - - $item["verb"] = $xpath->query("activity:verb/text()", $entry)->item(0)->nodeValue; - - if ($xpath->query("activity:object-type/text()", $entry)->item(0)->nodeValue != "") - $item["object-type"] = $xpath->query("activity:object-type/text()", $entry)->item(0)->nodeValue; - - $object = $xpath->query("activity:object", $entry)->item(0); - $item["object"] = self::transform_activity($xpath, $object, "object"); - - if (trim($item["object"]) != "") { - $r = parse_xml_string($item["object"], false); - if (isset($r->type)) - $item["object-type"] = $r->type; - } - - $target = $xpath->query("activity:target", $entry)->item(0); - $item["target"] = self::transform_activity($xpath, $target, "target"); - - $categories = $xpath->query("atom:category", $entry); - if ($categories) { - foreach ($categories AS $category) { - foreach($category->attributes AS $attributes) - if ($attributes->name == "term") { - $term = $attributes->textContent; - if(strlen($item["tag"])) - $item["tag"] .= ","; - - $item["tag"] .= "#[url=".App::get_baseurl()."/search?tag=".$term."]".$term."[/url]"; - } - } - } - - $enclosure = ""; - - $links = $xpath->query("atom:link", $entry); - if ($links) { - $rel = ""; - $href = ""; - $type = ""; - $length = "0"; - $title = ""; - foreach ($links AS $link) { - foreach($link->attributes AS $attributes) { - if ($attributes->name == "href") - $href = $attributes->textContent; - if ($attributes->name == "rel") - $rel = $attributes->textContent; - if ($attributes->name == "type") - $type = $attributes->textContent; - if ($attributes->name == "length") - $length = $attributes->textContent; - if ($attributes->name == "title") - $title = $attributes->textContent; - } - if (($rel != "") AND ($href != "")) - switch($rel) { - case "alternate": - $item["plink"] = $href; - break; - case "enclosure": - $enclosure = $href; - if(strlen($item["attach"])) - $item["attach"] .= ","; - - $item["attach"] .= '[attach]href="'.$href.'" length="'.$length.'" type="'.$type.'" title="'.$title.'"[/attach]'; - break; - } - } - } - - // Is it a reply or a top level posting? - $item["parent-uri"] = $item["uri"]; - - $inreplyto = $xpath->query("thr:in-reply-to", $entry); - if (is_object($inreplyto->item(0))) - foreach($inreplyto->item(0)->attributes AS $attributes) - if ($attributes->name == "ref") - $item["parent-uri"] = $attributes->textContent; - - // Get the type of the item (Top level post, reply or remote reply) - $entrytype = self::get_entry_type($importer, $item); - - // Now assign the rest of the values that depend on the type of the message - if (in_array($entrytype, array(DFRN_REPLY, DFRN_REPLY_RC))) { - if (!isset($item["object-type"])) - $item["object-type"] = ACTIVITY_OBJ_COMMENT; - - if ($item["contact-id"] != $owner["contact-id"]) - $item["contact-id"] = $owner["contact-id"]; - - if (($item["network"] != $owner["network"]) AND ($owner["network"] != "")) - $item["network"] = $owner["network"]; - - if ($item["contact-id"] != $author["contact-id"]) - $item["contact-id"] = $author["contact-id"]; - - if (($item["network"] != $author["network"]) AND ($author["network"] != "")) - $item["network"] = $author["network"]; - } - - if ($entrytype == DFRN_REPLY_RC) { - $item["type"] = "remote-comment"; - $item["wall"] = 1; - } elseif ($entrytype == DFRN_TOP_LEVEL) { - // The Diaspora signature is only stored in replies - // Since this isn't a field in the item table this would create a bug when inserting this in the item table - unset($item["dsprsig"]); - - if (!isset($item["object-type"])) - $item["object-type"] = ACTIVITY_OBJ_NOTE; - - if ($item["object-type"] == ACTIVITY_OBJ_EVENT) { - logger("Item ".$item["uri"]." seems to contain an event.", LOGGER_DEBUG); - $ev = bbtoevent($item["body"]); - if((x($ev, "desc") || x($ev, "summary")) && x($ev, "start")) { - logger("Event in item ".$item["uri"]." was found.", LOGGER_DEBUG); - $ev["cid"] = $importer["id"]; - $ev["uid"] = $importer["uid"]; - $ev["uri"] = $item["uri"]; - $ev["edited"] = $item["edited"]; - $ev['private'] = $item['private']; - $ev["guid"] = $item["guid"]; - - $r = q("SELECT `id` FROM `event` WHERE `uri` = '%s' AND `uid` = %d LIMIT 1", - dbesc($item["uri"]), - intval($importer["uid"]) - ); - if(count($r)) - $ev["id"] = $r[0]["id"]; - - $event_id = event_store($ev); - logger("Event ".$event_id." was stored", LOGGER_DEBUG); - return; - } - } -/* - if(activity_match($item['verb'],ACTIVITY_FOLLOW)) { - logger('consume-feed: New follower'); - new_follower($importer,$contact,$item); - return; - } - if(activity_match($item['verb'],ACTIVITY_UNFOLLOW)) { - lose_follower($importer,$contact,$item); - return; - } - if(activity_match($item['verb'],ACTIVITY_REQ_FRIEND)) { - logger('consume-feed: New friend request'); - new_follower($importer,$contact,$item,(?),true); - return; - } - if(activity_match($item['verb'],ACTIVITY_UNFRIEND)) { - lose_sharer($importer,$contact,$item); - return; - } -*/ - } - - $r = q("SELECT `id`, `uid`, `last-child`, `edited`, `body` FROM `item` WHERE `uri` = '%s' AND `uid` = %d LIMIT 1", - dbesc($item["uri"]), - intval($importer["importer_uid"]) - ); - - // Update content if 'updated' changes - if(count($r)) { - if (self::update_content($r[0], $item, $importer, $entrytype)) - logger("Item ".$item["uri"]." was updated.", LOGGER_DEBUG); - else - logger("Item ".$item["uri"]." already existed.", LOGGER_DEBUG); - return; - } - - if (in_array($entrytype, array(DFRN_REPLY, DFRN_REPLY_RC))) { - if($importer["rel"] == CONTACT_IS_FOLLOWER) { - logger("Contact ".$importer["id"]." is only follower. Quitting", LOGGER_DEBUG); - return; - } - - if(($item["verb"] === ACTIVITY_LIKE) - || ($item["verb"] === ACTIVITY_DISLIKE) - || ($item["verb"] === ACTIVITY_ATTEND) - || ($item["verb"] === ACTIVITY_ATTENDNO) - || ($item["verb"] === ACTIVITY_ATTENDMAYBE)) { - $is_like = true; - $item["type"] = "activity"; - $item["gravity"] = GRAVITY_LIKE; - // only one like or dislike per person - // splitted into two queries for performance issues - $r = q("SELECT `id` FROM `item` WHERE `uid` = %d AND `author-link` = '%s' AND `verb` = '%s' AND `parent-uri` = '%s' AND NOT `deleted` LIMIT 1", - intval($item["uid"]), - dbesc($item["author-link"]), - dbesc($item["verb"]), - dbesc($item["parent-uri"]) - ); - if($r && count($r)) - return; - - $r = q("SELECT `id` FROM `item` WHERE `uid` = %d AND `author-link` = '%s' AND `verb` = '%s' AND `thr-parent` = '%s' AND NOT `deleted` LIMIT 1", - intval($item["uid"]), - dbesc($item["author-link"]), - dbesc($item["verb"]), - dbesc($item["parent-uri"]) - ); - if($r && count($r)) - return; - - } else - $is_like = false; - - if(($item["verb"] === ACTIVITY_TAG) && ($item["object-type"] === ACTIVITY_OBJ_TAGTERM)) { - - $xo = parse_xml_string($item["object"],false); - $xt = parse_xml_string($item["target"],false); - - if($xt->type == ACTIVITY_OBJ_NOTE) { - $r = q("SELECT `id`, `tag` FROM `item` WHERE `uri` = '%s' AND `uid` = %d LIMIT 1", - dbesc($xt->id), - intval($importer["importer_uid"]) - ); - - if(!count($r)) - return; - - // extract tag, if not duplicate, add to parent item - if($xo->content) { - if(!(stristr($r[0]["tag"],trim($xo->content)))) { - q("UPDATE `item` SET `tag` = '%s' WHERE `id` = %d", - dbesc($r[0]["tag"] . (strlen($r[0]["tag"]) ? ',' : '') . '#[url=' . $xo->id . ']'. $xo->content . '[/url]'), - intval($r[0]["id"]) - ); - create_tags_from_item($r[0]["id"]); - } - } - } - } - - $posted_id = item_store($item); - $parent = 0; - - if($posted_id) { - - logger("Reply from contact ".$item["contact-id"]." was stored with id ".$posted_id, LOGGER_DEBUG); - - $item["id"] = $posted_id; - - $r = q("SELECT `parent`, `parent-uri` FROM `item` WHERE `id` = %d AND `uid` = %d LIMIT 1", - intval($posted_id), - intval($importer["importer_uid"]) - ); - if(count($r)) { - $parent = $r[0]["parent"]; - $parent_uri = $r[0]["parent-uri"]; - } - - if(!$is_like) { - $r1 = q("UPDATE `item` SET `last-child` = 0, `changed` = '%s' WHERE `uid` = %d AND `parent` = %d", - dbesc(datetime_convert()), - intval($importer["importer_uid"]), - intval($r[0]["parent"]) - ); - - $r2 = q("UPDATE `item` SET `last-child` = 1, `changed` = '%s' WHERE `uid` = %d AND `id` = %d", - dbesc(datetime_convert()), - intval($importer["importer_uid"]), - intval($posted_id) - ); - } - - if($posted_id AND $parent AND ($entrytype == DFRN_REPLY_RC)) { - logger("Notifying followers about comment ".$posted_id, LOGGER_DEBUG); - proc_run("php", "include/notifier.php", "comment-import", $posted_id); - } - - return true; - } - } else { - if(!link_compare($item["owner-link"],$importer["url"])) { - /// @todo Check if this is really used - // The item owner info is not our contact. It's OK and is to be expected if this is a tgroup delivery, - // but otherwise there's a possible data mixup on the sender's system. - // the tgroup delivery code called from item_store will correct it if it's a forum, - // but we're going to unconditionally correct it here so that the post will always be owned by our contact. - logger('Correcting item owner.', LOGGER_DEBUG); - $item["owner-name"] = $importer["senderName"]; - $item["owner-link"] = $importer["url"]; - $item["owner-avatar"] = $importer["thumb"]; - } - - if(($importer["rel"] == CONTACT_IS_FOLLOWER) && (!tgroup_check($importer["importer_uid"], $item))) { - logger("Contact ".$importer["id"]." is only follower and tgroup check was negative.", LOGGER_DEBUG); - return; - } - - // This is my contact on another system, but it's really me. - // Turn this into a wall post. - $notify = item_is_remote_self($importer, $item); - - $posted_id = item_store($item, false, $notify); - - logger("Item was stored with id ".$posted_id, LOGGER_DEBUG); - - if(stristr($item["verb"],ACTIVITY_POKE)) - self::do_poke($item, $importer, $posted_id); - } - } - - private function process_deletion($header, $xpath, $deletion, $importer) { - - logger("Processing deletions"); - - foreach($deletion->attributes AS $attributes) { - if ($attributes->name == "ref") - $uri = $attributes->textContent; - if ($attributes->name == "when") - $when = $attributes->textContent; - } - if ($when) - $when = datetime_convert("UTC", "UTC", $when, "Y-m-d H:i:s"); - else - $when = datetime_convert("UTC", "UTC", "now", "Y-m-d H:i:s"); - - if (!$uri OR !$importer["id"]) - return false; - - /// @todo Only select the used fields - $r = q("SELECT `item`.*, `contact`.`self` FROM `item` INNER JOIN `contact` on `item`.`contact-id` = `contact`.`id` - WHERE `uri` = '%s' AND `item`.`uid` = %d AND `contact-id` = %d AND NOT `item`.`file` LIKE '%%[%%' LIMIT 1", - dbesc($uri), - intval($importer["uid"]), - intval($importer["id"]) - ); - if(!count($r)) { - logger("Item with uri ".$uri." from contact ".$importer["id"]." for user ".$importer["uid"]." wasn't found.", LOGGER_DEBUG); - return; - } else { - - $item = $r[0]; - - $entrytype = self::get_entry_type($importer, $item); - - if(!$item["deleted"]) - logger('deleting item '.$item["id"].' uri='.$uri, LOGGER_DEBUG); - else - return; - - if($item["object-type"] === ACTIVITY_OBJ_EVENT) { - logger("Deleting event ".$item["event-id"], LOGGER_DEBUG); - event_delete($item["event-id"]); - } - - if(($item["verb"] === ACTIVITY_TAG) && ($item["object-type"] === ACTIVITY_OBJ_TAGTERM)) { - $xo = parse_xml_string($item["object"],false); - $xt = parse_xml_string($item["target"],false); - if($xt->type === ACTIVITY_OBJ_NOTE) { - $i = q("SELECT `id`, `contact-id`, `tag` FROM `item` WHERE `uri` = '%s' AND `uid` = %d LIMIT 1", - dbesc($xt->id), - intval($importer["importer_uid"]) - ); - if(count($i)) { - - // For tags, the owner cannot remove the tag on the author's copy of the post. - - $owner_remove = (($item["contact-id"] == $i[0]["contact-id"]) ? true: false); - $author_remove = (($item["origin"] && $item["self"]) ? true : false); - $author_copy = (($item["origin"]) ? true : false); - - if($owner_remove && $author_copy) - return; - if($author_remove || $owner_remove) { - $tags = explode(',',$i[0]["tag"]); - $newtags = array(); - if(count($tags)) { - foreach($tags as $tag) - if(trim($tag) !== trim($xo->body)) - $newtags[] = trim($tag); - } - q("UPDATE `item` SET `tag` = '%s' WHERE `id` = %d", - dbesc(implode(',',$newtags)), - intval($i[0]["id"]) - ); - create_tags_from_item($i[0]["id"]); - } - } - } - } - - if($entrytype == DFRN_TOP_LEVEL) { - $r = q("UPDATE `item` SET `deleted` = 1, `edited` = '%s', `changed` = '%s', - `body` = '', `title` = '' - WHERE `parent-uri` = '%s' AND `uid` = %d", - dbesc($when), - dbesc(datetime_convert()), - dbesc($uri), - intval($importer["uid"]) - ); - create_tags_from_itemuri($uri, $importer["uid"]); - create_files_from_itemuri($uri, $importer["uid"]); - update_thread_uri($uri, $importer["uid"]); - } else { - $r = q("UPDATE `item` SET `deleted` = 1, `edited` = '%s', `changed` = '%s', - `body` = '', `title` = '' - WHERE `uri` = '%s' AND `uid` = %d", - dbesc($when), - dbesc(datetime_convert()), - dbesc($uri), - intval($importer["uid"]) - ); - create_tags_from_itemuri($uri, $importer["uid"]); - create_files_from_itemuri($uri, $importer["uid"]); - update_thread_uri($uri, $importer["importer_uid"]); - if($item["last-child"]) { - // ensure that last-child is set in case the comment that had it just got wiped. - q("UPDATE `item` SET `last-child` = 0, `changed` = '%s' WHERE `parent-uri` = '%s' AND `uid` = %d ", - dbesc(datetime_convert()), - dbesc($item["parent-uri"]), - intval($item["uid"]) - ); - // who is the last child now? - $r = q("SELECT `id` FROM `item` WHERE `parent-uri` = '%s' AND `type` != 'activity' AND `deleted` = 0 AND `moderated` = 0 AND `uid` = %d - ORDER BY `created` DESC LIMIT 1", - dbesc($item["parent-uri"]), - intval($importer["uid"]) - ); - if(count($r)) { - q("UPDATE `item` SET `last-child` = 1 WHERE `id` = %d", - intval($r[0]["id"]) - ); - } - } - // if this is a relayed delete, propagate it to other recipients - - if($entrytype == DFRN_REPLY_RC) { - logger("Notifying followers about deletion of post ".$item["id"], LOGGER_DEBUG); - proc_run("php", "include/notifier.php","drop", $item["id"]); - } - } - } - } - - /** - * @brief Imports a DFRN message - * - * @param text $xml The DFRN message - * @param array $importer Record of the importer user mixed with contact of the content - * @param bool $sort_by_date Is used when feeds are polled - */ - function import($xml,$importer, $sort_by_date = false) { - - if ($xml == "") - return; - - if($importer["readonly"]) { - // We aren't receiving stuff from this person. But we will quietly ignore them - // rather than a blatant "go away" message. - logger('ignoring contact '.$importer["id"]); - return; - } - - $doc = new DOMDocument(); - @$doc->loadXML($xml); - - $xpath = new DomXPath($doc); - $xpath->registerNamespace("atom", NAMESPACE_ATOM1); - $xpath->registerNamespace("thr", NAMESPACE_THREAD); - $xpath->registerNamespace("at", NAMESPACE_TOMB); - $xpath->registerNamespace("media", NAMESPACE_MEDIA); - $xpath->registerNamespace("dfrn", NAMESPACE_DFRN); - $xpath->registerNamespace("activity", NAMESPACE_ACTIVITY); - $xpath->registerNamespace("georss", NAMESPACE_GEORSS); - $xpath->registerNamespace("poco", NAMESPACE_POCO); - $xpath->registerNamespace("ostatus", NAMESPACE_OSTATUS); - $xpath->registerNamespace("statusnet", NAMESPACE_STATUSNET); - - $header = array(); - $header["uid"] = $importer["uid"]; - $header["network"] = NETWORK_DFRN; - $header["type"] = "remote"; - $header["wall"] = 0; - $header["origin"] = 0; - $header["contact-id"] = $importer["id"]; - - // Update the contact table if the data has changed - // Only the "dfrn:owner" in the head section contains all data - self::fetchauthor($xpath, $doc->firstChild, $importer, "dfrn:owner", false); - - logger("Import DFRN message for user ".$importer["uid"]." from contact ".$importer["id"], LOGGER_DEBUG); - - // is it a public forum? Private forums aren't supported by now with this method - $forum = intval($xpath->evaluate("/atom:feed/dfrn:community/text()", $context)->item(0)->nodeValue); - - /// @todo Check the opposite as well (forum changed to non-forum) - if ($forum) - q("UPDATE `contact` SET `forum` = %d WHERE `forum` != %d AND `id` = %d", - intval($forum), intval($forum), - intval($importer["id"]) - ); - - $mails = $xpath->query("/atom:feed/dfrn:mail"); - foreach ($mails AS $mail) - self::process_mail($xpath, $mail, $importer); - - $suggestions = $xpath->query("/atom:feed/dfrn:suggest"); - foreach ($suggestions AS $suggestion) - self::process_suggestion($xpath, $suggestion, $importer); - - $relocations = $xpath->query("/atom:feed/dfrn:relocate"); - foreach ($relocations AS $relocation) - self::process_relocation($xpath, $relocation, $importer); - - $deletions = $xpath->query("/atom:feed/at:deleted-entry"); - foreach ($deletions AS $deletion) - self::process_deletion($header, $xpath, $deletion, $importer); - - if (!$sort_by_date) { - $entries = $xpath->query("/atom:feed/atom:entry"); - foreach ($entries AS $entry) - self::process_entry($header, $xpath, $entry, $importer); - } else { - $newentries = array(); - $entries = $xpath->query("/atom:feed/atom:entry"); - foreach ($entries AS $entry) { - $created = $xpath->query("atom:published/text()", $entry)->item(0)->nodeValue; - $newentries[strtotime($created)] = $entry; - } - - // Now sort after the publishing date - ksort($newentries); - - foreach ($newentries AS $entry) - self::process_entry($header, $xpath, $entry, $importer); - } - } -} -?> diff --git a/include/ostatus.php b/include/ostatus.php index caaeec84f7..00022f8c6c 100644 --- a/include/ostatus.php +++ b/include/ostatus.php @@ -1312,6 +1312,10 @@ function ostatus_add_author($doc, $owner) { function ostatus_entry($doc, $item, $owner, $toplevel = false, $repeat = false) { $a = get_app(); + if (($item["id"] != $item["parent"]) AND (normalise_link($item["author-link"]) != normalise_link($owner["url"]))) { + logger("OStatus entry is from author ".$owner["url"]." - not from ".$item["author-link"].". Quitting.", LOGGER_DEBUG); + } + $is_repeat = false; /* if (!$repeat) { From bcf10206359ee610c3a3f19c53d54563ae7dd8ca Mon Sep 17 00:00:00 2001 From: rabuzarus <> Date: Fri, 5 Feb 2016 21:38:55 +0100 Subject: [PATCH 200/242] vier smileybutton: dark.css insert new line at the end of the file --- view/theme/vier/dark.css | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/view/theme/vier/dark.css b/view/theme/vier/dark.css index 5ddaf71a2f..d9b419e18a 100644 --- a/view/theme/vier/dark.css +++ b/view/theme/vier/dark.css @@ -66,4 +66,4 @@ li :hover { table.smiley-preview{ background-color: #252C33 !important; -} \ No newline at end of file +} From db949bb802448184bfe5164d8d3dd86ddf51b187 Mon Sep 17 00:00:00 2001 From: Andrej Stieben Date: Fri, 5 Feb 2016 21:52:39 +0100 Subject: [PATCH 201/242] Updated modules to allow for partial overrides without errors Only define functions if they have not been defined before, e.g. in themes. This makes it possible to override parts of a module and still use the other functions. --- mod/_well_known.php | 4 ++ mod/acctlink.php | 3 +- mod/acl.php | 4 +- mod/admin.php | 78 ++++++++++++++++++++++++++++----------- mod/allfriends.php | 2 + mod/amcd.php | 5 ++- mod/api.php | 11 +++--- mod/apps.php | 40 ++++++++++---------- mod/attach.php | 3 +- mod/babel.php | 46 ++++++++++++----------- mod/bookmarklet.php | 5 ++- mod/cb.php | 11 +++++- mod/common.php | 2 + mod/community.php | 13 ++++--- mod/contactgroup.php | 4 +- mod/contacts.php | 38 +++++++++++++++---- mod/content.php | 48 ++++++++++++------------ mod/credits.php | 2 + mod/crepair.php | 10 +++-- mod/delegate.php | 10 +++-- mod/dfrn_confirm.php | 3 +- mod/dfrn_notify.php | 6 ++- mod/dfrn_poll.php | 13 ++++--- mod/directory.php | 19 +++++----- mod/dirfind.php | 6 ++- mod/display.php | 9 +++-- mod/editpost.php | 5 +-- mod/events.php | 6 ++- mod/fbrowser.php | 3 +- mod/filer.php | 5 ++- mod/filerm.php | 2 + mod/follow.php | 4 ++ mod/friendica.php | 11 +++--- mod/fsuggest.php | 19 +++++----- mod/group.php | 11 ++++-- mod/hcard.php | 10 ++--- mod/help.php | 3 +- mod/hostxrd.php | 3 +- mod/ignored.php | 3 +- mod/install.php | 55 ++++++++++++++++++--------- mod/invite.php | 13 ++++--- mod/item.php | 13 +++++-- mod/like.php | 7 ++-- mod/localtime.php | 11 +++--- mod/lockview.php | 20 +++++----- mod/login.php | 4 +- mod/lostpass.php | 7 ++-- mod/maintenance.php | 3 +- mod/manage.php | 8 ++-- mod/match.php | 2 + mod/message.php | 13 +++++-- mod/modexp.php | 4 +- mod/mood.php | 10 ++--- mod/msearch.php | 9 +++-- mod/navigation.php | 3 +- mod/network.php | 17 +++++++-- mod/newmember.php | 10 +++-- mod/nodeinfo.php | 11 ++++-- mod/nogroup.php | 6 ++- mod/noscrape.php | 3 +- mod/notes.php | 20 +++++----- mod/notice.php | 9 +++-- mod/notifications.php | 6 ++- mod/notify.php | 8 ++-- mod/oembed.php | 4 +- mod/oexchange.php | 17 ++++----- mod/openid.php | 10 ++--- mod/opensearch.php | 16 ++++---- mod/ostatus_subscribe.php | 2 + mod/p.php | 4 +- mod/parse_url.php | 18 +++++++-- mod/photo.php | 2 + mod/photos.php | 15 ++++---- mod/ping.php | 4 ++ mod/poco.php | 3 +- mod/poke.php | 12 +++--- mod/post.php | 7 ++-- mod/pretheme.php | 4 +- mod/probe.php | 4 +- mod/profile.php | 7 ++-- mod/profile_photo.php | 26 ++++++------- mod/profiles.php | 14 +++++-- mod/profperm.php | 12 +++--- mod/proxy.php | 12 ++++++ mod/pubsub.php | 20 +++++----- mod/pubsubhubbub.php | 5 ++- mod/qsearch.php | 3 +- mod/randprof.php | 3 +- mod/receive.php | 4 +- mod/redir.php | 6 ++- mod/regmod.php | 9 +++-- mod/removeme.php | 6 ++- mod/repair_ostatus.php | 2 + mod/rsd_xml.php | 6 +-- mod/salmon.php | 7 +++- mod/search.php | 14 ++++--- mod/session.php | 3 +- mod/settings.php | 16 ++++---- mod/share.php | 9 ++++- mod/smilies.php | 6 ++- mod/starred.php | 3 +- mod/statistics_json.php | 2 + mod/subthread.php | 12 +++--- mod/suggest.php | 9 +++-- mod/tagger.php | 8 ++-- mod/tagrm.php | 9 +++-- mod/toggle_mobile.php | 3 +- mod/uexport.php | 30 +++++++++------ mod/uimport.php | 12 ++++-- mod/update_community.php | 5 ++- mod/update_display.php | 3 +- mod/update_network.php | 3 +- mod/update_notes.php | 9 +++-- mod/update_profile.php | 9 +++-- mod/videos.php | 12 +++--- mod/view.php | 10 +++-- mod/viewcontacts.php | 5 ++- mod/viewsrc.php | 6 +-- mod/wall_attach.php | 2 + mod/wall_upload.php | 2 + mod/wallmessage.php | 12 +++--- mod/webfinger.php | 6 +-- mod/xrd.php | 3 +- 123 files changed, 768 insertions(+), 471 deletions(-) diff --git a/mod/_well_known.php b/mod/_well_known.php index 33070a1ecd..6c33136f95 100644 --- a/mod/_well_known.php +++ b/mod/_well_known.php @@ -2,6 +2,7 @@ require_once("mod/hostxrd.php"); require_once("mod/nodeinfo.php"); +if(! function_exists('_well_known_init')) { function _well_known_init(&$a){ if ($a->argc > 1) { switch($a->argv[1]) { @@ -19,7 +20,9 @@ function _well_known_init(&$a){ http_status_exit(404); killme(); } +} +if(! function_exists('wk_social_relay')) { function wk_social_relay(&$a) { define('SR_SCOPE_ALL', 'all'); @@ -64,3 +67,4 @@ function wk_social_relay(&$a) { echo json_encode($relay, JSON_PRETTY_PRINT|JSON_UNESCAPED_SLASHES); exit; } +} diff --git a/mod/acctlink.php b/mod/acctlink.php index a2365803ac..a551e3dbd6 100644 --- a/mod/acctlink.php +++ b/mod/acctlink.php @@ -2,8 +2,8 @@ require_once('include/Scrape.php'); +if(! function_exists('acctlink_init')) { function acctlink_init(&$a) { - if(x($_GET,'addr')) { $addr = trim($_GET['addr']); $res = probe_url($addr); @@ -14,3 +14,4 @@ function acctlink_init(&$a) { } } } +} diff --git a/mod/acl.php b/mod/acl.php index f5e04b96a7..5666ccabb8 100644 --- a/mod/acl.php +++ b/mod/acl.php @@ -3,8 +3,8 @@ require_once("include/acl_selectors.php"); +if(! function_exists('acl_init')) { function acl_init(&$a){ acl_lookup($a); } - - +} diff --git a/mod/admin.php b/mod/admin.php index 7f9000807b..ff17c0b8c4 100644 --- a/mod/admin.php +++ b/mod/admin.php @@ -2,7 +2,7 @@ /** * @file mod/admin.php - * + * * @brief Friendica admin */ @@ -23,6 +23,7 @@ require_once("include/text.php"); * @param App $a * */ +if(! function_exists('admin_post')) { function admin_post(&$a){ @@ -110,6 +111,7 @@ function admin_post(&$a){ goaway($a->get_baseurl(true) . '/admin' ); return; // NOTREACHED } +} /** * @brief Generates content of the admin panel pages @@ -128,6 +130,7 @@ function admin_post(&$a){ * @param App $a * @return string */ +if(! function_exists('admin_content')) { function admin_content(&$a) { if(!is_site_admin()) { @@ -245,6 +248,7 @@ function admin_content(&$a) { return $o; } } +} /** * @brief Subpage with some stats about "the federation" network @@ -260,6 +264,7 @@ function admin_content(&$a) { * @param App $a * @return string */ +if(! function_exists('admin_page_federation')) { function admin_page_federation(&$a) { // get counts on active friendica, diaspora, redmatrix, hubzilla, gnu // social and statusnet nodes this node is knowing @@ -284,7 +289,7 @@ function admin_page_federation(&$a) { // what versions for that platform do we know at all? // again only the active nodes $v = q('SELECT count(*) AS total, version FROM gserver - WHERE last_contact > last_failure AND platform LIKE "%s" + WHERE last_contact > last_failure AND platform LIKE "%s" GROUP BY version ORDER BY version;', $p); @@ -301,12 +306,12 @@ function admin_page_federation(&$a) { $newVC = $vv['total']; $newVV = $vv['version']; $posDash = strpos($newVV, '-'); - if($posDash) + if($posDash) $newVV = substr($newVV, 0, $posDash); if(isset($newV[$newVV])) - $newV[$newVV] += $newVC; + $newV[$newVV] += $newVC; else - $newV[$newVV] = $newVC; + $newV[$newVV] = $newVC; } foreach ($newV as $key => $value) { array_push($newVv, array('total'=>$value, 'version'=>$key)); @@ -361,6 +366,7 @@ function admin_page_federation(&$a) { '$baseurl' => $a->get_baseurl(), )); } +} /** * @brief Admin Inspect Queue Page @@ -375,6 +381,7 @@ function admin_page_federation(&$a) { * @param App $a * @return string */ +if(! function_exists('admin_page_queue')) { function admin_page_queue(&$a) { // get content from the queue table $r = q("SELECT c.name,c.nurl,q.id,q.network,q.created,q.last from queue as q, contact as c where c.id=q.cid order by q.cid, q.created;"); @@ -394,6 +401,7 @@ function admin_page_queue(&$a) { '$entries' => $r, )); } +} /** * @brief Admin Summary Page @@ -406,6 +414,7 @@ function admin_page_queue(&$a) { * @param App $a * @return string */ +if(! function_exists('admin_page_summary')) { function admin_page_summary(&$a) { $r = q("SELECT `page-flags`, COUNT(uid) as `count` FROM `user` GROUP BY `page-flags`"); $accounts = array( @@ -452,12 +461,14 @@ function admin_page_summary(&$a) { '$plugins' => array( t('Active plugins'), $a->plugins ) )); } +} /** * @brief Process send data from Admin Site Page - * + * * @param App $a */ +if(! function_exists('admin_page_site_post')) { function admin_page_site_post(&$a) { if(!x($_POST,"page_site")) { return; @@ -770,6 +781,7 @@ function admin_page_site_post(&$a) { return; // NOTREACHED } +} /** * @brief Generate Admin Site subpage @@ -779,6 +791,7 @@ function admin_page_site_post(&$a) { * @param App $a * @return string */ +if(! function_exists('admin_page_site')) { function admin_page_site(&$a) { /* Installed langs */ @@ -983,7 +996,7 @@ function admin_page_site(&$a) { '$form_security_token' => get_form_security_token("admin_site") )); - +} } /** @@ -998,6 +1011,7 @@ function admin_page_site(&$a) { * @param App $a * @return string **/ +if(! function_exists('admin_page_dbsync')) { function admin_page_dbsync(&$a) { $o = ''; @@ -1073,14 +1087,15 @@ function admin_page_dbsync(&$a) { } return $o; - +} } /** * @brief Process data send by Users admin page - * + * * @param App $a */ +if(! function_exists('admin_page_users_post')) { function admin_page_users_post(&$a){ $pending = ( x($_POST, 'pending') ? $_POST['pending'] : array() ); $users = ( x($_POST, 'user') ? $_POST['user'] : array() ); @@ -1171,6 +1186,7 @@ function admin_page_users_post(&$a){ goaway($a->get_baseurl(true) . '/admin/users' ); return; // NOTREACHED } +} /** * @brief Admin panel subpage for User management @@ -1184,6 +1200,7 @@ function admin_page_users_post(&$a){ * @param App $a * @return string */ +if(! function_exists('admin_page_users')) { function admin_page_users(&$a){ if($a->argc>2) { $uid = $a->argv[3]; @@ -1336,7 +1353,7 @@ function admin_page_users(&$a){ $o .= paginate($a); return $o; } - +} /** * @brief Plugins admin page @@ -1354,6 +1371,7 @@ function admin_page_users(&$a){ * @param App $a * @return string */ +if(! function_exists('admin_page_plugins')) { function admin_page_plugins(&$a){ /* @@ -1479,17 +1497,19 @@ function admin_page_plugins(&$a){ '$baseurl' => $a->get_baseurl(true), '$function' => 'plugins', '$plugins' => $plugins, - '$pcount' => count($plugins), + '$pcount' => count($plugins), '$noplugshint' => sprintf( t('There are currently no plugins available on your node. You can find the official plugin repository at %1$s and might find other interesting plugins in the open plugin registry at %2$s'), 'https://github.com/friendica/friendica-addons', 'http://addons.friendi.ca'), '$form_security_token' => get_form_security_token("admin_themes"), )); } +} /** * @param array $themes * @param string $th * @param int $result */ +if(! function_exists('toggle_theme')) { function toggle_theme(&$themes,$th,&$result) { for($x = 0; $x < count($themes); $x ++) { if($themes[$x]['name'] === $th) { @@ -1504,12 +1524,14 @@ function toggle_theme(&$themes,$th,&$result) { } } } +} /** * @param array $themes * @param string $th * @return int */ +if(! function_exists('theme_status')) { function theme_status($themes,$th) { for($x = 0; $x < count($themes); $x ++) { if($themes[$x]['name'] === $th) { @@ -1523,12 +1545,13 @@ function theme_status($themes,$th) { } return 0; } - +} /** * @param array $themes * @return string */ +if(! function_exists('rebuild_theme_table')) { function rebuild_theme_table($themes) { $o = ''; if(count($themes)) { @@ -1542,7 +1565,7 @@ function rebuild_theme_table($themes) { } return $o; } - +} /** * @brief Themes admin page @@ -1560,6 +1583,7 @@ function rebuild_theme_table($themes) { * @param App $a * @return string */ +if(! function_exists('admin_page_themes')) { function admin_page_themes(&$a){ $allowed_themes_str = get_config('system','allowed_themes'); @@ -1734,13 +1758,14 @@ function admin_page_themes(&$a){ '$form_security_token' => get_form_security_token("admin_themes"), )); } - +} /** * @brief Prosesses data send by Logs admin page - * + * * @param App $a */ +if(! function_exists('admin_page_logs_post')) { function admin_page_logs_post(&$a) { if(x($_POST,"page_logs")) { check_form_security_token_redirectOnErr('/admin/logs', 'admin_logs'); @@ -1758,6 +1783,7 @@ function admin_page_logs_post(&$a) { goaway($a->get_baseurl(true) . '/admin/logs' ); return; // NOTREACHED } +} /** * @brief Generates admin panel subpage for configuration of the logs @@ -1775,6 +1801,7 @@ function admin_page_logs_post(&$a) { * @param App $a * @return string */ +if(! function_exists('admin_page_logs')) { function admin_page_logs(&$a){ $log_choices = array( @@ -1806,6 +1833,7 @@ function admin_page_logs(&$a){ '$phplogcode' => "error_reporting(E_ERROR | E_WARNING | E_PARSE );\nini_set('error_log','php.out');\nini_set('log_errors','1');\nini_set('display_errors', '1');", )); } +} /** * @brief Generates admin panel subpage to view the Friendica log @@ -1825,6 +1853,7 @@ function admin_page_logs(&$a){ * @param App $a * @return string */ +if(! function_exists('admin_page_viewlogs')) { function admin_page_viewlogs(&$a){ $t = get_markup_template("admin_viewlogs.tpl"); $f = get_config('system','logfile'); @@ -1861,12 +1890,14 @@ function admin_page_viewlogs(&$a){ '$logname' => get_config('system','logfile') )); } +} /** * @brief Prosesses data send by the features admin page - * + * * @param App $a */ +if(! function_exists('admin_page_features_post')) { function admin_page_features_post(&$a) { check_form_security_token_redirectOnErr('/admin/features', 'admin_manage_features'); @@ -1898,23 +1929,25 @@ function admin_page_features_post(&$a) { goaway($a->get_baseurl(true) . '/admin/features' ); return; // NOTREACHED } +} /** * @brief Subpage for global additional feature management - * + * * This functin generates the subpage 'Manage Additional Features' * for the admin panel. At this page the admin can set preferences - * for the user settings of the 'additional features'. If needed this + * for the user settings of the 'additional features'. If needed this * preferences can be locked through the admin. - * + * * The returned string contains the HTML code of the subpage 'Manage * Additional Features' - * + * * @param App $a * @return string */ +if(! function_exists('admin_page_features')) { function admin_page_features(&$a) { - + if((argc() > 1) && (argv(1) === 'features')) { $arr = array(); $features = get_features(false); @@ -1933,7 +1966,7 @@ function admin_page_features(&$a) { ); } } - + $tpl = get_markup_template("admin_settings_features.tpl"); $o .= replace_macros($tpl, array( '$form_security_token' => get_form_security_token("admin_manage_features"), @@ -1945,3 +1978,4 @@ function admin_page_features(&$a) { return $o; } } +} diff --git a/mod/allfriends.php b/mod/allfriends.php index 356a389b83..8843265a99 100644 --- a/mod/allfriends.php +++ b/mod/allfriends.php @@ -5,6 +5,7 @@ require_once('include/Contact.php'); require_once('include/contact_selectors.php'); require_once('mod/contacts.php'); +if(! function_exists('allfriends_content')) { function allfriends_content(&$a) { $o = ''; @@ -97,3 +98,4 @@ function allfriends_content(&$a) { return $o; } +} diff --git a/mod/amcd.php b/mod/amcd.php index a2a1327e6d..141a804298 100644 --- a/mod/amcd.php +++ b/mod/amcd.php @@ -1,5 +1,5 @@ get_parameters(); $token = $params['oauth_token']; @@ -19,9 +17,10 @@ function oauth_get_client($request){ return $r[0]; } +} +if(! function_exists('api_post')) { function api_post(&$a) { - if(! local_user()) { notice( t('Permission denied.') . EOL); return; @@ -31,9 +30,10 @@ function api_post(&$a) { notice( t('Permission denied.') . EOL); return; } - +} } +if(! function_exists('api_content')) { function api_content(&$a) { if ($a->cmd=='api/oauth/authorize'){ /* @@ -114,3 +114,4 @@ function api_content(&$a) { echo api_call($a); killme(); } +} diff --git a/mod/apps.php b/mod/apps.php index a821ef5d5b..e807feae74 100644 --- a/mod/apps.php +++ b/mod/apps.php @@ -1,25 +1,23 @@ apps)==0) + notice( t('No installed applications.') . EOL); + + $tpl = get_markup_template("apps.tpl"); + return replace_macros($tpl, array( + '$title' => $title, + '$apps' => $a->apps, + )); } - - $title = t('Applications'); - - if(count($a->apps)==0) - notice( t('No installed applications.') . EOL); - - - $tpl = get_markup_template("apps.tpl"); - return replace_macros($tpl, array( - '$title' => $title, - '$apps' => $a->apps, - )); - - - } diff --git a/mod/attach.php b/mod/attach.php index 03f850f0d1..849faa26ec 100644 --- a/mod/attach.php +++ b/mod/attach.php @@ -1,7 +1,7 @@ argc != 2) { @@ -47,3 +47,4 @@ function attach_init(&$a) { killme(); // NOTREACHED } +} diff --git a/mod/babel.php b/mod/babel.php index d31e090c55..56455bdb21 100644 --- a/mod/babel.php +++ b/mod/babel.php @@ -9,55 +9,56 @@ function visible_lf($s) { return str_replace("\n",'
    ', $s); } +if(! function_exists('babel_content')) { function babel_content(&$a) { $o .= '

    Babel Diagnostic

    '; $o .= '
    '; $o .= t('Source (bbcode) text:') . EOL . '' . EOL; - $o .= '
    '; + $o .= ''; $o .= '

    '; $o .= '
    '; $o .= t('Source (Diaspora) text to convert to BBcode:') . EOL . '' . EOL; - $o .= '
    '; + $o .= ''; $o .= '

    '; if(x($_REQUEST,'text')) { $text = trim($_REQUEST['text']); - $o .= "

    " . t("Source input: ") . "

    " . EOL. EOL; - $o .= visible_lf($text) . EOL. EOL; + $o .= "

    " . t("Source input: ") . "

    " . EOL. EOL; + $o .= visible_lf($text) . EOL. EOL; $html = bbcode($text); - $o .= "

    " . t("bb2html (raw HTML): ") . "

    " . EOL. EOL; - $o .= htmlspecialchars($html). EOL. EOL; + $o .= "

    " . t("bb2html (raw HTML): ") . "

    " . EOL. EOL; + $o .= htmlspecialchars($html). EOL. EOL; //$html = bbcode($text); - $o .= "

    " . t("bb2html: ") . "

    " . EOL. EOL; - $o .= $html. EOL. EOL; + $o .= "

    " . t("bb2html: ") . "

    " . EOL. EOL; + $o .= $html. EOL. EOL; $bbcode = html2bbcode($html); - $o .= "

    " . t("bb2html2bb: ") . "

    " . EOL. EOL; - $o .= visible_lf($bbcode) . EOL. EOL; + $o .= "

    " . t("bb2html2bb: ") . "

    " . EOL. EOL; + $o .= visible_lf($bbcode) . EOL. EOL; $diaspora = bb2diaspora($text); - $o .= "

    " . t("bb2md: ") . "

    " . EOL. EOL; - $o .= visible_lf($diaspora) . EOL. EOL; + $o .= "

    " . t("bb2md: ") . "

    " . EOL. EOL; + $o .= visible_lf($diaspora) . EOL. EOL; $html = Markdown($diaspora); - $o .= "

    " . t("bb2md2html: ") . "

    " . EOL. EOL; - $o .= $html. EOL. EOL; + $o .= "

    " . t("bb2md2html: ") . "

    " . EOL. EOL; + $o .= $html. EOL. EOL; $bbcode = diaspora2bb($diaspora); - $o .= "

    " . t("bb2dia2bb: ") . "

    " . EOL. EOL; - $o .= visible_lf($bbcode) . EOL. EOL; + $o .= "

    " . t("bb2dia2bb: ") . "

    " . EOL. EOL; + $o .= visible_lf($bbcode) . EOL. EOL; $bbcode = html2bbcode($html); - $o .= "

    " . t("bb2md2html2bb: ") . "

    " . EOL. EOL; - $o .= visible_lf($bbcode) . EOL. EOL; + $o .= "

    " . t("bb2md2html2bb: ") . "

    " . EOL. EOL; + $o .= visible_lf($bbcode) . EOL. EOL; @@ -66,14 +67,15 @@ function babel_content(&$a) { if(x($_REQUEST,'d2bbtext')) { $d2bbtext = trim($_REQUEST['d2bbtext']); - $o .= "

    " . t("Source input (Diaspora format): ") . "

    " . EOL. EOL; - $o .= visible_lf($d2bbtext) . EOL. EOL; + $o .= "

    " . t("Source input (Diaspora format): ") . "

    " . EOL. EOL; + $o .= visible_lf($d2bbtext) . EOL. EOL; $bb = diaspora2bb($d2bbtext); - $o .= "

    " . t("diaspora2bb: ") . "

    " . EOL. EOL; - $o .= visible_lf($bb) . EOL. EOL; + $o .= "

    " . t("diaspora2bb: ") . "

    " . EOL. EOL; + $o .= visible_lf($bb) . EOL. EOL; } return $o; } +} diff --git a/mod/bookmarklet.php b/mod/bookmarklet.php index be8645c1fd..4db6bf401e 100644 --- a/mod/bookmarklet.php +++ b/mod/bookmarklet.php @@ -1,12 +1,14 @@ '.t('Login').''; @@ -44,3 +46,4 @@ function bookmarklet_content(&$a) { return $o; } +} diff --git a/mod/cb.php b/mod/cb.php index 6375d23984..04d01302c1 100644 --- a/mod/cb.php +++ b/mod/cb.php @@ -4,21 +4,28 @@ * General purpose landing page for plugins/addons */ - +if(! function_exists('cb_init')) { function cb_init(&$a) { call_hooks('cb_init'); } +} +if(! function_exists('cb_post')) { function cb_post(&$a) { call_hooks('cb_post', $_POST); } +} +if(! function_exists('cb_afterpost')) { function cb_afterpost(&$a) { call_hooks('cb_afterpost'); } +} +if(! function_exists('cb_content')) { function cb_content(&$a) { $o = ''; call_hooks('cb_content', $o); return $o; -} \ No newline at end of file +} +} diff --git a/mod/common.php b/mod/common.php index c9409b3ef1..4cdbe9641b 100644 --- a/mod/common.php +++ b/mod/common.php @@ -5,6 +5,7 @@ require_once('include/Contact.php'); require_once('include/contact_selectors.php'); require_once('mod/contacts.php'); +if(! function_exists('common_content')) { function common_content(&$a) { $o = ''; @@ -144,3 +145,4 @@ function common_content(&$a) { return $o; } +} diff --git a/mod/community.php b/mod/community.php index b6d72a3555..c64c6216b1 100644 --- a/mod/community.php +++ b/mod/community.php @@ -1,15 +1,14 @@ data['contact']['network'] != "") AND ($a->data['contact']['network'] != NETWORK_DFRN)) { $networkname = format_network_name($a->data['contact']['network'],$a->data['contact']['url']); - } else + } else $networkname = ''; $vcard_widget = replace_macros(get_markup_template("vcard-widget.tpl"),array( @@ -88,9 +89,10 @@ function contacts_init(&$a) { '$base' => $base )); - +} } +if(! function_exists('contacts_batch_actions')) { function contacts_batch_actions(&$a){ $contacts_id = $_POST['contact_batch']; if (!is_array($contacts_id)) return; @@ -132,10 +134,10 @@ function contacts_batch_actions(&$a){ goaway($a->get_baseurl(true) . '/' . $_SESSION['return_url']); else goaway($a->get_baseurl(true) . '/contacts'); - +} } - +if(! function_exists('contacts_post')) { function contacts_post(&$a) { if(! local_user()) @@ -215,10 +217,11 @@ function contacts_post(&$a) { $a->data['contact'] = $r[0]; return; - +} } /*contact actions*/ +if(! function_exists('_contact_update')) { function _contact_update($contact_id) { $r = q("SELECT `uid`, `url`, `network` FROM `contact` WHERE `id` = %d", intval($contact_id)); if (!$r) @@ -239,7 +242,9 @@ function _contact_update($contact_id) { // pull feed and consume it, which should subscribe to the hub. proc_run('php',"include/onepoll.php","$contact_id", "force"); } +} +if(! function_exists('_contact_update_profile')) { function _contact_update_profile($contact_id) { $r = q("SELECT `uid`, `url`, `network` FROM `contact` WHERE `id` = %d", intval($contact_id)); if (!$r) @@ -299,7 +304,9 @@ function _contact_update_profile($contact_id) { // Update the entry in the gcontact table update_gcontact_from_probe($data["url"]); } +} +if(! function_exists('_contact_block')) { function _contact_block($contact_id, $orig_record) { $blocked = (($orig_record['blocked']) ? 0 : 1); $r = q("UPDATE `contact` SET `blocked` = %d WHERE `id` = %d AND `uid` = %d", @@ -308,8 +315,10 @@ function _contact_block($contact_id, $orig_record) { intval(local_user()) ); return $r; - } +} + +if(! function_exists('_contact_ignore')) { function _contact_ignore($contact_id, $orig_record) { $readonly = (($orig_record['readonly']) ? 0 : 1); $r = q("UPDATE `contact` SET `readonly` = %d WHERE `id` = %d AND `uid` = %d", @@ -319,6 +328,9 @@ function _contact_ignore($contact_id, $orig_record) { ); return $r; } +} + +if(! function_exists('_contact_archive')) { function _contact_archive($contact_id, $orig_record) { $archived = (($orig_record['archive']) ? 0 : 1); $r = q("UPDATE `contact` SET `archive` = %d WHERE `id` = %d AND `uid` = %d", @@ -331,14 +343,18 @@ function _contact_archive($contact_id, $orig_record) { } return $r; } +} + +if(! function_exists('_contact_drop')) { function _contact_drop($contact_id, $orig_record) { $a = get_app(); terminate_friendship($a->user,$a->contact,$orig_record); contact_remove($orig_record['id']); } +} - +if(! function_exists('contacts_content')) { function contacts_content(&$a) { $sort_type = 0; @@ -799,7 +815,9 @@ function contacts_content(&$a) { return $o; } +} +if(! function_exists('contacts_tab')) { function contacts_tab($a, $contact_id, $active_tab) { // tabs $tabs = array( @@ -873,7 +891,9 @@ function contacts_tab($a, $contact_id, $active_tab) { return $tab_str; } +} +if(! function_exists('contact_posts')) { function contact_posts($a, $contact_id) { $r = q("SELECT `url` FROM `contact` WHERE `id` = %d", intval($contact_id)); @@ -901,7 +921,9 @@ function contact_posts($a, $contact_id) { return $o; } +} +if(! function_exists('_contact_detail_for_template')) { function _contact_detail_for_template($rr){ $community = ''; @@ -952,5 +974,5 @@ function _contact_detail_for_template($rr){ 'url' => $url, 'network' => network_to_name($rr['network'], $rr['url']), ); - +} } diff --git a/mod/content.php b/mod/content.php index c5a5556116..ab0fe7e4bf 100644 --- a/mod/content.php +++ b/mod/content.php @@ -15,7 +15,7 @@ // fast - e.g. one or two milliseconds to fetch parent items for the current content, // and 10-20 milliseconds to fetch all the child items. - +if(! function_exists('content_content')) { function content_content(&$a, $update = 0) { require_once('include/conversation.php'); @@ -61,7 +61,7 @@ function content_content(&$a, $update = 0) { $o = ''; - + $contact_id = $a->cid; @@ -100,7 +100,7 @@ function content_content(&$a, $update = 0) { $def_acl = array('allow_cid' => $str); } - + $sql_options = (($star) ? " and starred = 1 " : ''); $sql_options .= (($bmark) ? " and bookmark = 1 " : ''); @@ -137,7 +137,7 @@ function content_content(&$a, $update = 0) { } elseif($cid) { - $r = q("SELECT `id`,`name`,`network`,`writable`,`nurl` FROM `contact` WHERE `id` = %d + $r = q("SELECT `id`,`name`,`network`,`writable`,`nurl` FROM `contact` WHERE `id` = %d AND `blocked` = 0 AND `pending` = 0 LIMIT 1", intval($cid) ); @@ -304,9 +304,9 @@ function content_content(&$a, $update = 0) { echo json_encode($o); killme(); } +} - - +if(! function_exists('render_content')) { function render_content(&$a, $items, $mode, $update, $preview = false) { require_once('include/bbcode.php'); @@ -373,7 +373,7 @@ function render_content(&$a, $items, $mode, $update, $preview = false) { if($mode === 'network-new' || $mode === 'search' || $mode === 'community') { - // "New Item View" on network page or search page results + // "New Item View" on network page or search page results // - just loop through the items and format them minimally for display //$tpl = get_markup_template('search_item.tpl'); @@ -389,7 +389,7 @@ function render_content(&$a, $items, $mode, $update, $preview = false) { $sparkle = ''; if($mode === 'search' || $mode === 'community') { - if(((activity_match($item['verb'],ACTIVITY_LIKE)) || (activity_match($item['verb'],ACTIVITY_DISLIKE))) + if(((activity_match($item['verb'],ACTIVITY_LIKE)) || (activity_match($item['verb'],ACTIVITY_DISLIKE))) && ($item['id'] != $item['parent'])) continue; $nickname = $item['nickname']; @@ -436,7 +436,7 @@ function render_content(&$a, $items, $mode, $update, $preview = false) { $drop = array( 'dropping' => $dropping, - 'select' => t('Select'), + 'select' => t('Select'), 'delete' => t('Delete'), ); @@ -526,11 +526,11 @@ function render_content(&$a, $items, $mode, $update, $preview = false) { $comments[$item['parent']] = 1; else $comments[$item['parent']] += 1; - } elseif(! x($comments,$item['parent'])) + } elseif(! x($comments,$item['parent'])) $comments[$item['parent']] = 0; // avoid notices later on } - // map all the like/dislike activities for each parent item + // map all the like/dislike activities for each parent item // Store these in the $alike and $dlike arrays foreach($items as $item) { @@ -617,14 +617,14 @@ function render_content(&$a, $items, $mode, $update, $preview = false) { $redirect_url = $a->get_baseurl($ssl_state) . '/redir/' . $item['cid'] ; - $lock = ((($item['private'] == 1) || (($item['uid'] == local_user()) && (strlen($item['allow_cid']) || strlen($item['allow_gid']) + $lock = ((($item['private'] == 1) || (($item['uid'] == local_user()) && (strlen($item['allow_cid']) || strlen($item['allow_gid']) || strlen($item['deny_cid']) || strlen($item['deny_gid'])))) ? t('Private Message') : false); // Top-level wall post not written by the wall owner (wall-to-wall) - // First figure out who owns it. + // First figure out who owns it. $osparkle = ''; @@ -651,13 +651,13 @@ function render_content(&$a, $items, $mode, $update, $preview = false) { if((! $owner_linkmatch) && (! $alias_linkmatch) && (! $owner_namematch)) { // The author url doesn't match the owner (typically the contact) - // and also doesn't match the contact alias. - // The name match is a hack to catch several weird cases where URLs are + // and also doesn't match the contact alias. + // The name match is a hack to catch several weird cases where URLs are // all over the park. It can be tricked, but this prevents you from // seeing "Bob Smith to Bob Smith via Wall-to-wall" and you know darn - // well that it's the same Bob Smith. + // well that it's the same Bob Smith. - // But it could be somebody else with the same name. It just isn't highly likely. + // But it could be somebody else with the same name. It just isn't highly likely. $owner_url = $item['owner-link']; @@ -666,7 +666,7 @@ function render_content(&$a, $items, $mode, $update, $preview = false) { $template = $wallwall; $commentww = 'ww'; // If it is our contact, use a friendly redirect link - if((link_compare($item['owner-link'],$item['url'])) + if((link_compare($item['owner-link'],$item['url'])) && ($item['network'] === NETWORK_DFRN)) { $owner_url = $redirect_url; $osparkle = ' sparkle'; @@ -678,7 +678,7 @@ function render_content(&$a, $items, $mode, $update, $preview = false) { } $likebuttons = ''; - $shareable = ((($profile_owner == local_user()) && ($item['private'] != 1)) ? true : false); + $shareable = ((($profile_owner == local_user()) && ($item['private'] != 1)) ? true : false); if($page_writeable) { /* if($toplevelpost) { */ @@ -698,7 +698,7 @@ function render_content(&$a, $items, $mode, $update, $preview = false) { if(($show_comment_box) || (($show_comment_box == false) && ($override_comment_box == false) && ($item['last-child']))) { $comment = replace_macros($cmnt_tpl,array( - '$return_path' => '', + '$return_path' => '', '$jsreload' => (($mode === 'display') ? $_SESSION['return_url'] : ''), '$type' => (($mode === 'profile') ? 'wall-comment' : 'net-comment'), '$id' => $item['item_id'], @@ -739,7 +739,7 @@ function render_content(&$a, $items, $mode, $update, $preview = false) { $drop = array( 'dropping' => $dropping, - 'select' => t('Select'), + 'select' => t('Select'), 'delete' => t('Delete'), ); @@ -805,9 +805,9 @@ function render_content(&$a, $items, $mode, $update, $preview = false) { $shiny = ""; if(strcmp(datetime_convert('UTC','UTC',$item['created']),datetime_convert('UTC','UTC','now - 12 hours')) > 0) - $shiny = 'shiny'; + $shiny = 'shiny'; - // + // localize_item($item); @@ -897,5 +897,5 @@ function render_content(&$a, $items, $mode, $update, $preview = false) { return $threads; - +} } diff --git a/mod/credits.php b/mod/credits.php index f8cfb03f37..8e6321760b 100644 --- a/mod/credits.php +++ b/mod/credits.php @@ -5,6 +5,7 @@ * addons repository will be listed though ATM) */ +if(! function_exists('credits_content')) { function credits_content (&$a) { /* fill the page with credits */ $f = fopen('util/credits.txt','r'); @@ -18,3 +19,4 @@ function credits_content (&$a) { '$names' => $arr, )); } +} diff --git a/mod/crepair.php b/mod/crepair.php index 5b4db09dac..50502b4987 100644 --- a/mod/crepair.php +++ b/mod/crepair.php @@ -2,6 +2,7 @@ require_once("include/contact_selectors.php"); require_once("mod/contacts.php"); +if(! function_exists('crepair_init')) { function crepair_init(&$a) { if(! local_user()) return; @@ -28,8 +29,9 @@ function crepair_init(&$a) { profile_load($a, "", 0, get_contact_details_by_url($contact["url"])); } } +} - +if(! function_exists('crepair_post')) { function crepair_post(&$a) { if(! local_user()) return; @@ -91,9 +93,9 @@ function crepair_post(&$a) { return; } +} - - +if(! function_exists('crepair_content')) { function crepair_content(&$a) { if(! local_user()) { @@ -180,5 +182,5 @@ function crepair_content(&$a) { )); return $o; - +} } diff --git a/mod/delegate.php b/mod/delegate.php index 20d2e605e0..d421de3764 100644 --- a/mod/delegate.php +++ b/mod/delegate.php @@ -1,11 +1,13 @@ get_baseurl())), intval(local_user()), dbesc(NETWORK_DFRN) - ); + ); if(! count($r)) { notice( t('No potential page delegates located.') . EOL); @@ -144,5 +146,5 @@ function delegate_content(&$a) { return $o; - +} } diff --git a/mod/dfrn_confirm.php b/mod/dfrn_confirm.php index 27c04a908d..00e215e334 100644 --- a/mod/dfrn_confirm.php +++ b/mod/dfrn_confirm.php @@ -16,6 +16,7 @@ require_once('include/enotify.php'); +if(! function_exists('dfrn_confirm_post')) { function dfrn_confirm_post(&$a,$handsfree = null) { if(is_array($handsfree)) { @@ -801,5 +802,5 @@ function dfrn_confirm_post(&$a,$handsfree = null) { goaway(z_root()); // NOTREACHED - +} } diff --git a/mod/dfrn_notify.php b/mod/dfrn_notify.php index 4aa777b550..04500e89ad 100644 --- a/mod/dfrn_notify.php +++ b/mod/dfrn_notify.php @@ -5,6 +5,7 @@ require_once('include/event.php'); require_once('library/defuse/php-encryption-1.2.1/Crypto.php'); +if(! function_exists('dfrn_notify_post')) { function dfrn_notify_post(&$a) { logger(__function__, LOGGER_TRACE); $dfrn_id = ((x($_POST,'dfrn_id')) ? notags(trim($_POST['dfrn_id'])) : ''); @@ -213,8 +214,9 @@ function dfrn_notify_post(&$a) { // NOTREACHED } +} - +if(! function_exists('dfrn_notify_content')) { function dfrn_notify_content(&$a) { if(x($_GET,'dfrn_id')) { @@ -338,5 +340,5 @@ function dfrn_notify_content(&$a) { killme(); } - +} } diff --git a/mod/dfrn_poll.php b/mod/dfrn_poll.php index ab6637607e..82c75d28cf 100644 --- a/mod/dfrn_poll.php +++ b/mod/dfrn_poll.php @@ -3,7 +3,7 @@ require_once('include/items.php'); require_once('include/auth.php'); require_once('include/dfrn.php'); - +if(! function_exists('dfrn_poll_init')) { function dfrn_poll_init(&$a) { @@ -160,7 +160,7 @@ function dfrn_poll_init(&$a) { if($final_dfrn_id != $orig_id) { logger('profile_check: ' . $final_dfrn_id . ' != ' . $orig_id, LOGGER_DEBUG); - // did not decode properly - cannot trust this site + // did not decode properly - cannot trust this site xml_status(3, 'Bad decryption'); } @@ -195,11 +195,11 @@ function dfrn_poll_init(&$a) { return; // NOTREACHED } } - +} } - +if(! function_exists('dfrn_poll_post')) { function dfrn_poll_post(&$a) { $dfrn_id = ((x($_POST,'dfrn_id')) ? $_POST['dfrn_id'] : ''); @@ -257,7 +257,7 @@ function dfrn_poll_post(&$a) { if($final_dfrn_id != $orig_id) { logger('profile_check: ' . $final_dfrn_id . ' != ' . $orig_id, LOGGER_DEBUG); - // did not decode properly - cannot trust this site + // did not decode properly - cannot trust this site xml_status(3, 'Bad decryption'); } @@ -377,7 +377,9 @@ function dfrn_poll_post(&$a) { } } +} +if(! function_exists('dfrn_poll_content')) { function dfrn_poll_content(&$a) { $dfrn_id = ((x($_GET,'dfrn_id')) ? $_GET['dfrn_id'] : ''); @@ -562,3 +564,4 @@ function dfrn_poll_content(&$a) { } } } +} diff --git a/mod/directory.php b/mod/directory.php index 294a55585d..7ce1530efc 100644 --- a/mod/directory.php +++ b/mod/directory.php @@ -1,5 +1,5 @@ set_pager_itemspage(60); @@ -16,23 +16,23 @@ function directory_init(&$a) { unset($_SESSION['mobile-theme']); } - +} } - +if(! function_exists('directory_post')) { function directory_post(&$a) { if(x($_POST,'search')) $a->data['search'] = $_POST['search']; } +} - - +if(! function_exists('directory_content')) { function directory_content(&$a) { global $db; require_once("mod/proxy.php"); - if((get_config('system','block_public')) && (! local_user()) && (! remote_user()) || + if((get_config('system','block_public')) && (! local_user()) && (! remote_user()) || (get_config('system','block_local_dir')) && (! local_user()) && (! remote_user())) { notice( t('Public access denied.') . EOL); return; @@ -123,14 +123,14 @@ function directory_content(&$a) { } // if(strlen($rr['dob'])) { // if(($years = age($rr['dob'],$rr['timezone'],'')) != 0) -// $details .= '
    ' . t('Age: ') . $years ; +// $details .= '
    ' . t('Age: ') . $years ; // } // if(strlen($rr['gender'])) // $details .= '
    ' . t('Gender: ') . $rr['gender']; // show if account is a community account - /// @TODO The other page types should be also respected, but first we need a good + /// @TODO The other page types should be also respected, but first we need a good /// translatiion and systemwide consistency for displaying the page type if((intval($rr['page-flags']) == PAGE_COMMUNITY) OR (intval($rr['page-flags']) == PAGE_PRVGROUP)) $community = true; @@ -158,7 +158,7 @@ function directory_content(&$a) { else { $location_e = $location; } - + $photo_menu = array(array(t("View Profile"), zrl($profile_link))); $entry = array( @@ -217,3 +217,4 @@ function directory_content(&$a) { return $o; } +} diff --git a/mod/dirfind.php b/mod/dirfind.php index 0dfe4d67a9..f5e90705b7 100644 --- a/mod/dirfind.php +++ b/mod/dirfind.php @@ -5,6 +5,7 @@ require_once('include/Contact.php'); require_once('include/contact_selectors.php'); require_once('mod/contacts.php'); +if(! function_exists('dirfind_init')) { function dirfind_init(&$a) { if(! local_user()) { @@ -19,9 +20,9 @@ function dirfind_init(&$a) { $a->page['aside'] .= follow_widget(); } +} - - +if(! function_exists('dirfind_content')) { function dirfind_content(&$a, $prefix = "") { $community = false; @@ -235,3 +236,4 @@ function dirfind_content(&$a, $prefix = "") { return $o; } +} diff --git a/mod/display.php b/mod/display.php index 4e33927072..9995a2b3ef 100644 --- a/mod/display.php +++ b/mod/display.php @@ -1,5 +1,5 @@ array('term', t("Save to Folder:"), '', '', $filetags, t('- select -')), '$submit' => t('Save'), )); - + echo $o; } killme(); } +} diff --git a/mod/filerm.php b/mod/filerm.php index c266082c8f..be3456b58d 100644 --- a/mod/filerm.php +++ b/mod/filerm.php @@ -1,5 +1,6 @@ argv[1]=="json"){ $register_policy = Array('REGISTER_CLOSED', 'REGISTER_APPROVE', 'REGISTER_OPEN'); @@ -56,9 +57,9 @@ function friendica_init(&$a) { killme(); } } +} - - +if(! function_exists('friendica_content')) { function friendica_content(&$a) { $o = ''; @@ -70,7 +71,7 @@ function friendica_content(&$a) { $o .= t('This is Friendica, version') . ' ' . FRIENDICA_VERSION . ' '; $o .= t('running at web location') . ' ' . z_root() . '

    '; - $o .= t('Please visit Friendica.com to learn more about the Friendica project.') . '

    '; + $o .= t('Please visit Friendica.com to learn more about the Friendica project.') . '

    '; $o .= t('Bug reports and issues: please visit') . ' ' . ''.t('the bugtracker at github').'

    '; $o .= t('Suggestions, praise, donations, etc. - please email "Info" at Friendica - dot com') . '

    '; @@ -102,8 +103,8 @@ function friendica_content(&$a) { else $o .= '

    ' . t('No installed plugins/addons/apps') . '

    '; - call_hooks('about_hook', $o); + call_hooks('about_hook', $o); return $o; - +} } diff --git a/mod/fsuggest.php b/mod/fsuggest.php index 6b1cbd7533..26a5e98063 100644 --- a/mod/fsuggest.php +++ b/mod/fsuggest.php @@ -1,6 +1,6 @@ '; - $o .= contact_selector('suggest','suggest-select', false, + $o .= contact_selector('suggest','suggest-select', false, array('size' => 4, 'exclude' => $contact_id, 'networks' => 'DFRN_ONLY', 'single' => true)); @@ -109,3 +109,4 @@ function fsuggest_content(&$a) { return $o; } +} diff --git a/mod/group.php b/mod/group.php index 5b28784f56..2f8053eefb 100644 --- a/mod/group.php +++ b/mod/group.php @@ -1,18 +1,21 @@ page['aside'] = group_side('contacts','group','extended',(($a->argc > 1) ? intval($a->argv[1]) : 0)); } } +} - - +if(! function_exists('group_post')) { function group_post(&$a) { if(! local_user()) { @@ -64,7 +67,9 @@ function group_post(&$a) { } return; } +} +if(! function_exists('group_content')) { function group_content(&$a) { $change = false; @@ -229,5 +234,5 @@ function group_content(&$a) { } return replace_macros($tpl, $context); - +} } diff --git a/mod/hcard.php b/mod/hcard.php index 6d2d9e2ebf..af49423de3 100644 --- a/mod/hcard.php +++ b/mod/hcard.php @@ -1,5 +1,6 @@ argc > 2) && ($a->argv[2] === 'view')) { $which = $a->user['nickname']; - $profile = $a->argv[1]; + $profile = $a->argv[1]; } profile_load($a,$which,$profile); @@ -23,7 +24,7 @@ function hcard_init(&$a) { if((x($a->profile,'page-flags')) && ($a->profile['page-flags'] == PAGE_COMMUNITY)) { $a->page['htmlhead'] .= ''; } - if(x($a->profile,'openidserver')) + if(x($a->profile,'openidserver')) $a->page['htmlhead'] .= '' . "\r\n"; if(x($a->profile,'openid')) { $delegate = ((strstr($a->profile['openid'],'://')) ? $a->profile['openid'] : 'http://' . $a->profile['openid']); @@ -42,10 +43,9 @@ function hcard_init(&$a) { $uri = urlencode('acct:' . $a->profile['nickname'] . '@' . $a->get_hostname() . (($a->path) ? '/' . $a->path : '')); $a->page['htmlhead'] .= '' . "\r\n"; header('Link: <' . $a->get_baseurl() . '/xrd/?uri=' . $uri . '>; rel="lrdd"; type="application/xrd+xml"', false); - + $dfrn_pages = array('request', 'confirm', 'notify', 'poll'); foreach($dfrn_pages as $dfrn) $a->page['htmlhead'] .= "get_baseurl()."/dfrn_{$dfrn}/{$which}\" />\r\n"; - } - +} diff --git a/mod/help.php b/mod/help.php index 5465d3e900..320e622fa5 100644 --- a/mod/help.php +++ b/mod/help.php @@ -18,6 +18,7 @@ if (!function_exists('load_doc_file')) { } +if(! function_exists('help_content')) { function help_content(&$a) { nav_set_selected('help'); @@ -98,5 +99,5 @@ function help_content(&$a) { } ".$html; return $html; - +} } diff --git a/mod/hostxrd.php b/mod/hostxrd.php index 4121764f1a..5b178e9b8f 100644 --- a/mod/hostxrd.php +++ b/mod/hostxrd.php @@ -2,6 +2,7 @@ require_once('include/crypto.php'); +if(! function_exists('hostxrd_init')) { function hostxrd_init(&$a) { header('Access-Control-Allow-Origin: *'); header("Content-type: text/xml"); @@ -27,5 +28,5 @@ function hostxrd_init(&$a) { )); session_write_close(); exit(); - +} } diff --git a/mod/ignored.php b/mod/ignored.php index e876b4ef8b..8a681a1154 100644 --- a/mod/ignored.php +++ b/mod/ignored.php @@ -1,6 +1,6 @@ config['system']['theme'] = "../install"; $a->theme['stylesheet'] = $a->get_baseurl()."/view/install/style.css"; - - - + + + global $install_wizard_pass; if (x($_POST,'pass')) $install_wizard_pass = intval($_POST['pass']); - +} } +if(! function_exists('install_post')) { function install_post(&$a) { global $install_wizard_pass, $db; @@ -112,14 +113,18 @@ function install_post(&$a) { break; } } +} +if(! function_exists('get_db_errno')) { function get_db_errno() { if(class_exists('mysqli')) return mysqli_connect_errno(); else return mysql_errno(); } +} +if(! function_exists('install_content')) { function install_content(&$a) { global $install_wizard_pass, $db; @@ -304,6 +309,7 @@ function install_content(&$a) { } } +} /** * checks : array passed to template @@ -312,7 +318,8 @@ function install_content(&$a) { * required : boolean * help : string optional */ -function check_add(&$checks, $title, $status, $required, $help){ +if(! function_exists('check_add')) { +function check_add(&$checks, $title, $status, $required, $help) { $checks[] = array( 'title' => $title, 'status' => $status, @@ -320,7 +327,9 @@ function check_add(&$checks, $title, $status, $required, $help){ 'help' => $help, ); } +} +if(! function_exists('check_php')) { function check_php(&$phpath, &$checks) { $passed = $passed2 = $passed3 = false; if (strlen($phpath)){ @@ -370,9 +379,10 @@ function check_php(&$phpath, &$checks) { check_add($checks, t('PHP register_argc_argv'), $passed3, true, $help); } - +} } +if(! function_exists('check_keys')) { function check_keys(&$checks) { $help = ''; @@ -392,10 +402,10 @@ function check_keys(&$checks) { $help .= t('If running under Windows, please see "http://www.php.net/manual/en/openssl.installation.php".'); } check_add($checks, t('Generate encryption keys'), $res, true, $help); - +} } - +if(! function_exists('check_funcs')) { function check_funcs(&$checks) { $ck_funcs = array(); check_add($ck_funcs, t('libCurl PHP module'), true, true, ""); @@ -457,8 +467,9 @@ function check_funcs(&$checks) { /*if((x($_SESSION,'sysmsg')) && is_array($_SESSION['sysmsg']) && count($_SESSION['sysmsg'])) notice( t('Please see the file "INSTALL.txt".') . EOL);*/ } +} - +if(! function_exists('check_htconfig')) { function check_htconfig(&$checks) { $status = true; $help = ""; @@ -473,9 +484,10 @@ function check_htconfig(&$checks) { } check_add($checks, t('.htconfig.php is writable'), $status, false, $help); - +} } +if(! function_exists('check_smarty3')) { function check_smarty3(&$checks) { $status = true; $help = ""; @@ -489,9 +501,10 @@ function check_smarty3(&$checks) { } check_add($checks, t('view/smarty3 is writable'), $status, true, $help); - +} } +if(! function_exists('check_htaccess')) { function check_htaccess(&$checks) { $a = get_app(); $status = true; @@ -511,7 +524,9 @@ function check_htaccess(&$checks) { // cannot check modrewrite if libcurl is not installed } } +} +if(! function_exists('check_imagik')) { function check_imagik(&$checks) { $imagick = false; $gif = false; @@ -528,16 +543,18 @@ function check_imagik(&$checks) { check_add($checks, t('ImageMagick supports GIF'), $gif, false, ""); } } +} - - +if(! function_exists('manual_config')) { function manual_config(&$a) { $data = htmlentities($a->data['txt'],ENT_COMPAT,'UTF-8'); $o = t('The database configuration file ".htconfig.php" could not be written. Please use the enclosed text to create a configuration file in your web server root.'); $o .= ""; return $o; } +} +if(! function_exists('load_database_rem')) { function load_database_rem($v, $i){ $l = trim($i); if (strlen($l)>1 && ($l[0]=="-" || ($l[0]=="/" && $l[1]=="*"))){ @@ -546,8 +563,9 @@ function load_database_rem($v, $i){ return $v."\n".$i; } } +} - +if(! function_exists('load_database')) { function load_database($db) { require_once("include/dbstructure.php"); @@ -567,7 +585,9 @@ function load_database($db) { return $errors; } +} +if(! function_exists('what_next')) { function what_next() { $a = get_app(); $baseurl = $a->get_baseurl(); @@ -579,5 +599,4 @@ function what_next() { .t("Go to your new Friendica node registration page and register as new user. Remember to use the same email you have entered as administrator email. This will allow you to enter the site admin panel.") ."

    "; } - - +} diff --git a/mod/invite.php b/mod/invite.php index ccf876c7c0..1f559dabc0 100644 --- a/mod/invite.php +++ b/mod/invite.php @@ -9,6 +9,7 @@ require_once('include/email.php'); +if(! function_exists('invite_post')) { function invite_post(&$a) { if(! local_user()) { @@ -49,7 +50,7 @@ function invite_post(&$a) { notice( sprintf( t('%s : Not a valid email address.'), $recip) . EOL); continue; } - + if($invonly && ($x || is_site_admin())) { $code = autoname(8) . srand(1000,9999); $nmessage = str_replace('$invite_code',$code,$message); @@ -70,8 +71,8 @@ function invite_post(&$a) { else $nmessage = $message; - $res = mail($recip, email_header_encode( t('Please join us on Friendica'),'UTF-8'), - $nmessage, + $res = mail($recip, email_header_encode( t('Please join us on Friendica'),'UTF-8'), + $nmessage, "From: " . $a->user['email'] . "\n" . 'Content-type: text/plain; charset=UTF-8' . "\n" . 'Content-transfer-encoding: 8bit' ); @@ -93,8 +94,9 @@ function invite_post(&$a) { notice( sprintf( tt("%d message sent.", "%d messages sent.", $total) , $total) . EOL); return; } +} - +if(! function_exists('invite_content')) { function invite_content(&$a) { if(! local_user()) { @@ -134,7 +136,7 @@ function invite_content(&$a) { '$msg_text' => t('Your message:'), '$default_message' => t('You are cordially invited to join me and other close friends on Friendica - and help us to create a better social web.') . "\r\n" . "\r\n" . $linktxt - . "\r\n" . "\r\n" . (($invonly) ? t('You will need to supply this invitation code: $invite_code') . "\r\n" . "\r\n" : '') .t('Once you have registered, please connect with me via my profile page at:') + . "\r\n" . "\r\n" . (($invonly) ? t('You will need to supply this invitation code: $invite_code') . "\r\n" . "\r\n" : '') .t('Once you have registered, please connect with me via my profile page at:') . "\r\n" . "\r\n" . $a->get_baseurl() . '/profile/' . $a->user['nickname'] . "\r\n" . "\r\n" . t('For more information about the Friendica project and why we feel it is important, please visit http://friendica.com') . "\r\n" . "\r\n" , '$submit' => t('Submit') @@ -142,3 +144,4 @@ function invite_content(&$a) { return $o; } +} diff --git a/mod/item.php b/mod/item.php index 8c5a479646..f8f2e0fafe 100644 --- a/mod/item.php +++ b/mod/item.php @@ -25,6 +25,7 @@ require_once('include/text.php'); require_once('include/items.php'); require_once('include/Scrape.php'); +if(! function_exists('item_post')) { function item_post(&$a) { if((! local_user()) && (! remote_user()) && (! x($_REQUEST,'commenter'))) @@ -1017,7 +1018,9 @@ function item_post(&$a) { item_post_return($a->get_baseurl(), $api_source, $return_path); // NOTREACHED } +} +if(! function_exists('item_post_return')) { function item_post_return($baseurl, $api_source, $return_path) { // figure out how to return, depending on from whence we came @@ -1037,9 +1040,9 @@ function item_post_return($baseurl, $api_source, $return_path) { echo json_encode($json); killme(); } +} - - +if(! function_exists('item_content')) { function item_content(&$a) { if((! local_user()) && (! remote_user())) @@ -1058,6 +1061,7 @@ function item_content(&$a) { } return $o; } +} /** * This function removes the tag $tag from the text $body and replaces it with @@ -1071,6 +1075,7 @@ function item_content(&$a) { * * @return boolean true if replaced, false if not replaced */ +if(! function_exists('handle_tag')) { function handle_tag($a, &$body, &$inform, &$str_tags, $profile_uid, $tag, $network = "") { require_once("include/Scrape.php"); require_once("include/socgraph.php"); @@ -1245,8 +1250,9 @@ function handle_tag($a, &$body, &$inform, &$str_tags, $profile_uid, $tag, $netwo return array('replaced' => $replaced, 'contact' => $r[0]); } +} - +if(! function_exists('store_diaspora_comment_sig')) { function store_diaspora_comment_sig($datarray, $author, $uprvkey, $parent_item, $post_id) { // We won't be able to sign Diaspora comments for authenticated visitors - we don't have their private key @@ -1284,3 +1290,4 @@ function store_diaspora_comment_sig($datarray, $author, $uprvkey, $parent_item, return; } +} diff --git a/mod/like.php b/mod/like.php index 8d383b9abe..ef483a1f9e 100755 --- a/mod/like.php +++ b/mod/like.php @@ -5,6 +5,7 @@ require_once('include/bbcode.php'); require_once('include/items.php'); require_once('include/like.php'); +if(! function_exists('like_content')) { function like_content(&$a) { if(! local_user() && ! remote_user()) { return false; @@ -28,11 +29,11 @@ function like_content(&$a) { killme(); // NOTREACHED // return; // NOTREACHED } - +} // Decide how to return. If we were called with a 'return' argument, // then redirect back to the calling page. If not, just quietly end - +if(! function_exists('like_content_return')) { function like_content_return($baseurl, $return_path) { if($return_path) { @@ -45,4 +46,4 @@ function like_content_return($baseurl, $return_path) { killme(); } - +} diff --git a/mod/localtime.php b/mod/localtime.php index d1453bc527..fc500f4dd9 100644 --- a/mod/localtime.php +++ b/mod/localtime.php @@ -2,7 +2,7 @@ require_once('include/datetime.php'); - +if(! function_exists('localtime_post')) { function localtime_post(&$a) { $t = $_REQUEST['time']; @@ -13,9 +13,10 @@ function localtime_post(&$a) { if($_POST['timezone']) $a->data['mod-localtime'] = datetime_convert('UTC',$_POST['timezone'],$t,$bd_format); - +} } +if(! function_exists('localtime_content')) { function localtime_content(&$a) { $t = $_REQUEST['time']; if(! $t) @@ -38,12 +39,12 @@ function localtime_content(&$a) { $o .= '
    '; - $o .= '

    ' . t('Please select your timezone:') . '

    '; + $o .= '

    ' . t('Please select your timezone:') . '

    '; $o .= select_timezone(($_REQUEST['timezone']) ? $_REQUEST['timezone'] : 'America/Los_Angeles'); $o .= '
    '; return $o; - -} \ No newline at end of file +} +} diff --git a/mod/lockview.php b/mod/lockview.php index 0ae54c8c12..82f93f4985 100644 --- a/mod/lockview.php +++ b/mod/lockview.php @@ -1,8 +1,8 @@ argc > 1) ? $a->argv[1] : 0); if (is_numeric($type)) { $item_id = intval($type); @@ -10,13 +10,13 @@ function lockview_content(&$a) { } else { $item_id = (($a->argc > 2) ? intval($a->argv[2]) : 0); } - + if(! $item_id) killme(); if (!in_array($type, array('item','photo','event'))) killme(); - + $r = q("SELECT * FROM `%s` WHERE `id` = %d LIMIT 1", dbesc($type), intval($item_id) @@ -33,7 +33,7 @@ function lockview_content(&$a) { } - if(($item['private'] == 1) && (! strlen($item['allow_cid'])) && (! strlen($item['allow_gid'])) + if(($item['private'] == 1) && (! strlen($item['allow_cid'])) && (! strlen($item['allow_gid'])) && (! strlen($item['deny_cid'])) && (! strlen($item['deny_gid']))) { echo t('Remote privacy information not available.') . '
    '; @@ -53,7 +53,7 @@ function lockview_content(&$a) { dbesc(implode(', ', $allowed_groups)) ); if(count($r)) - foreach($r as $rr) + foreach($r as $rr) $l[] = '' . $rr['name'] . ''; } if(count($allowed_users)) { @@ -61,7 +61,7 @@ function lockview_content(&$a) { dbesc(implode(', ',$allowed_users)) ); if(count($r)) - foreach($r as $rr) + foreach($r as $rr) $l[] = $rr['name']; } @@ -71,7 +71,7 @@ function lockview_content(&$a) { dbesc(implode(', ', $deny_groups)) ); if(count($r)) - foreach($r as $rr) + foreach($r as $rr) $l[] = '' . $rr['name'] . ''; } if(count($deny_users)) { @@ -79,12 +79,12 @@ function lockview_content(&$a) { dbesc(implode(', ',$deny_users)) ); if(count($r)) - foreach($r as $rr) + foreach($r as $rr) $l[] = '' . $rr['name'] . ''; } echo $o . implode(', ', $l); killme(); - +} } diff --git a/mod/login.php b/mod/login.php index d09fc1868f..47c329eb63 100644 --- a/mod/login.php +++ b/mod/login.php @@ -1,5 +1,5 @@ config['register_policy'] == REGISTER_CLOSED) ? false : true); - +} } diff --git a/mod/lostpass.php b/mod/lostpass.php index 938d1cbb00..0c4bb1a833 100644 --- a/mod/lostpass.php +++ b/mod/lostpass.php @@ -4,6 +4,7 @@ require_once('include/email.php'); require_once('include/enotify.php'); require_once('include/text.php'); +if(! function_exists('lostpass_post')) { function lostpass_post(&$a) { $loginame = notags(trim($_POST['login-name'])); @@ -74,10 +75,10 @@ function lostpass_post(&$a) { 'body' => $body)); goaway(z_root()); - +} } - +if(! function_exists('lostpass_content')) { function lostpass_content(&$a) { @@ -164,5 +165,5 @@ function lostpass_content(&$a) { return $o; } - +} } diff --git a/mod/maintenance.php b/mod/maintenance.php index b50c94c9b9..02de29108f 100644 --- a/mod/maintenance.php +++ b/mod/maintenance.php @@ -1,7 +1,8 @@ t('System down for maintenance') )); } +} diff --git a/mod/manage.php b/mod/manage.php index adcc3d787a..6af3db9971 100644 --- a/mod/manage.php +++ b/mod/manage.php @@ -2,7 +2,7 @@ require_once("include/text.php"); - +if(! function_exists('manage_post')) { function manage_post(&$a) { if(! local_user()) @@ -87,9 +87,9 @@ function manage_post(&$a) { goaway( $a->get_baseurl() . "/profile/" . $a->user['nickname'] ); // NOTREACHED } +} - - +if(! function_exists('manage_content')) { function manage_content(&$a) { if(! local_user()) { @@ -144,5 +144,5 @@ function manage_content(&$a) { )); return $o; - +} } diff --git a/mod/match.php b/mod/match.php index 3b0367b429..f4936b28dc 100644 --- a/mod/match.php +++ b/mod/match.php @@ -13,6 +13,7 @@ require_once('mod/proxy.php'); * @param App &$a * @return void|string */ +if(! function_exists('match_content')) { function match_content(&$a) { $o = ''; @@ -109,3 +110,4 @@ function match_content(&$a) { return $o; } +} diff --git a/mod/message.php b/mod/message.php index 1724ebc424..1f11797d8b 100644 --- a/mod/message.php +++ b/mod/message.php @@ -3,6 +3,7 @@ require_once('include/acl_selectors.php'); require_once('include/message.php'); +if(! function_exists('message_init')) { function message_init(&$a) { $tabs = ''; @@ -36,9 +37,10 @@ function message_init(&$a) { '$baseurl' => $a->get_baseurl(true), '$base' => $base )); - +} } +if(! function_exists('message_post')) { function message_post(&$a) { if(! local_user()) { @@ -91,7 +93,7 @@ function message_post(&$a) { } else goaway($a->get_baseurl(true) . '/' . $_SESSION['return_url']); - +} } // Note: the code in 'item_extract_images' and 'item_redir_and_replace_images' @@ -171,7 +173,7 @@ function item_redir_and_replace_images($body, $images, $cid) { }} - +if(! function_exists('message_content')) { function message_content(&$a) { $o = ''; @@ -530,7 +532,9 @@ function message_content(&$a) { return $o; } } +} +if(! function_exists('get_messages')) { function get_messages($user, $lstart, $lend) { return q("SELECT max(`mail`.`created`) AS `mailcreated`, min(`mail`.`seen`) AS `mailseen`, @@ -541,7 +545,9 @@ function get_messages($user, $lstart, $lend) { intval($user), intval($lstart), intval($lend) ); } +} +if(! function_exists('render_messages')) { function render_messages($msg, $t) { $a = get_app(); @@ -593,3 +599,4 @@ function render_messages($msg, $t) { return $rslt; } +} diff --git a/mod/modexp.php b/mod/modexp.php index bba2c2882d..282d55a24b 100644 --- a/mod/modexp.php +++ b/mod/modexp.php @@ -2,6 +2,7 @@ require_once('library/asn1.php'); +if(! function_exists('modexp_init')) { function modexp_init(&$a) { if($a->argc != 2) @@ -29,6 +30,5 @@ function modexp_init(&$a) { echo 'RSA' . '.' . $m . '.' . $e ; killme(); - } - +} diff --git a/mod/mood.php b/mod/mood.php index eee11e20c5..2476f06562 100644 --- a/mod/mood.php +++ b/mod/mood.php @@ -4,7 +4,7 @@ require_once('include/security.php'); require_once('include/bbcode.php'); require_once('include/items.php'); - +if(! function_exists('mood_init')) { function mood_init(&$a) { if(! local_user()) @@ -59,7 +59,7 @@ function mood_init(&$a) { $uri = item_new_uri($a->get_hostname(),$uid); - $action = sprintf( t('%1$s is currently %2$s'), '[url=' . $poster['url'] . ']' . $poster['name'] . '[/url]' , $verbs[$verb]); + $action = sprintf( t('%1$s is currently %2$s'), '[url=' . $poster['url'] . ']' . $poster['name'] . '[/url]' , $verbs[$verb]); $arr = array(); @@ -105,9 +105,9 @@ function mood_init(&$a) { return; } +} - - +if(! function_exists('mood_content')) { function mood_content(&$a) { if(! local_user()) { @@ -138,5 +138,5 @@ function mood_content(&$a) { )); return $o; - +} } diff --git a/mod/msearch.php b/mod/msearch.php index 89de5b7057..3b1b0b617a 100644 --- a/mod/msearch.php +++ b/mod/msearch.php @@ -1,5 +1,6 @@ $rr['name'], - 'url' => $a->get_baseurl() . '/profile/' . $rr['nickname'], + 'name' => $rr['name'], + 'url' => $a->get_baseurl() . '/profile/' . $rr['nickname'], 'photo' => $a->get_baseurl() . '/photo/avatar/' . $rr['uid'] . '.jpg', 'tags' => str_replace(array(',',' '),array(' ',' '),$rr['pub_keywords']) ); @@ -38,5 +39,5 @@ function msearch_post(&$a) { echo json_encode($output); killme(); - -} \ No newline at end of file +} +} diff --git a/mod/navigation.php b/mod/navigation.php index 5db69b171e..8fbabfda96 100644 --- a/mod/navigation.php +++ b/mod/navigation.php @@ -2,6 +2,7 @@ require_once("include/nav.php"); +if(! function_exists('navigation_content')) { function navigation_content(&$a) { $nav_info = nav_info($a); @@ -22,5 +23,5 @@ function navigation_content(&$a) { '$apps' => $a->apps, '$clear_notifs' => t('Clear notifications') )); - +} } diff --git a/mod/network.php b/mod/network.php index a07c5868ec..9b07384e1b 100644 --- a/mod/network.php +++ b/mod/network.php @@ -1,4 +1,6 @@ page['aside'] .= networks_widget($a->get_baseurl(true) . '/network',(x($_GET, 'nets') ? $_GET['nets'] : '')); $a->page['aside'] .= saved_searches($search); $a->page['aside'] .= fileas_widget($a->get_baseurl(true) . '/network',(x($_GET, 'file') ? $_GET['file'] : '')); - +} } +if(! function_exists('saved_searches')) { function saved_searches($search) { if(! feature_enabled(local_user(),'savedsearch')) @@ -204,7 +207,7 @@ function saved_searches($search) { )); return $o; - +} } /** @@ -222,6 +225,7 @@ function saved_searches($search) { * * @return Array ( $no_active, $comment_active, $postord_active, $conv_active, $new_active, $starred_active, $bookmarked_active, $spam_active ); */ +if(! function_exists('network_query_get_sel_tab')) { function network_query_get_sel_tab($a) { $no_active=''; $starred_active = ''; @@ -278,10 +282,12 @@ function network_query_get_sel_tab($a) { return array($no_active, $all_active, $postord_active, $conv_active, $new_active, $starred_active, $bookmarked_active, $spam_active); } +} /** * Return selected network from query */ +if(! function_exists('network_query_get_sel_net')) { function network_query_get_sel_net() { $network = false; @@ -291,7 +297,9 @@ function network_query_get_sel_net() { return $network; } +} +if(! function_exists('network_query_get_sel_group')) { function network_query_get_sel_group($a) { $group = false; @@ -301,8 +309,9 @@ function network_query_get_sel_group($a) { return $group; } +} - +if(! function_exists('network_content')) { function network_content(&$a, $update = 0) { require_once('include/conversation.php'); @@ -886,4 +895,4 @@ function network_content(&$a, $update = 0) { return $o; } - +} diff --git a/mod/newmember.php b/mod/newmember.php index aa55c3a098..ef25333302 100644 --- a/mod/newmember.php +++ b/mod/newmember.php @@ -1,5 +1,6 @@ '; - $o .= '
  • ' . '' . t('Friendica Walk-Through') . '
    ' . t('On your Quick Start page - find a brief introduction to your profile and network tabs, make some new connections, and find some groups to join.') . '
  • ' . EOL; + $o .= '
  • ' . '' . t('Friendica Walk-Through') . '
    ' . t('On your Quick Start page - find a brief introduction to your profile and network tabs, make some new connections, and find some groups to join.') . '
  • ' . EOL; $o .= ''; @@ -23,7 +24,7 @@ function newmember_content(&$a) { $o .= '